{"id":20797528,"url":"https://github.com/rlaphoenix/mpgg","last_synced_at":"2025-07-01T12:05:22.081Z","repository":{"id":149155142,"uuid":"618759393","full_name":"rlaphoenix/mpgg","owner":"rlaphoenix","description":"Streamlined MPEG-1 and MPEG-2 source loader and helper utility for VapourSynth","archived":false,"fork":false,"pushed_at":"2024-07-15T18:47:04.000Z","size":52,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T10:47:40.351Z","etag":null,"topics":["dgindex","dgmpgdec","dvd","mpeg","mpeg2","vapoursynth"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rlaphoenix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-25T09:10:31.000Z","updated_at":"2025-03-19T20:01:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8f6e96e-9531-43c5-835e-68a4e16e05c1","html_url":"https://github.com/rlaphoenix/mpgg","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rlaphoenix/mpgg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fmpgg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fmpgg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fmpgg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fmpgg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlaphoenix","download_url":"https://codeload.github.com/rlaphoenix/mpgg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlaphoenix%2Fmpgg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262959559,"owners_count":23391057,"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":["dgindex","dgmpgdec","dvd","mpeg","mpeg2","vapoursynth"],"created_at":"2024-11-17T16:34:20.559Z","updated_at":"2025-07-01T12:05:22.073Z","avatar_url":"https://github.com/rlaphoenix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/rlaphoenix/mpgg\"\u003eMPGG\u003c/a\u003e\n    \u003cbr/\u003e\n    \u003csup\u003e\u003cem\u003eStreamlined MPEG-1 and MPEG-2 source loader and helper utility for VapourSynth\u003c/em\u003e\u003c/sup\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/rlaphoenix/mpgg/actions/workflows/ci.yml\"\u003e\n        \u003cimg src=\"https://github.com/rlaphoenix/mpgg/actions/workflows/ci.yml/badge.svg\" alt=\"Build status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://python.org\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-informational\" alt=\"Python version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://vapoursynth.com\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/vapoursynth-R49%2B-informational\" alt=\"VapourSynth version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://deepsource.io/gh/rlaphoenix/mpgg/?ref=repository-badge\"\u003e\n        \u003cimg src=\"https://deepsource.io/gh/rlaphoenix/mpgg.svg/?label=active+issues\u0026token=9rxkTrTRXcRYIVl8HjRu2sYX\" alt=\"DeepSource\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n- 🎥 Supports MPEG-1 and MPEG-2 Sources\n- 🧠 Understands Mixed-scan Sources\n- 🤖 VFR to CFR (Variable to Constant frame rate)\n- 🛠️ Automatic Frame-indexing using DGIndex\n- ⚙️ Zero-configuration\n- 🧩 Easy installation via PIP/PyPI\n- ❤️ Fully Open-Source! Pull Requests Welcome\n\n## Installation\n\n```shell\n$ pip install mpgg\n```\n\nVoilà 🎉! You now have the `mpgg` package installed, and you can now import it from a VapourSynth script.\n\n### Dependencies\n\nThe following is a list of software that needs to be installed manually. MPGG cannot install these automatically\non your behalf.\n\n#### Software\n\n- [DGIndex] v1.5.8+ for automatic frame-indexing of MPEG streams.\n- [MKVExtract] for demuxing MPEG streams from MKV containers, only required if you use MKV files directly.\n\nMake sure you put them in your current working directory, in the installation directory, or put the directory path in\nyour `PATH` environment variable. If you do not do this then their binaries will not be able to be found.\n\n  [MKVExtract]: \u003chttps://mkvtoolnix.download/downloads.html\u003e\n  [DGIndex]: \u003chttps://rationalqm.us/dgmpgdec/dgmpgdec.html\u003e\n\n#### VapourSynth Plugins\n\n- [d2vsource] for loading an indexed DGIndex project file.\n\nThese plugins may be installed using [vsrepo] on Windows, or from a package repository on Linux.\n\n  [d2vsource]: \u003chttps://github.com/dwbuiten/d2vsource\u003e\n  [vsrepo]: \u003chttps://github.com/vapoursynth/vsrepo\u003e\n\n## Usage\n\nThe following is an example of using MPGG to get a clean CFR Fully Progressive stream from an\nAnimated Mixed-scan VFR DVD-Video source.\n\n```python\nimport functools\n\nfrom mpgg import MPGG\nfrom havsfunc import QTGMC\n\n# load the source with verbose information printed\nmpg = MPGG(r\"C:\\Users\\John\\Videos\\animated_dvd_video.mkv\", verbose=True)\n\n# recover progressive frames where possible, and show which frames were recovered\nmpg.recover(verbose=True)\n\n# deinterlace any remaining interlaced frames with QTGMC, and show which frames were deinterlaced\nmpg.deinterlace(\n  kernel=functools.partial(QTGMC, Preset=\"Very Slow\", FPSDivisor=2),\n  verbose=True\n)\n\n# convert VFR to CFR by duplicating frames in a pattern\nmpg.ceil()\n\n# get the final clip (you may use the clip in between actions as well)\nclip = mpg.clip\n\n# ...\n\nclip.set_output()\n```\n\nYou can also chain calls! This is the same script but chained,\n\n```python\nimport functools\n\nfrom mpgg import MPGG\nfrom havsfunc import QTGMC\n\n# load MPEG, recover progressive frames, deinterlace what's left, and finally VFR to CFR\nclip = MPGG(r\"C:\\Users\\John\\Videos\\animated_dvd_video.mkv\", verbose=True).\\\n  recover(verbose=True).\\\n  deinterlace(kernel=functools.partial(QTGMC, Preset=\"Very Slow\", FPSDivisor=2), verbose=True).\\\n  ceil().\\\n  clip\n\n# ...\n\nclip.set_output()\n```\n\nThere are more methods not shown here. I recommend taking a look at the MPGG class for further\ninformation, methods, and more.\n\n\u003e __Warning__ Do not copy/paste and re-use these examples. Read each method's doc-string information\n\u003e as they each have their own warnings, tips, and flaws that you need to be aware of. For example,\n\u003e recover() shouldn't be used on all MPEG sources, floor() shouldn't be used with recover(), you\n\u003e may not want to use ceil() if you want to keep encoding as VFR, and such.\n\n## Terminology\n\n| Term           | Meaning                                                                        |\n|----------------|--------------------------------------------------------------------------------|\n| CFR            | Constant frame-rate, the source uses a set frame rate on playback              |\n| VFR            | Variable frame-rate, the source switches frame rate at least once on playback  |\n| Scan           | The technology used to show images on screens, i.e., Interlaced or Progressive |\n| Mixed-scan     | Source with both Progressive and Interlaced frames within the video data       |\n| Frame-indexing | Analyzing a source to index frame/field information for frame-serving          |\n\n## Contributors\n\n\u003ca href=\"https://github.com/rlaphoenix\"\u003e\u003cimg src=\"https://images.weserv.nl/?url=avatars.githubusercontent.com/u/17136956?v=4\u0026h=25\u0026w=25\u0026fit=cover\u0026mask=circle\u0026maxage=7d\" alt=\"\"/\u003e\u003c/a\u003e\n\n## License\n\n© 2021-2023 rlaphoenix — [GNU General Public License, Version 3.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlaphoenix%2Fmpgg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlaphoenix%2Fmpgg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlaphoenix%2Fmpgg/lists"}