bbc / bmx

Library and utilities to read and write broadcasting media files. Primarily supports the MXF file format
BSD 3-Clause "New" or "Revised" License
62 stars 17 forks source link

Create an MXF compatible with pyAAF2 #97

Open ndeshpande2022 opened 3 weeks ago

ndeshpande2022 commented 3 weeks ago

Hi there,

We're using raw2bmx to generate MXF files with embedded 608/708 closed captioning. Unfortunately the MXF files are not compatible with pyAAF which we use to generate an AAF file for Avid Media Composer (with the MXF linked).

It looks like the issue is related to the fact pyAAF can only link OPAtom mxf files. I believe this is a simple fix in the MXF header and has to do with the Operational Pattern Item Designator: ({ 0D.01.02.01.01.01.01.00 })

I think it should be changed to { 0D.01.02.01.10.01.00.00 }

Which is what it is in other MXF files that work with pyAAF. Not sure what else this may impact but I thought I would bring it to your attention in case someone else is trying to do the same thing.

ndeshpande2022 commented 3 weeks ago

I wanted to correct my original ticket. The issue does seem to be around the operation pattern. raw2bmx generates an MXF with an operation pattern of: MXF OP1a SingleItem SinglePackage UniTrack Stream Internal - [ 060e2b34.04010101.0d010201.01010100 ] image

However, pyAAF requires an operational pattern of MXF-OP Atom 1 Track N SourceClips - [ 060e2b34.04010102.0d010201.10010000 ] image

It appears to be a very simple change to the bytes being added. I hope this helps everyone.