2

I'm using Django and html5 to display videos on a webpage however with more videos, it will take forever to load with all (or a lot) on one page. So when a user uploads a video how can I automatically generate a thumbnail for the video, or better yet let the user decide the thumbnail (by scrolling through frames).

I've had a look at this question/answer but I can't see how when the thumbnail is generated it will add it to the video model, and where this functionality would go in the Django app (the form, view or another file all together).

Community
  • 1
  • 1
Kyle
  • 303
  • 8
  • 21

1 Answers1

0

I'm not sure how good (in terms of load times etc.) this way to do this is but I've found a neat way to get the same 'thumbnail effect'.

By removing the controls attribute from the <video> tag - and ensuring there is no autoplay attribute - the user can not play the video, and it shows up as just an image of the first frame.

Kyle
  • 303
  • 8
  • 21