Skip to content

Instantly share code, notes, and snippets.

@featherbear
Created September 3, 2020 10:22
Show Gist options
  • Save featherbear/01182337fd97fc8b7ff2da9b3dff0554 to your computer and use it in GitHub Desktop.
Save featherbear/01182337fd97fc8b7ff2da9b3dff0554 to your computer and use it in GitHub Desktop.
Windows FFmpeg | Downmix stereo to mono audio in a video file
@echo off
:: Drag the video file onto this file to downmix
rem Extract stereo stream
ffmpeg -i "%~1" -vn -acodec copy "%~1.stereo.aac" -y
rem Downmix stereo to mono
ffmpeg -i "%~1.stereo.aac" -ac 1 "%~1.mono.aac" -y
rem Replace stereo stream with mono stream
ffmpeg -i "%~1" -i "%~1.mono.aac" -c:v copy -map 0:v:0 -map 1:a:0 "%~p1%~n1.mono%~x1"
del "%~1.stereo.aac"
del "%~1.mono.aac"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment