Page 1 of 1
Generate thumbnails for video files on Synology NAS
Posted: 10 May 2024, 13:48
by rednoah
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
The following
filebot command uses
-exec to execute
ffmpeg for each video file to generate the missing thumbnail files:
** if the built-in ffmpeg does not work then you may need to use the /var/packages/CodecPack/target/bin/ffmpeg41 binary from the Advanced Media Extensions package
Shell: Select all
filebot -find "/volume1/Media/Movies" --filter 'def i = f.dir / "@eaDir" / f.name / "SYNOVIDEO_VIDEO_SCREENSHOT.jpg"; f.video && !i.exists() && seconds > 0 && (i.dir.exists() || i.dir.mkdirs())' \
-exec ffmpeg -an -ss '{seconds/5}' -i '{f}' -vframes 1 -vf scale=size=hd480:force_original_aspect_ratio=decrease -f mjpeg -y '{folder}/@eaDir/{f.name}/SYNOVIDEO_VIDEO_SCREENSHOT.jpg'

Alternatively, you can use
docker to run
filebot and full-featured
ffmpeg inside a container:
Shell: Select all
sudo docker run --rm -e PUID=0 -e PGID=0 -v 'data:/data' -v "/volume1:/volume1" rednoah/filebot \
-find "/volume1/Media/Movies" --filter 'def i = f.dir / "@eaDir" / f.name / "SYNOVIDEO_VIDEO_SCREENSHOT.jpg"; f.video && !i.exists() && seconds > 0 && (i.dir.exists() || i.dir.mkdirs())' \
-exec ffmpeg -an -ss '{seconds/5}' -i '{f}' -vframes 1 -vf scale=size=hd480:force_original_aspect_ratio=decrease -f mjpeg -y '{folder}/@eaDir/{f.name}/SYNOVIDEO_VIDEO_SCREENSHOT.jpg'

If you are using the DLNA media player of your Smart TV
(e.g. LG webOS TV) then you may need to select
Default Profile in the
Media Server settings to make thumbnails work:
You can use
Task Scheduler to generate
video thumbnails automatically on a schedule:
Shell: Select all
SHARE='/volume1/Media'
docker run --rm -e PUID=0 -e PGID=0 -v 'data:/data' -v "$SHARE:$SHARE" rednoah/filebot \
-find "$SHARE" --filter 'def i = f.dir / "@eaDir" / f.name / "SYNOVIDEO_VIDEO_SCREENSHOT.jpg"; f.video && !i.exists() && seconds > 0 && (i.dir.exists() || i.dir.mkdirs())' \
-exec ffmpeg -an -ss '{seconds/5}' -i '{f}' -vframes 1 -vf scale=size=hd480:force_original_aspect_ratio=decrease -f mjpeg -y '{folder}/@eaDir/{f.name}/SYNOVIDEO_VIDEO_SCREENSHOT.jpg'

You can use
Task Scheduler to generate
HEIC / HEIF photo thumbnails automatically on a schedule:
Shell: Select all
SHARE='/volume1/Media'
docker run --rm -e PUID=0 -e PGID=0 -v 'data:/data' -v "$SHARE:$SHARE" rednoah/filebot \
-find "$SHARE" --filter 'def i = f.dir / "@eaDir" / f.name / "SYNOFILE_THUMB_S.jpg"; ext ==~ /(?i:HEIC|HEIF)/ && !i.exists() && (i.dir.exists() || i.dir.mkdirs())' \
-exec convert -verbose '{f}' -thumbnail '1280x1280>' -write '{folder}/@eaDir/{f.name}/SYNOFILE_THUMB_XL.jpg' -thumbnail '360x360>' -write '{folder}/@eaDir/{f.name}/SYNOFILE_THUMB_M.jpg' -thumbnail '120x120>' '{folder}/@eaDir/{f.name}/SYNOFILE_THUMB_S.jpg'
Fetch the movie / episode poster for each movie / episode file
(see xattr metadata) and save it as
SYNOVIDEO_VIDEO_SCREENSHOT.jpg file:
Shell: Select all
filebot -find "/volume1/Media/Movies" --apply thumbnail
Find and delete
SYNOVIDEO_VIDEO_SCREENSHOT.jpg and
SYNOVIDEO_VIDEO_SCREENSHOT_JPEGTN.jpg files:
Shell: Select all
find "/volume1/Media/Movies" -name 'SYNOVIDEO_VIDEO_SCREENSHOT*.jpg' -print -delete
Re: Generate thumbnails for video files on Synology NAS
Posted: 30 May 2026, 14:41
by iconoclast
I have a Synology NAS DS124. I'm trying to generate video thumbnails for video files taken with my phone. I'm very new to Linux and I"m not super technical.
So far I have installed Filebot and Filebot node through the package center in DSM. I have also installed FFMPEG 7, Java Installer, and JSNode. I see the scripts that have been recommend to be added to facilitate thumbnails but I don't know where or how to put them. Can someone please walk me through the next steps?
Re: Generate thumbnails for video files on Synology NAS
Posted: 30 May 2026, 14:51
by rednoah
iconoclast wrote: 30 May 2026, 14:41
I see the scripts that have been recommend to be added to facilitate thumbnails but I don't know where or how to put them. Can someone please walk me through the next steps?
You can use
Task Scheduler to create and run scripts:


