Extract audio from MP4 files in the current directory
Extracts audio from all MP4 files in the current cirectory.
for i in *.mp4; do ffmpeg -i "$i" -vn -acodec copy "${i%.*}.aac"; done
FLAC to ALAC
Converts all FLAC files in the current directory to ALAC, preserving metadata.
for f in *.flac; do ffmpeg -i "$f" -c:a alac "${f%.flac}.m4a"; done
FLAC to MP3
Converts all FLAC files in the current directory to MP3 files with 320 kbps bitrate, preserving metadata.
for f in *.flac; do ffmpeg -i "$f" -ab 320k -map_metadata 0 -id3v2_version 3 "${f%.flac}.mp3"; done