in

andy vt's tools & blog

Flexibility isn't free

3 feature program - for dvr-ms files

Last post 10-02-2008 5:31 PM by babgvant. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-27-2008 9:21 PM

    3 feature program - for dvr-ms files

    Hi Andy.  I've looked all over for a solution and am considering learning how to write a program myself.  In other words I could use some help and info.  

    I edit dvr-ms files with Steven Toub's DvrmsEditor.  After it is done the file doesn't have a thumbnail nor the film strip 'icon overlay' in Explorer.   When I check the metadata info with EditDvrmsMetadata.exe the following attributes are missing:
    WM/MediaClassPrimaryID
    WM/MediaClassSecondaryID
    WM/Picture

    What I would like is a program that could create the Explorer thumbnail from the dvr-ms files I've edited.  I would also like a program that let me create the other 2 missing attributes and add the pertinant info (which I found on the web).

    Of course the best solution would be to update the DvrmsEditor program so it copies this information from the onset from the original, unedited file since I think Steven Toub left it as open source.  This is what made me think about learning how to do some programming which leads to my second question.  Where would you recommend I start in the learning process?  Even if I don't use it for this, I'd still like to learn to write programs that edit different types of media files like Steven Toub's program does with dvr-ms files.

    Sorry for the long post and thanks for any info you can provide.

    VMC-HVR1600

     

  • 09-29-2008 11:27 AM In reply to

    Re: 3 feature program - for dvr-ms files

    dtb writes WM/MediaClassPrimaryID WM/MediaClassSecondaryID, and contains code that would allow writing WM/Picture.  DVR-MS is different from other containers, each container has it's own method for storing attributes (if it even supports it).  It would be a lot of work to build a utility that did that.

    DVRMSToolbox, Recording Broker, LcdWriter, and more software
    babgvant.com
  • 09-29-2008 12:15 PM In reply to

    Re: 3 feature program - for dvr-ms files

    So would DTB write the WM/MediaClassPrimaryID, WM/MediaClassSecondaryID, and WM/Picture for the files I've already edited, even though they currently do not contain this info any more? Or does the original file have to start of with these attributes and then the info gets copied to the updated file?  I'm at work so I can't try it out right now but I'll give it a go in the next day or 2.

    Also, thanks for giving me more info about storing attributes in the DVR-MS container.  Good to know that this is not the simplest problem to start with as a "programmer in training".  I'll try something easier first.  I know Microsoft is changing the container to .wtv but the files I have now are in .dvr-ms so that's what I'm going to practice on.

    Since I still want to learning about writing programs geared towards working with these types of media files I'm wondering if you find yourself using DirectShow and C #, C++, .Net, or something else for your VMC-related programs?  I'm starting from the bottom floor and am open to any suggestions.  Love to research things on the net so if you point me in a basic direction I can run with it from there.  My experience is with basic database building but am ready to move forward.

    VMC-HVR1600

  • 10-02-2008 5:29 PM In reply to

    Re: 3 feature program - for dvr-ms files

     if you use MigrateMetaData to copy the values (you need to do this explictly with cut files) it will copy the attributes.

     

    using(DvrmsMetadataEditor sourceEditor = new DvrmsMetadataEditor(sourceFile))
                    using (AsfMetadataEditor destEditor = new AsfMetadataEditor(targetFile, false))
                    {
                        destEditor.CopyMetadataFromSource(sourceEditor, false, true);

                        IDictionary attrs = new Hashtable();
                        MetadataItem primaryId = new MetadataItem("WM/MediaClassPrimaryID", new Guid("DB9830BD-3AB3-4FAB-8A37-1A995F7FF74B"), MetadataItemType.Guid);
                        attrs.Add("WM/MediaClassPrimaryID", primaryId);

                        MetadataItem secondaryId = new MetadataItem("WM/MediaClassSecondaryID", new Guid("BA7F258A-62F7-47A9-B21F-4651C42A000E"), MetadataItemType.Guid);
                        attrs.Add("WM/MediaClassSecondaryID", secondaryId);
                        destEditor.SetAttributes(attrs, false);
                    }

    DVRMSToolbox, Recording Broker, LcdWriter, and more software
    babgvant.com
  • 10-02-2008 5:31 PM In reply to

    Re: 3 feature program - for dvr-ms files

    I use c# whenever I can, DirectShow.Net makes it easy to incorporate DirectShow functionality into a managed environment.  C++ is useful to, but I'm not that familiar with it so I'm much less productive, but for some tasks it is required,
    DVRMSToolbox, Recording Broker, LcdWriter, and more software
    babgvant.com
Page 1 of 1 (5 items)
@2008 andy vt
Powered by Community Server (Non-Commercial Edition), by Telligent Systems