Skip to content

Instantly share code, notes, and snippets.

@dscp46
Created August 11, 2026 11:34
Show Gist options
  • Select an option

  • Save dscp46/2ae1e32d468ecf7b38c78fc40b0e5903 to your computer and use it in GitHub Desktop.

Select an option

Save dscp46/2ae1e32d468ecf7b38c78fc40b0e5903 to your computer and use it in GitHub Desktop.
Convenient one liners
# Batch convert CDDA wav files into flac
find . -name '*.cdda.wav' -print0 | xargs -0 -n1 -P0 bash -c 'file="$1"; flac -8 -e -o "${file%%.cdda.wav}.flac" "${file}" --keep-foreign-metadata' _
# Same thing with HDCD decoding (replace filter by hdcd=force_pe=1 if you need to force-enable peak equalization).
find . -name '*.cdda.wav' -print0 | xargs -0 -n1 -P0 bash -c 'file="$1"; echo "${file}"; ffmpeg -i "${file}" -af hdcd -c:a pcm_s24le "${file%%.cdda.wav}.hdcd.wav"; flac -8 -e -o "${file%%.cdda.wav}.flac" "${file%%.cdda.wav}.hdcd.wav" --keep-foreign-metadata' _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment