Pure Python implementation of the Windows API method IDvdInfo2::GetDiscID.

Overview

pydvdid-m

downloads license wheel versions

Pure Python implementation of the Windows API method IDvdInfo2::GetDiscID.
This is a modification of sjwood's pydvdid.

The Windows API method IDvdInfo2::GetDiscID is used by Windows Media Center to compute a 'practically unique' 64-bit CRC for metadata retrieval. It's metadata retrieval API has sadly since shutdown around October 2019 and all it's information is presumably lost.

Changes compared to sjwood's repo

  1. License changed from Apache-2.0 to GPL-3.0.
  2. Moved build tools and dependency management from setuptools and requirements.txt to poetry.
  3. Support for Python 2.x and Python <3.6 has been dropped.
  4. All tests were removed entirely simply because a lot of the tests would need to be refactored for general code changes, and some tests might not be needed anymore.
  5. All custom exceptions were removed entirely and replaced with built-in ones.
  6. CRC-64 related code were refactored and merged as one CRC64 class in one file.
  7. The merged CRC64 class contains various improvements over the original code, including improvements with doc-strings, formatting, and such.
  8. Various BASH shell scripts and config files were removed entirely as they are deemed unnecessary.
  9. Uses pycdlib to read from ISO and direct disc drives, instead of assuming that it's a folder.

Other than that, the rest of the changes are general code improvements in various ways. There may be more differences as the repo gets commits, but these are the primary differences from sjwood's commit to the beginnings of this repository.

Installation

$ pip install pydvdid-m

Usage

You can run DvdId on all types of DVD video file structures:

  • Direct from Disc, e.g., /dev/sr0, \\.\E:, or such.
  • An ISO file, e.g., /mnt/cdrom, C:/Users/John/Videos/FAMILY_GUY_VOLUME_11_DISC_1.ISO.
  • A VIDEO_TS folder*, C:/Users/John/Videos/THE_IT_CROWD_D1/.

Note: Generating a DVD ID from a VIDEO_TS folder has a high chance of providing an invalid DVD ID. The algorithm uses file creation timestamps, and extracting VIDEO_TS folders direct from Disc or from an ISO will most likely change them, especially when transferred or moved.

CLI

FAMILY_GUY_VOLUME_11_DISC_1 db3804e3|1645f594 ">
phoenix@home@~$ dvdid "FAMILY_GUY_VOLUME_11_DISC_1.ISO"
<Disc>
<Name>FAMILY_GUY_VOLUME_11_DISC_1</Name>
<ID>db3804e3|1645f594</ID>
</Disc>

You can provide a path to an ISO file, or a mounted device, e.g.:

BBCDVD3508 3f041dfc|27ffd3a8 ">
phoenix@home@~$ dvdid "/dev/sr0"
<Disc>
<Name>BBCDVD3508</Name>
<ID>3f041dfc|27ffd3a8</ID>
</Disc>

or on Windows via Raw Mounted Device:

BBCDVD3508 3f041dfc|27ffd3a8 ">
PS> dvdid "\\.\E:"
<Disc>
<Name>BBCDVD3508</Name>
<ID>3f041dfc|27ffd3a8</ID>
</Disc>

Package

You can also use pydvdid-m in your own Python code by importing it.
Here's a couple of things you can do, and remember, you can use both ISO paths and mounted device targets.

>> dvd_id.disc_label 'BBCDVD3508' >>> repr(dvd_id.checksum) ' ' >>> dvd_id.checksum '3f041dfc|27ffd3a8' >>> dvd_id.checksum.as_bytes b"?\x04\x1d\xfc'\xff\xd3\xa8" >>> dvd_id.dumps() ' \n BBCDVD3508 \n 3f041dfc|27ffd3a8 \n '">
>>> from pydvdid_m import DvdId
>>> dvd_id = DvdId(r"C:\Users\John\Videos\FAMILY_GUY_VOLUME_11_DISC_1.ISO")
>>> dvd_id.disc_label
'BBCDVD3508'
>>> repr(dvd_id.checksum)
'
    
     '
    
