0

I have a 2 audio track mxf file and need to clone the video but create 8 audio tracks. The tracks 1 and 2 should be copied into 3 and 4, 5 and 6 and 7 and 8. Some files that I'm dealing with are 4 track files with the silence in 3 and 4, and some are genuine 2 track mxf's with a mono audio in each one. Not wearing my ffmpeg boots for quite some time, any ideas how to achieve this? Thanks!

1 Answer 1

0

In case anyone ever needs it, this worked out for me, the combination of split filter and map.

-filter_complex "[0:1]asplit=4[1:1][1:3][1:5][1:7];[0:2]asplit=4[2:2][2:4][2:6][2:8]"

-map 0:v:0 -map "[1:1]" -map "[2:2]" -map "[1:3]" -map "[2:4]" -map "[1:5]" -map "[2:6]" -map "[1:7]" -map "[2:8]"

The whole command:

ffmpeg -y -i <input_2_tracks>.mxf -filter_complex \
"[0:1]asplit=4[1:1][1:3][1:5][1:7];[0:2]asplit=4[2:2][2:4][2:6][2:8]" \
-map 0:v:0 -map "[1:1]" -map "[2:2]" -map "[1:3]" -map "[2:4]" -map "[1:5]" \
-map "[2:6]" -map "[1:7]" -map "[2:8]" \
-c:v copy -c:a pcm_s24le -ar 48000 <output_8_tracks>.mxf

This will take input with any number of tracks and copy the first two tracks into the eight tracks in the output file. The asplit arguments [1:1][1:3] etc. may be named arbitrarily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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