Opened 2 months ago

Last modified 2 months ago

#11226 new enhancement

Add Track Names to OP1a MXF files

Reported by: Isaac T. Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords: MXF mxf avid op1a tracks metadata
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Isaac T.)

Hello ffmpeg Team,

My name is Isaac. Thank you for all your work on ffmpeg, but I think I found a bug worth addressing.

I am trying to add Track Names to existing OP1a MXF files with ffmpeg.

For context, I want to use these OP1a MXFs in Avid Media Composer as editorial media, not for exports or deliverables. If Track Names are available and uniquely named in an OP1a MXF, those MXFs become more useful in the conform stage of post-production between Media Composer and Blackmagic Design’s DaVinci Resolve.

Given an existing OP1a MXF was transcoded from something like EditReady by Hedge, this is the exact command line I used to add track names to an OP1a MXF:

~/Downloads/ffmpeg/ffmpeg -i ~/Movies/EditReady/P1810409.mxf -map_metadata 0:g -metadata material_package_name="Isaac's Material Package Name" -metadata file_package_name="Isaac's File Package Name" -metadata reel_name="Isaac's Reel Name" -metadata:s:0 track_name="Track 1" -metadata:s:1 track_name="Track 2" -c copy ~/Movies/EditReady/test.mxf

Although ffmpeg reports successfully adding a “track_name” to each stream, the resulting OP1a MXFs are unusable in Avid Media Composer. Adding the OP1a MXFs to one of Media Composer managed media folders results in an error – CM_LABEL_NOT_UNIQUE, tt:2, lnum:768 – the Bin Column labeled “Tracks” displays an inaccurate number of tracks, and the associated Clip won’t play. (See attached screenshots.)

Also, using ffprobe on the resulting OP1a MXFs shows no “track_name” metadata was added to any of the streams.

Attached is the full, uncut console output from “ffmpeg -v 9 -loglevel 99 -i” I used with my OP1a MXF from EditReady.

A few last bits on OP1a MXFs you may already know:

Attached is a screenshot from ffprobe of a usable OP1a MXF transcoded with Avid Media Composer 2024.6.

Based on this screenshot, all of these metadata items will exist in an OP1a MXF when used by Avid Media Composer:

  • material_package_name & material_package_umid
  • file_package_name & file_package_umid (per stream)
  • track_name (per stream)
  • reel_name & reel_name_umid (per stream)
  • timecode

Here are my observations on how Media Composer treats OP1a MXFs with and without certain metadata:

  1. If you don't define material_package_name, file_package_name, and reel_name, MC successfully indexes, opens, and plays back an OP1a MXF.
  1. If you define, material_package_name and file_package_name, MC successfully indexes, opens, and plays back an OP1a MXF.
  1. If you define material_package_name, file_package_name, and reel_name, MC fails to index an OP1a MXF with that error. MC will open that Clip without crashing, but won't playback anything. Apparently, MC expects track_name to be explicitly defined per stream.

And if reel_name isn’t present in an OP1a MXF, DaVinci Resolve users have to find another way to match media files when doing a conform and round-trip back to Media Composer.

I know Media Composer is difficult to use, so if needed, these articles I wrote may help with testing:

Thank you for considering!

-Isaac T.-

Attachments (5)

ffmpeg - Full Uncut Console Output - From Isaac T - 2024 Oct 03.txt (27.3 KB ) - added by Isaac T. 2 months ago.
1 - Screenshot - Avid Media Composer Error - CM_LABEL_NOT_UNIQUE.png (31.5 KB ) - added by Isaac T. 2 months ago.
Screenshot - Avid Media Composer Error - CM_LABEL_NOT_UNIQUE
2 - Screenshot - Avid Media Composer - Bin Column - Tracks - Inaccurate Amount of Tracks.png (43.4 KB ) - added by Isaac T. 2 months ago.
Screenshot - Avid Media Composer 2024.6 - Bin Column - Tracks - Inaccurate Amount of Tracks
ffmpeg - Full Uncut Console Output + Added Track Names - From Isaac T - 2024 Oct 05.txt (504.6 KB ) - added by Isaac T. 2 months ago.
3 - ffprobe - OP1a MXF Transcoded from Avid Media Composer.jpeg (441.9 KB ) - added by Isaac T. 2 months ago.
Screenshot - ffprobe - Report of OP1a MXF Transcoded from Avid Media Composer

