Advertisement

How to import HD movies into Windows Media Center


The upgraded Movie Library in Windows 7 Media Center is very appreciated, but while it's better than Vista, it still doesn't do everything we want. Our main point of contention is that although it is possible to play more file types, it still isn't possible to fast forward or rewind them (you can skip forward, back, and resume though). The other issue is that connecting the HTPC directly to a HDTV is for the birds, and codec support on Extenders is very limited. The good news is that with a little help from our favorite Media Center utility and our new best friend, we've devised a very easy way to convert just about any HD movie to DVR-MS (Media Center's native format). This is pretty easy to setup, lets you have full trick play capability on extenders, and the results are good enough to please even our discerning eye.


Disclaimer
This is in no way meant to encourage you to pirate content. While we believe it is perfectly acceptable to store copies of movies you bought on your computer, we are not lawyers and do not believe it is okay to download things off the internet that you didn't pay for. So use your better judgment and do what is right. And whatever you do, don't say we didn't warn you.

Overview
This is a simple process that accepts various video files, analyzes the codecs in the container, converts the streams to MPEG-2 video with AC3 audio and wraps it all up into a dvr-ms file. We're leveraging the Movie Library in Media Center to view and pull metadata, but we're also using a utility to help it along. The utility is called Yet Another Media Meta Manager (Yammm) and it simply takes the file name and downloads the folder.jpg and dvdid.xml file needed by Media Center to make it download the rest of the metadata. If you use a different program like Media Browser to play the content, we created a slimmed down DVRMSToolBox profile that only does the conversion called Convert avi or mkv to DVR-MS.

What you need
Besides Windows 7, you really only need two downloads to do this. The first is the latest version of DVRMSToolBox and the second is YAMMM.

Download - DVRMSToolBox 1.2.1.8

Download - YAMMM

Getting things setup
Once you've run the installers, which consists of a little next, next, next; start by configuring Yammm (you can skip the YAMMM config if you don't want metadata) by setting the path it should watch for new movies. This is where your movies are stored and should have a full path of something like this.

D:\DVD\The Hunt For Red October\The.Hunt.For.Red.October.dvr-ms

In this example, you'd set Yammm to watch D:\DVD\ like in the image below. This is the same directory that you need to add to Media Center to watch for Movies via Settings>Media Library>Movies menu options.



The last thing you have to configure in Yammm is where you want the metadata cached. We want it on our main user account and all of our extenders, so our Metadata tab looks like this.



The latest version of DVRMSToolBox is pretty much ready to go out of the box, but if you are using Movie Library, you need to edit the MoviePath in the profile. So start by launching DVRMSToolboxSettings and find the Convert MKV to DVR-MS and put in Movie Folder profile, select it and hit and edit profile button at the bottom. (if you aren't using Movie Library, then use the profile called Convert avi or mkv to DVR-MS instead, which doesn't require editing).



Now select the first step and hit Configure. Change the 'Replace Regex' box with your movie path, be sure to have it end with '\$1\' so something like 'D:\DVD\$1\' or '\\whs1\DVD\$1\' (UNC paths work here).



Again, this should be the same path as you are watching with Yammm and Media Center. Before you exit and save, you can add your own steps if you want, say if you wanted to delete the source file or move it to another directory for archiving, or something.

After you hit ok, save, save; launch DVRMSToolBoxGUI.
Before you select your file though, you must rename it; this is so Yammm knows which movie it is. So if your file name is The.Hunt.For.Red.October.1990.720p.BluRay.DTS.x264.mkv you need to change it to The.Hunt.For.Red.October.mkv
Now in the DTB GUI, double click on the input file box and navigate to your file (UNC paths are not supported here, so if the file is on the network, you need to map a drive).
Copy and paste the contents of the input file box to the output file box (this is required, although ignored).
From the drop down profile box select Convert MKV to DVR-MS and put in Movie Folder .


If you have plenty of movies to convert, you might wan to hit Queue with Filewatcher to queue them up automatically (logs are wrote to C:\Users\Public\DvrmsToolbox\FWLogs by default) otherwise hit the Run button and the log will display below.


There is no status bar or anything and buffer errors can be ignored, but in about the same amount of time as it'll take you to watch the movie, your movie will pop up in Movie Library complete with box art.

Subtitles
If you need/want subtitles, the process will accept SRT or SSA files and hardsub them in -- they can never be turned off. There are a number of ways to acquire a subtitle file; you can rip it from a DVD with SubRip, you can download it, you can even watch the movie and create one with a text editor. This goes for all types of subtitles including regular and forced subtitles (for non-english parts of english movies, think The Hunt for Red October). Simply rename the SRT file to the same as your source file and put it in the same directory. The process will see it and hardsub it in. So in our example, our SRT file would be The.Hunt.For.Red.October.srt.

If you have an MKV file that already contains subtitles that you want to hardsub, you have to extract the SSA file first. So use mkvinfo to determine which track contains the desired subtitles, and then use mkvextract to extract the stream. Here is an example.

"C:\Program Files\MKVtoolnix\mkvextract" tracks The.Hunt.For.Red.October.mkv -c ISO8859-1 3:The.Hunt.For.Red.October.srt

Although this track is a SSA stream, we still name it SRT because that it what the process looks for. In the future there might be an option to hardsub a stream from the source file.

When things go wrong and ripped DVDs
This process doesn't accept every codec known to mankind and in fact was only really tested with avi and mkv files that contain XviD, H.264, MP3, AC3, and DTS codecs. For example, it won't work on VOBs ripped from DVDs. If you want to convert your DVDs, you're best bet is to use VideoReDo TV Suit, but if you want something free, then you can find a VOB to MPEG2 profile for DVRMSToolbox online, but it requires you to rip your DVD to a single VOB.

MencoderProper, where the real magic happens
We'll be honest, we've been working on this since before we posted our How to import HD into Media Center post, but just couldn't come up with a workable solution until recently. The reason was because unlike TV shows, HD moves come in many shapes and sizes. Between the various aspect ratios and audio codecs, we just couldn't obtain the desired results. That was until we discovered the My Network Project blog -- thanks to a podcast listener. We realized that the author, Andres Echevarria, was trying to solve the same problem we were, but the difference was he was taking a programmatical approach. Now we're not exactly sure how his application MencoderProper works, but what we know is that it does and with great results. The 100 foot view is that it analyzes the source file and generates the mencoder arguments on the fly. The results are high quality transcodes that come out perfect every time. The most amazing part to us is its ability to detect and transcode DTS to AC3 and hardsub subtitles at the same time. It really is great, and we owe a really big thanks to Andres for all of his hard work. Thanks!

DVRMSToolbox still rocks!
Yes, it really is the swiss army knife of video tools for PC based DVR software and that's why it the first thing we install when we setup a Media Center. Besides the ability to leverage Show Analyzer to automatically skip commericals, DTB is so open that you can pretty much make it to anything you want. We really appreciate all of Andy's hard work on the project and still can't believe he answers our email when we hit him up with yet another harebrained idea that we want his help on. Thank Andy!