Search code examples
audioffmpeg

How to take audio channels from a file and create an audio file with the channels as tracks?


I have an audio file with multiple channels. How can I create a new file which has multiple audio tracks instead?


Solution

  • This worked for me:

    ffmpeg -i in.wav -filter_complex '[a:0]channelsplit=channel_layout=5c[out0][out1][out2][out3][out4]' -ac 1 -map '[out0]' -map '[out1]' -map '[out2]' -map '[out3]' -map '[out4]' out.webm

    Reference: https://ffmpeg.org/ffmpeg-filters.html#Examples-21