### Install pydvdid using pip
Source: https://pypi.org/project/pydvdid
Install the pydvdid package using pip. This is the standard way to install Python packages.
```bash
pip install pydvdid
```
--------------------------------
### Retrieve DVD metadata using curl
Source: https://pypi.org/project/pydvdid
Use the obtained CRC64 to query the Windows Media Services API for DVD metadata. This example demonstrates how to fetch XML data containing DVD title and other details.
```bash
steve@babbage:~$ curl --get http://metaservices.windowsmedia.com/pas_dvd_B/template/GetMDRDVDByCRC.xml?CRC=$crc64
4.0LEGO Star Wars: The Padawan Menace [French] [Blu-ray/DVD]20th Century Fox Home Entertainment (Canadian2012 02 07Science FictionAMG7DDE9379-18E0-446A-8214-BCD3D573A54AE 278184 Provider=AMGProvider=AMG1LEGO Star Wars: The Padawan Menace [French] [Blu-ray/DVD]20th Century Fox Home Entertainment (CanadianScience Fiction
```
--------------------------------
### Get DVD CRC from shell
Source: https://pypi.org/project/pydvdid
Calculate the CRC64 for a DVD mounted at /mnt/dvd and store it in a shell variable. This CRC can then be used for metadata retrieval.
```bash
steve@babbage:~$ crc64=$(pydvdid /mnt/dvd)
steve@babbage:~$ echo $crc64
6e23e6a41a154405
```
--------------------------------
### Compute DVD ID and Fetch Metadata
Source: https://pypi.org/project/pydvdid
Import the compute function from pydvdid to generate a CRC64 hash for a DVD directory. This hash can then be used to query for DVD metadata from a remote service.
```python
>>> from pydvdid import compute
>>> crc64 = compute("/mnt/dvd")
>>> str(crc64)
'a5acf20f2e56954b'
```
```python
>>> from urllib import urlopen
>>> urlopen("http://metaservices.windowsmedia.com/pas_dvd_B/template/GetMDRDVDByCRC.xml?CRC={0}".format(crc64)).read()
'
4.0Room on the BroomN Circle EntertainmentGillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy SpallGillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy SpallJan Lachauer; Max Lang2013 08 06Children's/Familycov150/drv600/v691/v69118k4p4h.jpgcov075/drv600/v691/v69118k4p4h.jpgAMGE568D84B-4CB8-4296-8896-716DDCFA1458E 303360 Provider=AMGProvider=AMG1Room on the BroomN Circle EntertainmentJan Lachauer; Max LangGillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy SpallGillian Anderson; Rob Brydon; Martin Clunes; Sally Hawkins; Simon Pegg; Timothy SpallChildren's/Family1Scene One [4:47]2Scene Two [7:29]3Scene Three [4:31]4Scene Four [9:55]
'
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.