2

We recorded video from our last event with 2 sources (1 mic by speakers) and we now have to handle MXF files with 2 diferent sources.

I need to upload this video file on Youtube, it work but it only take the first audio source.

Any (Simple) way to merge this two audio sources ?

Regards,

5

First, get ffmpeg.

Generally, you want to give YouTube the highest quality you can because it will re-encode anything you give it, but the formats used in MXF can be mental for uploading. So re-encoding to modern formats for a more manageable upload often makes sense.

Example

ffmpeg -i input.mxf \
-filter_complex "[0:a:0][0:a:1]amerge" \
-ac 2 -c:v libx264 -crf 18 -c:a libvorbis output.mkv

What these options do

  • -filter_complex "[0:a:0][0:a:1]amerge[a]" – Take the two audio streams and combine them with amerge filter into one, multichannel stream.

    • The [0:a:1] refers to [input file index:stream specifier:stream index], so [0:a:1] is the second audio stream from the first input file (input.mxf).
  • -ac 2 – Downmix audio to stereo.

  • -c:v libx264 – Encode video to H.264. See more info and examples.

    • -crf 18 – libx264 option to make output roughly "visually lossless".
  • -c:a libvorbis – Encode audio to Vorbis.

  • output.mkv – Output to Matroska container format. It will not be playable in WMP or QuickTime, but who cares. YouTube will, and YouTube is all that matters in this case. VLC, mpv, or MPC-HC will be able to play it.

Keeping it as MXF

If you want MXF for whatever reason:

ffmpeg -i input.mxf \
-filter_complex "[0:a:0][0:a:1]amerge[a]" \
-map 0:v -map "[a]" -ac 2 -c:v copy -c:a pcm_s16le output.mxf
  • The video will be stream copied (re-muxed). No re-encoding, so it will be fast and preserve quality.

  • MXF is picky, so the -map option is used to arrange the output streams in a MXF friendly order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.