Page 1 of 1

EditDVRMSMetadata Source Code

Posted: Wed Aug 07, 2019 3:51 pm
by Charles
I think most people here are familiar with Stephen Toub's EditDvrmsMetadata program, from his Fun with DVR-MS article series (https://blogs.msdn.microsoft.com/toub/2 ... -metadata/).

If you're not, it's a very simple program for viewing and editing the Metadata in .DVR-MS (and .WTV) files. As far as I know, as simple and rudimentary as it is, it's the best program available for editing wtv metadata. If there's a better option, I'd love to be aware of it. The problem is that because it was written before the .wtv file format was introduced, it doesn't really support it natively. WTV files will load and save fine, but they won't show up in the File Open Dialog unless you choose to show all files (*.*). It's a minor inconvenience but when you're trying to edit multiple files in a row it can be extremely annoying.

Anyway, to cut a long story short, I found the source code a couple weeks ago online, in one of his later articles: https://blogs.msdn.microsoft.com/toub/2 ... aptioning/

At the bottom of the article there is a link to ClosedCaptions.zip that contains the code from the Closed Captioning article as well as the code from all his previous articles, including the source for EditDvrmsMetadata.

For anybody knowledgeable in C# it's a very easy step to add native .wtv support. Which I did, as well as drag and drop support. I also ripped out the ClosedCaptioning code Stephen added, because he says it was only supported for SD NTSC and I didn't want to do any testing. I'm not affiliated with Stephen Toub or Microsoft or anybody else, and I have no idea on the licensing of the source code linked. But I am a WMC enthusiast like you. These changes have helped me and they may help others, so I've attached a compiled copy of EditDvrmsMetadata v1.2.

Re: EditDVRMSMetadata Source Code

Posted: Wed Aug 07, 2019 6:59 pm
by jachin99
That's awesome that you have updated this!! One issue I always had with random wtv files though is that sometimes the coverart would get corrupted. I never found a program to embed coverart in a wtv file. I can tell you that using a link to a file location never worked and I believe the cover is embedded in a byte data array inside the wtv file. I don't use wmc much anymore but I think it would really make things complete if you added that ability. Just a suggestion.

Re: EditDVRMSMetadata Source Code

Posted: Thu Aug 08, 2019 12:53 pm
by Charles
That sounds like a great idea... for somebody else. To be clear, I've done all I wanted to do and I'm not interesting in taking ownership of this project.

I thought finding the source code was an important discovery for the community, and adding .wtv extension recognition and drag'n'drop were incredibly minor adjustments to the original code. Anything else starts to become outright new features, and far beyond the scope of what I set out to do.

There are a lot of things that can be done to improve EditDvrmsMetadata. As Stephen Toub himself said in his original blog post "this tool is a pretty simple wrapper" for his initial sample code.

Re: EditDVRMSMetadata Source Code

Posted: Thu Aug 08, 2019 9:17 pm
by Space
Every time I used this program I was like: "I wish I didn't have to select *.* every time", and even more, "I wish I could just drag and drop the file".

So thanks a lot for this!

Now, can you add the ability to mine Bitcoins with it? Thanks. :-)

EDIT: Seriously though, how difficult would it be to get this working with "Open with" and/or "Send to" when right clicking on a WTV file? Currently it just opens the program but does not load the WTV file. I think all you need to do is support supplying the name of the WTV file as an argument to the program.

Re: EditDVRMSMetadata Source Code

Posted: Fri Aug 09, 2019 12:29 am
by Charles
Space wrote: Thu Aug 08, 2019 9:17 pm Seriously though, how difficult would it be to get this working with "Open with" and/or "Send to" when right clicking on a WTV file?
Sigh... damnit, that is a compelling addition. Okay, v1.2.1.

Now I think it's as far as I want to take it myself.

Re: EditDVRMSMetadata Source Code

Posted: Fri Aug 09, 2019 12:48 am
by Space
Thanks! Much appreciated!

Oh, and good job finding the source code in the first place, I had no idea it was publicly available.

Re: EditDVRMSMetadata Source Code

Posted: Fri Aug 30, 2019 11:52 am
by technodevotee
Thanks for this.

I had a go with it way back and found it a faff to use.

So glad you have made it usable.