Back in 2024 I was using beets to catalogue, and eventually normalise, my collection of 90.000+ audio files. Then I hit a wall: beets can’t read SACD ISOs. The usual answer is sacd_extract, but driving it from a beets plugin means forking a process for every disc and scraping its text output. Slow and fragile.
So I tried to re-implement the SACD reading in Python, working with ChatGPT. After a few days of banging my head against it I got nowhere. Scarletbook is a niche format, DST decoding is genuinely hard, and I shelved it.
In October 2026 I threw Claude at the problem. It worked. After a few days of building and testing I now have:
pysacd, a Python module (pip install pysacd) that reads SACD TOCs and extracts audio in-process. Structured objects instead of text to parse, exceptions instead of exit codes. That’s what I needed for beets.
pysacd-extract, a reference implementation and drop-in replacement for sacd_extract: the same options, file names and bytes.
Prebuilt wheels for Linux (x86-64 and ARM64, glibc and musl), macOS (Apple silicon and Intel) and Windows: just pip install pysacd, nothing to compile. pysacd-extract, the drop-in for sacd_extract, comes with the same pip install pysacd on Linux, macOS and Windows, so there's no separate download.
Clean room, no licensing baggage:
sacd_extract’s DST decoder derives from the Philips/ISO reference code, which isn’t GPL-compatible. pysacd doesn’t touch it.
The decoder builds on FFmpeg’s LGPL DST decoder. The parts FFmpeg lacks were added clean room: one agent wrote a prose specification, and a different agent, which never saw the reference code, implemented from it. The spec is in the repo for anyone to audit.
sacd_extract was only used as a black box to compare output against.
Don’t trust me (or the AI), check it:
Disc info: identical to sacd_extract on 99 of 99 discs.
Output files: 28 of 28 end-to-end cases byte-identical to sacd_extract.
DST: about 6,7 million frames (roughly 25 hours of real discs) decode with zero errors.
Hostile input: millions of fuzzing runs under memory sanitizers plus about 95 deliberately broken disc images. They found real bugs, like a 1,4 MB image that could make 476 MB of silent FLAC.
CI compares every change against sacd_extract built from upstream source. Check it yourself with diff -r.
What you get:
DSF, DSDIFF, edit masters, and gapless 24-bit FLAC/WAV
MusicBrainz tags and cover art with your own naming templates, plus optional ISRC submission back to MusicBrainz (it asks first)
ISOs, raw-sector images and PS3 SACD Ripper servers as input
Plain-DSD discs extract 2,5 to 3,6× faster than with sacd_extract
Limitations:
It has only been tested against a PS3 simulator. If you have a PS3 running SACD Ripper, please send me a log.
Like sacd_extract, it can’t read SACDs from a PC optical drive. You need an ISO or a PS3.
GitHub: https://github.com/aclater/pysacd · PyPI: https://pypi.org/project/pysacd/