Monday, February 4, 2008

How to Copy Series DVD's into MythVideos

One of the big benefits of Myth is on-demand access to any episode of your favorite shows. I have a few full-series on DVD's and wanted to find the most efficient way to copy them onto my Myth system. The first tool you need is something that can copy the DVD episodes individually to be processed into AVI's. DVD Decrypter fits the bill nicely although there are many tools you can use. The big time saver is a nice little batch file called DVD Decrypter Multiple Feature Ripper. DDMFRip is a simple menu driven process that will allow you to define the basic structure of a DVD through a series of questions and then create multiple subdirectories correctly named for the series you want to copy. You can get a copy and a more in-depth guide here. I made one small change to the ddmfrip.bat file that capitalizes the E for episode in the filename so that a step in the later process of inserting video metadata into MythVideo will work correctly.

Once the DVD's are copied into their individual episodes, it's time to hit them with AutoGK. AutoGK is a simplified version of GordianKnot, a very feature rich utility for conversion. AutoGK dumbs down and simplifies the interface and works great for doing this. Follow step 4 in the in-depth guide above to use AutoGK for the final conversion from DVD VOB/IFO to an AVI. I selected 350MB for my final file size of a 45 minute episode.

Now that you have all of your episodes in avi format, it's time to move them onto your Myth box and into the menu system. I created a directory structure under the main Myth Videos directory of Series NameSeason XSeries Name S0XE01.avi.

I modified a script by Steve Adeff called ragetvgrab-0.5.pl. The original script was supposed to insert video files and their meta-data into the recording table so that series would show up in the recording table. I didn't have a lot of luck and preferred for these to show up in the MythVideo section. Here it is RageTVGrab Script (Video Metadata Edition). Basically you can just run it with the full path to your avi/video file:

./ragetvgrab-videos-0.1.pl -F /storage/videos/Voyager/Season 5/Star Trek Voyager S05E25.avi

This will prompt you with the meta-data collected from the ragetv site to verify accuracy. Hope this works as well for you as it does for me.

If you want to do an entire directory at once, you can use some bash magic:
IFS=$'n' # If your files have spaces or odd characters in the name, set this first
for file in `ls -1 /storage/videos/Voyager/Season 7/`; do /root/ragetvgrab-videos-0.1.pl -i -F /storage/videos/Voyager/Season 7/$file; done

Setting IFS will keep the for from splitting on the spaces. Make sure the paths are correct.

If you end up with odd chars in the title, you can clear them out with a little mysql. Go into mysql and run the following command:
 UPDATE videometadata set `plot` = replace(plot, "รข€™", "'")

How about that "change layout" junk that they are adding now, easily fixed
UPDATE videometadata set `title` = replace(title, ' (<a href='/mytvrage.php?page=my_layout'>Change Layout</a>) ', '') 

No comments:

Post a Comment