Just another weblog

Archive for the ‘DVRMSToolbox’ Category

Converting SageTV recordings to Zune/iPod/iPhone, version 2.0

Posted by onlydarksets on January 2, 2009

I posted a method for converting SageTV files to iPod/iPhone compliant files a while back, but a number of the files weren’t converting properly.  I also had problems with mencoder cutting commercials out of the files.  So, I retooled the approach, and I am now getting 100% success, using the approach outlined below.

Read the rest of this entry »

Posted in DVRMSToolbox, HowTo, iPhone, SageTV, Windows Mobile, Zune 2 | 6 Comments »

Commercial Viewer: Another great tool from babgvant

Posted by onlydarksets on December 26, 2008

UPDATE: Andy has already released an update.  Get the binary here.  I have updated the screenshot below.

Andy has posted yet another great tool on his site: Commercial Viewer.  This tool loads a video file and its associated EDL commercial file and lets you modify the values to fine-tune the commercial segments.  This isn’t a tool for every show that gets recorded – I use this for shows I want to archive indefinitely.


In the screenshot above, you can see the app.  Once you select a video, it also loads the associated EDL file (of course, you have to run SA or ComSkip on the video file first).  You can preview the video, although you can’t jump to an arbitrary spot (i.e., there is no slider) and you can jump to an arbitrary spot by clicking on the green/red slider (updated per Andy’s comment below – the perils of 5a posting).  You can select a commercial segment using the list on the right.  The two text boxes display the start and end times of the commercial segment, and you can jump to either of those spots.

Get it here.

Posted in DVRMSToolbox, SageTV | 2 Comments »

Convert Sage recordings to iPhone

Posted by onlydarksets on September 19, 2008

I have posted an updated method.  I STRONGLY SUGGEST YOU USE IT INSTEAD!  I leave the below for posterity…


NOTE: mencoder is not cutting commercials properly on my system.  Everything else is working fine.  I’ll post an update when I get it working.

Here is how I’m converting SageTV recordings to iPhone-compatible (and Touch/iPod-compatible) MP4 videos.  This will also work for the Zune!

At a high level, the steps (and applications used) are:

  1. DVRMSToolbox: monitor the recordings directories, identify which shows to process, grab the metadata that is later written to the MP4, and control program flow
  2. comskip or ShowAnalyzer: Scan for commercials
  3. mencoder: Cut commercials
  4. ffmpeg: Convert to MP4 (note: I had problems with the latest Windows build of ffmpeg, but the one from worked fine)
    1. Option 2 is to use mencoder to cut out commercials and convert to MP4 in single pass, and then use NicMP4Box to fix the MP4 container to make it iPod-compatible
  5. AtomicParsley: Write metadata to identify as TV Shows (plus any other info we have)

I am assuming basic familiarity with DTb, so I’ll talk about how to setup the Profile to process a Sage recording, but I am not addressing installing DTb or setting up the processing condition.

More after the break…

Read the rest of this entry »

Posted in DVRMSToolbox, iPhone, SageTV, Zune 2 | 14 Comments »

Transcoding for iPhone in Sage

Posted by onlydarksets on September 16, 2008

I finally got around to rebuilding my HTPC (does anyone call them that anymore?) yesterday, so now I need to set my sights on getting file conversions working again.  I’m pretty set on using DTb for file monitoring and processing control.  For transcoding, I was going to use VLC (or possibly Handbrake), but I might look at ffmpeg instead.  Also, Sage includes a transcoder, which is apparently based on ffmpeg, but I’m not sure it adds anything over ffmpeg for me.

A couple more resources:

Posted in DVRMSToolbox, iPhone, SageTV | 8 Comments »

Quickly convert DVR-MS with Expression Encoder

Posted by onlydarksets on August 29, 2008

Way back when, I setup Expression Encoder to convert my DVR-MS files to WMV (for size and portability).  One thing I found was the command-line switch to make the conversion run at close to real-time, even for HD.  While I assume this will work with the new WTV format (and EE 2, for that matter), it’s not something I’m working on or maintaining anymore.

The switch is “/VideoComplexity 0”, and it reduces the computing time to process the video.  I never noticed a difference between setting it to 3 or dropping it to 0, but YMMV.

“C:\Program Files\Microsoft Expression\Encoder 1.0\Encoder.exe” /Source “e:\” /Target “E:\HD_TARGET.wmv” /VideoComplexity 0 /VideoProfile “HD Archive (CBR)” /Log On /Time

“C:\Program Files\Microsoft Expression\Encoder 1.0\Encoder.exe” /Source “e:\” /Target “E:\SD_TARGET.wmv” /VideoComplexity 0 /VideoProfile “SD Archive (CBR)” /Log On /Time

I setup two different profiles (SD and HD), and had each bring the resolution down to 720×480 for SD or 720×404 for HD.  Of course, this was all automated with commericials removed by DTb.

Posted in DVRMSToolbox, Windows Media Center | 4 Comments »

Regular expression tester

Posted by onlydarksets on August 25, 2008

Regular expressions are the bain of my existence when it comes to DTb.  This isn’t because of any particular failing in DTb – Andy has made it extremely flexible by allowing regex.  Mostly it’s because I don’t have a lot of experience with using them (beyond the occasional search in TextPad), and I didn’t have a way to easily test and troubleshoot them.

Well, gskinner to the rescue with a web app for this (Flash required).  There’s also a desktop version (Adobe Air required).

There is also a good guide from Jan Goyvaerts.

Posted in DVRMSToolbox | 1 Comment »

Action: AdjustMetaData

Posted by onlydarksets on January 29, 2008


