Created
September 3, 2020 10:22
-
-
Save featherbear/01182337fd97fc8b7ff2da9b3dff0554 to your computer and use it in GitHub Desktop.
Windows FFmpeg | Downmix stereo to mono audio in a video file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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