Tuesday, January 9, 2007

Script to create playlists of VOB files

We have a D-Link DSM-320 media player and we use TVersity as its media server. We use it mainly to watch movies across our network. One thing we can do is watch the original VOB files ripped from a DVD, but the problem is there are multiple VOB files for a movie and after each one ends, the next one has to be manually started. (You can merge to VOBs into one, but the DSM-320 has a 4GB file limit.) One solution is to create a playlist for each movie, containing all movie's VOB files.

I wrote this Perl script to do just that. (It is similar to the script I wrote to auto-generate music playlists.) It traverses a directory and creates playlists for all subdirectories containing VOB files.

Just set $path (source) and $dest (playlist directory) in the script and then run it. It assumes the folder containing the VOBs will be named after the movie and it uses that folder name as the playlist name.


  1. This could be the perfect solution to my problem. I've given up trying to stream to the DSM-320 and instead bought the D-Link DSMG600 (Wireless Network Storage) and hardwired it to the DSM-320 - so I can do my conversions on the PC (in a different room), send the resulting files to the DSMG600, and stream to the TV via the DSM-320. I'm experimenting with different video codecs (like everybody else!) but vob files are by far the best quality, and seem to be most dependable, if only they would play in the correct order. Now all I need to know is how to run the script you suggested - save in a txt file and rename as .vbf? The DSM6600 has a built in server so I'm hoping it will recognize a playlist....thanks for any assistance

  2. You'll need to save it as tversity_playlist.pl since it's a Perl script. Go to http://www.activestate.com to get a copy of Perl if you don't already have it. Then edit the script as mentioned in the post and type 'perl tversity_playlist.pl' at the command prompt.