Closed lifenautjoe closed 4 years ago
Hi,
there is some support for generating thumbnails, it's just lacking some documentation. You could simply add another task which will extract thumbnails with the provided backend. Something like the following should do the trick:
video = Video.objects.get(pk=3) # assuming Video.file is a `VideoField`
encoding_backend = get_backend()
thumbnail_path = encoding_backend.get_thumbnail(video.file.path)
# you could now store the thumbnails on the model as well.
See here for more information.
Hi Alex,
Thanks for the reply.
I found the method in the code, however was breaking my head for about an hour figuring it out why it wouldn't work...
I just noticed get_thumbnail
doesn't return a File
handle but a string path 🙃.
Thanks for the reply and yeah, would be great to have this in the docs!
Hi Alex,
Is there any way to have the library generate a video thumbnail or is this outside the scope of the package?
Cheers!