bdmvkit 0.7.0__tar.gz → 0.7.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bdmvkit-0.7.0/bdmvkit.egg-info → bdmvkit-0.7.1}/PKG-INFO +7 -1
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/README.md +6 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/__init__.py +1 -1
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/__main__.py +7 -0
- bdmvkit-0.7.1/bdmvkit/contract.py +44 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1/bdmvkit.egg-info}/PKG-INFO +7 -1
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit.egg-info/SOURCES.txt +3 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/pyproject.toml +1 -1
- bdmvkit-0.7.1/tests/test_contract.py +32 -0
- bdmvkit-0.7.1/tests/test_contract_file.py +18 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/COPYING +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/COPYING.LESSER +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/clip.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/disc.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/encode.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/errors.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/formats.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/hdmv.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/igs.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/m2ts.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/nav.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/pgs.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/playlist.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/program.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit/uops.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit.egg-info/dependency_links.txt +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit.egg-info/entry_points.txt +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/bdmvkit.egg-info/top_level.txt +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/setup.cfg +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_disc.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_dts.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_files.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_menus.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_motion.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_nav.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_pgs.py +0 -0
- {bdmvkit-0.7.0 → bdmvkit-0.7.1}/tests/test_popup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bdmvkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: Blu-ray (BDMV) authoring in pure Python: playlists, clip information, HDMV navigation, PGS subtitles
|
|
5
5
|
Author: kajisho5
|
|
6
6
|
License-Expression: LGPL-3.0-or-later
|
|
@@ -176,8 +176,14 @@ menu's buttons run, for tools that make their own IG streams.
|
|
|
176
176
|
```sh
|
|
177
177
|
bdmvkit encode feature.mov feature.m2ts --chapters 0,300,600
|
|
178
178
|
bdmvkit build disc.json out
|
|
179
|
+
bdmvkit contract --json # machine-readable contract (AI Video Production OS registry)
|
|
179
180
|
```
|
|
180
181
|
|
|
182
|
+
`contract/contract.json` is that contract committed as a file (the `contract --json` output,
|
|
183
|
+
unchanged), so any release's contract is `git show vX.Y.Z:contract/contract.json`, with nothing
|
|
184
|
+
installed or run. Regenerate it with `python contract/generate.py` after a contract change or a
|
|
185
|
+
version bump; a unit test fails when it is stale.
|
|
186
|
+
|
|
181
187
|
`disc.json` looks like this:
|
|
182
188
|
|
|
183
189
|
```json
|
|
@@ -159,8 +159,14 @@ menu's buttons run, for tools that make their own IG streams.
|
|
|
159
159
|
```sh
|
|
160
160
|
bdmvkit encode feature.mov feature.m2ts --chapters 0,300,600
|
|
161
161
|
bdmvkit build disc.json out
|
|
162
|
+
bdmvkit contract --json # machine-readable contract (AI Video Production OS registry)
|
|
162
163
|
```
|
|
163
164
|
|
|
165
|
+
`contract/contract.json` is that contract committed as a file (the `contract --json` output,
|
|
166
|
+
unchanged), so any release's contract is `git show vX.Y.Z:contract/contract.json`, with nothing
|
|
167
|
+
installed or run. Regenerate it with `python contract/generate.py` after a contract change or a
|
|
168
|
+
version bump; a unit test fails when it is stale.
|
|
169
|
+
|
|
164
170
|
`disc.json` looks like this:
|
|
165
171
|
|
|
166
172
|
```json
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
bdmvkit encode SOURCE CLIP.m2ts [--fps 24000/1001] [--chapters 0,60,120] [--fast]
|
|
4
4
|
bdmvkit build DISC.json OUT_DIR
|
|
5
|
+
bdmvkit contract [--json]
|
|
5
6
|
|
|
6
7
|
DISC.json: {"titles": [{"clip": "a.m2ts", "fps": "24000/1001",
|
|
7
8
|
"chapters": [0, 60], "audio": [["ac3", 2, "en"]], "subtitles": ["ja"],
|
|
@@ -24,6 +25,7 @@ import os
|
|
|
24
25
|
import sys
|
|
25
26
|
|
|
26
27
|
from . import __version__
|
|
28
|
+
from .contract import contract
|
|
27
29
|
from .disc import Disc, MenuButton
|
|
28
30
|
from .encode import encode_clip
|
|
29
31
|
from .errors import BdmvError
|
|
@@ -52,7 +54,12 @@ def main(argv=None):
|
|
|
52
54
|
s.add_argument("disc", help="the disc description (JSON)")
|
|
53
55
|
s.add_argument("out", help="the folder to write BDMV into")
|
|
54
56
|
s.add_argument("--fast", action="store_true", help="quick encoding of the menus")
|
|
57
|
+
s = sub.add_parser("contract", help="print the machine-readable contract (JSON)")
|
|
58
|
+
s.add_argument("--json", action="store_true", help="accepted; the output is always JSON")
|
|
55
59
|
args = p.parse_args(argv)
|
|
60
|
+
if args.command == "contract":
|
|
61
|
+
print(json.dumps(contract(), indent=2))
|
|
62
|
+
return 0
|
|
56
63
|
try:
|
|
57
64
|
if args.command == "encode":
|
|
58
65
|
encode_clip(args.source, args.clip, fps=_fps(args.fps),
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Machine-readable contract (`bdmvkit contract --json`), in the shape the AI Video
|
|
2
|
+
Production OS registry reads (skill_id, version, contract_version, provides,
|
|
3
|
+
dependencies, not_provided)."""
|
|
4
|
+
|
|
5
|
+
from . import __version__
|
|
6
|
+
|
|
7
|
+
SKILL_ID = "bdmvkit"
|
|
8
|
+
CONTRACT_VERSION = "1.0"
|
|
9
|
+
|
|
10
|
+
TOOLS = [
|
|
11
|
+
{"tool_id": "bdmvkit/encode", "kind": "cli", "writes_media": True, "mutates_input": False,
|
|
12
|
+
"description": "Encode a video into a Blu-ray clip (.m2ts) with ffmpeg + x264",
|
|
13
|
+
"argv": ["encode", "<source>", "<clip.m2ts>", "[--fps 24000/1001|25|30000/1001]", "[--chapters 0,60,120]", "[--fast]"]},
|
|
14
|
+
{"tool_id": "bdmvkit/build", "kind": "cli", "writes_media": True, "mutates_input": False,
|
|
15
|
+
"description": "Write a BDMV folder (playlists, clip information, HDMV navigation, menus, PGS subtitles) from encoded clips and a disc description",
|
|
16
|
+
"argv": ["build", "<disc.json>", "<out_dir>", "[--fast]"]},
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def contract():
|
|
21
|
+
return {
|
|
22
|
+
"skill_id": SKILL_ID,
|
|
23
|
+
"id": SKILL_ID,
|
|
24
|
+
"version": __version__,
|
|
25
|
+
"contract_version": CONTRACT_VERSION,
|
|
26
|
+
"provides": [
|
|
27
|
+
{"id": "bluray.encode_clip", "lifecycle": "EXPERIMENTAL", "tool_id": "bdmvkit/encode"},
|
|
28
|
+
{"id": "bluray.author", "lifecycle": "EXPERIMENTAL", "tool_id": "bdmvkit/build"},
|
|
29
|
+
],
|
|
30
|
+
# No Skill dependencies (ffmpeg-skill is not used).
|
|
31
|
+
"dependencies": [],
|
|
32
|
+
"external_tools": [{"id": "ffmpeg", "required": True, "detail": "with libx264; encodes clips and menus"}],
|
|
33
|
+
"not_provided": [
|
|
34
|
+
"disc images (udfkit)",
|
|
35
|
+
"burning a disc",
|
|
36
|
+
"DVD-Video (vtskit, oncemore)",
|
|
37
|
+
"copy protection of any kind",
|
|
38
|
+
"network access of any kind",
|
|
39
|
+
],
|
|
40
|
+
"tools": TOOLS,
|
|
41
|
+
"python_api": "bdmvkit.Disc",
|
|
42
|
+
"execution": {"canonical_invocation": ["bdmvkit", "contract", "--json"],
|
|
43
|
+
"network": False, "shell": False},
|
|
44
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bdmvkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.1
|
|
4
4
|
Summary: Blu-ray (BDMV) authoring in pure Python: playlists, clip information, HDMV navigation, PGS subtitles
|
|
5
5
|
Author: kajisho5
|
|
6
6
|
License-Expression: LGPL-3.0-or-later
|
|
@@ -176,8 +176,14 @@ menu's buttons run, for tools that make their own IG streams.
|
|
|
176
176
|
```sh
|
|
177
177
|
bdmvkit encode feature.mov feature.m2ts --chapters 0,300,600
|
|
178
178
|
bdmvkit build disc.json out
|
|
179
|
+
bdmvkit contract --json # machine-readable contract (AI Video Production OS registry)
|
|
179
180
|
```
|
|
180
181
|
|
|
182
|
+
`contract/contract.json` is that contract committed as a file (the `contract --json` output,
|
|
183
|
+
unchanged), so any release's contract is `git show vX.Y.Z:contract/contract.json`, with nothing
|
|
184
|
+
installed or run. Regenerate it with `python contract/generate.py` after a contract change or a
|
|
185
|
+
version bump; a unit test fails when it is stale.
|
|
186
|
+
|
|
181
187
|
`disc.json` looks like this:
|
|
182
188
|
|
|
183
189
|
```json
|
|
@@ -5,6 +5,7 @@ pyproject.toml
|
|
|
5
5
|
bdmvkit/__init__.py
|
|
6
6
|
bdmvkit/__main__.py
|
|
7
7
|
bdmvkit/clip.py
|
|
8
|
+
bdmvkit/contract.py
|
|
8
9
|
bdmvkit/disc.py
|
|
9
10
|
bdmvkit/encode.py
|
|
10
11
|
bdmvkit/errors.py
|
|
@@ -22,6 +23,8 @@ bdmvkit.egg-info/SOURCES.txt
|
|
|
22
23
|
bdmvkit.egg-info/dependency_links.txt
|
|
23
24
|
bdmvkit.egg-info/entry_points.txt
|
|
24
25
|
bdmvkit.egg-info/top_level.txt
|
|
26
|
+
tests/test_contract.py
|
|
27
|
+
tests/test_contract_file.py
|
|
25
28
|
tests/test_disc.py
|
|
26
29
|
tests/test_dts.py
|
|
27
30
|
tests/test_files.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "bdmvkit"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.1"
|
|
8
8
|
description = "Blu-ray (BDMV) authoring in pure Python: playlists, clip information, HDMV navigation, PGS subtitles"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "LGPL-3.0-or-later"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""The contract: the AI Video Production OS registry shape."""
|
|
2
|
+
|
|
3
|
+
import io
|
|
4
|
+
import json
|
|
5
|
+
import unittest
|
|
6
|
+
from contextlib import redirect_stdout
|
|
7
|
+
|
|
8
|
+
from bdmvkit import __version__
|
|
9
|
+
from bdmvkit.__main__ import main
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TestContract(unittest.TestCase):
|
|
13
|
+
def test_contract_json(self):
|
|
14
|
+
out = io.StringIO()
|
|
15
|
+
with redirect_stdout(out):
|
|
16
|
+
self.assertEqual(main(["contract", "--json"]), 0)
|
|
17
|
+
c = json.loads(out.getvalue())
|
|
18
|
+
for k in ("skill_id", "version", "contract_version", "provides", "dependencies", "not_provided"):
|
|
19
|
+
self.assertIn(k, c)
|
|
20
|
+
self.assertEqual((c["skill_id"], c["version"]), ("bdmvkit", __version__))
|
|
21
|
+
tool_ids = [t["tool_id"] for t in c["tools"]]
|
|
22
|
+
ids = [p["id"] for p in c["provides"]]
|
|
23
|
+
self.assertEqual(len(ids), len(set(ids)))
|
|
24
|
+
for p in c["provides"]:
|
|
25
|
+
self.assertEqual(set(p), {"id", "lifecycle", "tool_id"})
|
|
26
|
+
self.assertIn(p["lifecycle"], ("PROPOSED", "EXPERIMENTAL", "STABLE", "DEPRECATED", "RETIRED"))
|
|
27
|
+
self.assertIn(p["tool_id"], tool_ids)
|
|
28
|
+
self.assertFalse(c["execution"]["network"])
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
unittest.main()
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""contract/contract.json is the committed copy of the contract; it must match what the code prints."""
|
|
2
|
+
import subprocess
|
|
3
|
+
import sys
|
|
4
|
+
import unittest
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
ROOT = Path(__file__).resolve().parent.parent
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CommittedContractFileTest(unittest.TestCase):
|
|
11
|
+
def test_contract_file_is_up_to_date(self):
|
|
12
|
+
result = subprocess.run([sys.executable, str(ROOT / "contract" / "generate.py"), "--check"],
|
|
13
|
+
capture_output=True, text=True)
|
|
14
|
+
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|