Skip to content

Instantly share code, notes, and snippets.

@Dinir
Created August 9, 2022 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dinir/d3c17c4b432538bdabcc773ff6471508 to your computer and use it in GitHub Desktop.
Save Dinir/d3c17c4b432538bdabcc773ff6471508 to your computer and use it in GitHub Desktop.
Extract aac audio from a video file. Default audio track is 3 (0-index).
@echo off
set "inputfile=%1"
set "filename=%1"
shift
set track=3
:loop
if not "%1"=="" (
if "%1"=="-t" (
set "track=%2"
shift
)
if "%1"=="-o" (
set "filename=%2"
shift
)
shift
goto :loop
)
ffmpeg -i "%inputfile%" -map 0:a:%track% "%filename%".aac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment