Category Archives: Windows

Windows: Convert .wav to .m4a [PC Audio to AAC] using FFmpeg

The latest version of ffmpeg use the libvo_aacenc library. This means the libfdk_aac library is optional.

To convert, type the following

ffmpeg -i in.wav out.aac

Or run the following script in a directory to batch convert files.


FOR /R %%G IN (*.wav) DO (CALL :SUB_VLC "%%G")
FOR /R %%G IN (*.wav.m4a) DO (CALL :SUB_RENAME "%%G")
GOTO :eof

 SET _firstbit=%1
 SET _qt="
 CALL SET _newnm=%%_firstbit:%_qt%=%%
 SET _commanm=%_newnm:,=_COMMA_%
 REM echo %_commanm%
 CALL "D:\Program Files (x86)\FFmpeg\bin\ffmpeg.exe" -i %1 "%_commanm%.m4a
GOTO :eof

 SET _origfnm=%1
 SET _endbit=%_origfnm:*.wav=%
 CALL SET _newfilenm=%%_origfnm:.wav%_endbit%=.m4a%%
 SET _newfilenm=%_newfilenm:_COMMA_=,%
 COPY %1 %_newfilenm%
 DEL %1
GOTO :eof