Skip to main content

udfkit

udfkit

Write DVD-Video and Blu-ray disc images in pure Python: no external programs, no root, no dependencies beyond the standard library.

  • DVD-Video (udfkit.dvd): UDF 1.02 + ISO 9660 "bridge", the file systems DVD players and libdvdread (VLC, mpv) read. The VIDEO_TS files are placed where their IFO files say they start, as genisoimage -dvd-video -udf does, and the image comes out the same size with the same sector map.
  • Blu-ray (udfkit.bluray): UDF 2.50 with a metadata partition, as BD-ROM discs use and libbluray (through libudfread) reads.
  • Volume names (udfkit.info): the ISO 9660 and UDF names of an image.
  • Checksum manifest (udfkit.manifest): the image's SHA-256 and every file's SHA-256, written beside the image, and udfkit verify reading the image back against them.

Images are deterministic: the same files and date give the same bytes.

日本語の説明は README.ja.md にあります。

Why

Python's ISO library (pycdlib) writes UDF 2.60 only. DVD players expect UDF 1.02, and Blu-ray discs use 2.50. The other ways to make such images are:

  • old command-line tools (mkisofs / genisoimage);
  • macOS's own hdiutil;
  • tools that need a mounted file system and root (udftools).

udfkit runs anywhere Python runs.

Install

pip install udfkit

A release is made by the version: when the version in pyproject.toml (and udfkit/__init__.py) reaches main without a tag of its own, .github/workflows/release.yml runs the tests, builds the package, makes the GitHub release with its tag and publishes to PyPI (trusted publishing, environment pypi). Merging the version bump is all it takes.

Use

udfkit dvd    path/to/disc  disc.iso --label MY_DISC   # disc/ holds VIDEO_TS (and AUDIO_TS, extras)
udfkit bluray path/to/bd    bd.iso   --label MY_BD     # bd/ holds BDMV
udfkit verify disc.iso                               # read it back against disc.iso.manifest.json
udfkit info   disc.iso
udfkit contract --json                               # machine-readable contract (AI Video Production OS registry)
from udfkit import dvd, bluray

stats = dvd.write_image("disc", "disc.iso", "MY_DISC")
print(stats["bytes"], stats["extents"]["/VIDEO_TS/VTS_01_1.VOB"])   # (first sector, size)

bluray.write_image("bd", "bd.iso", "MY_BD")

dvd.write_image(..., shift=n) puts n empty sectors before VIDEO_TS. It is used to put a dual-layer disc's layer break on an ECC block (16 sectors).

Checksum manifest and verify

udfkit dvd and udfkit bluray write two files beside the image (--no-manifest leaves them out):

  • disc.iso.sha256: the image's SHA-256, as sha256sum -c disc.iso.sha256 (or shasum -a 256 -c) reads it;
  • disc.iso.manifest.json: the image's size and SHA-256, and for every file its path, first sector, size and SHA-256. The file hashes are read back from the image, so they say what the image holds.

udfkit verify disc.iso reads the image again and compares. A changed byte is reported with the file it belongs to; the exit status is 1:

udfkit: /work/disc.iso: /VIDEO_TS/VTS_01_1.VOB does not match the manifest
  write the image again from its source folder, or copy it again

Damage outside every file (the file system structures) is reported as such. --json prints the whole result; --manifest PATH reads a manifest kept elsewhere. From Python:

from udfkit import dvd, manifest

stats = dvd.write_image("disc", "disc.iso", "MY_DISC")
manifest.write_manifest("disc.iso", stats["extents"])
print(manifest.verify("disc.iso")["bad_files"])     # [] when the image is intact

Tests

python -m unittest discover -s tests -t .

The tests read every structure back with their own reader, independent of the writer: every descriptor tag, checksum and CRC, and the UDF and ISO 9660 directories. When these tools are installed, the tests also check:

  • isoinfo lists and extracts the files of a DVD image;
  • libudfread (the reader libbluray uses) reads every file of a Blu-ray image back;
  • ffmpeg + dvdauthor + genisoimage: a real VIDEO_TS gives the same image size and sector map as genisoimage -dvd-video -udf.

udfkit was first written for oncemore, a DVD and Blu-ray authoring app. There its images are played back with libdvdnav and libbluray on every change.

Support

udfkit is free and stays free. If it saves you time, you can support its development through GitHub Sponsors (the Sponsor button at the top of this repository). Bug reports help just as much: Issues.

The logo, colours and writing rules: docs/DESIGN.md.

License

Apache License 2.0. See LICENSE and NOTICE.

Metadata

Release files for udfkit 0.2.0

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

Source distribution (sdist)

Source distribution for udfkit 0.2.0
File Size Uploaded Provenance Actions
udfkit-0.2.0.tar.gz 46.4 kB With provenance Details for udfkit-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for udfkit 0.2.0
File Interpreter ABI Platform Actions
udfkit-0.2.0-py3-none-any.whl Python 3 none any Details for udfkit-0.2.0-py3-none-any.whl

Total release size: 81.5 kB

Release files / udfkit-0.2.0.tar.gz

Download URL udfkit-0.2.0.tar.gz
Size 46.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7a437b96399a025e9b02f7a3883fafad9b543bbb184b18692edc1a4be6333241
BLAKE2b-256 checksum
How to use checksums
655bdabb0bb5ece78e816f9c820e649216a27d056a754baabc1686ea38b3793d
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 12, 2026.

Transparency log

Release files / udfkit-0.2.0-py3-none-any.whl

Download URL udfkit-0.2.0-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbd6ee30d3b107634b9d716b2d99d63c51337ba6df31cbe108daa87494fe3031
BLAKE2b-256 checksum
How to use checksums
1911f5dfde2a3298b0c811cbb5be782275ce361895fbac647ce2f863860ab543
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 12, 2026.

Transparency log

Security for udfkit 0.2.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for udfkit-0.2.0.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 12, 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