This Action will write certain meta data to the CutDvrmsFile Context. By default, it will create two new meta data fields (and default them to the following values):

  • WM/Toolname = DVRMSToolbox
  • WM/ToolVersion = <currentversion> (e.g.,

You can also do the following:

  • FixSlider – not sure why you would do this, but it sets the WM/WMRVEndTime and WM/MediaOriginalRunTime fields.
  • AddTooledToDescription – prepends the MetaMarker value to the WM/SubTitleDescription field. You can then check this value in a processing condition to see if the file has run through a particular Profile.
  • IncrementScheduleItem – not sure why you would do this, but it increments WM/WMRVScheduleItemID.

Using Toub’s DVR-MS meta data editor, you can see the following meta data fields and values have been added:


A few important notes:

  1. AdjustMetaData only writes to the CutDVRMSFile Context. So, if you want to edit the input file (for example), you need to first copy the InputFile Context to the CutDVRMSFile Context. You can set the CutDVRMSFile value by:
    1. Add a ChangeContextValue Action
    2. SourceContext = <Context for which you want to update the meta data>
    3. TargetContext = CutDVRMSFile
    4. FindRegex = (.*)
    5. ReplaceRegex = $1
  2. This should be the last Action in your Profile. Otherwise, if there is a failure, the file will be marked as successfully processed when, in fact, it was not. Also, due to #1, if you set it too early you could muck up another Action that legitimately needs to use the CutDVRMSFile Context (e.g., cutting commercials from DVR-MS).
  3. Regenerate MetaTags.bin. MetaTags.bin is a list of all meta data that can be evaluated by a Processing Condition. The “stock” MetaTags.bin does not include WM/Toolname. If you want to evaluate WM/Toolname, you need to first run a Profile that sets WM/Toolname on a DVR-MS file, and then run Generate MetaTags.bin from the Processing Condition dialog box (and select the DVR-MS file you just modified).

Posted in Actions, DVRMSToolbox | 2 Comments »

HowTo: ChangeContextValue regular expressions

Posted by onlydarksets on January 15, 2008

I came up with a regular expression that should allow full access to the path, filename, and extension when using the ChangeContextValue Action. I’m sure there is a more efficient way to do it, but this works just fine.

FindRegex: ^((.*\\)(.*)\.(.*))\z


  • $1 = E:\Recorded TV\subdir\another one\Dirty Sexy
  • $2 = E:\Recorded TV\subdir\another one\
  • $3 = Dirty Sexy Money_WJLA-DT_10_10_2007_22_00_01
  • $4 = dvr-ms

So, if you want to change the extension, the ReplaceRegex value would be:


If you want to change the path, the ReplaceRegex would be:

C:\New Path\$3.$4

I don’t suggest using this to change the filename (use the AdvancedFileRename Action instead). However, if you insist, the ReplaceRegex would be:

$2$3 (FIXED).$4

Posted in DVRMSToolbox, HowTo | Leave a Comment »

Best resolution for playback on Zune and VMC?

Posted by onlydarksets on January 12, 2008

My video source is NTSC via DVR-MS.  I am converting using DVRMSToolbox, natch, (which uses DVR2WMV), and a custom PRX (found here).

Has anyone found a single set of video conversion settings that will allow proper aspect ratios on both the Zune and through Vista Media Center (or an extender)?

DVR-MS SD shows are natively 720×480.  If I maintain the aspect ratio when converting to WMV, the file plays fine on the Zune, but it is letterboxed.  If I lower the resolution to 640×480 during conversion, it looks perfect on the Zune, but the AR is obviously wrong when I play it on VMC or an extender.

I am looking for a conversion setting that will allow the video to display with the proper aspect ratio, regardless of where it is played.  Alternatively, is there an option on the Zune to “stretch” the video to fit the screen during playback?

Posted in DVRMSToolbox, Zune 2 | Leave a Comment »

Video on the Zune – DVRMSToolbox

Posted by onlydarksets on January 9, 2008

Maybe it’s because I’m already running DTb, but this was easy as pie. I installed it on my laptop, opened up DTbGUI, set the input and output files, and then selected the “Cut out commercials, convert to WMV” profile. It took about 10 minutes, and spit out a 1700Kbps WMV3 file of a 30 minute show with the commercials removed.

That said, the 21 minute video (at 720×480) was a 280MB file, which is far too large for SD.

I lowered the video bitrate to 800Kbps (by using a text editor to modify the PRX file in the C:\Program Files\DVRMSToolbox\prx directory), and the resulting WMV file was about 165MB. To change the bitrate, make a copy of cbrNTSC.prx and open the new file (I called mine cbrZune). You need to update the “Video Stream” <streamconfig> tag, and the <videoinfoheader> tags with the new bitrates:

<streamconfig majortype=”{73646976-0000-0010-8000-00AA00389B71}”
streamname=”Video Stream”

<videoinfoheader dwbitrate=”900000″

The resolution was 720×480, but it should be 640×480 to get the right aspect ratio. So, I modified the <rctarget> and <bitmapinfoheader> tags to reflect the correct aspect ratio.

I also tried to lower the audio from 160Kbps to 96Kbps, and it reduced the size to 155MB, but the audio was completely hosed (skipping in and out). I’ll have to look into that, but it’s 10MB, so I’m not horribly worried about it.

If you are interested, you can download the PRX here.

So, that’s great – I’m not even going to bother looking at the other solutions, because DTb works great for SD, it’s already installed, and I’m familiar with it. If it breaks down in the future, then I’ll consider it, but, knowing the developer behind it, I have faith it will keep chugging along (at least, until he defects to Apple ;)).

However, this solution doesn’t work for HD (ATSC) sources. More on that later.

Posted in DVRMSToolbox, Zune 2 | 1 Comment »