seafile icon indicating copy to clipboard operation
seafile copied to clipboard

Video thumbnail feature broken

Open mumpitzstuff opened this issue 7 years ago • 5 comments

New moviepy versions can not be used for video thumbnails. The latest working version is 0.2.3.4. 0.2.3.5 will produce a lot of error entries in seahub.log.

2019-03-07 23:26:30,627 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /thumbnail/c6072f86-aa46-4$Traceback (most recent call last):

mumpitzstuff avatar Mar 09 '19 23:03 mumpitzstuff

I modified /seahub/seahub/thumbnails/utils.py (seafile 6.3.4) and removed the whole moviepy dependency. moviepy seems to be full of bugs. I just replaced a few lines of code to call ffmpeg directly as subprocess. The video thumbnail feature works like a charm now!

Please add something similar to your official release.

utils.zip

mumpitzstuff avatar Mar 25 '19 11:03 mumpitzstuff

The following default value should be set to 1 because sometimes videos are shorter than 5s (seahub tries to recreate the thumbnail every time you reload the page, but always get an error):

# Use the frame at 5 second as thumbnail
THUMBNAIL_VIDEO_FRAME_TIME = 5

The user can set it to 5 or any other value if needed. Or just extract the very first frame from the video as default. This should work for all types of videos.

mumpitzstuff avatar Mar 25 '19 12:03 mumpitzstuff

@mumpitzstuff can you submit a pr for this? I don't understand the dependency on moviepy.

jonatino avatar Oct 01 '20 08:10 jonatino

Isn't video thumbnail deprecated as of 7.1? ctrl+f for ENABLE_VIDEO_THUMBNAIL in seafile-manual

laur89 avatar Oct 16 '20 17:10 laur89