>>> dvd_id.checksum
'3f041dfc|27ffd3a8'
>>> dvd_id.checksum.as_bytes
b"?\x04\x1d\xfc'\xff\xd3\xa8"
>>> dvd_id.dumps()
'
    
     \n
     
      BBCDVD3508
     
     \n
     
      3f041dfc|27ffd3a8
     
     \n
    '

License

GNU General Public License, Version 3

You might also like...
A SageMaker Projects template to deploy a model from Model Registry, choosing your preferred method of deployment among async (Asynchronous Inference), batch (Batch Transform), realtime (Real-time Inference Endpoint). More to be added soon!
A method to check whether a Discord user is using the client or not.

Discord Captcha Method This is an example, of a verification trough a check, if the user loads the picture send with the verification-message. This ma

Growtopia server_data.php reader with bypass method, using discord bot

Server_data.php-reader Growtopia server_data.php reader with bypass method, using discord bot How to use 1 install python 2 change your bot token

A.I and game for gomoku, working only on windows
A.I and game for gomoku, working only on windows

Gomoku (A.I of gomoku) The goal of the project is to create an artificial intelligence of gomoku. Goals Beat the opponent. Requirements Python 3.7+ Wo

🖥️ Windows Batch and powershell Discord Token grabber. Made for Troll (lmao)
🖥️ Windows Batch and powershell Discord Token grabber. Made for Troll (lmao)

Batched-Grabber Windows Batch and powershell Discord Token grabber. Made for Troll ! Setup. 1. pip(3) install numpy colored 2. python(3) Batched.py 3.

A taskbar clock for secondary taskbars on Windows 11
A taskbar clock for secondary taskbars on Windows 11

ElevenClock A taskbar clock for secondary taskbars on Windows 11. When microsoft's engineers were creating Windows 11, they forgot to add a clock on t

=|= the MsgRoom bot for Windows 96

=|= bot A MsgRoom bot in Python 3 for Windows96.net. The bot joins as =|=, if parameter name_lasts is not true and default_name is =|=. The full

A discord.py code generator program. Compatible with both linux and windows.

Astro-Cord A discord.py code generator program. Compatible with both linux and windows. About This is a program made to make discord.py bot developmen

Price checker windows application

Price-Checker price checker windows application This application monitors the prices of selected products and displays a notification if the price has

Comments
  • Inaccurate DVD IDs on ISO with RCE protection removed

    Inaccurate DVD IDs on ISO with RCE protection removed

    AnyDVD and possibly others may modify or remove a couple of bytes in the VIDEO_TS.IFO and VTS_01_0.IFO files when removing RCE protection. This results in alternate DVD IDs compared to before, and after modifications.

    Detection of an RCE-removed ISO might be possible, or at the very least forcing a reversal of the process by modifying some headers back might be possible. But even if that is possible, knowing if it originally had RCE-protection or not, or to which region, may not be possible to automatically infer.

    I have attached an example VIDEO_TS and VTS_01_0 IFO files before and after RCE protection removal.

    R1-USA-NTSC-RCE-Kept.tar.gz R1-USA-NTSC-RCE-Removed.tar.gz

    help wanted 
    opened by rlaphoenix 0