Note that the
Task Scheduler example above relies exclusively on
docker. This means that any dependencies
(other than Container Manager) that you may or may not have installed via
Package Center will not be used and do not matter.
DSM › Control Panel › Task Scheduler is part of Synology DSM. You can create new scheduled tasks via the
Create button. After that you just copy & paste the shell script, adjust it to your needs, and run it. Make sure to send the output to yourself via email
(or by setting an output results folder) so you can see what your script is doing, or not doing if something doesn't work.
Re: Generate thumbnails for video files on Synology NAS
Posted: 31 May 2026, 01:21
by iconoclast
So are you saying that I can run this functionality using task scheduler alone? Did I need to install Filebot, Java Installer, FFMPEG? This is where I get confused. Is Docker the same as Container Manager and do I need to install it?
I guess these are the questions I have. In order to enable video thumbnails in file station,
- What packages do I need to install?
- Can said packages be installed through the DSM Package Center or do they need to be installed through Docker (Container Manager)?
- Once those packages are installed, what script needs to be added and where do I add it?
Thank you for the help.
Re: Generate thumbnails for video files on Synology NAS
Posted: 31 May 2026, 04:01
by rednoah
iconoclast wrote: 31 May 2026, 01:21
So are you saying that I can run this functionality using task scheduler alone?
Yes. Open
Task Manager. Create Task. Paste
Shell Script as shown in the screenshots above. Maybe modify the first line. That's it.


You can click on the screenshots above to make them bigger. That's what you want to see on your screen when you configure the
Task Manager to run our custom script.

You can copy & paste the code from
here:
Shell: Select all
SHARE='/volume1/Media'
docker run --rm -e PUID=0 -e PGID=0 -v 'data:/data' -v "$SHARE:$SHARE" rednoah/filebot \
-find "$SHARE" --filter 'def i = f.dir / "@eaDir" / f.name / "SYNOVIDEO_VIDEO_SCREENSHOT.jpg"; f.video && !i.exists() && seconds > 0 && (i.dir.exists() || i.dir.mkdirs())' \
-exec ffmpeg -an -ss '{seconds/5}' -i '{f}' -vframes 1 -vf scale=size=hd480:force_original_aspect_ratio=decrease -f mjpeg -y '{folder}/@eaDir/{f.name}/SYNOVIDEO_VIDEO_SCREENSHOT.jpg'
docker is indeed part of
Container Manager. That's the only package you need to install via DSM Package Center.
Container Manager is usually already installed, so you usually don't need to open DSM Package Center at all. You don't need to open
Container Manager either. It just needs to be installed for the
docker command to work.

If you continue to have trouble, make sure to
screenshots of what you have so far / or where you're stuck, so that we can see what you can see.
Re: Generate thumbnails for video files on Synology NAS
Posted: 01 Jun 2026, 01:16
by iconoclast
Thank you for taking the time to assist me. Your responses make sense and are helpful. I would like to ask though because I'm a little confused. I've read other places that I"m supposed to install FileBot, Java Installer, FFMPEG, JSnode. Is this not the case? Those packages are not needed to create video thumbnails?
Re: Generate thumbnails for video files on Synology NAS
Posted: 01 Jun 2026, 02:23
by rednoah
iconoclast wrote: 01 Jun 2026, 01:16
Thank you for taking the time to assist me. Your responses make sense and are helpful. I would like to ask though because I'm a little confused. I've read other places that I"m supposed to install FileBot, Java Installer, FFMPEG, JSnode. Is this not the case? Those packages are not needed to create video thumbnails?
No, you don't to need install any packages via DSM Package manager
(other than Container Manager) so you really really just need to follow the instructions as shown in the screenshots above. If you are stuck, show us
screenshots of where you are stuck.
Re: Generate thumbnails for video files on Synology NAS
Posted: 03 Jun 2026, 22:48
by iconoclast
I have a question regarding this text SHARE='/volume1/Media', is the 'Media' the name of the folder I want to create the thumbnails for? If that is the folder name, what if I want to create thumbnails in multiple folders or all folders? Thank you.
Re: Generate thumbnails for video files on Synology NAS
Posted: 04 Jun 2026, 04:03
by rednoah
SHARE='/volume1/Media' indeed refers to the input file path. You can use
Right-Click ➔ Properties in
File Station and then copy & paste the file path of the selected folder from the
Location text field.

If you want to generate thumbnails for multiple shares then you can simply repeat the instructions and create 1 scheduled task per 1 shared folder.
Re: Generate thumbnails for video files on Synology NAS
Posted: 06 Jun 2026, 02:46
by iconoclast
It actually worked! I can't believe it was that simple. You made it very understandable. Thank you.
Re: Generate thumbnails for video files on Synology NAS
Posted: 07 Jun 2026, 05:42
by rednoah
iconoclast wrote: 06 Jun 2026, 02:46
It actually worked! I can't believe it was that simple.
Spread the word! Feel free to help others and write a tutorial in your own words.