Skip to content

Instantly share code, notes, and snippets.

@n8jadams
Created October 16, 2021 12:28
Show Gist options
  • Save n8jadams/5051664fae882736ff08be6e20e5f31d to your computer and use it in GitHub Desktop.
Save n8jadams/5051664fae882736ff08be6e20e5f31d to your computer and use it in GitHub Desktop.
Convert Apple ALAC (.m4a) to .mp3
#!/bin/sh
# Find and convert all apple alac (.m4a) files to .mp3.
find . -name '*.m4a' -print0 | while read -d '' -r file; do
ffmpeg -i "$file" -n -acodec libmp3lame -ab 320k "${file%.m4a}.mp3" < /dev/null && rm "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment