Skip to main content

Python wrapper for VideoLAN's libdvdcss.

Project description

pydvdcss

Python wrapper for VideoLAN's libdvdcss.

license issues pr's welcome
support me

To-do

  • Implement dvdcss_open
  • Implement dvdcss_close
  • Implement dvdcss_seek
  • Implement dvdcss_read
  • Implement dvdcss_error
  • Implement dvdcss_is_scrambled
  • Implement __enter__ and __exit__ for proper disposing
  • Implement dvdcss_readv
  • Add handlers for failed find_library or cdll calls
  • Add function to set DVDCSS_VERBOSE
  • Add function to set DVDCSS_METHOD

Quick Installation

python -m pip install --user pydvdcss

Quick Usage

from pydvdcss import PyDvdCss

# ...

# choose device
dev = "/dev/sr0"

# with handles disposing once you leave the call
with PyDvdCss() as dvdcss:

  # open device
  dvdcss.open(dev)

  # check if dvd is scrambled
  if dvdcss.is_scrambled():
    print("The DVD is scrambled!")

  # read volume id from sector 16
  dvdcss.seek(16)  # seek to sector 16
  dvdcss.read(1)   # read only one sector
  volume_label = dvdcss.buffer[40:72].strip().decode()
  print(f"{dev}: {volume_label}")

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

pydvdcss-1.0.2.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

pydvdcss-1.0.2-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

Supported by

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