Converting DNxHD 115 QT to OP-ATOM MXF for ingest into Avid Media Composer

Help
2014-03-20
2014-03-20
  • Isaac Guenard
    Isaac Guenard
    2014-03-20

    I'm looking to automate a process that will require converting thousands of Avid DNxHD Quicktimes to MXF files to be used by an Avid Media Composer (MC). Hence it needs to be OP-ATOM

    I feel like I am inches away from a solution, but AVID chokes on all my tests so far. I'm hoping someone with some experience with this or a similar workflow might be able to offer some guidance?

    Since my QT is already DNxHD, I'm going for a barebones command like this.

    > ffmbc -i input_test.mov -threads 8 -s 1920x1080 -vcodec copy -an -y output_test.mxf
    FFmbc version 0.7-rc8
    Copyright (c) 2008-2013 Baptiste Coudurier and the FFmpeg developers
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input_test.mov':
      Metadata:
        major_brand: qt
        minor_version: 537199360
        compatible_brands: qt
      Duration: 00:00:04.12, bitrate: 116278 kb/s
        Stream #0.0(eng): Video: dnxhd, yuv422p, 1920x1080p, 116275 kb/s, 23.98 fps
        Metadata:
          codec_name: DNxHD  709
    Output #0, mxf, to 'output_test.mxf':
      Metadata:
        encoder: FFmbc 0.7
        Stream #0.0(und): Video: dnxhd, yuv422p, 1920x1080p, stream copy, 23.98 fps
    Stream mapping:
      Stream #0.0 -> #0.0
    Press [q] to stop, [?] for help
    frame=   99 fps= 41 Lsize=   58713kB time=00:00:04.12 bitrate=116483.0kbits/s
    video:58608kB audio:0kB global headers:0kB muxing overhead 0.178383%
    

    This produces an Op1a MXF, but i need an OP-Atom. From what I can see, FFMBC does not do that, which means I need to use writeavidmxf from Ingex, which I do with the following command

    > writeavidmxf.exe --film23.976 --prefix "output_op-atom"  --DNxHD1080p115 output_test.mxf
    

    avidmxfinfo tells me the following about the file that produces.

    Filename = output_op-atom_v1.mxf
    Project name =
    Project edit rate = 24000/1001
    Clip name = output_op-atom
    Clip created = 2014-03-20 00:32:49.596
    Clip edit rate = 24000/1001
    Clip duration = 99 samples (00:00:04:03)
    Clip video tracks = 1
    Clip audio tracks = 0
    Clip track string = V1
    Video essence
    Essence type = DNxHD 120
    Essence label = 060e2b34040101010e04030102060102
    Track number = 1
    Edit rate = 24000/1001
    Track duration = 99 samples (00:00:04:03)
    Track segment duration = 99 samples (00:00:04:03)
    Track segment offset = 0 samples (00:00:00:00)
    Start timecode = 0 samples (00:00:00:00)
    Image aspect ratio = 16/9
    Stored WxH = 1920x1080 (full frame)
    Display WxH = 1920x1080 (full frame)
    Material package UID = 060a2b340101010101010f0013000000532a37315cbf0c25060e2b347f7f2a80
    File package UID     = 060a2b340101010101010f0013000000532a37315cc10c25060e2b347f7f2a80
    Physical package UID = 060a2b340101010101010f0013000000532a37315cc00c25060e2b347f7f2a80
    Physical package type = Tape
    Physical package name =
    

    The problem is that the resulting MXF is not recognized by the Avid. When I copy it into D:\Avid MediaFiles\MXF\1 the console reports the following error

    Decode frame failed.
    CChannel: error: CMError_Codec, function Execute, line 284, internal codec error string: HDCODEC Error Non HD Format
    
    DecodeFrame error: HDCODEC Error Non HD Format
    Exception caught in APlayer::Play - Exception: CORE_CONSISTENCY_CHECK_FAILURE, className:SWDC_CodecInterface_Task, methodName:Execute, mDecodeResult:2
    
    FileDebugDump - bad sample(in clip): 0, (in sequence): 0, length: 606208 bytes, starting offset: 0x0x60000 in file: /Volumes/3TB RAID Set 1/Avid MediaFiles/MXF/1/output_op-atom_v1.mxf
    
    Exception caught in APlayer::Play - Exception Exception: std::exception, what:CORE_CONSISTENCY_CHECK_FAILURE raised Quiescing in the exception handlerDecode frame failed.
    CChannel: error: CMError_Codec, function Execute, line 284, internal codec error string: HDCODEC Error Non HD Format
    
    DecodeFrame error: HDCODEC Error Non HD Format
    Exception caught in APlayer::Play - Exception: CORE_CONSISTENCY_CHECK_FAILURE, className:SWDC_CodecInterface_Task, methodName:Execute, mDecodeResult:2
    
    FileDebugDump - bad sample(in clip): 0, (in sequence): 0, length: 606208 bytes, starting offset: 0x0x60000 in file: /Volumes/3TB RAID Set 1/Avid MediaFiles/MXF/1/output_op-atom_v1.mxf
    
    Exception caught in APlayer::Play - Exception Exception: std::exception, what:CORE_CONSISTENCY_CHECK_FAILURE raised Quiescing in the exception handler
    

    I've tried a variety of different command options for the ffmbc command - but so far none have worked out. Can anyone offer any insight into what I might be doing wrong, or a better path to follow? I'm hitting the wall here.

    Thanks in advance for any help

    Isaac G.

     
    • Philip de Nier
      Philip de Nier
      2014-03-20

      The reason Avid doesn't like the OP-Atom file you've created is because writeavidmxf.exe requires raw DNxHD, not MXF wrapped DNxHD. The DNxHD essence in the OP-Atom file therefore contains MXF stuff that shouldn't be there.

      A better tool for you would be bmxtranswrap downloads. You could then use FFmbc to rewrap the Quicktime file to OP-1A MXF (both audio and video) and use bmxtranswrap to re-wrap to Avid OP-Atom.

      Philip

       
  • phillipitn
    phillipitn
    2014-03-20

    Hi Isaac,
    As Philip de Nier says - use bmxtranswrap

    I have a similar need, and cobbled together a Windows script for occasional imports of random media to XDCAM OP-Atom files for use in Newscutter/Media Composer.

    Here's the script below- feel free to use/modify it. Basically it uses ffmbc to transcode, and bmxtranswrap to produce the OP-Atom files, copy them to an Avid MediaFiles folder, and a free mail utility to email alerts/notifications when finished. You'd use Media Tool to actually use the files, unless you want to get into Avid Interplay Web Services ...

    Good luck
    PhilB

    rem echo off
    TITLE Metamorph
    rem change to utf-8 encoding
    chcp 65001

    rem Change to drive and directory of input file
    rem %~d1
    rem cd %~p1

    pushd %~d1%~p1

    rem convert to XDCAMHD422

    TITLE Metamorph - transcoding

    c:\metamorph\ffmbc.exe -i "%~nx1" -threads 8 -tff -r 25 -target xdcamhd422 -an -s 1920x1080 "%~nx1"intermediate.mxf -acodec pcm_s24le -ar 48000 -newaudio -acodec pcm_s24le -ar 48000 -newaudio -acodec pcm_s24le -ar 48000 -newaudio -acodec pcm_s24le -ar 48000 -newaudio

    IF %ERRORLEVEL% NEQ 0 GOTO FFMPEG_ERROR_HANDLER

    TITLE Metamorph - wrapping
    c:\metamorph\bmxtranswrap -t avid -p -o "%~nx1" "%~nx1"intermediate.mxf

    IF %ERRORLEVEL% NEQ 0 GOTO BMXTRANSWRAP_ERROR_HANDLER
    del "%~nx1"intermediate.mxf

    TITLE Metamorph - copying files
    copy "%~nx1".mxf D:\"Avid Mediafiles"\MXF\1
    rem Cleanup
    del "%~nx1"
    .mxf

    TITLE Metamorph - notifying
    c:\metamorph\bmail -s mailrelay.itn.local -t phillip.barnett@itn.co.uk -f metamorph@itn.co.uk -a ""%~nx1" transcode complete" -b "Transcode finished and copied to local Media drives. Now use Media Tool to edit and then consolidate to Interplay"
    msg %username% Transcode finished and ready to use. Use Media tool to view.
    GOTO QUIT

    :FFMPEG_ERROR_HANDLER
    del "%~nx1"intermediate.mxf
    copy "%~nx1" X:\temp
    msg %username% Problem with source file!
    c:\metamorph\bmail -s mailrelay.itn.local -t phillip.barnett@itn.co.uk -f metamorph@itn.co.uk -a "Oops! Ffmbc couldn't transcode "%~nx1"" -b "Copy the file for Server manager's inspection"

    GOTO QUIT

    :BMXTRANSWRAP_ERROR_HANDLER
    del "%~nx1"intermediate.mxf
    c:\metamorph\bmail -s mailrelay.itn.local -t phillip.barnett@itn.co.uk -f metamorph@itn.co.uk -a "Oops! Bmxtranswrap couldn't handle "%~nx1"" -b "Copy file for server manager's inspection"
    GOTO QUIT

    :QUIT

     
  • phillipitn
    phillipitn
    2014-03-20

    Just to clarify, I'm using Windows, but you could obviously adapt that workflow to Mac/Linux, and use a different email command line other than bmail (http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm)

    I have a folder called metamorph in the root of the MC machine, with ffmbc/bmail and bmxtranswrap, and the script, with a shortcut on the desktop. Drag a media file and drop it on the batch file, and wait a while for completion. You'd probably want to modify the process if you're processing thousands of files :-)

    Apologies if I'm stating the obvious ....