Skip to main content

DVD IFO parser and title extracter.

Project description

DVD IFO Parser and Utilities

Library

So far the VTS IFO file is 100% parsed, at least as far as I've been able to find definitions for the fields. To use the library simply install the dvdutil library via your preferred method (pyenv venv or pdm suggested) and import the library.

pdm add dvdutil
from dvd.ifo import vts

with open("/path/to/VTS_XX_0.IFO", "rb") as ifo_file:
    ifo = vts.VTS_IFO.from_bytes(ifo_file)

print(ifo.vts_vobs_video_attrs.resolution)

Title Extracter

Also included is a script to extract titles from a DVD title set, including all of the source DVD's video, audio, and subtitle tracks without transcoding but in a matroska container. The idea is to back up the DVD's original content but to split it into individual title videos for easier consumption so you don't have to use the DVD menus every time, but without any transcoding so that there is no loss of fidelity or additional artifacts. To use this run the title_extracter.py script:

extract-titles --out /path/to/output-dir /path/to/input/VTS_XX_0.IFO

You will need ffmpeg and ffprobe in your path for this to work. You can specify a directory for temporary files to be placed in (there will be a fair number of these as the script needs to calculate video lengths to better time chapter alignments).

If you prefer to not use the additional hard drive space or just want the conversion as fast as possible you can use the --fast option. This requires only ffmpeg in your path and will read directly from the VOB files and pipe the data directly to ffmpeg. Note that there are downsides to fast mode. The first is that the chapter markers are more likely to drift from their intended locations as the video goes on. The second is that the streams in the output files may be in different order in different title files. For example, if your source DVD has 2 episodes of a show in the same Title Set and has two audio streams, one in English and one in Japanese, the first episode's video might have English as audio stream 1, Japanese as stream 2, and the second episode might have them the other way, with Japanese first.

If you want to go even further and get a shell script to run yourself to perform the "fast" extraction you can add --shell to --fast and your output will be a shell script and various txt files with chapter metadata. The shell script will use cat, dd, and ffmpeg to do the quick and dirty extraction of titles to mkv files. It will have the same downsides as the --fast option.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dvdutils-0.1.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dvdutils-0.1.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file dvdutils-0.1.0.tar.gz.

File metadata

  • Download URL: dvdutils-0.1.0.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.5 CPython/3.13.2 Linux/6.12.41-gentoo-dist

File hashes

Hashes for dvdutils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d09a073f6a449bff6f014ec5e01125b5bb022d4fc31258b82f80e3b535f02ea3
MD5 ab4ff11995009ea031e6059815b14ca9
BLAKE2b-256 dd066c440abf1086fd13e6fa63fa0089b7432b9e535ed300a16c9457af88de6a

See more details on using hashes here.

File details

Details for the file dvdutils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dvdutils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.25.5 CPython/3.13.2 Linux/6.12.41-gentoo-dist

File hashes

Hashes for dvdutils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40d6618ce4a4f0c54ea7060fb68425588566518df9396d3c7248234e3d2099df
MD5 2e2def2a506070e2e641805ce8d8bfba
BLAKE2b-256 6bf185df81febb928fda76da186776a2141597da3d0f673a391e45701d9de4c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page