ffmpeg:audio:audio_channels:change_audio_channels_-_5.1_to_stereo
This is an old revision of the document!
Table of Contents
ffmpeg - Audio - Audio Channels - Change Audio Channels - 5.1 to Stereo
Use ffmpeg built-in downmix
ffmpeg -i input.mp4 -c:v copy -ac 2 stereo_output.mp4
NOTE: The -ac 2 switch works by mixing proportions of the first 5 channels from the sources 6-channel stream - Back Left, Back Right, Front Left, Front Right and Front Center - into the Front Left and Front Right channels of the output stereo stream:
- -ac 2 tells ffmpeg to downmix the audio to stereo.
- It will then choose a reasonable default audio codec for a .mp4 file.
WARNING: When using this option, audio from the LFE channel (the .1 in 5.1, reserved for the subwoofer and used for deep, low-frequency effects) is discarded completely when using this option.
Specify multiple channels for the stereo mix
This example takes a combination of various channels for the stereo mix.
ffmpeg -i "input.mkv" -c:v copy -af '-af "pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR"' -ac 2 -c:s: copy stereo_output2.mp4
Specify two channels for the stereo mix
This example takes only the front left and front right channel for the stereo mix.
ffmpeg -i "input.mkv" -c:v copy -af 'pan=stereo|c0=FL|c1=FR' -ac 2 -c:s: copy stereo_output2.mp4
NOTE: This is probably a very bad way to downmix multi channel audio.
- It completely discards all channels except for the first 2.
- For most 5.1 audio source, most dialogue will be on the 3rd channel, FC.
- This discards that.
ffmpeg/audio/audio_channels/change_audio_channels_-_5.1_to_stereo.1742945069.txt.gz · Last modified: 2025/03/25 23:24 by peter