UPDATE: If you’re on a Mac I suggest you use this python script instead.

The Synology Diskstation(DS) devices have a Photo Station application that creates a web based album of folders in your /photos folder.

The DS creates thumbnails for these photos when they are uploaded to the NAS. Unfortunately these devices are using slow low power processors so converting the photos takes some time. Each photo has 5 thumbnails of different sizes, and videos have various conversions applied to them.

What this script does is allow you to use the power of your workstation to do the processing for you.

Requires ImageMagick and ffmpeg, both free and opensource.

As of version 1.0 this now supports videos!

The script can be downloaded from the github page here or you can get a copy via svn:
svn checkout https://github.com/phillips321/synothumbs synothumbs
Simply browse to the directory you want to process and run the command like so, photos with thumbnails already created will be skipped:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
phillips321@KubuntuDesktop:~$ synoThumbs.sh test
###########################################################################################################
 Welcome to synoThumb.sh version 1.0
 This script creates the thumbs for a synology
##########################################################
Searching Thumbs For test/IMG_1792.JPG
   -- SYNOPHOTO:THUMB_XL.jpg thumbnail created
   -- SYNOPHOTO:THUMB_L.jpg thumbnail created
   -- SYNOPHOTO:THUMB_B.jpg thumbnail created
   -- SYNOPHOTO:THUMB_M.jpg thumbnail created
   -- SYNOPHOTO:THUMB_S.jpg thumbnail created
Searching Thumbs For test/P3260456.JPG
   -- SYNOPHOTO:THUMB_XL.jpg thumbnail created
   -- SYNOPHOTO:THUMB_L.jpg thumbnail created
   -- SYNOPHOTO:THUMB_B.jpg thumbnail created
   -- SYNOPHOTO:THUMB_M.jpg thumbnail created
   -- SYNOPHOTO:THUMB_S.jpg thumbnail created
Searching video conversions for test/IMG_1812.MOV
   -- processing IMG_1812.MOV
   -- IMG_1812.MOV flv created
   -- processing IMG_1812.MOV
   -- IMG_1812.MOV h264 created
Searching Thumbs For test/IMG_1812.MOV
   -- SYNOPHOTO:THUMB_XL.jpg thumbnail created
   -- SYNOPHOTO:THUMB_L.jpg thumbnail created
   -- SYNOPHOTO:THUMB_B.jpg thumbnail created
   -- SYNOPHOTO:THUMB_M.jpg thumbnail created
   -- SYNOPHOTO:THUMB_S.jpg thumbnail created
Searching video conversions for test/P3260441.AVI
   -- processing P3260441.AVI
   -- P3260441.AVI mp4 created
   -- processing P3260441.AVI
   -- P3260441.AVI mobile mp4 created
Searching Thumbs For test/P3260441.AVI
   -- SYNOPHOTO:THUMB_XL.jpg thumbnail created
   -- SYNOPHOTO:THUMB_L.jpg thumbnail created
   -- SYNOPHOTO:THUMB_B.jpg thumbnail created
   -- SYNOPHOTO:THUMB_M.jpg thumbnail created
   -- SYNOPHOTO:THUMB_S.jpg thumbnail created
##########################################################
 Now log into DSM and reindex your photos
 (Control Panel --> Media Indexing Service --> Re-index)
##########################################################
phillips321@KubuntuDesktop:~$

Leave a Reply