Skip to content

Instantly share code, notes, and snippets.

@wotori
Created January 11, 2026 13:49
Show Gist options
  • Select an option

  • Save wotori/7078b4a68c611461627cb4d941a29326 to your computer and use it in GitHub Desktop.

Select an option

Save wotori/7078b4a68c611461627cb4d941a29326 to your computer and use it in GitHub Desktop.
flac to parts
mkdir -p tracks
shnsplit -o flac -f album.cue -d tracks album.flac
cd tracks
for f in *.flac; do
echo "==> Converting: $f"
ffmpeg -hide_banner -loglevel warning -stats -i "$f" \
-codec:a libmp3lame -q:a 2 -map_metadata 0 \
"${f%.flac}.mp3"
done
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment