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 ">
[email protected]@~$ 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 ">
[email protected]@~$ 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)

Telegram Link Shortener Bot (With 20 Shorteners)

Telegram ShortenerBot ShortenerBot: ๐Ÿ‡ฌ๐Ÿ‡ง Telegram Link Shortener Bot (11 + 9 Shorteners) ๐Ÿ‡น๐Ÿ‡ท Telegram Link Kฤฑsaltฤฑcฤฑ Bot (11 + 9 Kฤฑsaltฤฑcฤฑ) All suppo

Hรผzรผnlรผ Artemis [HuzunluArtemis] 10 May 24, 2022
A program used to create accounts in bulk, still a work in progress as of now.

Discord Account Creator This project is still a work in progress. It will be published upon its full completion. About This project is still under dev

patched 8 Sep 15, 2022
GitHub Actions Docker training

GitHub-Actions-Docker-training Training exercise repository for GitHub Actions using a docker base. This repository should be cloned and used for trai

GitHub School 1 Jan 21, 2022
Bot telegram yang menggemakan pesan apa pun yang Anda kirim atau modifikasi untuk menganonimkan pesan

Bot telegram yang menggemakan pesan apa pun yang Anda kirim atau modifikasi untuk menganonimkan pesan

KEN KAN 2 Oct 21, 2022
Twitter-Scrapping - Tweeter tweets extracting using python

Twitter-Scrapping Twitter tweets extracting using python This project is to extr

Suryadeepsinh Gohil 2 Feb 04, 2022
Minimal Python client for the Iris API, built on top of Authlib and httpx.

๐Ÿ•ธ๏ธ Iris Python Client Minimal Python client for the Iris API, built on top of Authlib and httpx. Installation pip install dioptra-iris-client Usage f

Dioptra 1 Jan 28, 2022
Image Tooแฅฃs Bot I specialize for logo design Services with Amazing logo Creator Platform and more tools

Image Tooแฅฃs Bot I specialize for logo design Services with Amazing logo Creator Platform and more tools

Sz Team Bots <sz/>โœŒ๏ธ 10 Oct 21, 2022
An unofficial client library for Google Music.

gmusicapi: an unofficial API for Google Play Music gmusicapi allows control of Google Music with Python. from gmusicapi import Mobileclient api = Mob

Simon Weber 2.5k Dec 15, 2022
CnCL - CnCLess it's an Easy to deploy Botnet without CnC/C2

CnCL CnCLess it's an Easy to deploy Botnet without CnC/C2, Harder to track and t

ZSendokame 2 Jan 10, 2022
Riffdog Terraform scanner - finding 'things' in the Real World (aka AWS) which Terraform didn't put there.

riffdog Riffdog Terraform / Reality scanner - finding 'things' in the Real World which Terraform didn't put there. This project works by firstly loadi

Riffdog 4 Mar 23, 2020
This is a Telegram video compress bot repo. By Binary Tech๐Ÿ’ซ

This is a Telegram Video Compress Bot. Prouduct By Binary Tech ๐Ÿ’ซ Features Compresse videos and generate screenshots too.You can set custom video name

silentz lk 7 Mar 03, 2022
A secure and customizable bot for controlling cross-server announcements and interactions within Discord

DiscordBot A secure and customizable bot for controlling cross-server announcements and interactions within Discord. Within the code of the bot, you c

Jacob Dorfmeister 1 Jan 22, 2022
ZenML ๐Ÿ™: MLOps framework to create reproducible ML pipelines for production machine learning.

ZenML is an extensible, open-source MLOps framework to create production-ready machine learning pipelines. It has a simple, flexible syntax, is cloud and tool agnostic, and has interfaces/abstraction

ZenML 2.6k Dec 27, 2022
Updater for PGCG (Paradox Game Converters Group) converters written in Python.

Updater Updater for PGCG (Paradox Game Converters Group) converters written in Python. Needs to be put inside an "Updater" directory in the root conve

Paradox Game Converters 2 Jan 10, 2022
Tinyman Python SDK

tinyman-py-sdk Tinyman Python SDK Design Goal This SDK is designed for automated interaction with the Tinyman AMM. It will be most useful for develope

Tinyman 113 Dec 30, 2022
streamlit translator is used to detect and translate between languages created using gTTS, googletrans, pillow and streamlit python packages

Streamlit Translator Streamlit Translator is a simple translator app to detect and translate between languages. Streamlit Translator gets text and lan

Siva Prakash 5 Apr 05, 2022
thumbor is an open-source photo thumbnail service by globo.com

Survey If you use thumbor, please take 1 minute and answer this survey? It's only 2 questions and one is multiple choice!!! thumbor is a smart imaging

Thumbor (by @globocom) 9.3k Dec 31, 2022
Twitter automation tool for growing organic followers.

Tiwoto Tiwoto is a simple python program that automates some kind of behaviors and keep your account active. Create an .env file in this directory and

Mehmetcan Yildiz 6 Sep 22, 2022
Music bot for playing music on telegram voice chat group.

Somali X Music ๐ŸŽต Music bot for playing music on telegram voice chat group. Requirements FFmpeg NodeJS nodesource.com Python 3.8+ or Higher PyTgCalls

Abdisamad Omar Mohamed 4 Dec 01, 2021