Download all attachments as: .zip

Change History (9)

by Isaac T., 2 months ago

Screenshot - Avid Media Composer Error - CM_LABEL_NOT_UNIQUE

by Isaac T., 2 months ago

Screenshot - Avid Media Composer 2024.6 - Bin Column - Tracks - Inaccurate Amount of Tracks

comment:1 by Tomas Härdin, 2 months ago

Type: defectenhancement

mxfenc doesn't write track_name. I'm not sure where you get 'ffmpeg reports successfully adding a “track_name” to each stream' from - the console output attached doesn't even mention track_name. mxfenc doesn't report what it has written. Also Avid Media Composer is notoriously picky about MXF as far as I remember

comment:2 by Isaac T., 2 months ago

@Tomas: thanks for giving this a look.

I uploaded another set of console output using the command in this thread to add track_name metadata to each stream.

Here's the excerpt from that output that ffmpeg reporting it successfully added track_name's to each stream:

Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
[pcm_rechunk_bsf @ 0x7fa2e5704ac0] Setting entry with key 'r' to value '24000/1001'
Automatically inserted bitstream filter 'pcm_rechunk'; args='r=24000/1001'
Output #0, mxf, to '/Users/isaacterronez/Movies/EditReady/test.mxf':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
    uid             : adab4424-2f25-4dc7-92ff-000c00000000
    generation_uid  : adab4424-2f25-4dc7-92ff-000c00000001
    company_name    : Hedge
    product_name    : EditReady
    product_version_num: 59.27.100.0.0
    product_version : 24.4
    application_platform: Lavf (darwin)
    product_uid     : adab4424-2f25-4dc7-92ff-29bd000c0002
    toolkit_version_num: 59.27.100.0.0
    material_package_umid: 0x060A2B340101010501010D00139F56AD52947134C99F56AD0052947134C99F00
    timecode        : 00:22:19:01
    material_package_name: Isaac's Material Package Name
    file_package_name: Isaac's File Package Name
    reel_name       : Isaac's Reel Name
    encoder         : Lavf61.5.101
  Stream #0:0, 0, 1001/24000: Video: dnxhd (DNXHD), 1 reference frame, yuv422p(bt709/unknown/unknown, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 0/1, q=2-31, 23.98 fps, 23.98 tbr, 23.98 tbn
      Metadata:
        file_package_umid: 0x060A2B340101010501010D00139F56AD52947134C99F56AD0052947134C99F01
        reel_umid       : 0x060A2B340101010501010D00139F56AD52947134C99F56AD0052947134C99F02
        reel_name       : From EditReady 24.4
        timecode        : 00:22:19:01
        track_name      : Track 1
  Stream #0:1, 0, 1/48000: Audio: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304 kb/s
      Metadata:
        file_package_umid: 0x060A2B340101010501010D00139F56AD52947134C99F56AD0052947134C99F01
        reel_umid       : 0x060A2B340101010501010D00139F56AD52947134C99F56AD0052947134C99F02
        reel_name       : From EditReady 24.4
        timecode        : 00:22:19:01
        track_name      : Track 2

Also Avid Media Composer is notoriously picky about MXF as far as I remember

You're right! Re-reading my last reply, I realized I forgot to attach that screenshot of the ffprobe report on an OP1a MXF created by Media Composer.

I've uploaded it now and annotated it for so you can easily locate the metadata needed to satisfy Media Composer's requirements based on my obersvations:

  1. material_package_name & material_package_umid
  2. file_package_name & file_package_umid (per stream)
  3. track_name (per stream)
  4. reel_name & reel_name_umid (per stream)
  5. timecode
Version 0, edited 2 months ago by Isaac T. (next)

by Isaac T., 2 months ago

Screenshot - ffprobe - Report of OP1a MXF Transcoded from Avid Media Composer

comment:3 by Isaac T., 2 months ago

Description: modified (diff)

comment:4 by Isaac T., 2 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.