Create proxy files with matching audio channels

If you are working with a proxy workflow in Adobe Premiere you may have encountered an audio channel mismatch error when attempting to connect your proxy media. The bad news: You are going to need to transcode everything again. The good news: I have solutions!

I generally prefer to do this with DaVinci resolve. However, if you are using the Lite version you won’t be able to import some 10-bit formats (GH5, FS5, etc). Never fear, ffmpeg has your back!

DAVINCI RESOLVE METHOD

This method will be easier for those less savvy with the Terminal. I’m going to assume you know how to use DaVinci Resolve.

  1. Import footage to Media Pool

  2. Create a timeline with your footage

  3. On the Deliver page make sure you select individual clips

  4. Choose your desired video output settings

  5. Under Audio, you are going select same as source

  6. Under the File tab, select Filename uses: Source Name to match your output file names

  7. Hit render and you’re done!

FFMPEG METHOD

  1. Open a terminal window and make sure you have ffmpeg installed

    ffmpeg

    This should return a bunch of lines of text starting with the version number

    ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers

  2. Run the transcoding command

    ffmpeg -i inputfile.mxf -map 0 -g 48 -c:v libx264 -profile:v baseline -crf 16 -c:a aac -b:a 256k -vf scale=852:480 -pix_fmt yuv420p output_file.mp4

    This example converts the input file to a 852x480p H.264 file. I’ll be honest, I am not sure what a lot of the option flags are for but the main ones to look out for are scale=width:height and -map 0 .

    In my particular case it was a bit more complicated. When I tried running the above command I kept getting an error saying:

    Could not find tag for codec none in stream #9, codec not currently supported in container

    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

    Stream #9? Huh? ffmpeg identifies the data streams in a file starting with 0 and I knew my file had 8 channels of audio (streams 1-8) so whats this 9th stream? Lets use ffmpeg to check what streams our file contains

    ffmpeg -i input_file.mxf

    You will see a list with all of the streams printed in your terminal.

    Stream #0:9: Data: none

    Metadata:
    file_package_umid: 0x060A2B340101010501010D431300000000BC7A79727305DF080046020298578A
    data_type: vbi_vanc_smpte_436M

    I have no idea what this is, but I do know that it isn’t audio and it isn’t video! If you add an additional map option to your ffmpeg command telling it to ignore this stream you will be in business. In this specific example the ignore option is -map 0:9

    Here’s the full example:

    ffmpeg -i inputfile.mxf -map 0 -map 0:9 -g 48 -c:v libx264 -profile:v baseline -crf 16 -c:a aac -b:a 256k -vf scale=852:480 -pix_fmt yuv420p output_file.mp4

Previous
Previous

Batch process files in a directory with FFMPEG and bash scripts

Next
Next

Mount SMB volume from terminal