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

How do you find the footer in an MXF file?
http://freemxf.org/forum/viewtopic.php?f=4&t=11
Page 1 of 1

Author:  Board Admin [ Sun Apr 18, 2004 3:04 pm ]
Post subject:  How do you find the footer in an MXF file?

Finding the footer of an MXF file is not always easy, the general algorithm to use is as follows:
  • Check the FooterPosition property in the header partition pack
  • Next, check for a Random Index Pack at the end of the file (read the last 4 bytes of the file which should be the size of the RIP, seek back this many bytes and see if you find a RIP key) the last entry will be for the footer
  • Next, scan backwards through the file, byte-by-byte looking for the footer key, if you find it validate that it is a footer not just the bytes that make up the footer key as part of some other data field.
  • If all else fails you may have to scan every KLV from the start of the file - this is not likely to be quick!
As you can see it is much easier to find the footer if either the FooterPosition property in the header is used or the file contains a Random Index Pack. So, if it is not possible to complete FooterPosition when encoding an MXF file add a RIP.

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