Re: Upload video with automatically created thumbnail in Django 2

615 views
Skip to first unread message

Pravin Yadav

unread,
Jun 5, 2018, 8:26:22 AM6/5/18
to Django users

I want to upload .mp4 and .mov videos in my django website with automatic thumbnail generation. Thumbnails should be created in .jpg or .png that will be saved in ImageField and also video in FileField.

I'm using Python 3.6.1 and Django 2.0.

Please advise me how to create a video similar to youtube.

Is there any opensource modules/plugins available for this this ?

Kindly, Help me.


Thanks,


Pravin Yadav



screenshot_from.png

HaatBhaar Developer

unread,
Jun 5, 2018, 9:24:15 AM6/5/18
to django...@googlegroups.com
Hello dude,
I wish I could solved your problem. But right now I don't have that idea. Hope fully I will find that for you and will give the solution.
May your next problem I can solve.

--
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.
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/1713df71-5a64-48dd-9951-e65bf8367cd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Hello,

Thanks and Warm Regards
---------------------------------------------------
HaatBhaar Team | +91-906-708-0040
--------------------------------------------------
Sabka HaatBhaar, Sabka Udhaar!

Pravin Yadav

unread,
Jun 6, 2018, 5:34:03 AM6/6/18
to Django users
Hi Sir,

is it possible to create only one thumbs image. If any one know kindly help me. I'm not getting any solutions. Plz help...........................................


Thanks,
Pravin Yadav


On Tuesday, June 5, 2018 at 6:54:15 PM UTC+5:30, HaatBhaar Developer wrote:
Hello dude,
I wish I could solved your problem. But right now I don't have that idea. Hope fully I will find that for you and will give the solution.
May your next problem I can solve.
On 5 June 2018 at 17:40, Pravin Yadav <pk.j...@gmail.com> wrote:

I want to upload .mp4 and .mov videos in my django website with automatic thumbnail generation. Thumbnails should be created in .jpg or .png that will be saved in ImageField and also video in FileField.

I'm using Python 3.6.1 and Django 2.0.

Please advise me how to create a video similar to youtube.

Is there any opensource modules/plugins available for this this ?

Kindly, Help me.


Thanks,


Pravin Yadav



--
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.

Daniel Germano Travieso

unread,
Jun 6, 2018, 8:45:30 AM6/6/18
to django...@googlegroups.com
Hello!

This type of video rendering and processing should be done by a python module that can handle this workload.

For example, you can use OpenCV, a C++ computer vision module that has a python hooks version, so you can upload your video via django the usual way an use the OpenCV to process the video and extract a frame for the thumbnail (a function like cv2.VideoCapture) on the view that handles the upload.

Please beware of a possible overhead on your server's processing power as video rendering tools are always CPU bound.

Hope it helps. 

Julio Biason

unread,
Jun 6, 2018, 8:50:45 AM6/6/18
to django...@googlegroups.com
Hello,

Another solution is to use `ffmpeg`. There is an option to extract (even multiple) screencaps from a video (sorry, can't remember the proper option for this).

And, as Daniel pointed, this is very heavy operation, so either you'll need a heck of a server (with plenty CPU and fast disks) OR use something to process things asynchronously, like Celery.

To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@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.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101  |  Mobile: +55 51 99907 0554
Reply all
Reply to author
Forward
0 new messages