Media Indexing and video files
Media Indexing generates thumbnails for image files but does not generate thumbnails for video files (1, 2, 3) for some reason.File Station, DS File, Media Server and friends therefore cannot display thumbnails for video files:
Video Station does however generate thumbnails and those thumbnails are then available to File Station, DS File, Media Server and friends, even if the Video Station package is no longer installed. Looks like Video Station is simply using ffmpeg to generate a SYNOVIDEO_VIDEO_SCREENSHOT.jpg file in the @eaDir folder for each video file:
Console Output: Select all
$ while true; do ps -aefyl | grep ffmpeg | grep -v grep; sleep 0.1; done
/var/packages/CodecPack/target/bin/ffmpeg41 -timelimit 20 -an -ss 300 -i '/volume1/Media/Movies/The Man from Earth (2007).mkv' -vframes 1 -vf scale=size=hd480:force_original_aspect_ratio=decrease -f mjpeg -y '/volume1/Media/Movies/@eaDir/The Man from Earth (2007).mkv/SYNOVIDEO_TEMP.jpg'
$ find @eaDir
@eaDir/The Man from Earth (2007).mkv
@eaDir/The Man from Earth (2007).mkv/SYNOINDEX_MEDIA_INFO
@eaDir/The Man from Earth (2007).mkv/SYNOVIDEO_VIDEO_SCREENSHOT.jpg
Generate thumbnails for video files
The following filebot command uses -exec to execute ffmpeg for each video file to generate the missing thumbnail files:Shell: Select all
filebot -find /path/to/input --filter 'def i = f.dir / "@eaDir" / f.name / "SYNOVIDEO_VIDEO_SCREENSHOT.jpg"; f.video && i.dir.exists() && !i.exists()' \
-exec ffmpeg -timelimit 20 -an -ss 300 -i '{f}' -vframes 1 -vf scale=size=hd480:force_original_aspect_ratio=decrease -f mjpeg -y '{folder}/@eaDir/{f.name}/SYNOVIDEO_VIDEO_SCREENSHOT.jpg'
Generate thumbnails from movie posters
Fetch the movie poster for each movie file (see xattr metadata) and save it as SYNOVIDEO_VIDEO_SCREENSHOT.jpg file:Shell: Select all
filebot -r /path/to/input --filter 'movie' -script g:'args.each{ f -> def i = f.dir / "@eaDir" / f.name / "SYNOVIDEO_VIDEO_SCREENSHOT.jpg"; if (i.dir.exists() && !i.exists()) println f.metadata.info.poster.saveAs(i) }'
Delete thumbnails for video files
Find and delete SYNOVIDEO_VIDEO_SCREENSHOT.jpg files:Shell: Select all
find /path/to/input -name SYNOVIDEO_VIDEO_SCREENSHOT.jpg -print -delete