andy vt's tools & blog

automating lazy


Downloads: 96 File Size:
Posted By: babgvant Views: 4,400
Date Added: Sat, May 9 2009


DVRMStoWMVHD.exe is a command line utility that converts dvr-ms files to WMV files.  It is designed to work with ATSC files with HD video and AC3 audio streams, but will also convert NTSC and PAL recordings.  Other file formats, like mpg and vob (and VIDEO_TS), will work but may not be supported.

By default (no custom profile is specified) to will convert the dvr-ms file to a WMV file with VC-1 video and WMA Pro 5.1 audio with a programmatically built profile based on the attributes of the source file.  A custom profile can be passed using the -p argument if more control is desired over the target format.  Automatic profile generation does not always work for non-HD (ATSC) sources.

AC3Filter is preferred, and needs to be configured to deliver 5.1 audio for AC3 streams for WMA Pro to work properly.  Other AC3 decoders should work if properly configured, but will not be supported.

While the application should work on XP if WMF11 is installed, it was developed and tested on Vista.


dvrmstowmvhd -i "" -o "out.wmv" [-p "wmv.prx" -a "preferred audio guid" -v "preferred video guid" -m -pp -s -pm -w <seconds to wait b/w status writes> -t <dvd title to convert> -g -cw <crop width> -ch <crop height> -ct <crop top ratio> -cb <crop bottom ratio> -cl <crop left ratio> -cr <crop right ratio> -dp <wmv.prx>  -im <deinterlace mode> -http <port #>]

-i : The path to the file that should be converted.  If spaces are included in the path, it should be enclosed in quotes.
-o :  The path to the file that will be output.  If spaces are included in the path, it should be enclosed in quotes.
-p : Optional path to the WMF Profile (prx) file that will be used to convert the file.  If spaces are included in the path, it should be enclosed in quotes.  If unspecified, the application will generate a profile based on the input file.
-a : Optional guid of the audio decoder that should be loaded into the graph.  There is no guarentee that it will be used, but it should if input and output types match.
-v : Optional guid of the video decoder that should be loaded into the graph.  There is no guarentee that it will be used, but it should if input and output types match.
-m: Optional, load and connect MatrixMixer filter.  Useful for audio gain on non-AC3 streams.
-pp: Optional, PRIORITY_CLASS value as integer. 32768 = ABOVE_NORMAL_PRIORITY_CLASS for e.g.
-s: Optional, if present writer filter will try to synchronize stream writes, may cause filter deadlocks
-pm: Optional, processor affinity mask. 3 on a dual core system will use both cores(1+2=3)
-w: optional, seconds to wait b/w status writes
-t: optional, dvd title to convert.  defaults to the tile with the most chapters
-g: optional, if present graph will be published to the ROT
-cw: optional, number of pixels to crop from the width
-ch: optional, number of pixels to crop from the height
-ct: optional, top crop ratio; defaults to 1
-cb: optional, bottom crop ratio; defaults to 1
-cl: optional, left crop ratio; defaults to 1
-cr: optional, right crop ratio; defaults to 1
-dp: optional, path to write generated profile to
-im: optional, deinterlace mode defaults to 0 or no deinterlacing. 1 = Normal, 2 = Half Size (use when output is half, or less, the frame size of the input), 4 = Inverse Telecine
-http: optional, port to stream on.  When -http is present -o is optional

  • Fixed indexing issue
  • Added metadata migration
  • Changed usage syntax
  • Added support for custom audio and video decoders, pass guid of decoder including brackets
  • Added mpg support
  • Added Intelligent Connect rendering for non-dvrms formats
  • Removed synchronization block from sample writing method in WMWriterFilter.  Should stop deadlocks from occuring but may lead to A/V synch issues
  • Moved status writing from filter to main function, application is less verbose which should make it faster
  • Changed dummy graph run wait to not care if it failsMade the MS Mpeg Decoder the preferred video decoder
  • Added support for NTSC and PAL dvr-ms files
  • Added option to load MatixMixer filter, useful for doing audio gain

  • Added -pp to control process priority
  • Added -s, runs wmwriter filter in sync write mode, may cause problems only use if A/V is not in sync
  • Added -pm to control processor affinity
  • Added WMA support
  • Changd DVR-MS status to report % instead of write time

  • Added conversion hang detection
  • Added workaround for improperly reported BitmapInfoHeader frame size

  • Changed DVR-MS to report write time instead of %   
  • Added -c, supports DVRMSToolbox commercial xml files for creating output
  • Fixed support for -c option
  • Added -w to set how often status is reported
  •  Removed -c option, couldn't figure out a/v sync issues
  • Added VIDEO_TS conversion
  • Added -t to specify DVD title that will be converted.  Defaults to 1.

  • Altered -t default to find title with the most chapters (assuming it is the main title)
  • Added code to find the error message text
  • Added work around for GPL MPEG-1/2 Decoder ({CE1B27BE-851B-45DD-AB26-44389A8F71B4}) and other decoders that do not build rcSource and rcTarget before connecting
  • Added -g, publishes graph to ROT
  • Added DirectSound Audio to all graphs to improve synchronization
  • Added crop support for dvr-ms conversion via the open source crop filter from here (regsvr32 cropfilter.dll included in zip file to use)

  •  Forced crop values to be even #s

  •  Fixed profile generation for non-ATSC sources (Filter is active error)
  • Added -dp, writes generated profile to specified location

  •  Added deinterlacing option, -im

  • Added http streaming option (http port#)

  •  fix a bug where dvr-ms files w/o encryption could not be converted
  •     added nds option to not use the directshow audio renderer as a clock


No comments exist for this file.
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems