C.W.K.
Stream
Lesson 03 of 10 · published

Channel Layout — Mono, Stereo, 5.1

~10 min · channels, mono, stereo, surround

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

Channels carry meaning

An audio stream isn't just 'audio' — it has a channel layout. Mono (1 ch), stereo (2 ch L/R), 5.1 (6 ch FL/FR/C/LFE/SL/SR), 7.1 (8 ch). Each channel is a speaker assignment. Mismatched layouts cause silent channels, doubled center, or worse.

Three operations you'll need

  • Downmix — 5.1 → stereo, stereo → mono. Use -ac 2 or -ac 1. FFmpeg's default downmix coefficients are sensible.
  • Force layout-channel_layout stereo when the source has wrong metadata.
  • Pan — re-route specific channels with the pan filter. Useful when the source has voiceover only on the left channel.

Code

Common channel ops·bash
# 5.1 → stereo (sum surrounds in)
ffmpeg -i surround.mkv -ac 2 -c:v copy stereo.mkv

# Stereo → mono (average L/R)
ffmpeg -i stereo.wav -ac 1 mono.wav

# Force a layout when the source has wrong metadata
ffmpeg -i broken.wav -channel_layout stereo -c:a copy fixed.wav
Custom routing with the <code>pan</code> filter·bash
# Voiceover only on left channel — copy left to both channels
ffmpeg -i input.mp4 -af "pan=stereo|c0=c0|c1=c0" -c:v copy out.mp4

# Swap left and right
ffmpeg -i in.wav -af "pan=stereo|c0=c1|c1=c0" out.wav

# Sum a 5.1 manually (instead of -ac 2)
ffmpeg -i 5.1.wav -af "pan=stereo|FL=FL+0.7*FC+0.5*BL|FR=FR+0.7*FC+0.5*BR" \
  out_stereo.wav
# This is what -ac 2 does by default — the manual form lets you tune it.

External links

Exercise

Take a stereo file. Convert to mono with -ac 1. Then take a 5.1 source (download a Hollywood trailer or generate one with ffmpeg -f lavfi -i 'anoisesrc=channel_layout=5.1'). Downmix to stereo and listen — is the dialogue still clearly audible? Try the manual pan recipe and compare to the default -ac 2.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.