Fun with DVR-MS

My latest article for MSDN Online is now available at Fun with DVR-MS!  A bit on the long side, but in it I delve into working with DirectShow and DVR-MS files (the recorded television files generated by Windows Media Center) from managed code, and I demonstrate how to do things like work with DirectShow filter graphs, play DVR-MS files in your own applications, convert DVR-MS files to other file formats, edit and splice DVR-MS files, extract and change metadata, etc.  I also demonstrate how to build a few fun applications, like a DVR-MS to WMV transcoder that runs as a Media Center add-in:

Hope you enjoy it!


Comments (87)

  1. Barney Craggs says:

    Steve, Blinding idea – as you say probably one of the most talked about utils for MCE on the forums at the moment.

    Never managed to get the dCut or DVR2WMV apps working and have given up as your approach seems more sound.

    BUT (and it is a fairly big but) I am still failing to get this working.

    – Ran the installer

    – Registered the

    – Fired up MCE

    – Added a prog to the transcode list and let it rip…

    – The dialog comes up that it is processing but the progress bar hasn’t moved in half an hour (looks scarily like the problem I had with DVR2WMV)

    – MCE and the dialog remain responsive (so no hanging here)

    – no ConvertToWMV process seems to be running

    Any thoughts as to what may cause this wierdy?


  2. Stephen Toub says:

    Hi Barney-

    If you had a problem with dvr2wmv and dCut that resulted in similar pausing, unfortunately I’d bet you’re having the same problem here. dCut uses dvr2wmv, and both dvr2wmv and my sample app simply build the appropriate filter graph and then run it, and while I haven’t seen the source for Alex’s DLL and while I know he implemented it with more features than mine (2-pass encoding, manual selection of the decoders to use, etc), I’d bet that at its core it’s fairly similiar in what graph it builds.

    First, just to confirm, what type of recording are you using? Is it NTSC and non-HD? How big a file? etc. And what MPEG2 decoder are you using? I’ve heard that people have the most success when using NVDVD, which is what I use. Have you tried using a small file (using either DvrEdit or the DvrmsEditor included with the article to cut a snippet out of a larger file), and do you run into the same problem?

    A couple of things to look at:

    1) When the progress bar stops progressing, open up task manager and look at your CPU utilization… is it at or close to 100% or something much lower?

    2) Also when it stops progressing, open up GraphEdit and use the File->Connect to Remote Graph option to connect to the graph in the converter… what do you see? If you make sure that the View->Enable Seek Bar option is checked, is the seek bar at approximately the same place as the progress bar?

    3) Is the graph using the decoder you’re expecting it to? Do you have multiple decoders on the system? You could try building the graph by hand as described in the article, and see if you have any more success. If you don’t, I honestly don’t think you’re going to have success with this.

    Also, you mention a ConvertToWmv process, but actually it runs on its own thread in the MCE shell process, so that’s the process in task manager you want to look for.

    Hope that helps, and I hope we can get you up and running with at least some solution.


  3. Barney Craggs says:

    Steve – thanks for that, I’ll give it a go tonight when I’m back at home. Barney

  4. Barney Craggs says:


    Steve – if you’d rather not end up trying to support this here I would understand. Just let me know.

    Ok to answer a couple of the questions you posed:

    1.I’m in New Zealand so we’re PAL and we don’t have HD yet :o(

    2. I’ve cut down a file to 70Mb (opening credits of ER)

    3. I’m using the Intervideo Video Decoder that came with my HP Media Center

    4. The progress bar stops at 1% encoded and has produced a 10 – 17kb wmv file.

    5. The CPU is knocking around 10% pretty much the whole time (P3-3.4Ghz 1Gb Ram)

    6. Opened up the remote graph and to be fair it looks okay to me – curiously though if I open up the dvr-ms file I get the "some of the streams in this movie are in an unsupported format" error. Could this be the route of my evils?

    Does any of this help?

  5. Barney Craggs says:

    As mentioned, opening the dvr-ms file gives the "some of the streams…" error message.

    BUT I read the whole article (at least the bits I actually understand) and built a graph from the ground up to render to WMV, and hey presto it works.

    Great, but using the graph is hardly practical.


  6. Stephen Toub says:

    Unfortunately, this isn’t going to work with PAL or HD as implemented. There are some issues with these formats that require some serious workarounds to get transcoding to work properly. Alex has implemented such workarounds in dvr2wmv, but as my article is just sample code, well, it doesn’t. So, for now, to all those using PAL, this probably won’t work. Apologies.

  7. Barney Craggs says:

    Don’t sweat it. It’s about time I installed a compiler and played around anyhow.

    I guess as using the graph to convert PAL to WMV (granted an NTSC WMV as the quality doesn’t suffer at all at the higher bitrate) seems to work it shouldn’t be too hard to modify your source to follow the same path as the working graph.

    Again thanks for the help, and indeed the inspiration.


  8. Aaron says:

    Hi Steve,

    Thanks so much for your write-up on DVR-MS files.

    Quick question: How does the WMV Transcoder plugin determine which decoder to use? I have two installed on my MCE machine (PowerDVD and Nvidia). No matter what I do, the transcoder always uses Nvidia (as shown when I "connect to a running graph" in GraphEdit). For reasons more complicated that I’d rather explain, I’d much prefer that the transcoder uses PowerDVD, but I don’t want to uninstall the NVidia decoder.

    Setting PowerDVD as the "default" MCE decoder (using the Microsoft decoder check utility) does not appear to have any effect on the plugin.



  9. Stephen Toub says:

    Hi Aaron-

    You’re welcome; glad you’re finding the article helpful!

    The WmvTranscoderPlugin relies on the filter graph manager’s Intelligent Connect functionality to build the graph. It simply adds the WM ASF Writer filter to the graph and then renders the DVR-MS file, relying on Intelligent Connect to wire everything up. As mentioned in the Fun with DVR-MS article, Intelligent Connect goes through a series of steps to figure out what filters to insert along the way, and it values available filters already in the graph above ones it would have to find in the registry and instantiate. So, all you have to do (if you don’t mind adding another line of code or two and recompiling) is add an instance of the PowerDVD video decoder filter to the filter graph, in addition to adding the WM ASF Writer, before calling RenderFile with the DVR-MS. Intelligent Connect should then use the PowerDVD decoder already in the graph instead of creating the NVIDIA decoder. Try it out in GraphEdit to verify.

    Alternatively, and possibly easier, read about the concept of "merit" ( in the DirectShow SDK documentation and how it relates to Intelligent Connect and IFilterMapper2::EnumMatchingFilters. You could probably tweak the merit value of the two decoders such that Intelligent Connect considers the PowerDVD decoder as a better choice than the NVIDIA decoder.

    That said, I’ve had good success with the NVIDIA decoder.


  10. Aaron says:

    Stephen, this is great. Thanks for the quick response!


  11. BD says:


    Ahh, a little help if you could…

    I installed on a MCE 05 machine, using PowerDVD. When I start the transcode, the bar shows up then immediately disappears. There is no error or resulting file in the specified folder.

    The graph correctly shows dvr-ms -> decrypt/tag -> Cyberlink Audio Decoder -> Default DS device and dvr-ms -> decrypt/tag -> cyberlink video/SP decoder -> video renderer.

    Any thoughts?


  12. Stephen Toub says:

    Hmm, unfortunately that’s not the correct graph. The default DS device and video renderer as you describe them are the default audio and video output devices, meaning a window on the screen and the sound card… the WM ASF Writer isn’t being used as the sink for any stream, and in fact from your description it sounds like a WM ASF Writer filter isn’t even in the graph. Is it? Is the WM ASF Writer any where in the graph when you examine it with GraphEdit? Also, how are you viewing the graph? Are you connecting to the live graph in GraphEdit, or opening the saved .GRF file generated by WmvTranscoderPlugin in the temp directory?

  13. BD says:

    I am looking at the live graph using GraphEdit and rendering a dvr-ms.

    So no, the WM ASF writer is not showing, but I would not expect it to – then the stream wouldn’t play correctly in MCE, right? I assume your program dynamically modifies the graph prior to transcoding, then restores after. Yes? No?


  14. Stephen Toub says:

    The plug-in creates a brand new graph that has nothing to do with the one MCE uses for playback. When it starts the transcoding, it creates the graph, and when it’s done, it tears it down; the graph is only published to the ROT while transcoding is happening.

    So… you’re looking at the wrong graph. The transcoder’s graph has nothing to do with MCE’s rendering graph (which MCE also publishes to the ROT), which is why you can watch a show at the same time as you’re transcoding.

    For more information, see the "Fun with DVR-MS" article on MSDN which explains the transcoding and publishing process in detail (with sample code).



  15. BD says:


    I appreciate your assistance on this. I looked at the graphs created by your plugin, and I see the problem.

    Please keep in mind that I am using PowerDVD in MCE 2k5 for my decoding. One not of interest is that when I originally set it up, I noticed that I was not getting correctly decoded audio. If I played the MPEG stream back in the native PowerDVD player, the audio decoded (Pro Logic) correctly. But when I played it in MCE or WMP, the audio did not decode correctly. So a little DDEcheck, GraphEdit, and merit checking led me to see that the Cyberlink (PowerDVD) Audio Decoder was not being employed, the system preferring to use quartz.dll (MPEG Audio Decoder). So I increased the Merit of the Cyberlink Audio Decoder to encourage MCE and WMP to use it, and it has been successfully working since.

    Soooo, looking at the graphs the plugin creates, and I see that the video is correctly directed through the video decoder to the .wmv filter, but the audio stream remains consistent: DVR-MS -> decrypt/tag -> CyberLink Audio Decoder -> Default DirectSound device.

    Any thoughts on how to fix this? Truth be told I am now (satisfactorily) using DVR2WMV, but as you note I would much prefer the native MCE interface.



  16. BD says:

    Furthermore, when I open the graph that your plugin creates and edit the sound path so that it channels to the WMV filter, it renders correctly.

    So, (not faulting, but identifying here!) your plugin does not write the graph correctly. Or perhaps it is looking to re-pin from the MPEG decoder in quartz.dll rather than reading the reading and using the default. I’ll go look at the code…


  17. Stephen Toub says:

    As I mention in the article, my sample plug-in (it is meant as a sample, after all, to demonstrate what’s discussed in the article and is not meant to be a production-quality application) simply uses DirectShow Intelligent Connect to wire-up the filter graph. It adds the WM ASF Writer filter to the graph and then renders the DVR-MS file, letting Intelligent Connect fill in everything in the middle, including choosing what decoder filters to use and how to connect them. If the graph isn’t coming out as you’d expect it to, that’s due to Intelligent Connect and nothing specifically in the sample code. You could of course modify the graph building code however you see fit, avoiding Intelligent Connect as much as you like.

    If you want to use Alex’s dvr2wmv and you want to use the ListMaker interface, I’d suggest simply changing my WmvTranscoderPlugin sample code to use dvr2wmv.dll (through COM interop) rather than my sample WmvTranscoder class… it should be a pretty easy replacement, given that the two interfaces are so similar.


  18. BD says:

    Solid thoughts – thank you for your time.


  19. Travis Parker says:

    Any idea why DVR-MS editor will sometimes hang while saving the output DVR-MS file? Cancelling and playing what has been output reveals the hang always occurs at the end of a segment and before the next segment starts. This doesn’t occur between every segment, and if I change the start and end times of the segments enough I get the the entire file to save. To clarify: The problem seems to be that the next segment can’t be streamed to the output, although changing the end time of the previous segment is sometimes required to get it going.

    DVREdit and dCut have the same problem for me: DVREdit will freeze at the end of a segment. dCut will save out the individual segments but then freeze trying to concatenate them. Also, this problem seems to occur more on the Better and Best quality material than on the Good profile.

    Others on the xpMCE and TGB forums have had similar problems. The usual bit of advice seems to be to try a different DVD Decoder, but I didn’t think the IStreamBufferRecComp even used the decoder?

    If you have any advice it would be most appreciated. I really want to get some of this stuff on DVD.


  20. Shaun Usman says:


    I found and downloaded/installed the WMVTranscoder you wrote a few weeks ago, and it worked great.

    However, it doesn’t work anymore… When I try to use it now within MCE2005, the interface works fine, but when I hit the Transcode button, it shows the message with the progress bar for a second, and is then done. No error messages, and the directory it was to transcode to does get created, but the transcoding itself doesn’t get done. (It has the same behavior if I use the plugin through the Xbox Extender).

    I have tried uninstalling and reinstalling the plugin, and it hasn’t made a difference. Anyways I thought I would let you know, and if you do have a suggestion for me that would be great, cause it was a neat utility…

    (Between the time I last successfully used it and now a few weeks have passed, during which I have done stuff like install new ATI drivers followed by a rollback due to the new drivers somehow corelating with impacting connectivity for the Xbox Extender, and I have also installed the SonicExtender.msi file which had previously been missing)

    Thanks again and regardless of whether it works for me again, it was cool to read through your article on dvr-ms and the code samples…


  21. Travis, yes, it’s a known issue with RecComp. I expect this will be better in the next version, though I can’t say for sure.

    Shaun, WmvTranscoder uses Intelligent Connect to create the filter graph, and it sounds like there’s some corruption due to all of the installs and uninstalls that’s preventing IC from working correctly. If you follow the instructions in the article for using GraphEdit to convert from DVR-MS to WMV, what happens? Is a graph built successfully?

  22. tDc says:


    You mentioned if we wanted to use Alex’s dvr2wmv and use the ListMaker interface, you’d suggest simply changing my WmvTranscoderPlugin sample code to use dvr2wmv.dll (through COM interop) rather than your sample WmvTranscoder class. Additionally you said it should be a pretty easy replacement, given that the two interfaces are so similar.

    How would one go about setting that up? Where is the code that would need to be changed? Would it be pretty simple for a novice to complete?

    Your ListMaker interface with Alex’s dvr2wmv would be a perfect solution compared to anything that currently exists.

    Also, in your code, where do you modify the Transcoder settings? I edited the .prx files, but files don’t transcode according to those settings on my system.


  23. re: what code to change

    Pretty much the only places that would require code changes are in the WmvTranscoderPlugin.ConvertToWmv and WmvTranscoderPlugin.Cancel methods. ConvertToWmv is supplied with a list of the files to be converted and runs through that list converting each… instead of using the sample WmvConverter to do that conversion, you’d just use Alex’s dll.

    re: profiles

    As mentioned in the article, the plug-in looks to the registry to find which profile it should use (the ProfilePath value on the HKLMSoftwareToubWmvTranscoderPlugin key). If ProfilePath isn’t configured, no profile is explicity set onto the ASF Writer filter in the filter graph, so its defaults are used. Modify that registry value to point to whatever .prx file you want to use (the full path to the file), and that should do it.

    Hope that helps,


  24. tDc says:

    Thanks for your help!

    I’m having another problem now. Since changing the HKLMSoftwareToubWmvTranscoderPlugin key to point to a Profile, when it transcodes the resulting file is stripped of it’s meta data (Episode Name, Episode Description, etc.) and the filename is changed from the MCE standard naming convention to just the program name and a dash. (i.e. Boston becomes Boston Legal -.wmv)

    Is there any reason it would be doing this?

    Also, I’m noticing transcoding is taking almost 3-4 times longer than DVR2WMV. Is this unusual?


  25. re: speed

    dvr2wmv ignores the complexity setting in the profile by setting the complexity setting in the video stream to 0. I’ve heard this can result in significant speedups without any noticeable effect on the results, and my sample code doesn’t do this (with emphasis on sample code).

    re: title

    There’s code in WmvTranscoderPlugin to explicitly change the title. If you don’t want the files renamed, set the Rename value in the registry to 0. As far as why it’s ending up with just the title followed by a dash, if you look at the code you’ll see that the code checks if title or subtitle is null. Unfortunately, this is buggy, since GetMetadataItemAsString will return string.Empty if the metadata doesn’t exist, rather than null. In your case it sounds like there is no subtitle, so it’s just ending up as "title – .wmv". I should really have rewritten that whole section of code to fallback to using the original name if enough metadata doesn’t exist to make a useful new one. But, alas, 20/20 hindsight and all that. 🙂

    re: metadata

    Did you set the CopyMetadata registry value to 0? That would cause it to stop copying the metadata, which has to be done explicitly, since the transcoding filter graph has no knowledge of such information. In other words, when you transcode a file, the resulting file doesn’t have any of the original metadata, so the code in the plug-in explicitly copies it, but only if the CopyMetadata registry value is set appropriately. Maybe this got changed when you modified the ProfilePath setting?

  26. tDc says:

    Is there a way to mimic a 0 complexity setting in the profile? Does changing the complexity from Auto to Simple or Complex speed up the transcoding time?

    >>re: speed

    dvr2wmv ignores the complexity setting in the profile by setting the complexity setting in the video stream to 0. I’ve heard this can result in significant speedups without any noticeable effect on the results.

  27. Ben says:

    This plugin is great but I am also looking to change the code to point to DVR2WMV.dll rather than your WMVConverter cos it doesn’t work on PAL, at least I can’t get it to work, however Alex’s dll works a treat.

    I just wondered, have you any plans on making this code change nice and neatly yourself for us poor PAL users?

    Has anyone else made this change? I know absolutely nothing about programming in this language and fear I may do more damage than good!



  28. Ben says:

    Got it! Steven’s plugin is working to WMV on a PAL system.

    The reason the ConverttoWMV from Steven’s article wasn’t working was because Intelligent Connect was’t being all that intelligent. It would only connect the graph using Intervideo decoders which just plain don’t work for me.

    If I use DVR2WMV with intervideo it doesnt work, however I HAVE been able to get the rendering to WMV to work with DVR2WMV when I tell it to use the CyberLink Powerdvd6 decoders.

    So in order to get Steven’s plugin to work I have to get Intelligent connect to create the graph using Cyberlink Decoders and not Intervideo ones….

    The problem was that the Cyberlink ones only seem to work when Intervideo is installed?! The solution was that I have to manually reregister all the Cyberlink Audio and Video decoders by hand, this seem to do the trick.

    Now when I create the graph in GraphEdit it uses the Cyberlink ones, hence when Steven’s Article does the same thing it uses the Cyberlink ones and successfully renders the PAL DVR-MS files into WMV.


  29. Terrific. Glad it works for you.

  30. Ben says:


    I have another problem with teh addin which I wonder if you may be able to help with?

    I removed everything in an attempt to clean things up, intending only to install your add-in. I have done so however when I select the addin from the More Programs menu nothing happens…

    Do you know why this might be?

    Its really frustrating having got it to work and now the addin doesn’t run when I click it?!



  31. Ben, is there an error message in the event log?

  32. Ben says:


    Thanks for you reply, I forgot to check again (i’m at work at the mo). I have noticed though that the Create CD/DVD wizard also isn’t working. i think its time for a reinstall…..again.


  33. McAkins says:

    Hi Steve,

    First, thanks for this article, it is an eye-opener for me.

    The Add-In has been working for me without problem, my only objection is that my CPU usage hit 100% when transcoding. Given the lenght of time it takes to finish transcoding, I can’t have this all the time. My question then is, is there a way to throttle CPU usage, if not, if you ever update the code, can you hack the code only to transcode when MCE is less busy? Either of the option will be OK.

    I have tried transcoding with Windows Media Encoder because of the Throttling ability, but alas, ver9.0 does not support dvr-ms.

    Any help, anyone?

    Thanks again.

    – McAkins

  34. Good question, but something I’ve never investigated, so unfortunately I’m not sure.

  35. Hein says:

    Hi Steve,

    Great article! It shows how easy it is to build a converter using GraphEdit. It’s now clear to me how to convert dvr-ms to wmv using graphedit. I wonder if it’s also possible to convert mpeg to dvr-ms using GraphEdit. The filter for creating a dvr-ms file. Is it available on a MCE 2005 machine? Or am I on the wrong track here? Thanks in advance! Hein.

  36. Hi Hein-

    It should be possible to do, and the filters for creating DVR-MS files are available in sbe.dll that’s shipped as part of WinXP since SP1, but I’ve never tried, and so unfortunately can’t tell you exactly how to do it. You might try contacting Alex, the author of dvredit, as at one point I believe he planned to include mpg->dvr-ms functionality in his tool.


  37. Tom says:

    I was hoping to get some pointers on some modifications I’ve made to your code.

    I’ve added 3 additional filters; Video, Audio, and the ACM Wrapper for the AC3 audio as additional IBaseFilter’s.

    The graph it builds does not connect the video pin to the ASF writer. I can manually do this and run the graph in GraphEdit though.

    Can you point me in the right direction for connecting pins of filters to each other in your code?

    Is it possible with your implementation to also modify properties of the filters? For instance setting the interlace setting on the video pin.

    I’m doing all of this as some of the elecard filters provide some cool functionality but they do not store them in the registry. You must set them every time. Therefore I cannot use dvr2wmv.dll

    Thanks so much for the excellent piece of work!

  38. Tom-

    If you know the names of the pins you want to connect, you can use the IBaseFilter.FindPin method to get back the IPin for each pin in which you’re interested; alternatively, you can use IBaseFilter.EnumPins to iterate through the pins and to pick out the ones you want. You can then use the methods on IPin, like IPin.Connect, to wire up the graph.

    I updated some of the COM interface interop definitions for the project at… you might want to start with those.

    Hope that helps,


  39. Juan says:

    Will be possible to create a similar application to transcode xvid in any way that xbox 360 could read it in real tima??

  40. Eric Flickner says:


    I was wondering how to start using an existing tlb file to build a Media Center plug-in under C#. Their library is written using C++. This type library is used with VideoReDo for scanning commercials in a video file. The software is scriptable through the Windows Scripting Interface. It also has a COM interface with function prototypes. I have used tlbimp to convert the tlb to a dll and am able to browse the contents of the dll through idlasm in the .NET Framework 1.1 SDK.

  41. john says:

    Have you tried Digital Media Converter v2.63?

  42. Peter says:

    Hi Just found you plugin worked first time,

    however is it possible for the output to go to MyVideo folder.

  43. Stephen Toub says:

    Sure, though it’d require a minor code change.  Right now you can configure the PreferredDrive in the registry; you’d just need to change the code to accept a preferred path instead, and then in the registry you could configure the add-in with any target path you wanted, including My Videos.

  44. Scott says:

    This looks like the tool that would be helpful.

    Media Center recorder default settings has start record some mins before and after a given show

    When you record lets say 2 shows back to back on same channel it puts them as one show on the recording. Now the fun.

    I want to remove the ending of the unwanted show at the start and remove the beginging of the next show at the end of this recording.

    I would also like to split a two shows so each will fit on a dvd. And have the header info corrected on both parts.

    Now the progaming question/next article idea, can you intercept a failure to fit on DVD after/before it trys some compression and fails, to jump your custom code to let you in a mini viewer find the split point create two new files and bring the users back to the begining. Perhaps its not possable, or perhaps those entry points were left open for this.?

    Even if you do not do more writing on Fun with DVR-MS, thank you for the info that was done.

  45. Scott, that’s a nice idea, but I don’t believe the hooks are available to make this happen, at least not with built-in CD/DVD writing support.  You could certainly do this if you were writing your own CD/DVD burning add-in, but that would obviously require a heck of a lot more work.

  46. rawat says:

    this is DVR-MS related url in window media player, but it dose not work please help me

  47. Jens says:

    Hi Stephen.

    I installed the plugin, and tried to transcode PAL recorded TV. The result was missing parts of the bottom of the screen whichever way I set the .prx file.

    Now in this thread I read that about a year ago it was discussed that the plugin doesn’t work with PAL.

    Is it these problems that I’ve run into now?

    Apart from the missing parts I get both good picture and sound.

    Hope you can help – thanks in advance.

    All the best, Jens.

  48. RICK says:

    Where do i download the WmvTranscoderPlugin?


  49. aaron says:

    I really enjoyed your article on DVR-MS programming with DirectShow. I’m interested in writing an application that will convert DVR-MS to MPEG (just stripping the DVR-MS container from the original MPEG) so I can do things with the standard file.

    I’ve figured out how to use my MPEG2 decoder (Cyberlink) in GraphEdit to do this but my question is: Can I do this with the DirectShow libraries the same way your sample application does? Or would I need an SDK from Cyberlink?

    And if so, is there a way to get MPEG out of the WM ASF filters?

  50. Fuyuki says:

    I would assume that your program work on Windows XP Professional SP2, and it does.

    With PlayingDvrms.exe, only problem is that when I try to seek with trackbar, the video/sound just stops and cannot run again

    except that I seek to the beginning of the file.

    Do you have any information about that?

    It’s just it doesn’t run correctly on XP Pro?

    Thank you in advance,


  51. Stephen Toub says:

    I’m not aware of any such problem, although sometimes it can take a few seconds for the seek to complete successfully (these are huge files).

  52. fuyuki says:

    Dear Stephen,

    Thank you for kind reply.

    By debugging I have found out that when the SBE source filter tries to NewSegment after the BeginFlush/EndFlush, something is returning 0x80070084h back to the filter and the SBE source filter decided not to do DeliverNewSegment.

    I guess that is why the SBE source filter can not complete the seek.

    Are you in anyway familier with this 0x80070084h return code from any pin/any filter/any peace of any program source?

    Best regards,


  53. peros says:

    I have trouble installing the wmvtranscoderplugin. I get the error:

    This AddIn can only be installed on Windows XP Media Center Edition 2005 or later.

    I got version:

    Windows XP Media Center Edition 2005.

    Service Pack 2.

    Thanks in advance,


  54. Nick Burger says:

    Thank you for your article and source code.  With some minor tweaks this compiles in VC# 2005 express.  Even more than a year later this is the best software I’ve found.

    I’ve been working on an application for about 35 hours.  I need help with a problem, maybe a bug in the SDK.

    Documentation consistently indicates that IWMPControls2.step(-1) steps back one frame and pauses.  It does not.  Values >1, <-1 and =0 are ignored (as expected), and 1 steps forward properly.

    I’ve dug around quite a bit.  There are many instances of MS documentation telling me it should work, but only an old, unresolved reference to the problem:

    Can you suggest a solution or a resource I can look to?

    I’m using the WMP11 SDK, with WMP11 installed.

    Thank you,


  55. Nick Burger says:

    Ah, I found a reference to it.  Apparently MPEG parsers don’t generally support going backwards, so step backwards isn’t available.  Apparently it doesn’t work too well in most other formats anyway.

    I was already trying to make current position work, but it’s a mess.  I guess I’ll keep working.  I may have to figure something out with taking frame captures when I step forward, and then rolling them back.

  56. Ian Carrick says:

    Stephen, great product, great articles.

    The problem I have is converting to WMV. It’s to do with the NVIDIA encoder. If this is used in GraphEdit, conversion just never works, it just hangs and builds a WMV file of 6K! I proved this by exchanging NVIDIA for Cyberlink encoder and WMV conversion works.

    My question is – for the few programs which do WMV conversion like yours and dCut etc, is there a generic way to force WMV conversion using Cyberlink for all these types of programs. I assume for your program the only way to do this is to recompile with the changes you already mention in this blog. Thanks, Ian.

  57. Hi Ian-

    You should be able to bump up the merit value ( on the Cyberlink filter such that when Intelligent Connect is used to build the graph, it finds the Cyberlink filter first while enumerating all applicable decoders.  This would be a registry change and shouldn’t require any recompilation.

    Hope that helps,


  58. Todd says:

    After editing TV w/ the DVRMSEditor (which works great BTW), I the way the program title is displayed in MCE Recorded TV looks different and there are no details for the program.  The title would originally be in the form of Show Title-Episode Name and after editing it changes to show title (no caps and no episode info)  It also ceases to group shows togther by title.  Is this normal, or have I goofed something up?

  59. Rick Engle says:

    Has anyone tried to add 2-pass encoding to the Converter class?  I think I’d get a better feeling for it if I knew how you would wire up a Graph for VBR/2-pass encoding.

    Does GraphEdit support this?



  60. Erv Walter says:

    Thanks for the awesome MSDN article.  I stumbled on it a few weeks ago, and it was very helpful in creating my MCE-to-Zune tool:

    I still haven’t figured out how to make it work for HD content, but I’m still poking around!

  61. ... says:

    Lavoro grande con il luogo! Siete il padrone!

  62. ... says:

    Lavoro eccellente! ..ringraziamenti per le informazioni..realmente lo apprezzo: D

  63. ... says:

    Dein Aufstellungsort verdient nur gute Woerter. Danke.

  64. Tom Webster says:

    Anybody know whether or not the dvr-ms software works?


  65. Kieren says:

    There is a converter called "autodvrconvert". It is slightly buggy but converts most dvr-ms files to standard mpeg.

  66. Kieren Holt says:

    How does MCE know which shows are repeats? If there is some unique ID for each TV show, is there a way of naming the dvr-ms file with that unique number? I’d like a quick way of identifying repeats, at the moment it names the recording date and channel etc. but this does not tell me whether the shows are repeats. Any ideas?

  67. Examine the metadata for the recorded show, specifically WM/MediaIsRepeat.

  68. Dave Arkell says:

    It looks like the article has moved, any idea where it’s gone?

  69. My latest article for MSDN Online is now available at Fun with DVR-MS!&nbsp; A bit on the long side, but in it I delve into working with DirectShow and DVR-MS files (the recorded television files generated by Windows Media Center) from managed code, and I demonstrate how to do things like work with DirectShow filter graphs, play DVR-MS files in your own applications, convert DVR-MS files to other file formats, edit and splice DVR-MS files, extract and change metadata, etc.&nbsp; I also demonstrate how to build a few fun applications, like a DVR-MS to WMV transcoder that runs as a Media Center add-in:

    I do not agree. Go to

  70. russ says:

    I cannot find this great article.  It has moved.  Where is it?

  71. Ian says:

    Has this article been removed from MSDN ?

  72. Andy says:

    I can’t find it either. Yet another shambolic Microsoft deleting links mess. No wonder Vista is so buggy if this is how they manage cross references.

  73. Andy says:

    I emailed Stephen who kindly promptly wrote back with:

    Hi Andy-

    The article was accidentally taken down when a content sweep was done to update the MCE site on MSDN for Vista.  I’ve been working to get it put back up.


  74. Paul says:


    Is it possible to use the DLL file from your download, add it as a resource into VB script and then access the DVR-MS data using some VB Code, so for example I simply want to display the title and sub title of a program recorded in a VB program, I can see that this information can be found in the metadata but I’m struggling to extract this information.



  75. Jamison Fitzgerald says:

    What would cause a blank file, no file type or anything in the output folder, named that of the show to be converted but no file size or anything?

  76. Matt Falcon says:

    Care to update the link in the post with the one in the comments here? Still got a severe case of link-rot going on here. Very useful utility and blog post even 5 years later. Please don't leave us hanging! 🙂