Skip to content

Instantly share code, notes, and snippets.

@stemwinder
Last active May 21, 2017 20:11
Show Gist options
  • Save stemwinder/c18a8f814e061f73dcd102628e9d03c8 to your computer and use it in GitHub Desktop.
Save stemwinder/c18a8f814e061f73dcd102628e9d03c8 to your computer and use it in GitHub Desktop.
FLAC & ALAC Commands
# delete all FLAC files recursively
find ./* -depth -type f -name \*.flac -delete
# list all FLAC files recursively
find ./* -depth -type f -name \*.flac
# convert all FLAC files to ALAC recursively
find ./* -depth -type f -name \*.flac | parallel -j+0 --gnu nice -n 19 ffmpeg -i "{}" -c:a alac "{.}.m4a"
# convert FLAC to ALAC and strip album art
ffmpeg -i INPUT -c:a alac -map 0:a -map -0:v [OUTPUT]
# show a file's stream count in JSON format
ffprobe -v quiet -print_format json -show_format -show_streams [INPUT] | jq '{name: .format["filename"], streams: .streams | length}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment