Last active
May 18, 2026 20:31
-
-
Save BenMcLean/5b5bf455618e91d35f261a5ecd122954 to your computer and use it in GitHub Desktop.
Convert DTS-CD WAV to 16-bit 5.1 FLAC for more reliable playback (Process is lossy AND buggy so retain both your original WAVs AND your physical DTS-CDs just in case)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @ECHO OFF | |
| CD /D "%~dp1" | |
| ffmpeg -err_detect ignore_err -i "%~1" -af "volume=-1.0dB" -ac 6 -c:a flac -sample_fmt s16 -compression_level 5 "%~dp1%~n1.flac" | |
| @PAUSE |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The script was tested against a bit-perfect 'Copy Image & Create Cue Sheet' rip of Alan Parsons - On Air (1996), verified via Exact Audio Copy and AccurateRip. It applies a -1.0dB volume reduction. While Audacity still shows flat-topped waveforms in the loudest sections (indicating that clipping was permanently baked into the original 1996 studio mix), the reduction ensures that modern decoders and AVR hardware have enough headroom to prevent intersample clipping during playback.
Don't let FFmpeg's default behavior trick you: because DTS-CDs use lossy compression math, FFmpeg would output 24-bit files to preserve decoder precision by default. Forcing it back to 16-bit matches the physical bit-depth of the CD and saves massive amounts of space without sacrificing any audible quality. I chose FLAC compression level 5 instead of my usual archival level 8 to guarantee smooth, stutter-free decoding on consumer media players like Kodi. I don't hear any artifacts, but a part of me is still paranoid about unnecessarily losing quality when transcoding such an obscure legacy format from 30 years ago.