Skip to main content

pysacd

PyPI Python Wheel Implementation Downloads License

CI Coverage CodeQL Fuzzing Checked with mypy Ruff OpenSSF Scorecard SLSA Build L2

SACD in your Python process, and a clean-room, drop-in replacement for sacd_extract: the same options, the same file names, the same bytes.

from pysacd import read_toc                 # in-process: no subprocess, no text to parse

disc = read_toc("album.iso")
print(disc.artist, "-", disc.title)
for t in disc.stereo.tracks:
    print(t.number, t.title, t.duration)

pysacd reads SACD (Scarletbook) disc images, and PS3 SACD Ripper servers, straight from Python. Its multithreaded C engine runs inside your process, so a script, a tagger or a library catalogue drives it with function calls and gets back structured results. It never spawns sacd_extract and parses its text.

Coming from sacd_extract? pysacd-extract is a drop-in replacement, verified file by file against the real thing:

ln -s "$(command -v pysacd-extract)" ~/bin/sacd_extract    # that's the whole migration

Quick start

You need Python 3.10 or later on Linux or macOS, and an SACD disc image. The commands use album.iso in the current folder; type your image's name instead.

  1. Install pysacd in a virtual environment of its own (wheels for Linux, macOS and Windows; engine and libFLAC included):

    python3 -m venv pysacd-env
    . pysacd-env/bin/activate
    pip install pysacd
    
  2. Read the disc's table of contents: album, areas and tracks.

    pysacd toc album.iso
    
  3. Extract the stereo area to DSF files, as sacd_extract would:

    pysacd-extract -2 -s -i album.iso
    

    You should see Exporting DSF output in folder: and the album's title, then a folder of that name with one .dsf file per track.

Next: FLAC and WAV with your own naming and MusicBrainz tags in converting, Windows and building from source in the quick start guide, and the Python API in the Python library.

Why pysacd

