freeMXF.org
http://freemxf.org/forum/

Adding descriptive metadata on MXF OP1A by command line
http://freemxf.org/forum/viewtopic.php?f=2&t=255
Page 1 of 1

Author:  t.christin [ Wed Mar 14, 2012 8:10 am ]
Post subject:  Adding descriptive metadata on MXF OP1A by command line

Hi, I'm new user on this site and beginner with C++ language and MXF files.

I need to automate some process on a video server.
My goal is to update MXF OP1A files by adding them a descriptive metadata track (comment) picked up in a database.
The db is not a problem for me. All I really need is to use some command line to do it ! I downloaded the windows .exe package and I didn't fine any options on mxfwrap.exe for doing this.
I found some posts related to my subject, but the explanations are not enough understandable for my rookie level on C++. :D
I have downloaded the entire SDK too, but I can't compile it with Codeblocks or Visual Studio 2010.

My final aim is to use the command and integrate it into a powershell script.

Any kind of help will be welcome !

Thanks in advance for your precious contribution ! :)

Tim.

Author:  Matt Beard [ Wed Mar 14, 2012 8:57 am ]
Post subject:  Re: Adding descriptive metadata on MXF OP1A by command line

It should be possible to compile the source under Visual Studio 2010, but there may be a few changes required for the compiler to accept the code - most of these should be apparent during the solution conversion that happens when you first open the solution file. I tend to develop in VS2005 and VS2008, but other members of the team to use VS2010 and have not had any major problems.

In order to add descriptive metadata to an existing file, you will need to write a new application rather than using the sample ones available. You will also need to update the dictionary file to add the definitions for the desired metadata classes and items (ideally they should be in a separate dictionary, but you can start by adding them to the main one).

Your application will need to do the following:

* Load the new dictionary
* Open the existing MXF file
* Read and parse the master header metadata for the file
* Add your new properties
* Build an Identification Set and use it to update the files generations UIDs
* Attempt to re-write the master partition with the updated metadata
** This may well fail if the master partition is in the header (as there may not be room for the extended metadata), if so you will need to:
*** Read the partition pack from the header, convert it to an open header and ensure that the value of FooterPartition is correct then re-write this at position 0
*** Turn the master partition into a footer and use this to replace the existing footer (if the existing footer also has index table data you will need to transfer that too)

This may be quite ambitious for "a beginner with C++"

Author:  t.christin [ Fri Mar 16, 2012 2:05 pm ]
Post subject:  Re: Adding descriptive metadata on MXF OP1A by command line

Hi Matt !

Thanks for you detailled reply.
I found the good package (tar.gz, not the zip) and now i can build the mxlib.lib on Visual Studio 2010.
I know it's not quite simple to do it but it coud be very useful at work.

Do you think the easiest way is to base on the simplewrap.exe ? I think it's maybe better because there are no many options and it's what I need.
I have to study the docs and specificities of MXF and ater Iwill begin my code.

Thank you very much again, and I think I will need your help later :)

Have a nice weekend !

Tim.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/