Releases(v1.1.1)
  • v1.1.1(Jan 20, 2022)

    Added

    • Added important information on DVD ID accuracy to the README.
    • Added a "Saved DVD ID to" print statement in the primary script to show it got auto-saved, and to where.

    Changed

    • Ensured that filenames are uppercase. ISO-9660 isn't strict about file-casing, but the DVD spec is.
    • Changed DvdId.dump's return value from the Path.write_text int return value to the Path which was written to.

    Fixed

    • Fixed raw Windows Device target checks, e.g. \\.\E: from being detected as a VIDEO_TS folder.
    Source code(tar.gz)
    Source code(zip)
    pydvdid_m-1.1.1-py3-none-any.whl(20.51 KB)
  • v1.1.0(Jan 15, 2022)

    Added

    • This CHANGELOG file.
    • Support for VIDEO_TS folders. However, they may not provide an accurate DvdId, see README.
    • Added support for Path targets in disc_label. It returns the folder/file name as the disc label.
    • Added file extension restrictions for files that get processed in DvdId (BUP, IFO, VOB).
    • Added function DvdId._get_file to get a direct path (as the correct object type) to a specific file.

    Changed

    • Refactored DvdId's class variable disc_label as a function property.
    • Ensured that VIDEO_TS.IFO would be processed before VTS_01_0.IFO, and that they would both be processed.

    Fixed

    • Fixed mistake in DvdId._get_first_64k_content which had the variables of the expected/read bytes mixed up.
    • Fixed possible invalid creation time seconds value if it was somehow in floating-point accuracy. DVD IDs made from ISO files or straight from disc shouldn't have had any issues.
    • Corrected the Type-hint of UDFFileEntry to DirectoryRecord.
    • Added Error Handling to DvdId._get_files, which could cause an exception if the path isn't found.
    • Fixed the /VIDEO_TS directory exists check in DvdId.
    Source code(tar.gz)
    Source code(zip)
    pydvdid_m-1.1.0-py3-none-any.whl(19.99 KB)
  • v1.0.0(Jan 15, 2022)

Owner
null
Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs.

Twython Twython is a Python library providing an easy way to access Twitter data. Supports Python 3. It's been battle tested by companies, educational

Ryan McGrath 1.9k Jan 2, 2023
Pure Python 3 MTProto API Telegram client library, for bots too!

Telethon ⭐️ Thanks everyone who has starred the project, it means a lot! Telethon is an asyncio Python 3 MTProto library to interact with Telegram's A

LonamiWebs 7.3k Jan 1, 2023
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug · Request Feature Features Checks tokens Checks all

dropout 10 Dec 1, 2022
Pydapper - A pure python port of the NuGet library dapper

pydapper A pure python library inspired by the NuGet library dapper. pydapper is

Zach Schumacher 38 Jan 2, 2023
An example of matrix addition, demonstrating the basic method of Python calling C library functions

Example for Python call C functions An example of matrix addition, demonstrating the basic method of Python calling C library functions. How to run Bu

Quantum LIu 2 Dec 21, 2021
A Python interface module to the SAS System. It works with Linux, Windows, and mainframe SAS. It supports the sas_kernel project (a Jupyter Notebook kernel for SAS) or can be used on its own.

A Python interface to MVA SAS Overview This module creates a bridge between Python and SAS 9.4. This module enables a Python developer, familiar with

SAS Software 319 Dec 19, 2022
OpenSea Bulk Uploader And Trader 100000 NFTs (MAC WINDOWS ANDROID LINUX) Automatically and massively upload and sell your non-fungible tokens on OpenSea using Python Selenium

OpenSea Bulk Uploader And Trader 100000 NFTs (MAC WINDOWS ANDROID LINUX) Automatically and massively upload and sell your non-fungible tokens on OpenS

ERC-7211 3 Mar 24, 2022
Bot developed in python, 100% open-source, compatible with Windows and Linux.

Bombcrypto Bot [Family JOW] Bot desenvolvido em python, 100% do código é aberto, para aqueles que tenham conhecimento validarem que não existe nenhum

Renato Maia 71 Dec 20, 2022
Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of delivery for realtime exchange data and other financial information. This repository provides an SDK for developing applications to access the NCDS.

Nasdaq Cloud Data Service (NCDS) Nasdaq Cloud Data Service (NCDS) provides a modern and efficient method of delivery for realtime exchange data and ot

Nasdaq 8 Dec 1, 2022
Passive income method via SerpClix. Uses a bot to accept clicks.

SerpClixBotSearcher This bot allows you to get passive income from SerpClix. Each click is usually $0.10 (sometimes $0.05 if offer isnt from the US).

Jason Mei 3 Sep 1, 2021