Last active
March 24, 2025 16:59
-
-
Save auyongcheemeng/0a0b3cdbabb19cf803da0caa7d5d0179 to your computer and use it in GitHub Desktop.
ffmpeg flac to alac conversion batch script (windows)
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
:::: ffmpeg script for converting FLAC to ALAC | |
:: ffmpeg windows binary is required (https://ffmpeg.org) | |
:: Script creates the folders ['flac' and 'alac'] on first run. | |
:: Copy the associated files to the appropriate folder [ie. '.flac' files to 'flac' folder] | |
:: and run the | |
IF NOT EXIST alac\NUL mkdir alac | |
IF NOT EXIST flac\NUL mkdir flac | |
for %%a in ("flac\*.flac") do ffmpeg -y -i "%%a" -vn -c:a alac "alac\%%~na.m4a" | |
:: [optional] for flac files with embedded coverart (thanks @ChocolateAdventurouz) - uncomment line below /comment line above if used | |
:: for %%a in ("flac\*.flac") do ffmpeg -y -i "%%a" -c:v copy -c:a alac "alac\%%~na.m4a" | |
@echo off | |
pause |
I second the previous comment. This script is so nice.
Gotta try. Thanks!
In case you want to have the album art in the alac file, the ffmpeg command should be:
for %%a in ("flac\*.flac") do ffmpeg -y -i "%%a" -c:v copy -c:a alac "alac\%%~na.m4a"
In case you want to have the album art in the alac file, the ffmpeg command should be:
for %%a in ("flac\*.flac") do ffmpeg -y -i "%%a" -c:v copy -c:a alac "alac\%%~na.m4a"
Nice, updated the script for those who might want it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was a lifesaver. Thank you so much.