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

random index pack, ending file on a 512 byte bdry
http://freemxf.org/forum/viewtopic.php?f=3&t=152
Page 1 of 1

Author:  Tommy [ Thu May 29, 2008 4:56 pm ]
Post subject:  random index pack, ending file on a 512 byte bdry

Hi again,

We'd like to use the random index pack at the end of our mxf files,
and then also, if possible, end the file on a 512 byte boundary.

This, however, does not seem to be easy to do, given that the footer partition pack precedes it, and ends with padding on a 512 byte mark
(our KAG size).

Our random index is only 60 bytes (points to header, 1 body, and footer),
but I get the impression one can not pad the random index at the end,
nor can padding be placed within the random index (you can't have
the filler KLV within another KLV, can you? ).
And then you can't pad before the random index, because it butts
up against the filler for the footer partition pack, and you're not
supposed to place 2 filler KLV's back to back, right?

Is there a way around this?

Thanks, Tommy Schell

:roll:

Author:  akira [ Tue Sep 09, 2008 7:36 am ]
Post subject: 

just an idea.

Insert 37 dummy empty body paritions before footer partition,
and use BER of RIP 12byte length form.
8b 00 00 00 00 00 00 00 00 00 02 00
Then, 512 byte = 16(key) + 12(ber) + 12 * 40(number of paritions) + 4(length)

But many implementation maybe ignore 12byte length BER form.

Author:  Matt Beard [ Tue Sep 09, 2008 10:17 am ]
Post subject: 

It would not be valid to use a 12-byte length!

At the moment WriteFooter() always adds a RIP that is aligned to the current KAG.

If you need the RIP to end on a KAG boundary I suggest that after calling WriteFooter() you move back to the location of the KLVFill following the footer and re-write that KLVFill to be larger by (KAGSize - Size of RIP) then add a new RIP.

Author:  Tommy [ Tue Sep 09, 2008 3:07 pm ]
Post subject: 

I did something similar: I found in the SMPTE docs (S377M) that each partition can have its own unique KAG size.

So I simply changed my KAG size in my footer to accomodate this:

KAG = 512 - sizeof (RIP)

Footer Partition pack is padded to the KAG, followed by RIP.
Then the RIP ends on a 512 byte boundary.

Thanks
Tommy


:lol:

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