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
64 stars 19 forks source link

raw2bmx RAW ANC Data format #92

Open ndeshpande2022 opened 3 months ago

ndeshpande2022 commented 3 months ago

Hi there,

I'm looking for information regarding the format of the RAW ANC data: --anc captions.raw

If I want to embed 608/708 closed captioning as ANC data with no video or audio, is this possible? I have the hex data for the CDP. Is this enough?

ps. If it helps, the end goal is two wrap the mxf into an AAF file for Avid.

philipnbbc commented 3 months ago

Support for ANC data is limited in bmx. The file provided to the --anc option needs to have the data already formatted according to SMPTE ST 436 "MXF Mappings for VBI Lines and Ancillary Data Packets". I assume CDP is just the caption data and so that won't include the ST 436 wrapping. bmx just treats it as an opaque blob of data. The frames also need to have a fixed size (--anc-const) to allow bmx to read frames from the input.

ndeshpande2022 commented 3 months ago

Hi @philipnbbc - thanks so much for your quick reply. I have the SMPTE-436 spec and it looks simple enough to wrap 608 and 708 captions. I'll give it a try and post back an example to this issue so that others can reference it.

Thanks again!

ndeshpande2022 commented 2 months ago

In case this helps someone in the future...

We were able to get this to work (to embed CC 608/708 in a MXF file). I've attached a copy of the raw essence file we used and the command:

.\bin\raw2bmx.exe -t op1a -f 23976 -o .\samples\tmp\raw2bmxtestNEW.mxf --anc-const 124 --anc .\ccCreatorFiles_d0.raw

A couple important notes: The frame rate is really important, the same is true for the 608/708 data size. The 608/708 data will be a different size depending on the frame rate.

Other issues: We're still trying to figure out how to embed the output in a AAF file using pyAAF2 but we haven't gotten it to work quite yet. I'll try and reply back when we have more information.

For now, here is the example ANC file we used to do the embed: ccCreatorFiles_d0.txt (Change extension .raw)