I have an MKV video file with 5.1 channel audio. I want to use the third channel (FC) as AAC Audio Track 1 (with language label Malayalam), the whole audio file copied as Audio Track 2 (also with language label Malayalam), and save the video as MKV. I don't want to reencode the video.

How can I do that?

I tried this:

ffmpeg -i "input.mkv" -filter_complex "channelsplit=channel_layout=5.1[FL][FR][FC][LFE][BL][BR]" -map '[FC]' -acodec aac -map 0 -vcodec copy "output [Background Removed].mkv"

It gave me the error:

Filter channelsplit:BR has an unconnected output

1 Answer 1


Only extract the relevant channel using channelsplit.


ffmpeg -i "input.mkv" -filter_complex "channelsplit=channel_layout=5.1:channels=FC[FC]" -map '[FC]' -map 0 -c copy -c:a:0 aac "output [Background Removed].mkv"

  • Thanks. I need at least 15 reputation to up-vote. Your answer is really useful. Please mention how to set the language of the new track to Malayalam, so that I can select this as the correct answer.
    – Kalyani
    Aug 3, 2021 at 4:47
  • Add -metadata:s:a:0 language=mal
    – Gyan
    Aug 3, 2021 at 10:49
  • Up-voted and Selected, although it would be useful for everybody to describe each part of the command.
    – Kalyani
    Aug 5, 2021 at 12:52

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.