I've been investigating different ways to convert ATSC HD dvr-ms files to other more efficient formats (MP4) for a few weeks. The trick, and also the hard part, has been figuring out how to preserve the the surround sound; getting high quality video into a file isn't nearly as difficult.
One of the formats capable of meeting my requirements is WMVHD. It's not that different from standard WMV, just higher bit-rates and resolution on the video side, and WMA Pro 5.1 instead of standard WMA for audio. The problem is that the standard ASF Writer filter (used by most WMV converters, including DVR2WMV) doesn't seem to be capable of connecting to an AC3 audio source filter in DirectShow, even when a conversion profile specifies WMA Pro as the audio codec. I'd love to get this working btw, as it would dramatically simplify the solution, so if anyone knows how to make this work please let me know.
So instead of using DirectShow for the WMV conversion we going to use the Windows Media Encoder (WMEncoder). This isn't a terrible solution, but because it doesn't support dvr-ms files (or at least I couldn't get it to work) the dvr-ms file needs to be "converted" to the mpeg format before this will work.
Things you will need before starting:
- WMEncoder
- Vista users will want to install this hotfix
- AC3Filter (I used 1.46 for this, other revs may work)
- AVIVO (there are other ways to convert to MPG, but this one works really well)
- GraphEdit (optional)
The only thing that's tricky to install is the AVIVO codecs. Unless you want the full application (if you're using non-ATI hw you don't have a choice); after launching the installer and letting it extract the files just cancel out and browse to the ATI folder that should have been created on your system drive. Drill into the folder until you get to SUPPORT\7-9_vista_xcode_52447\Packages\Apps\AVIVO and execute AVIVO.msi. It will install the filters you will need.
First thing that needs to happen is to configure AC3Filter to transform the AC3 audio into 6 channel PCM, so WMEncoder can read the audio and convert it to WMA Pro. Open up AC3Filter Config, on the main tab select 3/2+SW 5.1 channels from the "Output format" drop down, then click "OK" to save.
Next step is to create a filter graph stub. Open up GraphEdit and add the "ATI MPEG File Writer" and "ATI MPEG Multiplexer" filters to the graph.
Configure the "ATI MPEG Multiplexer" mode to "HD MPEG-2", click OK
Your graph should look like this. Save the file, doesn't really matter what you name it. I named mine "avivo_mux.grf"; for those who want to skip this step or can't find GraphEdit, I've included the grf file.
At this point you can either use GraphEdit to "convert" the file or DTB (using the ConvertWithGraph action). I'm going to use GraphEdit for this but there's not reason you can't automate the process completely using DTB today (it will be significantly easier with the next rev of 1.2.0.9 as an that deals with WMEncoder directly will be included).
From the File menu select "Render Media File" and select the ATSC file that you'd like to convert. You may get an error message when you open the file. Just ignore it, we're not going to try to save the closed captions right now.
The resulting graph should look something like this.
Click play, wait a few minutes for the mpeg to generate. This should be pretty quick, so don't wander far. When it's done, don't save the new graph when you exit. You can reuse the graph stub file created anytime you need to repeat this process.
Next open up WMEncoder, select "Convert a File" from the wizard dialog.
Set the source and output files. The source file is the mpg you just created.
Select File Archive.
Click "Finish"
Go to the session properties and select the "Compression" tab, if the properties aren't displayed select View : Properties Panel from the menu bar.

Click the "Edit" button
Then "Import" the WMVHD.prx file.

Click "OK" to close the dialog. Then click "Apply" (on the properties window). and "Start Encoding". Encoding the file will take a long time. Depending on the profile used, and the speed of your computer.
After you're done you can migrate the metadata from the original DVR-MS file using DTB.
So now the next question is how to automate that process. While you can do it today with 1.2.0.8 (or 1.1.0.6) using the convertwithgraph and runexternal, it's not a great solution. The bat/cmd file that would run to invoke WMEncoder would have to create an WME file that contained all of the settings we selected in the WMEncoder GUI. Because of this a new action that interacts directly with WMEncoder will be included in the next rev of 1.2.0.9 (it's not available yet), that will work just like the wmv conversion actions. When I finish that up, I'll publish a profile that encapsulates this process making it really simple for everyone.