ffmpeg:audio:audio_channels:change_audio_channels_-_stereo_to_mono
This is an old revision of the document!
Table of Contents
ffmpeg - Audio - Audio Channels - Change Audio Channels - Stereo to Mono
Downmix both channels
ffmpeg -i "input.mkv" -ac 1 mono.mkv
WARNING: Any out of phase stereo will cancel out.
The following filtergraph can be used to bring out of phase stereo in phase prior to downmixing:
-af "asplit[a],aphasemeter=video=0,ametadata=select:key=lavfi.aphasemeter.phase:value=-0.005:function=less,pan=1c|c0=c0,aresample=async=1:first_pts=0,[a]amix"
Choose a specific channel
...using the channelsplit audio filter
ffmpeg -i stereo.wav -filter_complex "[0:a]channelsplit=channel_layout=stereo:channels=FR[right]" -map "[right]" front_right.wav
NOTE: This uses the channelsplit audio filter to include only the right channel.
- If you only want the left channel use FL instead of FR.
- For a list of channel names, run
ffmpeg -layouts
...using the pan audio filter
ffmpeg -i "input.mkv" -af "pan=mono|c0=c1" "mono.mkv"
NOTE: This uses the channelsplit audio filter to include only the right channel.
- Alternatively, you could use c0=FR instead.
- If you only want the left channel, use c0=c0 or c0=FL instead.
ffmpeg/audio/audio_channels/change_audio_channels_-_stereo_to_mono.1742947979.txt.gz · Last modified: 2025/03/26 00:12 by peter