Skip to content

Instantly share code, notes, and snippets.

@tulior
Created July 17, 2020 20:20
Show Gist options
  • Save tulior/608b3564859d0554c4941feaf9e080dd to your computer and use it in GitHub Desktop.
Save tulior/608b3564859d0554c4941feaf9e080dd to your computer and use it in GitHub Desktop.
ffmpeg commands to downmix audio to 2 channels
# LIBOPUS
ffmpeg -i <input> -c:a libopus -b:a <bitrate> <output>
# FORMULA TO DOWNMIX TO 2 CHANNELS AND EMPHASIZE VOICE
ffmpeg -i <input> -c:v copy \
-ac 2 -af "pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR" \
<output>
# COMBINED
ffmpeg -i <input> -c:v copy -c:a libopus -b:a <bitrate> \
-ac 2 -af "pan=stereo|FL=FC+0.30*FL+0.30*BL|FR=FC+0.30*FR+0.30*BR" \
<output>
https://superuser.com/a/1410620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment