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
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
ffmpeg/audio/audio_channels/change_audio_channels_-_stereo_to_mono.1742947648.txt.gz · Last modified: 2025/03/26 00:07 by peter