


filter_complex "channelsplit=channel_layout=5.1" \ Split a 5.1 channel input into individual per-channel files using the channelsplit audio filter: If inputs do not have the same duration the output will stop with the shortest. With amerge all inputs must have the same sample rate and format. filter_complex "amerge=inputs=6" -map "" output.wav filter_complex "join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR" -map "" output.wavĪnother method using the amerge audio filter which is somewhat less flexible than the join filter shown above: The join audio filter also allows you to manually choose the layout:

filter_complex "join=inputs=6:channel_layout=5.1" -map "" output.wav Note: These examples will not magically create a "true" stereo output from the mono input, but simply place the same audio into both the left and right channels of the output (both channels will be identical).Ĭreate a stereo output from two mono inputs with the join audio filter:įfmpeg -i left.mp3 -i right.mp3 -filter_complex "join=inputs=2:channel_layout=stereo" -map "" output.mp3įfmpeg -i left.mp3 -i right.mp3 -filter_complex "amerge=inputs=2" -map "" output.mkaĬombine 6 mono inputs into one 5.1 (6 channel) output with the join audio filter:įfmpeg -i front_left.wav -i front_right.wav -i front_center.wav -i lfe.wav -i back_left.wav -i back_right.wav \ Output each channel in stereo input to individual mono streams in one output file with the channelsplit audio filter:įfmpeg -i in.mp3 -filter_complex "channelsplit=channel_layout=stereo" output.mka Output each channel in stereo input to individual mono files with the channelsplit audio filter:įfmpeg -i stereo.wav -filter_complex "channelsplit=channel_layout=stereo" -map "" left.wav -map "" right.wavįfmpeg -i stereo.wav -map_channel 0.0.0 left.wav -map_channel 0.0.1 right.wavįfmpeg -i stereo.wav -filter_complex "pan=1c|c0=c0 pan=1c|c0=c1" -map "" left.wav -map "" right.wav

