ffmpeg-skill 1.26.0 → 2.0.0
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.
- package/README.md +5 -5
- package/SKILL.md +2 -2
- package/docs/contract.md +54 -46
- package/package.json +1 -1
- package/references/gotchas.md +5 -5
- package/references/scripts.md +6 -6
- package/scripts/_common/__init__.py +6 -6
- package/scripts/_common/decision.py +2 -2
- package/scripts/_common/emit.py +2 -37
- package/scripts/_common/probe.py +10 -6
- package/scripts/_common/runner.py +13 -45
- package/scripts/_contract.py +34 -31
- package/scripts/background.py +1 -1
- package/scripts/broll.py +2 -2
- package/scripts/caption.py +1 -1
- package/scripts/check.py +3 -3
- package/scripts/color.py +4 -4
- package/scripts/crop.py +1 -1
- package/scripts/cut.py +1 -1
- package/scripts/deinterlace.py +1 -1
- package/scripts/denoise.py +1 -1
- package/scripts/export.py +2 -2
- package/scripts/fit.py +2 -2
- package/scripts/freeze.py +1 -1
- package/scripts/graphics.py +1 -1
- package/scripts/grid.py +2 -2
- package/scripts/insert.py +1 -1
- package/scripts/join.py +2 -2
- package/scripts/look.py +1 -1
- package/scripts/loop.py +1 -1
- package/scripts/multicam.py +2 -2
- package/scripts/overlay.py +1 -1
- package/scripts/pad.py +1 -1
- package/scripts/probe.py +1 -1
- package/scripts/proxy.py +2 -2
- package/scripts/redact.py +1 -1
- package/scripts/render.py +4 -1
- package/scripts/report.py +1 -1
- package/scripts/reverse.py +1 -1
- package/scripts/sequence.py +1 -1
- package/scripts/silence.py +1 -1
- package/scripts/speedramp.py +1 -1
- package/scripts/sphere.py +1 -1
- package/scripts/stabilize.py +1 -1
- package/scripts/straighten.py +1 -1
- package/scripts/sync.py +1 -1
- package/scripts/verify.py +2 -2
- package/scripts/waveform.py +1 -1
package/scripts/reverse.py
CHANGED
|
@@ -22,7 +22,7 @@ def main() -> int:
|
|
|
22
22
|
ap.add_argument("input")
|
|
23
23
|
ap.add_argument("-o", "--output", help="output file (default: <name>_reverse.<ext>)")
|
|
24
24
|
ap.add_argument("--no-audio", action="store_true", help="drop audio instead of reversing it")
|
|
25
|
-
ap.
|
|
25
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
26
26
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
27
27
|
add_common(ap)
|
|
28
28
|
args = ap.parse_args()
|
package/scripts/sequence.py
CHANGED
|
@@ -46,7 +46,7 @@ def main() -> int:
|
|
|
46
46
|
ap.add_argument("--start-number", type=int, default=0, help="first frame index, for a printf pattern (default 0)")
|
|
47
47
|
ap.add_argument("--width", type=int, help="output width in px; with --height also given, both are used directly")
|
|
48
48
|
ap.add_argument("--height", type=int, help="output height in px; with --width also given, both are used directly")
|
|
49
|
-
ap.
|
|
49
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
50
50
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
51
51
|
add_common(ap)
|
|
52
52
|
args = ap.parse_args()
|
package/scripts/silence.py
CHANGED
|
@@ -242,7 +242,7 @@ def main() -> int:
|
|
|
242
242
|
fil.add_argument("--max-cuts", type=int, default=400,
|
|
243
243
|
help="refuse above this many removal ranges: the filter graph grows with them "
|
|
244
244
|
"(default 400)")
|
|
245
|
-
ap.
|
|
245
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
246
246
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS)
|
|
247
247
|
add_common(ap)
|
|
248
248
|
args = ap.parse_args()
|
package/scripts/speedramp.py
CHANGED
|
@@ -60,7 +60,7 @@ def main() -> int:
|
|
|
60
60
|
ap.add_argument("-o", "--output", help="output file (default: <name>_ramp.<ext>)")
|
|
61
61
|
ap.add_argument("--segment", action="append", required=True, dest="segments",
|
|
62
62
|
help=f"START-END:FACTOR, repeatable; segments must cover 0..duration with no gaps or overlaps, in order. FACTOR is {MIN_SPEED}..{MAX_SPEED} (2.0 = twice as fast, 0.5 = half speed)")
|
|
63
|
-
ap.
|
|
63
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
64
64
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
65
65
|
add_common(ap)
|
|
66
66
|
args = ap.parse_args()
|
package/scripts/sphere.py
CHANGED
|
@@ -64,7 +64,7 @@ def main() -> int:
|
|
|
64
64
|
out.add_argument("--width", type=int, default=1920, help="output width in px, must be even (default 1920)")
|
|
65
65
|
out.add_argument("--height", type=int, default=1080, help="output height in px, must be even (default 1080)")
|
|
66
66
|
out.add_argument("--interp", choices=INTERP_METHODS, default="lanczos", help="resampling method (default lanczos)")
|
|
67
|
-
ap.
|
|
67
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
68
68
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
69
69
|
ap.add_argument("--fps", type=float, help="force a constant output frame rate (recommended for VFR sources)")
|
|
70
70
|
add_common(ap)
|
package/scripts/stabilize.py
CHANGED
|
@@ -39,7 +39,7 @@ def main() -> int:
|
|
|
39
39
|
ap.add_argument("--zoom", type=float, default=0.0, help="percent to zoom in to hide stabilization edges, 0..100 (default 0)")
|
|
40
40
|
ap.add_argument("--crop", choices=["keep", "black"], default="keep", help="edges --zoom doesn't crop away: keep (stretch border pixels, default) or black (fill solid black)")
|
|
41
41
|
ap.add_argument("--tripod", action="store_true", help="lock the frame fully still against a single reference frame instead of smoothing the camera's motion")
|
|
42
|
-
ap.
|
|
42
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
43
43
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
44
44
|
add_common(ap)
|
|
45
45
|
args = ap.parse_args()
|
package/scripts/straighten.py
CHANGED
|
@@ -35,7 +35,7 @@ def main() -> int:
|
|
|
35
35
|
ap.add_argument("--fill-color", default="black", help="corner fill colour with --fit pad (default black)")
|
|
36
36
|
ap.add_argument("--audio-stream", type=int, default=0,
|
|
37
37
|
help="which audio stream of the input to keep, 0-based in file order (default 0)")
|
|
38
|
-
ap.
|
|
38
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
39
39
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
40
40
|
ap.add_argument("--fps", type=float, help="force a constant output frame rate (recommended for VFR sources)")
|
|
41
41
|
add_common(ap)
|
package/scripts/sync.py
CHANGED
|
@@ -265,7 +265,7 @@ def main() -> int:
|
|
|
265
265
|
mode = ap.add_mutually_exclusive_group()
|
|
266
266
|
mode.add_argument("--replace-audio", action="store_true", help="write reference video with the second file's audio, aligned")
|
|
267
267
|
mode.add_argument("--trim-second", action="store_true", help="write the second file shifted so it lines up with the reference")
|
|
268
|
-
ap.
|
|
268
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
269
269
|
add_common(ap)
|
|
270
270
|
args = ap.parse_args()
|
|
271
271
|
apply_common(args)
|
package/scripts/verify.py
CHANGED
|
@@ -73,7 +73,7 @@ def step(name: str, argv: List[str], timeout: float) -> Dict:
|
|
|
73
73
|
was_json, STATE.json = STATE.json, False # probe()'s die() would print a JSON document of its own
|
|
74
74
|
try:
|
|
75
75
|
v = probe(argv[1]).get("video") or {}
|
|
76
|
-
ok = bool(v.get("
|
|
76
|
+
ok = bool(v.get("bt2020_or_hdr")) and v.get("bit_depth", 8) >= 10
|
|
77
77
|
err = "" if ok else f"re-encode lost HDR: {v.get('color_transfer')}/{v.get('pix_fmt')}"
|
|
78
78
|
except SystemExit:
|
|
79
79
|
ok, err = False, "output missing"
|
|
@@ -148,7 +148,7 @@ def main() -> int:
|
|
|
148
148
|
if not args.quick:
|
|
149
149
|
plan.append(("overlay text", ["overlay.py", cut, "--text", "verify", "--position", "top-left", "-o", f"{stem}_ovl.mp4"] + fast))
|
|
150
150
|
plan.append(("look sheet", ["look.py", cut, "-o", f"{stem}_sheet.png"]))
|
|
151
|
-
if (meta.get("video") or {}).get("
|
|
151
|
+
if (meta.get("video") or {}).get("bt2020_or_hdr"):
|
|
152
152
|
plan.append(("color to-sdr", ["color.py", f"{stem}_acc.mp4", "--to-sdr", "-o", f"{stem}_sdr.mp4"] + fast))
|
|
153
153
|
plan.append(("hdr preserved", ["__check_hdr__", f"{stem}_acc.mp4"]))
|
|
154
154
|
plan.append(("probe analyze", ["probe.py", cut, "--analyze"]))
|
package/scripts/waveform.py
CHANGED
|
@@ -73,7 +73,7 @@ def main() -> int:
|
|
|
73
73
|
ag.add_argument("--text", help="plain cue file to burn, same as caption.py --text")
|
|
74
74
|
ag.add_argument("--title", help="one static label drawn over the plate, through graphics.py's sticker template")
|
|
75
75
|
ag.add_argument("--brand", help="brand.json: --color / --background / font defaults")
|
|
76
|
-
ap.
|
|
76
|
+
ap.set_defaults(crf=18) # --quality's default (the --crf alias was removed in 2.0)
|
|
77
77
|
ap.add_argument("--preset", default="medium", choices=X264_PRESETS, help="x264 preset")
|
|
78
78
|
add_common(ap)
|
|
79
79
|
args = ap.parse_args()
|