Why it exists, in the author's words: author's note.

  • No fork, no scraping.
    • What you get back: objects (or --json), not sacd_extract -P text.
    • Failures are exceptions, not exit codes and stderr.
    • Progress is a callback; to cancel, raise from it.
    • The TOC reader runs in-process, through scarletbook-rs: one call returns objects (see the Python library).
  • One pass, every output. One call reads an area once and writes DSF, DSDIFF, WAV and FLAC (any mix), plus an ISO copy. DST is decoded on every core, with the GIL released.
  • Byte-for-byte compatible with sacd_extract, apart from a few deliberate exceptions.
  • Clean by construction. No Philips/ISO reference code, ever. The SACD engine (TOC, sectors, DST decoding, and the layout of DSF and DSDIFF files) is scarletbook-rs, a clean-room library written only from published specifications. See clean room and licences.
  • Goes further than sacd_extract:
    • gapless 24-bit FLAC/WAV;
    • MusicBrainz tags and cover art, with your own naming;
    • resume after a dropped PS3 connection;
    • raw-sector (2064/2054-byte) images;
    • protection against hostile disc text;
    • logs you can diagnose a failure from.
  • Faster than sacd_extract: plain-DSD discs extract to DSF 3.6–4.0× faster, and DST discs 2.5× (all threads; measured on 0.3.0's scarletbook engine). See performance.

Why you shouldn't use pysacd (yet)

  • Never tested against a real PS3. The network client is verified against a protocol simulator and sacd_extract, but not against hardware (#10).
  • Optical drives: like sacd_extract, it can't read a PC drive's SACD layer. You need an ISO or a PS3.

Documentation

The documentation index lists every document and its sections.

Quick start install, and a tour of the commands
pysacd-extract migrating from sacd_extract, compatibility policy, verification
Converting naming templates, tags, MusicBrainz, gapless PCM
The Python library the API, what's parsed, image formats
Performance benchmarks and their conditions
Reading from a PS3 usage, the wire protocol and the PS3's quirks
Logging what to attach when something fails
Security hostile discs, servers and text; report vulnerabilities via SECURITY.md
Clean room and licences where the code came from, acknowledgements
Development building, tests, CI; contributor rules in CLAUDE.md
Contributing reporting bugs, the pull-request process, project rules
Changelog what changed in each release
Releases by major version what each minor version brought, across the SACD projects

License

GPL-2.0-or-later. The engine links the scarletbook-rs C library statically, which pysacd uses under MIT (it is MIT OR Apache-2.0). See clean room and licences.

Metadata

Release files for pysacd 0.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysacd 0.5.4
File Size Uploaded Provenance Actions
pysacd-0.5.4.tar.gz 252.1 kB With provenance Details for pysacd-0.5.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pysacd 0.5.4
File Actions
pysacd-0.5.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pysacd-0.5.4-py3-none-win_amd64.whl
pysacd-0.5.4-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details for pysacd-0.5.4-py3-none-musllinux_1_2_x86_64.whl
pysacd-0.5.4-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for pysacd-0.5.4-py3-none-manylinux_2_28_x86_64.whl
pysacd-0.5.4-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for pysacd-0.5.4-py3-none-manylinux_2_28_aarch64.whl
pysacd-0.5.4-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pysacd-0.5.4-py3-none-macosx_11_0_arm64.whl
pysacd-0.5.4-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for pysacd-0.5.4-py3-none-macosx_10_13_x86_64.whl

Total release size: 10.6 MB

Release files / pysacd-0.5.4.tar.gz

Download URL pysacd-0.5.4.tar.gz
Size 252.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8868cd023179909218b860bcd0aec94c5144a69778227b23db565ad23094ae98
BLAKE2b-256 checksum
How to use checksums
166f8861ab601d87e28192afefccb5cd04f53e297837dbb4f682bcda3a8919ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / pysacd-0.5.4-py3-none-win_amd64.whl

Download URL pysacd-0.5.4-py3-none-win_amd64.whl
Size 2.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
db3d00cd8b40777e4872778902019322c4ea645b2683906b3d928b2f10c10a70
BLAKE2b-256 checksum
How to use checksums
6baebe2ddd5c56111bced88976dc744b70b4acfec77f9c555895c1b39f102179
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / pysacd-0.5.4-py3-none-musllinux_1_2_x86_64.whl

Download URL pysacd-0.5.4-py3-none-musllinux_1_2_x86_64.whl
Size 1.9 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
91f32413b78df2a2776fbe2089cf354de4e6da7003cf24c5ea9f11f9b493b963
BLAKE2b-256 checksum
How to use checksums
d0ffdadd28291a05f09434fb88a5a00667d3e51e74f49b8e69ee24704121f077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / pysacd-0.5.4-py3-none-manylinux_2_28_x86_64.whl

Download URL pysacd-0.5.4-py3-none-manylinux_2_28_x86_64.whl
Size 1.8 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4f3937cee5a6a9a3f22a63b847166a9a342d7c1ab6b61d9460492423d761b56f
BLAKE2b-256 checksum
How to use checksums
5c1b93877b10c67e997e5bd1e4be31e1fa86055b1cdc194e4327ae36e939f949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / pysacd-0.5.4-py3-none-manylinux_2_28_aarch64.whl

Download URL pysacd-0.5.4-py3-none-manylinux_2_28_aarch64.whl
Size 1.6 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
aae49e9a981e67908e1555f7b81e133844aa3b69d89f2207f398efc6622c8f2e
BLAKE2b-256 checksum
How to use checksums
cd9be920a582c3ea044ca4242e8668cd20f4d0c5eec7343bf611caf14920b6df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / pysacd-0.5.4-py3-none-macosx_11_0_arm64.whl

Download URL pysacd-0.5.4-py3-none-macosx_11_0_arm64.whl
Size 1.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e5f309207c2882e9f2e022cad61c5183a142dc006eb36589d33131a052571cdb
BLAKE2b-256 checksum
How to use checksums
b24c3e5f3ef9efb5b0ba48d85e8285f156a2df97c52fe77aa3a659d3d9ff59b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / pysacd-0.5.4-py3-none-macosx_10_13_x86_64.whl

Download URL pysacd-0.5.4-py3-none-macosx_10_13_x86_64.whl
Size 1.6 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
c2e0c67934c3c09777507bbaf2f30952e4d05c1b1c38da86c62ab33aca24e575
BLAKE2b-256 checksum
How to use checksums
727a6130fcb872418ba8f6062679512d442e3974a4ba3f7dcdd98a8610ed3358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for pysacd 0.5.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for pysacd-0.5.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page