This file contains hidden or 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
| REM This script will check all MP4 files in the current folder | |
| REM and process them to extract audio into separate files (M4A). | |
| REM The audio files use the same file name as the original video file, with a number, and the M4A extension | |
| REM This is a batch file, to be run on Windows, in Command Line. | |
| REM For Linux, see the "extract-audio.sh" gist below | |
| REM In this example, there are 2 audio tracks, which get split out to 2 separate audio files. | |
| REM The original video file remains unchanged. | |
| REM If you want have a video file with more than 2 audio tracks, | |
| REM just add more "-map 0:a:0 -c copy "%~na audio track 1.m4a"" sections: | |
| REM -map 0:a:0 -c copy "%~na audio track 1.m4a" |