{"id":20797530,"url":"https://github.com/rlaphoenix/pyd2v","last_synced_at":"2025-05-06T18:43:54.874Z","repository":{"id":62579739,"uuid":"243755291","full_name":"rlaphoenix/pyd2v","owner":"rlaphoenix","description":"Python library for parsing Donald Graft's DGMPGDec Project (.d2v) files.","archived":false,"fork":false,"pushed_at":"2023-10-08T19:13:44.000Z","size":46,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T15:44:51.209Z","etag":null,"topics":["d2v","dgindex","dgmpgdec","mpeg","parser","python","video"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rlaphoenix.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-28T12:16:43.000Z","updated_at":"2023-10-03T02:35:26.000Z","dependencies_parsed_at":"2022-11-03T21:01:08.432Z","dependency_job_id":null,"html_url":"https://github.com/rlaphoenix/pyd2v","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fpyd2v","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fpyd2v/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fpyd2v/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fpyd2v/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlaphoenix","download_url":"https://codeload.github.com/rlaphoenix/pyd2v/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252747357,"owners_count":21798137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d2v","dgindex","dgmpgdec","mpeg","parser","python","video"],"created_at":"2024-11-17T16:34:20.576Z","updated_at":"2025-05-06T18:43:54.831Z","avatar_url":"https://github.com/rlaphoenix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyd2v\n\n[![License](https://img.shields.io/github/license/rlaphoenix/pyd2v)](https://github.com/rlaphoenix/pyd2v/blob/master/LICENSE)\n[![Build status](https://github.com/rlaphoenix/pyd2v/actions/workflows/ci.yml/badge.svg)](https://github.com/rlaphoenix/pyd2v/actions/workflows/ci.yml)\n[![Python version](https://img.shields.io/pypi/pyversions/pyd2v)](https://pypi.python.org/pypi/pyd2v)\n[![PyPI version](https://img.shields.io/pypi/v/pyd2v)](https://pypi.python.org/pypi/pyd2v)\n[![Contributors](https://img.shields.io/github/contributors/rlaphoenix/pyd2v)](https://github.com/rlaphoenix/pyd2v/graphs/contributors)\n[![DeepSource issues](https://deepsource.io/gh/rlaphoenix/pyd2v.svg/?label=active+issues)](https://deepsource.io/gh/rlaphoenix/pyd2v)\n\nA Python Parser for DGMPGDec's D2V Project Files.\n\n## Installation\n\n    pip install --user pyd2v\n\n## Building\n\n### Dependencies\n\n- [Python](https://python.org/downloads) (v3.7 or newer)\n- [Poetry](https://python-poetry.org/docs) (latest recommended)\n\n### Steps\n\n1. `git clone https://github.com/rlaphoenix/pyd2v`\n2. `cd pyd2v`\n3. `poetry config virtualenvs.in-project true` (optional, but recommended)\n4. `poetry install`\n5. `d2v --help`\n\nFor further information on using the Poetry virtual environment, see\n[Using your virtual environment](https://python-poetry.org/docs/basic-usage/#using-your-virtual-environment).\n\n## Usage\n\nThis project can be used in Python Scripts by importing `pyd2v`, or in your terminal by calling `d2v`.\n\n### Scripting\n\n```py\nfrom pyd2v import D2V\n\n# ...\n\nd2v = D2V(filename=\"C:/Users/phoenix/Videos/1998_home_video.d2v\")\nprint(d2v)  # d2v object basic information, e.g. version and settings\nprint(d2v.videos)  # input video files\nprint(d2v.settings[\"Frame_Rate\"])  # frame rate\nprint(d2v.data[0])  # print first frame data\n```\n\n### Executable\n\nFor help information run `d2v --help`. Here's some examples of using the d2v executable:\n\n#### Getting a Setting like the Video Resolution:\n\n```shell\n$ d2v \"D:\\...\\The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX.d2v\" settings.Picture_Size\n[720, 576]\n```\n\n#### Parse the entire D2V to a JSON Pickle:\n\n```shell\n$ d2v \"D:\\...\\The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX.d2v\" --json\n{\"py/object\": \"pyd2v.d2v.D2V\", \"path\": {\"py/reduce\": [{\"py/type\": \"pathlib.WindowsPath\"}, {\"py/tuple\": [\"D:\\\\\", \"...\",\n\"The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX.d2v\"]}]}, \"version\": 16, \"videos\": [\n\"D:\\\\...\\\\The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX.mpeg\"], \"settings\": {\"Stream_Type\": 0,\n\"MPEG_Type\": 2, \"iDCT_Algorithm\": 5, \"YUVRGB_Scale\": 1, \"Luminance_Filter\": {\"Gamma\": 0, \"Offset\": 0}, \"Clipping\":\n[0, 0, 0, 0], \"Aspect_Ratio\": \"16:9\", \"Picture_Size\": [720, 576], \"Field_Operation\": 2, ... ...\n```\n\n#### Parse only the D2V Headers:\n\n```shell\n$ d2v \"D:\\...\\The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX.d2v\" --pretty\n\u003cD2V path=WindowsPath('D:/.../The.IT.Crowd.S01E01.Yesterdays.Jam.PAL.DVD.DD.2.0.MPEG-2.REMUX.d2v') version=16,\ndata_type='100.00% VIDEO\\n', settings={'Stream_Type': 0, 'MPEG_Type': 2, 'iDCT_Algorithm': 5, 'YUVRGB_Scale': 1,\n'Luminance_Filter': {'Gamma': 0, 'Offset': 0}, 'Clipping': [0, 0, 0, 0], 'Aspect_Ratio': '16:9', 'Picture_Size':\n[720, 576], 'Field_Operation': 2, 'Frame_Rate': ['25000', [25, 1]], 'Location': {'StartFile': '0', 'StartOffset': '0',\n'EndFile': '0', 'EndOffset': '67d1f'}}\u003e\n```\n\n### D2V Properties\n\nD2V objects contain the following properties:\n\n- version: D2V version, `16` is currently the latest for the original DGIndex which was last updated in 2010.\n- videos: List of the video file paths that were indexed by DGIndex. It will be just a filename if \"Use Full Paths\" was\n  disabled in DGIndex.\n- settings: Will return various user-provided and auto-evaluated settings based on input data. More information on\n  Settings below.\n- data: Indexing data of the MPEG video stream, Each entry is of an I frame which will describe the following non-I\n  frames up to the next I frame.\n- data_type: What type of video is most previlent, e.g. `88.4% FILM`, `PAL`, `99.9% NTSC`.\n\n### Settings\n\n| Auto-evaluated Settings | Possible Values                        | Description                                                                        |\n| ----------------------- | -------------------------------------- | ---------------------------------------------------------------------------------- |\n| Stream_Type             | 0=Elementary Stream                    | Defines the type of MPEG stream.                                                   |\n|                         | 1=Program Stream                       |                                                                                    |\n|                         | 2=Transport Stream                     |                                                                                    |\n|                         | 3=PVA Stream                           |                                                                                    |\n| Transport_Packet_Size   | [188, 204]                             | Specifies the size in bytes of the transport packets. Used only for Stream_Type=2. |\n| MPEG_Type               | 1=MPEG-1, 2=MPEG-2                     | Defines the type of MPEG stream.                                                   |\n| Aspect_Ratio            | MPEG-2: \"1:1\", \"4:3\", \"16:9\", \"2.21:1\" | Defines the Aspect Ratio of the video specified in the MPEG stream.                |\n|                         | MPEG-1: \"1:1\", 0.6735, [\"16:9\", 625],  |                                                                                    |\n|                         | 0.7615, 0.8055, [\"16:9\", 525], 0.8935, |                                                                                    |\n|                         | [\"4:3\", 625], 0.9815, 1.0255, 1.0695,  |                                                                                    |\n|                         | [\"4:3\", 525], 1.575, 1.2015            |                                                                                    |\n| Picture_Size            | [width, height]                        | Defines the size of the video _after_ clipping has been applied.                   |\n| Frame_Rate              | rate [num, den]                        | 'rate' defines output framerate \\* 1000.                                           |\n\n| User-specified Settings | Possible Values                           | Description                                                              |\n| ----------------------- | ----------------------------------------- | ------------------------------------------------------------------------ |\n| MPEG2_Transport_PID     | {Video, Audio, RCR}                       | Selects the video/audio PIDs to be decoded. Used only for Stream_Type=2. |\n| iDCT_Algorithm          | 1=32-bit MMX                              | Defines the iDCT DGDecode will use to decode this video                  |\n|                         | 2=32-bit SSEMMX                           |                                                                          |\n|                         | 3=32-bit SSE2MMX                          |                                                                          |\n|                         | 4=64-bit Floating Point                   |                                                                          |\n|                         | 5=64-bit IEEE-1180 Reference              |                                                                          |\n|                         | 6=32-bit SSEMMX (Skal)                    |                                                                          |\n|                         | 7=32-bit Simple MMX (XviD)                |                                                                          |\n| YUVRGB_Scale            | 0=TV Scale                                | Defines the range DGDecode will use if RGB conversion is requested.      |\n|                         | 1=PC Scale                                |                                                                          |\n| Luminance_Filter        | {Gamma, Offset} (range of +/- 256)        | Defines values for DGIndex's Luminance_Filter.                           |\n| Clipping                | [ClipLeft,ClipRight,ClipTop,ClipBottom]   | Defines values for Cropping lines of video.                              |\n| Field_Operation         | 0=Honor Pulldown Flags                    | Defines values for Field Operation.                                      |\n|                         | 1=Force Film                              |                                                                          |\n|                         | 2=Ignore Pulldown Flags                   |                                                                          |\n| Location                | {StartFile,StartOffset,EndFile,EndOffset} | Defines start and end points for the video selection range.              |\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlaphoenix%2Fpyd2v","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlaphoenix%2Fpyd2v","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlaphoenix%2Fpyd2v/lists"}