Skip to content

Instantly share code, notes, and snippets.

@doole
Created February 8, 2024 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doole/f9c2899b0d2f5d3e039c27d9cf84e447 to your computer and use it in GitHub Desktop.
Save doole/f9c2899b0d2f5d3e039c27d9cf84e447 to your computer and use it in GitHub Desktop.
FLAC transcoding (cli)

FLAC Transcode

Convert

MP3 - VBR V0

- encode/mp3

find . -name '*.flac' -print0 | xargs -0 -I FILE sh -c 'ffmpeg -i "$1" -c:a libmp3lame -q:a 0 "${1%.flac}.mp3" ' -- FILE

M4A - CBR 320kbps

find . -name '*.flac' -print0 | xargs -0 -I FILE sh -c 'ffmpeg -i "$1" -c:a libfdk_aac -b:a 320k "${1%.flac}.m4a" ' -- FILE

Split from single FLAC + CUE

shnsplit -f file.cue -t '%n - %t' -o flac file.flac

Tools

  • fedora
sudo dnf install cuetools shntool
  • debian
sudo apt install cuetools shntool
  • macos (homebrew)
brew install cuetools shntool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment