How to Let a User add a Video not a image as a post?

36 views
Skip to first unread message

djangorobert

unread,
Sep 1, 2016, 10:53:20 AM9/1/16
to Django users
I have researched this issue with django for years now and seems that no body in the django community knows how to do this which is a suprise because there are many smart people but not one has been able to solve this mystery?


What i'm aiming for is to let a user upload a vido format 

and then in the template display there posts 

does anyone know how to put it in html5 but along with django in the view.py ?


thanks any help or code would be appreciated 

Mike Dewhirst

unread,
Sep 1, 2016, 6:24:47 PM9/1/16
to django...@googlegroups.com
On 2/09/2016 12:53 AM, djangorobert wrote:
> I have researched this issue with django for years now and seems that
> no body in the django community knows how to do this which is a
> suprise because there are many smart people but not one has been able
> to solve this mystery?
>
>
> What i'm aiming for is to let a user upload a vido formatÂ
>
> and then in the template display there postsÂ

http://pyvideo.org/pycon-au-2016/the-dangerous-exquisite-art-of-safely-handing-user-uploaded-files.html

>
> does anyone know how to put it in html5 but along with django in the
> view.py ?
>
>
> thanks any help or code would be appreciatedÂ
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e5004b13-722d-4565-8c7f-dcc9297a9c6c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e5004b13-722d-4565-8c7f-dcc9297a9c6c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

ludovic coues

unread,
Sep 2, 2016, 5:39:54 AM9/2/16
to django...@googlegroups.com
First part of your problem is to get user submitted file and send the
file back. Mike link might help you with that, I haven't checked.

The second part is to show to the user an html video they can play.
Last time I checkd, It was browser specific. Some only handle open
codec like webm, other only proprietary codec pushed by adobe.

As long as there is no codec supported by every browser, you need to
convert the video uploaded by the user multiple time, to get versions
covering all the browser you want to support. Then you display the
right video to each browser.

The problem of choosing the right format for the right browser isn't
django specific and have been covered numerous time. For handling
video conversion, I would suggest an asynchronous solution. Doing it
in the view handling post request would do a really bad user
experience. I suggest celery for this task.

So recap.
You need to:
- get file from your user and send kind of static file to user
- convert video out of a request
- set up a <video> element to request the right movie
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e5004b13-722d-4565-8c7f-dcc9297a9c6c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

Sylvain GROS-DESORMEAUX

unread,
Sep 4, 2016, 10:58:13 AM9/4/16
to django...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages