Loop/Batch file for extracting all .aac from .m4a files in folder
I need to extract the .aac stream from ~1749 .m4a files with ffmpeg
This is what I use for single files:
ffmpeg -i example.m4a -vn -c:a copy example.acc
All loops I found on the internet aren't working for me.
Use the below examples and just plug in your source path and output path accordingly—I have both implicit and explicit examples below to run as batch or manually from command prompt.
As usual be sure to test this with test files first though to ensure it works as expected.
EXPLICITExplicit
Manual from command line copy and paste
FOR %A IN ("C:\SourcePath\*.m4a") DO ffmpeg -i "%~A" -vn -c:a copy "C:\OutputPath\%~NA.aac"
Run from a batch script
FOR %%A IN ("C:\SourcePath\*.m4a") DO ffmpeg -i "%%~A" -vn -c:a copy "C:\OutputPath\%%~NA.aac"
IMPLICITImplicit
Manual from command line copy and paste
FOR %A IN ("*.m4a") DO ffmpeg -i "%~A" -vn -c:a copy "%~NA.aac"
Run from a batch script
FOR %%A IN ("*.m4a") DO ffmpeg -i "%%~A" -vn -c:a copy "%%~NA.aac"