[FFmpeg-user] Copying all audio channels and create mixdown at the same time

Steve Dierker steve.dierker at flavoursys.com
Tue Aug 22 19:15:16 EEST 2017

Hello list,

I have an MXF file with one video track and 8 audio track. I'm trying to
reencode it to MP4 while preserving all existing tracks and also adding
a mixdown of all audio tracks as the 9th track.
Right now I'm only able to do this in 2 separate FFmpeg calls and I'm
wondering whether one can do it in one call.

This is how I do it right now:

# Create mixdown MP4
ffmpeg -i audio_8.mxf \
  -vn -c:a libfdk_aac -b:a 128k \
  -filter_complex amix=inputs=8:dropout_transition=2 \
  -y mixdown.mp4

# Merge and reencode video
ffmpeg -i audio_8.mxf -i mixdown.mp4 \
  -c:v libx264 -b:v 700k -c:a libfdk_aac -b:a 128k \
  -map 0 -metadata:s:a:0 language=abw -metadata:s:a:1 language=afg \
  -metadata:s:a:2 language=ago -metadata:s:a:3 language=aia \
  -metadata:s:a:4 language=ala -metadata:s:a:5 language=alb \
  -metadata:s:a:6 language=and -metadata:s:a:7 language=are \
  -map 1 -metadata:s:a:8 language=eng \
  -y finished.mp4

Steve Dierker

Mail: steve.dierker at flavoursys.com
Jabber: steved at jabber.ccc.de
Skype: bigzed625

More information about the ffmpeg-user mailing list