One of the annoying things with Synology NAS servers is the fact that a video file moved to the filesystem does not automatically appear on the DNLA share on client devices. It needs a re-index of the media files.

You can log into the HTML Admin Console and start a re-index, however this will be a full re-index and most likely take ages to complete. A quicker way is to connect to the SSH Console and issue the following command:

synoindex -R video

This will only re-index video files. This can also be used for photos and other media types.

As per documentation here are the other command options.
synoindex -R {all|photo|music|video|thumb} )

Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

This Post Has 8 Comments

  1. Synology Newbie

    Thanks for this solution. It was driving me crazy (having to reindex after every new set of files was added to the server).

    Having purchased a Synology NAS quite recently I find myself regularly moving music I’ve ripped over to it via my PC so I needed a way to speed up the ridiculous indexing process. The solution you provided works just great. I downloaded Putty and used SSH to reindex using synoindex -R music and the music appeared in the list of available files on all my DLNA hi-fi players very quickly. The music amounts to around 200GB so it seems a lot quicker. I suspect it’s because it doesn’t have to process the photos folder over again as that takes forever. Thanks for posting this.

  2. BobD

    I don’t understand why they didn’t put this command into the crontab at least, so that it can be updated nightly automatically. In any case, easy enough to do that yourself by editing /etc/crontab.

  3. JP

    Hi. Thanks for sharing this very nice tip.
    After take a look at this command I also find this useful option to reindex only a specific directory:
    synoindex -R dirpath

  4. joost

    You can also use this by creating a .sh file with the ash console command and let the synology task scheduler run the .sh so it will run automatically at the by you given time.

  5. Richard Lewis

    Excellent fix. I used PuTTY via SSH to re-index my video files in minutes! Thanks Leo.

  6. Matt

    Thank you! This was driving me nuts. I wanted to write a script to automatically copy my photos to the NAS but was worried that they wouldn’t show up in DNLA devices like my TV since previous attempts at just moving files around with ssh/scp seemed to be ignored by my TV. Figured it was some kind of caching or permissions problem but it was actually just a db that comes with its own indexing script…which makes it pretty easy.

  7. Andy

    I’m logged into PuTTY, but can’t get this to work. Is is as simple as typing synoindex -R video or do I need to type any other commands before this stage? Also, what’s an example of the full command to type to carry this out on just one folder or directory pathway? I.e synoindex -R \\DiskstationName\homes\Andy\video\Home Videos\ How to I identify and type the parthway? Do I surround it with ” ” or similar?


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.