Big-endian aes audio in mxf

Developers
pawel
2011-08-22
2013-04-25
  • pawel
    pawel
    2011-08-22

    Hi,

    Is there a way to specify 24 bit 48 kHz aes audio as Big-endian byte order in writeavidmxf, ( frame-wrapped essence with video? ) I've changed the line:
    CHK_ORET(mxf_set_int16_item(writer->prefaceSet, &MXF_ITEM_K(Preface, ByteOrder), 0x4949)); /* little-endian */

    CHK_ORET(mxf_set_int16_item(writer->prefaceSet, &MXF_ITEM_K(Preface, ByteOrder), 0x4d4d)); /* little-endian */
    but i'am not sure is this is enough.

    I've also found some bug in writeavidmxf, as i understand this,
    inputs.bytesPerSample = 2; (line 1688, for PCM essence) should be different for different bps but in example, this value is always set to 2.

    Best regards,

     
  • pawel
    pawel
    2011-08-22

    The comment is second code is wrong, should be /* big-endian */

     
  • Philip de Nier
    Philip de Nier
    2011-08-22

    The Preface::ByteOrder property is only relevant to the AAF stored format where the file usually adopts the byte order of the platform that creates it. In MXF that property is not relevant; MXF KLV is always big endian.

    I think it's preferably to stick with little endian PCM. However, if you want to use big endian then you need the AIFF labels, keys and track numbers. It's probably easiest to extract those from an Avid sample file.

    writeavidmxf has the input options after the inputs (can't remember why I did it that way) and therefore the value 2 is the default bps and can be overridden by the succeeding -bps option.

    Philip