feat(hybrid): generate dolby vision from hdr10+ with --generate-dv

Builds per-scene L1 in unshackle (PQ mean, letterbox-aware) with a generate_dv_mode config (v29/v40/legacy); a failed hybrid no longer exits 0 with no video.
This commit is contained in:
imSp4rky
2026-10-17 16:40:14 -06:00
parent 14bd2f2c7e
commit 35871f3a52
22 changed files with 1370 additions and 286 deletions
+8 -7
View File
@@ -127,18 +127,19 @@ def info_frame(rpu: Path, frame: int = 0) -> dict:
raise RuntimeError(f"dovi_tool info returned invalid JSON: {e}")
def generate_from_hdr10plus(
extra_json: Path,
hdr10plus_json: Path,
def generate(
config_json: Path,
output: Path,
*,
status: Optional[str] = "Generating DV RPU from HDR10+ metadata...",
hdr10plus_json: Optional[Path] = None,
status: Optional[str] = "Generating DV RPU...",
label: str = "dovi_tool generate",
) -> bytes:
"""Assemble a DV RPU from extracted HDR10+ metadata + an extra JSON descriptor."""
"""Build a DV RPU from a dovi_tool generator config, and from hdr10plus_tool JSON when given."""
tool = require_dovi_tool()
extra = ["--hdr10plus-json", hdr10plus_json] if hdr10plus_json else []
return run_step(
[tool, "generate", "-j", extra_json, "--hdr10plus-json", hdr10plus_json, "-o", output],
[tool, "generate", "-j", config_json, *extra, "-o", output],
status=status,
output=output,
label=label,
@@ -166,5 +167,5 @@ __all__ = (
"editor",
"info_summary",
"info_frame",
"generate_from_hdr10plus",
"generate",
)