Skip to content

Instantly share code, notes, and snippets.

View Medstar117's full-sized avatar
๐Ÿ˜ƒ
Chilling on my PC

Medstar Medstar117

๐Ÿ˜ƒ
Chilling on my PC
View GitHub Profile
@flatlinebb
flatlinebb / extract-audio.bat
Last active April 21, 2025 00:34
How to extract audio from video with ffmpeg, into separate files
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"