premiere-cli 0.2.0__py3-none-any.whl
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.
- premiere_cli/__init__.py +11 -0
- premiere_cli/cli.py +3664 -0
- premiere_cli/log.py +66 -0
- premiere_cli/panel/.debug +8 -0
- premiere_cli/panel/CSXS/manifest.xml +52 -0
- premiere_cli/panel/css/style.css +53 -0
- premiere_cli/panel/host/commands/add-adjustment-layer.jsx +190 -0
- premiere_cli/panel/host/commands/add-audio-keyframes.jsx +176 -0
- premiere_cli/panel/host/commands/add-custom-metadata-field.jsx +63 -0
- premiere_cli/panel/host/commands/add-keyframe.jsx +181 -0
- premiere_cli/panel/host/commands/add-marker-to-project-item.jsx +194 -0
- premiere_cli/panel/host/commands/add-marker.jsx +129 -0
- premiere_cli/panel/host/commands/add-text-overlay.jsx +101 -0
- premiere_cli/panel/host/commands/add-to-render-queue.jsx +120 -0
- premiere_cli/panel/host/commands/add-to-timeline.jsx +300 -0
- premiere_cli/panel/host/commands/add-track.jsx +188 -0
- premiere_cli/panel/host/commands/add-transition.jsx +134 -0
- premiere_cli/panel/host/commands/adjust-audio-levels.jsx +132 -0
- premiere_cli/panel/host/commands/apply-audio-effect.jsx +118 -0
- premiere_cli/panel/host/commands/apply-effect.jsx +122 -0
- premiere_cli/panel/host/commands/apply-lut.jsx +107 -0
- premiere_cli/panel/host/commands/attach-custom-property.jsx +66 -0
- premiere_cli/panel/host/commands/auto-reframe-sequence.jsx +124 -0
- premiere_cli/panel/host/commands/batch-add-transitions.jsx +158 -0
- premiere_cli/panel/host/commands/batch-apply-effect.jsx +182 -0
- premiere_cli/panel/host/commands/batch-rename-clips.jsx +170 -0
- premiere_cli/panel/host/commands/batch-set-clips-enabled.jsx +145 -0
- premiere_cli/panel/host/commands/clear-item-in-out.jsx +117 -0
- premiere_cli/panel/host/commands/clear-sequence-in-out.jsx +100 -0
- premiere_cli/panel/host/commands/close-all-source-clips.jsx +32 -0
- premiere_cli/panel/host/commands/close-sequence.jsx +80 -0
- premiere_cli/panel/host/commands/close-source-monitor.jsx +32 -0
- premiere_cli/panel/host/commands/color-correct.jsx +164 -0
- premiere_cli/panel/host/commands/copy-effect-values.jsx +183 -0
- premiere_cli/panel/host/commands/copy-effects-between-clips.jsx +234 -0
- premiere_cli/panel/host/commands/create-bars-and-tone.jsx +152 -0
- premiere_cli/panel/host/commands/create-bin.jsx +76 -0
- premiere_cli/panel/host/commands/create-caption-track.jsx +159 -0
- premiere_cli/panel/host/commands/create-sequence-from-clips.jsx +170 -0
- premiere_cli/panel/host/commands/create-sequence-from-preset.jsx +90 -0
- premiere_cli/panel/host/commands/create-sequence.jsx +166 -0
- premiere_cli/panel/host/commands/create-smart-bin.jsx +80 -0
- premiere_cli/panel/host/commands/create-subclip.jsx +248 -0
- premiere_cli/panel/host/commands/create-subsequence.jsx +136 -0
- premiere_cli/panel/host/commands/debug-qe-inspect.jsx +248 -0
- premiere_cli/panel/host/commands/debug-qe-try-mutate.jsx +305 -0
- premiere_cli/panel/host/commands/delete-marker.jsx +178 -0
- premiere_cli/panel/host/commands/deselect-all-clips.jsx +98 -0
- premiere_cli/panel/host/commands/detach-proxy.jsx +116 -0
- premiere_cli/panel/host/commands/duplicate-clip.jsx +140 -0
- premiere_cli/panel/host/commands/duplicate-sequence.jsx +150 -0
- premiere_cli/panel/host/commands/encode-file.jsx +86 -0
- premiere_cli/panel/host/commands/encode-project-item.jsx +145 -0
- premiere_cli/panel/host/commands/export-aaf.jsx +77 -0
- premiere_cli/panel/host/commands/export-fcp-xml.jsx +65 -0
- premiere_cli/panel/host/commands/export-frame.jsx +381 -0
- premiere_cli/panel/host/commands/export-omf.jsx +95 -0
- premiere_cli/panel/host/commands/export-sequence-as-project.jsx +65 -0
- premiere_cli/panel/host/commands/export-sequence.jsx +100 -0
- premiere_cli/panel/host/commands/extract-audio-track.jsx +181 -0
- premiere_cli/panel/host/commands/extract-selection.jsx +113 -0
- premiere_cli/panel/host/commands/find-items-by-media-path.jsx +112 -0
- premiere_cli/panel/host/commands/freeze-frame.jsx +215 -0
- premiere_cli/panel/host/commands/get-active-sequence.jsx +103 -0
- premiere_cli/panel/host/commands/get-all-project-paths.jsx +72 -0
- premiere_cli/panel/host/commands/get-bin-contents.jsx +176 -0
- premiere_cli/panel/host/commands/get-clip-adjustment-layer.jsx +83 -0
- premiere_cli/panel/host/commands/get-clip-at-playhead.jsx +99 -0
- premiere_cli/panel/host/commands/get-clip-at-position.jsx +120 -0
- premiere_cli/panel/host/commands/get-clip-links.jsx +135 -0
- premiere_cli/panel/host/commands/get-clip-markers.jsx +144 -0
- premiere_cli/panel/host/commands/get-clip-speed.jsx +69 -0
- premiere_cli/panel/host/commands/get-color-label.jsx +89 -0
- premiere_cli/panel/host/commands/get-color-space.jsx +99 -0
- premiere_cli/panel/host/commands/get-duplicate-media.jsx +78 -0
- premiere_cli/panel/host/commands/get-effect-properties.jsx +129 -0
- premiere_cli/panel/host/commands/get-encoder-presets.jsx +131 -0
- premiere_cli/panel/host/commands/get-export-file-extension.jsx +56 -0
- premiere_cli/panel/host/commands/get-footage-interpretation.jsx +113 -0
- premiere_cli/panel/host/commands/get-full-clip-info.jsx +162 -0
- premiere_cli/panel/host/commands/get-full-project-overview.jsx +193 -0
- premiere_cli/panel/host/commands/get-full-sequence-info.jsx +184 -0
- premiere_cli/panel/host/commands/get-graphics-white-luminance.jsx +31 -0
- premiere_cli/panel/host/commands/get-insertion-bin.jsx +35 -0
- premiere_cli/panel/host/commands/get-item-metadata.jsx +94 -0
- premiere_cli/panel/host/commands/get-keyframes.jsx +158 -0
- premiere_cli/panel/host/commands/get-mogrt-component.jsx +111 -0
- premiere_cli/panel/host/commands/get-next-edit-point.jsx +131 -0
- premiere_cli/panel/host/commands/get-offline-media.jsx +67 -0
- premiere_cli/panel/host/commands/get-open-projects.jsx +50 -0
- premiere_cli/panel/host/commands/get-premiere-state.jsx +164 -0
- premiere_cli/panel/host/commands/get-project-info.jsx +63 -0
- premiere_cli/panel/host/commands/get-project-item-info.jsx +247 -0
- premiere_cli/panel/host/commands/get-project-panel-metadata.jsx +30 -0
- premiere_cli/panel/host/commands/get-qe-clip-info.jsx +198 -0
- premiere_cli/panel/host/commands/get-render-queue-status.jsx +35 -0
- premiere_cli/panel/host/commands/get-sequence-count.jsx +24 -0
- premiere_cli/panel/host/commands/get-sequence-in-out.jsx +76 -0
- premiere_cli/panel/host/commands/get-sequence-markers-by-type.jsx +89 -0
- premiere_cli/panel/host/commands/get-source-monitor-info.jsx +34 -0
- premiere_cli/panel/host/commands/get-source-monitor-position.jsx +30 -0
- premiere_cli/panel/host/commands/get-target-tracks.jsx +76 -0
- premiere_cli/panel/host/commands/get-timeline-gaps.jsx +124 -0
- premiere_cli/panel/host/commands/get-timeline-summary.jsx +154 -0
- premiere_cli/panel/host/commands/get-total-clip-count.jsx +67 -0
- premiere_cli/panel/host/commands/get-track-info.jsx +117 -0
- premiere_cli/panel/host/commands/get-unused-media.jsx +99 -0
- premiere_cli/panel/host/commands/get-used-media-report.jsx +125 -0
- premiere_cli/panel/host/commands/get-value-at-time.jsx +135 -0
- premiere_cli/panel/host/commands/get-version-info.jsx +33 -0
- premiere_cli/panel/host/commands/get-work-area.jsx +52 -0
- premiere_cli/panel/host/commands/get-workspaces.jsx +29 -0
- premiere_cli/panel/host/commands/get-xmp-metadata.jsx +107 -0
- premiere_cli/panel/host/commands/import-ae-comps.jsx +129 -0
- premiere_cli/panel/host/commands/import-fcp-xml.jsx +103 -0
- premiere_cli/panel/host/commands/import-folder.jsx +193 -0
- premiere_cli/panel/host/commands/import-image-sequence.jsx +171 -0
- premiere_cli/panel/host/commands/import-media.jsx +217 -0
- premiere_cli/panel/host/commands/import-mogrt-from-library.jsx +105 -0
- premiere_cli/panel/host/commands/import-mogrt.jsx +111 -0
- premiere_cli/panel/host/commands/import-sequences-from-project.jsx +80 -0
- premiere_cli/panel/host/commands/insert-from-source.jsx +162 -0
- premiere_cli/panel/host/commands/inspect-dom-object.jsx +162 -0
- premiere_cli/panel/host/commands/invert-selection.jsx +114 -0
- premiere_cli/panel/host/commands/is-work-area-enabled.jsx +88 -0
- premiere_cli/panel/host/commands/lift-selection.jsx +106 -0
- premiere_cli/panel/host/commands/link-selection.jsx +111 -0
- premiere_cli/panel/host/commands/list-available-audio-effects.jsx +33 -0
- premiere_cli/panel/host/commands/list-available-audio-transitions.jsx +35 -0
- premiere_cli/panel/host/commands/list-available-effects.jsx +33 -0
- premiere_cli/panel/host/commands/list-available-transitions.jsx +74 -0
- premiere_cli/panel/host/commands/list-markers.jsx +69 -0
- premiere_cli/panel/host/commands/list-project-items.jsx +105 -0
- premiere_cli/panel/host/commands/lock-track.jsx +114 -0
- premiere_cli/panel/host/commands/manage-proxies.jsx +176 -0
- premiere_cli/panel/host/commands/match-frame.jsx +141 -0
- premiere_cli/panel/host/commands/move-clip-to-track.jsx +220 -0
- premiere_cli/panel/host/commands/move-clip.jsx +97 -0
- premiere_cli/panel/host/commands/move-items-to-bin.jsx +194 -0
- premiere_cli/panel/host/commands/move-playhead-to-edit.jsx +174 -0
- premiere_cli/panel/host/commands/move-playhead.jsx +137 -0
- premiere_cli/panel/host/commands/nest-clips.jsx +179 -0
- premiere_cli/panel/host/commands/open-in-source.jsx +117 -0
- premiere_cli/panel/host/commands/open-project.jsx +61 -0
- premiere_cli/panel/host/commands/overwrite-clip-at.jsx +350 -0
- premiere_cli/panel/host/commands/overwrite-from-source.jsx +150 -0
- premiere_cli/panel/host/commands/play-source-monitor.jsx +36 -0
- premiere_cli/panel/host/commands/play-timeline.jsx +24 -0
- premiere_cli/panel/host/commands/razor-all-tracks.jsx +171 -0
- premiere_cli/panel/host/commands/redo.jsx +69 -0
- premiere_cli/panel/host/commands/refresh-media.jsx +101 -0
- premiere_cli/panel/host/commands/relink-media.jsx +132 -0
- premiere_cli/panel/host/commands/remove-all-effects.jsx +114 -0
- premiere_cli/panel/host/commands/remove-effect-by-name.jsx +143 -0
- premiere_cli/panel/host/commands/remove-effect.jsx +122 -0
- premiere_cli/panel/host/commands/remove-from-timeline.jsx +93 -0
- premiere_cli/panel/host/commands/remove-keyframe-range.jsx +173 -0
- premiere_cli/panel/host/commands/remove-keyframe.jsx +192 -0
- premiere_cli/panel/host/commands/remove-selected-clips.jsx +126 -0
- premiere_cli/panel/host/commands/remove-track-intervals.jsx +254 -0
- premiere_cli/panel/host/commands/remove-transition.jsx +164 -0
- premiere_cli/panel/host/commands/rename-bin.jsx +88 -0
- premiere_cli/panel/host/commands/rename-clip.jsx +127 -0
- premiere_cli/panel/host/commands/rename-project-item.jsx +111 -0
- premiere_cli/panel/host/commands/rename-track.jsx +84 -0
- premiere_cli/panel/host/commands/replace-clip-media.jsx +140 -0
- premiere_cli/panel/host/commands/replace-clip.jsx +188 -0
- premiere_cli/panel/host/commands/reverse-clip.jsx +187 -0
- premiere_cli/panel/host/commands/ripple-delete-clip.jsx +156 -0
- premiere_cli/panel/host/commands/roll-edit.jsx +162 -0
- premiere_cli/panel/host/commands/save-project-as.jsx +55 -0
- premiere_cli/panel/host/commands/save-project.jsx +57 -0
- premiere_cli/panel/host/commands/scene-edit-detection.jsx +128 -0
- premiere_cli/panel/host/commands/search-project-items.jsx +180 -0
- premiere_cli/panel/host/commands/select-all-clips.jsx +107 -0
- premiere_cli/panel/host/commands/select-clips-by-color.jsx +142 -0
- premiere_cli/panel/host/commands/select-clips-by-name.jsx +133 -0
- premiere_cli/panel/host/commands/select-clips-in-range.jsx +133 -0
- premiere_cli/panel/host/commands/select-disabled-clips.jsx +127 -0
- premiere_cli/panel/host/commands/select-project-item.jsx +115 -0
- premiere_cli/panel/host/commands/set-active-project.jsx +184 -0
- premiere_cli/panel/host/commands/set-active-sequence.jsx +87 -0
- premiere_cli/panel/host/commands/set-all-tracks-targeted.jsx +112 -0
- premiere_cli/panel/host/commands/set-anti-alias-quality.jsx +125 -0
- premiere_cli/panel/host/commands/set-blend-mode.jsx +111 -0
- premiere_cli/panel/host/commands/set-clip-anchor-point.jsx +102 -0
- premiere_cli/panel/host/commands/set-clip-enabled.jsx +127 -0
- premiere_cli/panel/host/commands/set-clip-opacity.jsx +102 -0
- premiere_cli/panel/host/commands/set-clip-pan.jsx +107 -0
- premiere_cli/panel/host/commands/set-clip-position.jsx +103 -0
- premiere_cli/panel/host/commands/set-clip-properties.jsx +221 -0
- premiere_cli/panel/host/commands/set-clip-rotation.jsx +102 -0
- premiere_cli/panel/host/commands/set-clip-scale.jsx +102 -0
- premiere_cli/panel/host/commands/set-clip-selection.jsx +144 -0
- premiere_cli/panel/host/commands/set-clip-speed.jsx +160 -0
- premiere_cli/panel/host/commands/set-clip-volume.jsx +128 -0
- premiere_cli/panel/host/commands/set-color-label.jsx +123 -0
- premiere_cli/panel/host/commands/set-color-value.jsx +155 -0
- premiere_cli/panel/host/commands/set-effect-property.jsx +124 -0
- premiere_cli/panel/host/commands/set-footage-interpretation.jsx +173 -0
- premiere_cli/panel/host/commands/set-frame-blend.jsx +145 -0
- premiere_cli/panel/host/commands/set-graphics-white-luminance.jsx +73 -0
- premiere_cli/panel/host/commands/set-item-in-out.jsx +180 -0
- premiere_cli/panel/host/commands/set-item-metadata.jsx +134 -0
- premiere_cli/panel/host/commands/set-item-offline.jsx +109 -0
- premiere_cli/panel/host/commands/set-item-start-time.jsx +139 -0
- premiere_cli/panel/host/commands/set-keyframe-interpolation.jsx +186 -0
- premiere_cli/panel/host/commands/set-override-frame-rate.jsx +123 -0
- premiere_cli/panel/host/commands/set-override-pixel-aspect-ratio.jsx +129 -0
- premiere_cli/panel/host/commands/set-poster-frame.jsx +192 -0
- premiere_cli/panel/host/commands/set-project-panel-metadata.jsx +69 -0
- premiere_cli/panel/host/commands/set-scale-to-frame-size.jsx +101 -0
- premiere_cli/panel/host/commands/set-scale-width-height.jsx +140 -0
- premiere_cli/panel/host/commands/set-sequence-in-out.jsx +65 -0
- premiere_cli/panel/host/commands/set-sequence-settings.jsx +184 -0
- premiere_cli/panel/host/commands/set-source-in-out.jsx +98 -0
- premiere_cli/panel/host/commands/set-target-track.jsx +91 -0
- premiere_cli/panel/host/commands/set-time-interpolation.jsx +141 -0
- premiere_cli/panel/host/commands/set-track-mute.jsx +91 -0
- premiere_cli/panel/host/commands/set-track-visibility.jsx +94 -0
- premiere_cli/panel/host/commands/set-transcode-on-ingest.jsx +78 -0
- premiere_cli/panel/host/commands/set-uniform-scale.jsx +104 -0
- premiere_cli/panel/host/commands/set-work-area.jsx +76 -0
- premiere_cli/panel/host/commands/set-workspace.jsx +35 -0
- premiere_cli/panel/host/commands/set-xmp-metadata.jsx +157 -0
- premiere_cli/panel/host/commands/slide-edit.jsx +162 -0
- premiere_cli/panel/host/commands/slip-edit.jsx +167 -0
- premiere_cli/panel/host/commands/split-clip.jsx +144 -0
- premiere_cli/panel/host/commands/stabilize-clip.jsx +139 -0
- premiere_cli/panel/host/commands/stop-playback.jsx +23 -0
- premiere_cli/panel/host/commands/trim-clip.jsx +111 -0
- premiere_cli/panel/host/commands/undo.jsx +114 -0
- premiere_cli/panel/host/commands/unlink-selection.jsx +106 -0
- premiere_cli/panel/host/commands/unnest-sequence.jsx +207 -0
- premiere_cli/panel/host/commands/update-marker.jsx +120 -0
- premiere_cli/panel/host/index.jsx +1227 -0
- premiere_cli/panel/host/presets/default-4k-25fps.sqpreset +63 -0
- premiere_cli/panel/index.html +16 -0
- premiere_cli/panel/js/cs-interface.js +11 -0
- premiere_cli/panel/js/main.js +409 -0
- premiere_cli/panel_install.py +220 -0
- premiere_cli-0.2.0.dist-info/METADATA +127 -0
- premiere_cli-0.2.0.dist-info/RECORD +247 -0
- premiere_cli-0.2.0.dist-info/WHEEL +5 -0
- premiere_cli-0.2.0.dist-info/entry_points.txt +3 -0
- premiere_cli-0.2.0.dist-info/licenses/LICENSE +428 -0
- premiere_cli-0.2.0.dist-info/top_level.txt +1 -0
premiere_cli/cli.py
ADDED
|
@@ -0,0 +1,3664 @@
|
|
|
1
|
+
"""Send a command to the Premiere Bridge CEP panel and print its JSON response."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import json
|
|
5
|
+
import re
|
|
6
|
+
import sys
|
|
7
|
+
import urllib.error
|
|
8
|
+
import urllib.request
|
|
9
|
+
|
|
10
|
+
DEFAULT_PORT = 47823
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _validate_response(parsed_json) -> dict:
|
|
14
|
+
"""Ensure parsed JSON is a dict with an 'ok' key, or return an error dict.
|
|
15
|
+
|
|
16
|
+
This guards against panels returning valid JSON that isn't a properly-
|
|
17
|
+
structured response (e.g. the literal 42, a string, an array, or a dict
|
|
18
|
+
missing the required 'ok' key).
|
|
19
|
+
"""
|
|
20
|
+
if not isinstance(parsed_json, dict):
|
|
21
|
+
return {"ok": False, "error": f"panel returned an unexpected response: {repr(parsed_json)}"}
|
|
22
|
+
if "ok" not in parsed_json:
|
|
23
|
+
return {"ok": False, "error": f"panel returned an unexpected response: {repr(parsed_json)}"}
|
|
24
|
+
return parsed_json
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
_INTERVAL_LINE_RE = re.compile(r"^(\d{2,3}:\d{2}:\d{2})\s*-\s*(\d{2,3}:\d{2}:\d{2})$")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _parse_intervals_file(path: str) -> list:
|
|
31
|
+
"""Parse a remove_pauses.py-style cuts file ("MM:SS:FF - MM:SS:FF" per
|
|
32
|
+
line, blank lines ignored) into [{"start": ..., "end": ...}, ...].
|
|
33
|
+
|
|
34
|
+
Raises ValueError on a line that doesn't match that format.
|
|
35
|
+
"""
|
|
36
|
+
intervals = []
|
|
37
|
+
with open(path, "r", encoding="utf-8") as fh:
|
|
38
|
+
for line_num, raw_line in enumerate(fh, start=1):
|
|
39
|
+
line = raw_line.strip()
|
|
40
|
+
if not line:
|
|
41
|
+
continue
|
|
42
|
+
match = _INTERVAL_LINE_RE.match(line)
|
|
43
|
+
if not match:
|
|
44
|
+
raise ValueError(f"{path}:{line_num}: not a valid line ({raw_line!r})")
|
|
45
|
+
intervals.append({"start": match.group(1), "end": match.group(2)})
|
|
46
|
+
return intervals
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def submit_command(command: str, args: dict | None = None, port: int = DEFAULT_PORT) -> dict:
|
|
50
|
+
"""POST a command to the Premiere Bridge panel's /command endpoint.
|
|
51
|
+
|
|
52
|
+
Always returns a dict with an "ok" key. Never raises — connection
|
|
53
|
+
failures, timeouts, and malformed responses are folded into
|
|
54
|
+
{"ok": False, "error": "..."} so the caller always gets well-formed JSON.
|
|
55
|
+
"""
|
|
56
|
+
payload = {"command": command, "args": args or {}}
|
|
57
|
+
data = json.dumps(payload).encode("utf-8")
|
|
58
|
+
request = urllib.request.Request(
|
|
59
|
+
f"http://127.0.0.1:{port}/command",
|
|
60
|
+
data=data,
|
|
61
|
+
headers={"Content-Type": "application/json"},
|
|
62
|
+
method="POST",
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
with urllib.request.urlopen(request, timeout=10) as response:
|
|
67
|
+
parsed = json.loads(response.read().decode("utf-8"))
|
|
68
|
+
return _validate_response(parsed)
|
|
69
|
+
except urllib.error.HTTPError as exc:
|
|
70
|
+
try:
|
|
71
|
+
parsed = json.loads(exc.read().decode("utf-8"))
|
|
72
|
+
return _validate_response(parsed)
|
|
73
|
+
except (json.JSONDecodeError, UnicodeDecodeError):
|
|
74
|
+
return {"ok": False, "error": f"panel returned HTTP {exc.code} with an unreadable body"}
|
|
75
|
+
except OSError as exc:
|
|
76
|
+
return {
|
|
77
|
+
"ok": False,
|
|
78
|
+
"error": (
|
|
79
|
+
f"could not reach the Premiere Bridge panel on port {port} "
|
|
80
|
+
f"(is the panel open in Premiere Pro?): {exc}"
|
|
81
|
+
),
|
|
82
|
+
}
|
|
83
|
+
except json.JSONDecodeError as exc:
|
|
84
|
+
return {"ok": False, "error": f"panel returned a malformed response: {exc}"}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def main() -> None:
|
|
88
|
+
parser = argparse.ArgumentParser(description="Send a command to the Premiere Bridge CEP panel.")
|
|
89
|
+
parser.add_argument("--port", type=int, default=DEFAULT_PORT, help=f"Bridge panel port (default: {DEFAULT_PORT})")
|
|
90
|
+
subparsers = parser.add_subparsers(dest="subcommand", required=True)
|
|
91
|
+
|
|
92
|
+
install_panel_parser = subparsers.add_parser(
|
|
93
|
+
"install-panel",
|
|
94
|
+
help="Install the bundled Premiere Bridge CEP panel into Adobe's extensions directory and enable PlayerDebugMode",
|
|
95
|
+
)
|
|
96
|
+
install_panel_parser.add_argument(
|
|
97
|
+
"--symlink",
|
|
98
|
+
action="store_true",
|
|
99
|
+
help="Symlink the installed package's own panel directory instead of copying (development use; breaks if the package is uninstalled/moved)",
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
subparsers.add_parser(
|
|
103
|
+
"doctor",
|
|
104
|
+
help="Diagnose the CLI -> panel -> Premiere chain: panel installed, panel reachable, versions matching, Premiere responding",
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
create_sequence_parser = subparsers.add_parser("create-sequence", help="Create a new sequence")
|
|
108
|
+
create_sequence_parser.add_argument("--name", required=True, help="Name of the new sequence")
|
|
109
|
+
create_sequence_parser.add_argument(
|
|
110
|
+
"--bin", required=True,
|
|
111
|
+
help="'/'-separated bin path to create the sequence in, e.g. 'B-Roll/Interviews' (created if missing)",
|
|
112
|
+
)
|
|
113
|
+
create_sequence_parser.add_argument(
|
|
114
|
+
"--fps", type=float, default=25.0, help="Frame rate, e.g. 25 or 23.976 (default: 25 — matches the bundled preset)"
|
|
115
|
+
)
|
|
116
|
+
create_sequence_parser.add_argument(
|
|
117
|
+
"--width", type=int, default=3840, help="Frame width in pixels (default: 3840 — matches the bundled preset)"
|
|
118
|
+
)
|
|
119
|
+
create_sequence_parser.add_argument(
|
|
120
|
+
"--height", type=int, default=2160, help="Frame height in pixels (default: 2160 — matches the bundled preset)"
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
extract_audio_parser = subparsers.add_parser(
|
|
124
|
+
"extract-audio-track", help="Extract part or all of one audio track to a local audio file"
|
|
125
|
+
)
|
|
126
|
+
extract_audio_parser.add_argument("--output", required=True, help="Absolute path to write the extracted audio file to")
|
|
127
|
+
extract_audio_parser.add_argument(
|
|
128
|
+
"--audio-track-index", type=int, required=True, help="0-based index of the audio track to extract (e.g. 0 for Audio 1)"
|
|
129
|
+
)
|
|
130
|
+
extract_audio_parser.add_argument(
|
|
131
|
+
"--sequence-name", help="Name of the sequence to extract from (default: the currently active sequence)"
|
|
132
|
+
)
|
|
133
|
+
extract_audio_parser.add_argument(
|
|
134
|
+
"--start-seconds", type=float, help="Start of the range to extract, in seconds (default: entire sequence)"
|
|
135
|
+
)
|
|
136
|
+
extract_audio_parser.add_argument(
|
|
137
|
+
"--end-seconds", type=float, help="End of the range to extract, in seconds (required if --start-seconds is given)"
|
|
138
|
+
)
|
|
139
|
+
extract_audio_parser.add_argument(
|
|
140
|
+
"--format", choices=["wav", "mp3", "aac"], default=None,
|
|
141
|
+
help="Output format, using a preset bundled inside Premiere Pro itself (default: wav). Ignored if --preset-path is given.",
|
|
142
|
+
)
|
|
143
|
+
extract_audio_parser.add_argument(
|
|
144
|
+
"--preset-path",
|
|
145
|
+
help="Absolute path to a .epr export preset, overriding --format (default: auto-detect a bundled preset for --format)",
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
remove_intervals_parser = subparsers.add_parser(
|
|
149
|
+
"remove-track-intervals",
|
|
150
|
+
help="Ripple-delete a list of time intervals from an audio track (and, optionally, linked video track(s))",
|
|
151
|
+
)
|
|
152
|
+
remove_intervals_parser.add_argument(
|
|
153
|
+
"--sequence-name",
|
|
154
|
+
help="Name of the sequence to edit (default: the currently active sequence; made active if it isn't)",
|
|
155
|
+
)
|
|
156
|
+
remove_intervals_parser.add_argument(
|
|
157
|
+
"--audio-track-index", type=int, required=True,
|
|
158
|
+
help="0-based index of the audio track to remove intervals from",
|
|
159
|
+
)
|
|
160
|
+
remove_intervals_parser.add_argument(
|
|
161
|
+
"--video-track-index", type=int, action="append", default=None,
|
|
162
|
+
help="0-based index of a video track to apply the same cuts to (repeatable; omit if none)",
|
|
163
|
+
)
|
|
164
|
+
remove_intervals_parser.add_argument(
|
|
165
|
+
"--intervals-file", required=True,
|
|
166
|
+
help="Path to a remove_pauses.py-style cuts file (one 'MM:SS:FF - MM:SS:FF' line per interval)",
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
export_frame_parser = subparsers.add_parser(
|
|
170
|
+
"export-frame", help="Export a single frame at a given timecode to a PNG file"
|
|
171
|
+
)
|
|
172
|
+
export_frame_parser.add_argument("--output", required=True, help="Absolute path to write the exported PNG to")
|
|
173
|
+
export_frame_parser.add_argument(
|
|
174
|
+
"--timecode", required=True, help="Timecode to export, as 'MM:SS:FF' (e.g. '00:12:05')"
|
|
175
|
+
)
|
|
176
|
+
export_frame_parser.add_argument(
|
|
177
|
+
"--sequence-name", help="Name of the sequence to export from (default: the currently active sequence)"
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
move_playhead_parser = subparsers.add_parser(
|
|
181
|
+
"move-playhead", help="Move a sequence's playhead to a target time"
|
|
182
|
+
)
|
|
183
|
+
move_playhead_parser.add_argument(
|
|
184
|
+
"--timecode", help='Target time as "MM:SS:FF" (exactly one of --timecode/--seconds is required)'
|
|
185
|
+
)
|
|
186
|
+
move_playhead_parser.add_argument(
|
|
187
|
+
"--seconds", type=float, help="Target time in seconds (exactly one of --timecode/--seconds is required)"
|
|
188
|
+
)
|
|
189
|
+
move_playhead_parser.add_argument(
|
|
190
|
+
"--sequence-name", help="Name of the sequence to move (default: the currently active sequence)"
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
subparsers.add_parser(
|
|
194
|
+
"get-project-info", help="Snapshot of the currently active project (name, path, sequences, root item count)"
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
subparsers.add_parser(
|
|
198
|
+
"list-project-items", help="Recursively list every item in the active project's bin tree"
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
subparsers.add_parser(
|
|
202
|
+
"get-full-project-overview",
|
|
203
|
+
help="Comprehensive snapshot of the active project: nested bin tree, sequences, and media-type counts",
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
search_items_parser = subparsers.add_parser(
|
|
207
|
+
"search-project-items", help="Search project items by name substring, extension, offline status, and/or color label"
|
|
208
|
+
)
|
|
209
|
+
search_items_parser.add_argument("--name-contains", help="Case-insensitive substring to match against item names")
|
|
210
|
+
search_items_parser.add_argument("--extension", help="File extension to match against each item's media path (with or without a leading dot)")
|
|
211
|
+
search_items_parser.add_argument("--offline-only", action="store_true", help="Only match items that are offline")
|
|
212
|
+
search_items_parser.add_argument("--color-label", type=int, help="Match items with this color label (0-15)")
|
|
213
|
+
|
|
214
|
+
subparsers.add_parser(
|
|
215
|
+
"get-active-sequence", help="Read the active sequence's full structure (tracks, clips)"
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
full_sequence_info_parser = subparsers.add_parser(
|
|
219
|
+
"get-full-sequence-info", help="Read a sequence's full structure, including clip effects and markers"
|
|
220
|
+
)
|
|
221
|
+
full_sequence_info_parser.add_argument(
|
|
222
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
full_clip_info_parser = subparsers.add_parser(
|
|
226
|
+
"get-full-clip-info", help="Read one clip's full detail, including effect components and properties"
|
|
227
|
+
)
|
|
228
|
+
full_clip_info_parser.add_argument(
|
|
229
|
+
"--sequence-name", help="Name of the sequence to read from (default: the currently active sequence)"
|
|
230
|
+
)
|
|
231
|
+
full_clip_info_parser.add_argument(
|
|
232
|
+
"--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on"
|
|
233
|
+
)
|
|
234
|
+
full_clip_info_parser.add_argument(
|
|
235
|
+
"--track-index", type=int, required=True, help="0-based index of the track"
|
|
236
|
+
)
|
|
237
|
+
full_clip_info_parser.add_argument(
|
|
238
|
+
"--clip-index", type=int, required=True, help="0-based index of the clip on that track"
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
timeline_summary_parser = subparsers.add_parser(
|
|
242
|
+
"get-timeline-summary", help="Read a compact per-track summary of a sequence"
|
|
243
|
+
)
|
|
244
|
+
timeline_summary_parser.add_argument(
|
|
245
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
subparsers.add_parser(
|
|
249
|
+
"debug-qe-inspect",
|
|
250
|
+
help="TEMPORARY: reflect on the QE DOM's active-sequence/track/clip objects for API discovery",
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
debug_mutate_parser = subparsers.add_parser(
|
|
254
|
+
"debug-qe-try-mutate",
|
|
255
|
+
help="TEMPORARY: try QE clip remove()/moveToTrack() calls on the active sequence (safety-guarded by name)",
|
|
256
|
+
)
|
|
257
|
+
debug_mutate_parser.add_argument(
|
|
258
|
+
"--sequence-name", required=True,
|
|
259
|
+
help="Must exactly match the active sequence's name in Premiere — refuses to run otherwise. "
|
|
260
|
+
"Point this at a duplicate/throwaway sequence, never real project media.",
|
|
261
|
+
)
|
|
262
|
+
debug_mutate_parser.add_argument(
|
|
263
|
+
"--skip-remove-test", action="store_true",
|
|
264
|
+
help="Skip the remove() test and only try moveToTrack() (use once remove() is already confirmed working)",
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
subparsers.add_parser(
|
|
268
|
+
"get-premiere-state",
|
|
269
|
+
help="Full point-in-time snapshot: app version, open project, active sequence, playhead, selection",
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
inspect_dom_parser = subparsers.add_parser(
|
|
273
|
+
"inspect-dom-object",
|
|
274
|
+
help="Evaluate a property-path expression (app/qe/$.global) and reflect on the result — API discovery/debug tool",
|
|
275
|
+
)
|
|
276
|
+
inspect_dom_parser.add_argument(
|
|
277
|
+
"--expression", required=True,
|
|
278
|
+
help='Property path to evaluate, e.g. "app.project.activeSequence" (no function calls — read-only)',
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
subparsers.add_parser(
|
|
282
|
+
"get-open-projects",
|
|
283
|
+
help="Lightweight list of every currently open project (name, path, isActive)",
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
set_active_project_parser = subparsers.add_parser(
|
|
287
|
+
"set-active-project", help="Switch which open project is active (NOT yet live-verified — see docs)"
|
|
288
|
+
)
|
|
289
|
+
set_active_project_parser.add_argument("--name", help="Exact name of the open project to activate")
|
|
290
|
+
set_active_project_parser.add_argument("--path", help="Exact path of the open project to activate")
|
|
291
|
+
|
|
292
|
+
get_work_area_parser = subparsers.add_parser(
|
|
293
|
+
"get-work-area", help="Get the work area bar's in/out points, in seconds"
|
|
294
|
+
)
|
|
295
|
+
get_work_area_parser.add_argument(
|
|
296
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
set_work_area_parser = subparsers.add_parser(
|
|
300
|
+
"set-work-area", help="Set the work area bar's in/out points, in seconds"
|
|
301
|
+
)
|
|
302
|
+
set_work_area_parser.add_argument("--start-seconds", type=float, required=True, help="Work area start, in seconds")
|
|
303
|
+
set_work_area_parser.add_argument("--end-seconds", type=float, required=True, help="Work area end, in seconds")
|
|
304
|
+
set_work_area_parser.add_argument(
|
|
305
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
get_sequence_in_out_parser = subparsers.add_parser(
|
|
309
|
+
"get-sequence-in-out", help="Get the sequence's in/out points, in seconds"
|
|
310
|
+
)
|
|
311
|
+
get_sequence_in_out_parser.add_argument(
|
|
312
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
set_sequence_in_out_parser = subparsers.add_parser(
|
|
316
|
+
"set-sequence-in-out", help="Set the sequence's in/out points, in seconds (e.g. for export range)"
|
|
317
|
+
)
|
|
318
|
+
set_sequence_in_out_parser.add_argument("--in-seconds", type=float, required=True, help="In-point, in seconds")
|
|
319
|
+
set_sequence_in_out_parser.add_argument("--out-seconds", type=float, required=True, help="Out-point, in seconds")
|
|
320
|
+
set_sequence_in_out_parser.add_argument(
|
|
321
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
is_work_area_enabled_parser = subparsers.add_parser(
|
|
325
|
+
"is-work-area-enabled", help="Check whether the work area bar is enabled on a sequence"
|
|
326
|
+
)
|
|
327
|
+
is_work_area_enabled_parser.add_argument(
|
|
328
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
get_export_file_extension_parser = subparsers.add_parser(
|
|
332
|
+
"get-export-file-extension", help="Get the file extension a given export preset would produce"
|
|
333
|
+
)
|
|
334
|
+
get_export_file_extension_parser.add_argument(
|
|
335
|
+
"--preset-path", required=True, help="Absolute path to the export preset (.epr) file"
|
|
336
|
+
)
|
|
337
|
+
get_export_file_extension_parser.add_argument(
|
|
338
|
+
"--sequence-name", help="Name of the sequence to check against (default: the currently active sequence)"
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
subparsers.add_parser("get-workspaces", help="List all available workspace layouts")
|
|
342
|
+
|
|
343
|
+
set_workspace_parser = subparsers.add_parser("set-workspace", help="Switch to a specific workspace layout")
|
|
344
|
+
set_workspace_parser.add_argument(
|
|
345
|
+
"--name", required=True, help="Name of the workspace to activate (e.g. 'Editing', 'Color', 'Audio')"
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
subparsers.add_parser(
|
|
349
|
+
"play-timeline", help="Start playback of the active sequence timeline (QE DOM, active sequence only)"
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
subparsers.add_parser(
|
|
353
|
+
"stop-playback", help="Stop playback of the active sequence timeline (QE DOM, active sequence only)"
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
play_source_monitor_parser = subparsers.add_parser(
|
|
357
|
+
"play-source-monitor", help="Start playback of the clip currently open in the Source Monitor"
|
|
358
|
+
)
|
|
359
|
+
play_source_monitor_parser.add_argument(
|
|
360
|
+
"--speed", type=float, help="Playback speed (1.0 = normal, 2.0 = 2x, -1.0 = reverse; default: 1.0)"
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
subparsers.add_parser(
|
|
364
|
+
"get-source-monitor-position", help="Get the current time indicator position in the Source Monitor"
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
subparsers.add_parser("get-version-info", help="Get Premiere Pro version and build information")
|
|
368
|
+
bin_contents_parser = subparsers.add_parser(
|
|
369
|
+
"get-bin-contents", help="Recursively list the contents of one bin, addressed by a '/'-separated path"
|
|
370
|
+
)
|
|
371
|
+
bin_contents_parser.add_argument(
|
|
372
|
+
"--bin-path", required=True, help="'/'-separated bin path, e.g. 'B-Roll/Interviews' (same convention as create-sequence's --bin)"
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
project_item_info_parser = subparsers.add_parser(
|
|
376
|
+
"get-project-item-info", help="Full detail on one project item, identified by node ID or tree path"
|
|
377
|
+
)
|
|
378
|
+
project_item_info_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--tree-path is required)")
|
|
379
|
+
project_item_info_parser.add_argument("--tree-path", help="Tree path of the project item (one of --node-id/--tree-path is required)")
|
|
380
|
+
|
|
381
|
+
timeline_gaps_parser = subparsers.add_parser(
|
|
382
|
+
"get-timeline-gaps", help="Find gaps (empty spaces) between clips on a sequence's tracks"
|
|
383
|
+
)
|
|
384
|
+
timeline_gaps_parser.add_argument(
|
|
385
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
386
|
+
)
|
|
387
|
+
timeline_gaps_parser.add_argument(
|
|
388
|
+
"--track-type", choices=["video", "audio", "both"], help="Which track type to analyze (default: both)"
|
|
389
|
+
)
|
|
390
|
+
timeline_gaps_parser.add_argument(
|
|
391
|
+
"--min-gap-seconds", type=float, help="Minimum gap duration in seconds to report (default: 0.04)"
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
subparsers.add_parser(
|
|
395
|
+
"get-offline-media", help="Find all offline/missing media in the project"
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
used_media_parser = subparsers.add_parser(
|
|
399
|
+
"get-used-media-report", help="Report which source media a sequence uses, and how many times"
|
|
400
|
+
)
|
|
401
|
+
used_media_parser.add_argument(
|
|
402
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
subparsers.add_parser(
|
|
406
|
+
"get-all-project-paths", help="Get every unique media file path used in the project"
|
|
407
|
+
)
|
|
408
|
+
|
|
409
|
+
subparsers.add_parser(
|
|
410
|
+
"get-unused-media", help="Find project items not used in any sequence"
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
subparsers.add_parser(
|
|
414
|
+
"get-duplicate-media", help="Find project items that reference the same source media file"
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
clip_links_parser = subparsers.add_parser(
|
|
418
|
+
"get-clip-links", help="Find clips linked to a given clip (same source and start time)"
|
|
419
|
+
)
|
|
420
|
+
clip_links_parser.add_argument(
|
|
421
|
+
"--sequence-name", help="Name of the sequence to read from (default: the currently active sequence)"
|
|
422
|
+
)
|
|
423
|
+
clip_links_parser.add_argument(
|
|
424
|
+
"--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on"
|
|
425
|
+
)
|
|
426
|
+
clip_links_parser.add_argument(
|
|
427
|
+
"--track-index", type=int, required=True, help="0-based index of the track"
|
|
428
|
+
)
|
|
429
|
+
clip_links_parser.add_argument(
|
|
430
|
+
"--clip-index", type=int, required=True, help="0-based index of the clip on that track"
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
subparsers.add_parser(
|
|
434
|
+
"get-insertion-bin", help="Get the bin currently focused in the Project panel (where new imports land)"
|
|
435
|
+
)
|
|
436
|
+
|
|
437
|
+
subparsers.add_parser(
|
|
438
|
+
"get-project-panel-metadata", help="Get the Project panel's column/metadata configuration as XML"
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
subparsers.add_parser(
|
|
442
|
+
"list-available-effects", help="List all video effects available in this Premiere Pro install (QE DOM)"
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
subparsers.add_parser(
|
|
446
|
+
"list-available-audio-effects", help="List all audio effects available in this Premiere Pro install (QE DOM)"
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
subparsers.add_parser(
|
|
450
|
+
"list-available-transitions",
|
|
451
|
+
help="List all video transitions available in this Premiere Pro install (QE DOM; may be empty on PPro 2026)",
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
subparsers.add_parser(
|
|
455
|
+
"list-available-audio-transitions", help="List all audio transitions available in this Premiere Pro install (QE DOM)"
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
list_markers_parser = subparsers.add_parser(
|
|
459
|
+
"list-markers", help="List all markers on a sequence"
|
|
460
|
+
)
|
|
461
|
+
list_markers_parser.add_argument(
|
|
462
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
clip_markers_parser = subparsers.add_parser(
|
|
466
|
+
"get-clip-markers", help="List all markers on a specific timeline clip"
|
|
467
|
+
)
|
|
468
|
+
clip_markers_parser.add_argument(
|
|
469
|
+
"--sequence-name", help="Name of the sequence to read from (default: the currently active sequence)"
|
|
470
|
+
)
|
|
471
|
+
clip_markers_parser.add_argument(
|
|
472
|
+
"--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on"
|
|
473
|
+
)
|
|
474
|
+
clip_markers_parser.add_argument(
|
|
475
|
+
"--track-index", type=int, required=True, help="0-based index of the track"
|
|
476
|
+
)
|
|
477
|
+
clip_markers_parser.add_argument(
|
|
478
|
+
"--clip-index", type=int, required=True, help="0-based index of the clip on that track"
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
markers_by_type_parser = subparsers.add_parser(
|
|
482
|
+
"get-sequence-markers-by-type", help="List all sequence markers matching a specific marker type"
|
|
483
|
+
)
|
|
484
|
+
markers_by_type_parser.add_argument(
|
|
485
|
+
"--type", required=True,
|
|
486
|
+
choices=["Comment", "Chapter", "Segmentation", "WebLink", "FlashCuePoint"],
|
|
487
|
+
help="Marker type to filter by",
|
|
488
|
+
)
|
|
489
|
+
markers_by_type_parser.add_argument(
|
|
490
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
item_metadata_parser = subparsers.add_parser(
|
|
494
|
+
"get-item-metadata", help="Get project metadata for a project item"
|
|
495
|
+
)
|
|
496
|
+
item_metadata_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
497
|
+
item_metadata_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
498
|
+
|
|
499
|
+
color_label_parser = subparsers.add_parser(
|
|
500
|
+
"get-color-label", help="Get the color label of a project item"
|
|
501
|
+
)
|
|
502
|
+
color_label_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
503
|
+
color_label_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
504
|
+
|
|
505
|
+
footage_interp_parser = subparsers.add_parser(
|
|
506
|
+
"get-footage-interpretation", help="Get footage interpretation settings for a project item"
|
|
507
|
+
)
|
|
508
|
+
footage_interp_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
509
|
+
footage_interp_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
510
|
+
|
|
511
|
+
xmp_metadata_parser = subparsers.add_parser(
|
|
512
|
+
"get-xmp-metadata", help="Get the raw XMP metadata for a project item (truncated to 100KB)"
|
|
513
|
+
)
|
|
514
|
+
xmp_metadata_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
515
|
+
xmp_metadata_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
516
|
+
|
|
517
|
+
color_space_parser = subparsers.add_parser(
|
|
518
|
+
"get-color-space", help="Get color space information for a project item"
|
|
519
|
+
)
|
|
520
|
+
color_space_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
521
|
+
color_space_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
522
|
+
|
|
523
|
+
subparsers.add_parser(
|
|
524
|
+
"get-render-queue-status", help="Get the current status of the Adobe Media Encoder render queue"
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
clip_at_position_parser = subparsers.add_parser(
|
|
528
|
+
"get-clip-at-position", help="Find the clip(s) covering a given time position"
|
|
529
|
+
)
|
|
530
|
+
clip_at_position_parser.add_argument("--seconds", type=float, required=True, help="Time position in seconds")
|
|
531
|
+
clip_at_position_parser.add_argument("--track-type", choices=["video", "audio"], help="Restrict to this track type")
|
|
532
|
+
clip_at_position_parser.add_argument(
|
|
533
|
+
"--track-index", type=int, help="Restrict to this 0-based track index (requires --track-type)"
|
|
534
|
+
)
|
|
535
|
+
clip_at_position_parser.add_argument(
|
|
536
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
clip_at_playhead_parser = subparsers.add_parser(
|
|
540
|
+
"get-clip-at-playhead", help="Find all clips at the current playhead position across tracks"
|
|
541
|
+
)
|
|
542
|
+
clip_at_playhead_parser.add_argument(
|
|
543
|
+
"--track-type", choices=["video", "audio", "both"], help="Track type to check (default: both)"
|
|
544
|
+
)
|
|
545
|
+
clip_at_playhead_parser.add_argument(
|
|
546
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
next_edit_point_parser = subparsers.add_parser(
|
|
550
|
+
"get-next-edit-point", help="Find the next or previous edit point (clip boundary) from the playhead"
|
|
551
|
+
)
|
|
552
|
+
next_edit_point_parser.add_argument(
|
|
553
|
+
"--direction", choices=["next", "previous"], help="Direction to search (default: next)"
|
|
554
|
+
)
|
|
555
|
+
next_edit_point_parser.add_argument(
|
|
556
|
+
"--track-type", choices=["video", "audio", "both"], help="Track type to check (default: both)"
|
|
557
|
+
)
|
|
558
|
+
next_edit_point_parser.add_argument(
|
|
559
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
subparsers.add_parser("get-sequence-count", help="Get the total number of sequences in the project")
|
|
563
|
+
|
|
564
|
+
total_clip_count_parser = subparsers.add_parser(
|
|
565
|
+
"get-total-clip-count", help="Get the total number of clips across all tracks in a sequence"
|
|
566
|
+
)
|
|
567
|
+
total_clip_count_parser.add_argument(
|
|
568
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
target_tracks_parser = subparsers.add_parser(
|
|
572
|
+
"get-target-tracks", help="Get which tracks are currently targeted for editing"
|
|
573
|
+
)
|
|
574
|
+
target_tracks_parser.add_argument(
|
|
575
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
576
|
+
)
|
|
577
|
+
|
|
578
|
+
track_info_parser = subparsers.add_parser(
|
|
579
|
+
"get-track-info", help="Get detailed info about a specific track (clips, mute/lock/target state)"
|
|
580
|
+
)
|
|
581
|
+
track_info_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type")
|
|
582
|
+
track_info_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
583
|
+
track_info_parser.add_argument(
|
|
584
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
encoder_presets_parser = subparsers.add_parser(
|
|
588
|
+
"get-encoder-presets", help="List Adobe Media Encoder export presets discoverable via app.encoder"
|
|
589
|
+
)
|
|
590
|
+
encoder_presets_parser.add_argument(
|
|
591
|
+
"--format", help="Filter to presets whose name matches this substring (e.g. 'H.264', 'ProRes')"
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
qe_clip_info_parser = subparsers.add_parser(
|
|
595
|
+
"get-qe-clip-info", help="Read QE-DOM clip info not available through the standard API"
|
|
596
|
+
)
|
|
597
|
+
qe_clip_info_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
598
|
+
qe_clip_info_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
599
|
+
qe_clip_info_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
600
|
+
qe_clip_info_parser.add_argument(
|
|
601
|
+
"--sequence-name", help="Name of the sequence to read from (default: the currently active sequence)"
|
|
602
|
+
)
|
|
603
|
+
|
|
604
|
+
subparsers.add_parser(
|
|
605
|
+
"get-source-monitor-info", help="Get info about the clip currently loaded in the Source Monitor"
|
|
606
|
+
)
|
|
607
|
+
|
|
608
|
+
adjustment_layer_parser = subparsers.add_parser(
|
|
609
|
+
"get-clip-adjustment-layer", help="Check whether an addressed clip is an adjustment layer"
|
|
610
|
+
)
|
|
611
|
+
adjustment_layer_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
612
|
+
adjustment_layer_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
613
|
+
adjustment_layer_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
614
|
+
adjustment_layer_parser.add_argument(
|
|
615
|
+
"--sequence-name", help="Name of the sequence to read from (default: the currently active sequence)"
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
add_marker_parser = subparsers.add_parser(
|
|
619
|
+
"add-marker", help="Add a marker to a sequence"
|
|
620
|
+
)
|
|
621
|
+
add_marker_parser.add_argument("--seconds", type=float, required=True, help="Time position for the marker, in seconds")
|
|
622
|
+
add_marker_parser.add_argument("--name", help="Marker name/label")
|
|
623
|
+
add_marker_parser.add_argument("--comments", help="Marker comments")
|
|
624
|
+
add_marker_parser.add_argument(
|
|
625
|
+
"--type", choices=["Comment", "Chapter", "Segmentation", "WebLink"], help="Marker type (default: Comment)"
|
|
626
|
+
)
|
|
627
|
+
add_marker_parser.add_argument("--duration-seconds", type=float, help="Duration of the marker in seconds (default: point marker)")
|
|
628
|
+
add_marker_parser.add_argument("--color-index", type=int, help="Marker color index (0-7)")
|
|
629
|
+
add_marker_parser.add_argument(
|
|
630
|
+
"--sequence-name", help="Name of the sequence to add the marker to (default: the currently active sequence)"
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
update_marker_parser = subparsers.add_parser(
|
|
634
|
+
"update-marker", help="Update an existing sequence marker's properties, identified by guid"
|
|
635
|
+
)
|
|
636
|
+
update_marker_parser.add_argument("--guid", required=True, help="guid of the marker to update (from list-markers/add-marker)")
|
|
637
|
+
update_marker_parser.add_argument("--name", help="New marker name")
|
|
638
|
+
update_marker_parser.add_argument("--comments", help="New marker comments")
|
|
639
|
+
update_marker_parser.add_argument(
|
|
640
|
+
"--type", choices=["Comment", "Chapter", "Segmentation", "WebLink"], help="New marker type"
|
|
641
|
+
)
|
|
642
|
+
update_marker_parser.add_argument("--color-index", type=int, help="New marker color index (0-7)")
|
|
643
|
+
update_marker_parser.add_argument("--duration-seconds", type=float, help="New duration in seconds, relative to the marker's existing start")
|
|
644
|
+
update_marker_parser.add_argument("--end-seconds", type=float, help="New absolute end time in seconds (ignored if --duration-seconds is also given)")
|
|
645
|
+
update_marker_parser.add_argument(
|
|
646
|
+
"--sequence-name", help="Name of the sequence the marker is on (default: the currently active sequence)"
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
delete_marker_parser = subparsers.add_parser(
|
|
650
|
+
"delete-marker", help="Delete a sequence or project-item marker, identified by guid"
|
|
651
|
+
)
|
|
652
|
+
delete_marker_parser.add_argument("--guid", help="guid of the marker to delete (one of --guid/--marker-name is required)")
|
|
653
|
+
delete_marker_parser.add_argument("--marker-name", help="Exact marker name to delete (errors if ambiguous; one of --guid/--marker-name is required)")
|
|
654
|
+
delete_marker_parser.add_argument(
|
|
655
|
+
"--sequence-name", help="Name of the sequence the marker is on (default: the currently active sequence)"
|
|
656
|
+
)
|
|
657
|
+
delete_marker_parser.add_argument(
|
|
658
|
+
"--node-id", help="Node ID of a PROJECT ITEM to delete the marker from instead of a sequence"
|
|
659
|
+
)
|
|
660
|
+
delete_marker_parser.add_argument(
|
|
661
|
+
"--item-name", help="Exact name of a PROJECT ITEM to delete the marker from instead of a sequence"
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
add_marker_to_item_parser = subparsers.add_parser(
|
|
665
|
+
"add-marker-to-project-item", help="Add a source marker to a project item"
|
|
666
|
+
)
|
|
667
|
+
add_marker_to_item_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
668
|
+
add_marker_to_item_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
669
|
+
add_marker_to_item_parser.add_argument("--seconds", type=float, required=True, help="Time position for the marker, in seconds")
|
|
670
|
+
add_marker_to_item_parser.add_argument("--marker-name", help="Marker name/label (separate from --name, which addresses the project item)")
|
|
671
|
+
add_marker_to_item_parser.add_argument("--comments", help="Marker comments")
|
|
672
|
+
add_marker_to_item_parser.add_argument(
|
|
673
|
+
"--type", choices=["Comment", "Chapter", "Segmentation", "WebLink"], help="Marker type (default: Comment)"
|
|
674
|
+
)
|
|
675
|
+
add_marker_to_item_parser.add_argument("--duration-seconds", type=float, help="Duration of the marker in seconds (default: point marker)")
|
|
676
|
+
add_marker_to_item_parser.add_argument("--color-index", type=int, help="Marker color index (0-7)")
|
|
677
|
+
|
|
678
|
+
subparsers.add_parser("redo", help="Redo the last undone action")
|
|
679
|
+
|
|
680
|
+
undo_parser = subparsers.add_parser(
|
|
681
|
+
"undo", help="Undo the last action (or --count actions), merging the reference project's undo/multiple_undo pair into one command"
|
|
682
|
+
)
|
|
683
|
+
undo_parser.add_argument("--count", type=int, help="Number of actions to undo (default: 1, capped at 50)")
|
|
684
|
+
|
|
685
|
+
move_to_edit_parser = subparsers.add_parser(
|
|
686
|
+
"move-playhead-to-edit", help="Move the playhead to the next or previous edit point (clip boundary)"
|
|
687
|
+
)
|
|
688
|
+
move_to_edit_parser.add_argument(
|
|
689
|
+
"--direction", choices=["next", "previous"], help="Direction to move (default: next)"
|
|
690
|
+
)
|
|
691
|
+
move_to_edit_parser.add_argument(
|
|
692
|
+
"--sequence-name", help="Name of the sequence to move (default: the currently active sequence)"
|
|
693
|
+
)
|
|
694
|
+
|
|
695
|
+
set_poster_frame_parser = subparsers.add_parser(
|
|
696
|
+
"set-poster-frame", help="Set a project item's poster frame (thumbnail) at a given time (API uncertain — see docs)"
|
|
697
|
+
)
|
|
698
|
+
set_poster_frame_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
699
|
+
set_poster_frame_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
700
|
+
set_poster_frame_parser.add_argument("--seconds", type=float, required=True, help="Time position for the poster frame, in seconds")
|
|
701
|
+
|
|
702
|
+
select_item_parser = subparsers.add_parser(
|
|
703
|
+
"select-project-item", help="Select a project item in the Project panel"
|
|
704
|
+
)
|
|
705
|
+
select_item_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
706
|
+
select_item_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
707
|
+
|
|
708
|
+
select_by_name_parser = subparsers.add_parser(
|
|
709
|
+
"select-clips-by-name", help="Select all clips whose name contains a substring (case-insensitive)"
|
|
710
|
+
)
|
|
711
|
+
select_by_name_parser.add_argument("--name-contains", required=True, help="Case-insensitive substring to match against clip names")
|
|
712
|
+
select_by_name_parser.add_argument(
|
|
713
|
+
"--add-to-selection", action="store_true", help="Add matches to the existing selection instead of replacing it"
|
|
714
|
+
)
|
|
715
|
+
select_by_name_parser.add_argument(
|
|
716
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
717
|
+
)
|
|
718
|
+
|
|
719
|
+
select_all_parser = subparsers.add_parser(
|
|
720
|
+
"select-all-clips", help="Select all clips in a sequence, or all clips on one track type"
|
|
721
|
+
)
|
|
722
|
+
select_all_parser.add_argument(
|
|
723
|
+
"--track-type", choices=["video", "audio", "both"], help="Track type to select (default: both)"
|
|
724
|
+
)
|
|
725
|
+
select_all_parser.add_argument(
|
|
726
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
deselect_all_parser = subparsers.add_parser(
|
|
730
|
+
"deselect-all-clips", help="Deselect every clip in a sequence"
|
|
731
|
+
)
|
|
732
|
+
deselect_all_parser.add_argument(
|
|
733
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
734
|
+
)
|
|
735
|
+
|
|
736
|
+
select_in_range_parser = subparsers.add_parser(
|
|
737
|
+
"select-clips-in-range", help="Select all clips that overlap a time range"
|
|
738
|
+
)
|
|
739
|
+
select_in_range_parser.add_argument("--start-seconds", type=float, required=True, help="Start of the range, in seconds")
|
|
740
|
+
select_in_range_parser.add_argument("--end-seconds", type=float, required=True, help="End of the range, in seconds")
|
|
741
|
+
select_in_range_parser.add_argument(
|
|
742
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
select_by_color_parser = subparsers.add_parser(
|
|
746
|
+
"select-clips-by-color", help="Select all clips whose source project item has a given color label"
|
|
747
|
+
)
|
|
748
|
+
select_by_color_parser.add_argument("--color-label", type=int, required=True, help="Color label to match (0-15)")
|
|
749
|
+
select_by_color_parser.add_argument(
|
|
750
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
751
|
+
)
|
|
752
|
+
|
|
753
|
+
invert_selection_parser = subparsers.add_parser(
|
|
754
|
+
"invert-selection", help="Invert the current clip selection (selected become deselected and vice versa)"
|
|
755
|
+
)
|
|
756
|
+
invert_selection_parser.add_argument(
|
|
757
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
758
|
+
)
|
|
759
|
+
|
|
760
|
+
select_disabled_parser = subparsers.add_parser(
|
|
761
|
+
"select-disabled-clips", help="Select all disabled clips in a sequence"
|
|
762
|
+
)
|
|
763
|
+
select_disabled_parser.add_argument(
|
|
764
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
set_clip_selection_parser = subparsers.add_parser(
|
|
768
|
+
"set-clip-selection", help="Select or deselect a single clip, addressed by track/clip index"
|
|
769
|
+
)
|
|
770
|
+
set_clip_selection_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
771
|
+
set_clip_selection_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
772
|
+
set_clip_selection_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
773
|
+
set_clip_selection_group = set_clip_selection_parser.add_mutually_exclusive_group(required=True)
|
|
774
|
+
set_clip_selection_group.add_argument("--select", dest="selected", action="store_true", help="Select the clip")
|
|
775
|
+
set_clip_selection_group.add_argument("--deselect", dest="selected", action="store_false", help="Deselect the clip")
|
|
776
|
+
set_clip_selection_parser.add_argument(
|
|
777
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
778
|
+
)
|
|
779
|
+
|
|
780
|
+
add_track_parser = subparsers.add_parser(
|
|
781
|
+
"add-track", help="Add one or more video or audio tracks to a sequence (one underlying call per track)"
|
|
782
|
+
)
|
|
783
|
+
add_track_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Type of track to add")
|
|
784
|
+
add_track_parser.add_argument("--index", type=int, help="Insertion position (0-based; default: append at the end)")
|
|
785
|
+
add_track_parser.add_argument("--count", type=int, help="Number of tracks to add (default: 1, capped at 8)")
|
|
786
|
+
add_track_parser.add_argument(
|
|
787
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
788
|
+
)
|
|
789
|
+
|
|
790
|
+
lock_track_parser = subparsers.add_parser("lock-track", help="Lock or unlock a video or audio track")
|
|
791
|
+
lock_track_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type")
|
|
792
|
+
lock_track_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
793
|
+
lock_track_parser.add_argument(
|
|
794
|
+
"--locked", required=True, choices=["true", "false"], help="Whether the track should be locked"
|
|
795
|
+
)
|
|
796
|
+
lock_track_parser.add_argument(
|
|
797
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
track_visibility_parser = subparsers.add_parser(
|
|
801
|
+
"set-track-visibility", help="Show or hide a video track (implemented via its mute flag — see docs)"
|
|
802
|
+
)
|
|
803
|
+
track_visibility_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the video track")
|
|
804
|
+
track_visibility_parser.add_argument(
|
|
805
|
+
"--visible", required=True, choices=["true", "false"], help="Whether the track should be visible"
|
|
806
|
+
)
|
|
807
|
+
track_visibility_parser.add_argument(
|
|
808
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
track_mute_parser = subparsers.add_parser("set-track-mute", help="Mute or unmute a video or audio track")
|
|
812
|
+
track_mute_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type")
|
|
813
|
+
track_mute_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
814
|
+
track_mute_parser.add_argument(
|
|
815
|
+
"--muted", required=True, choices=["true", "false"], help="Whether the track should be muted"
|
|
816
|
+
)
|
|
817
|
+
track_mute_parser.add_argument(
|
|
818
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
819
|
+
)
|
|
820
|
+
|
|
821
|
+
rename_track_parser = subparsers.add_parser("rename-track", help="Rename a video or audio track")
|
|
822
|
+
rename_track_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type")
|
|
823
|
+
rename_track_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
824
|
+
rename_track_parser.add_argument("--name", required=True, help="New track name")
|
|
825
|
+
rename_track_parser.add_argument(
|
|
826
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
set_target_track_parser = subparsers.add_parser(
|
|
830
|
+
"set-target-track", help="Target or untarget a track for insert/overwrite edits"
|
|
831
|
+
)
|
|
832
|
+
set_target_track_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type")
|
|
833
|
+
set_target_track_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
834
|
+
set_target_track_parser.add_argument(
|
|
835
|
+
"--targeted", required=True, choices=["true", "false"], help="Whether the track should be targeted"
|
|
836
|
+
)
|
|
837
|
+
set_target_track_parser.add_argument(
|
|
838
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
set_all_targeted_parser = subparsers.add_parser(
|
|
842
|
+
"set-all-tracks-targeted", help="Target or untarget every track (optionally filtered to one track type)"
|
|
843
|
+
)
|
|
844
|
+
set_all_targeted_parser.add_argument(
|
|
845
|
+
"--targeted", required=True, choices=["true", "false"], help="Whether tracks should be targeted"
|
|
846
|
+
)
|
|
847
|
+
set_all_targeted_parser.add_argument(
|
|
848
|
+
"--track-type", choices=["video", "audio", "both"], help="Restrict to this track type (default: both)"
|
|
849
|
+
)
|
|
850
|
+
set_all_targeted_parser.add_argument(
|
|
851
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
852
|
+
)
|
|
853
|
+
|
|
854
|
+
def _add_clip_addressing_args(p):
|
|
855
|
+
p.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
856
|
+
p.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
857
|
+
p.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
858
|
+
p.add_argument(
|
|
859
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
860
|
+
)
|
|
861
|
+
|
|
862
|
+
set_clip_position_parser = subparsers.add_parser(
|
|
863
|
+
"set-clip-position", help="Set the Position property (pixels) on a clip's Motion component"
|
|
864
|
+
)
|
|
865
|
+
_add_clip_addressing_args(set_clip_position_parser)
|
|
866
|
+
set_clip_position_parser.add_argument("--x", type=float, required=True, help="X position in pixels")
|
|
867
|
+
set_clip_position_parser.add_argument("--y", type=float, required=True, help="Y position in pixels")
|
|
868
|
+
|
|
869
|
+
set_clip_scale_parser = subparsers.add_parser(
|
|
870
|
+
"set-clip-scale", help="Set the Scale property on a clip's Motion component (100 = original size)"
|
|
871
|
+
)
|
|
872
|
+
_add_clip_addressing_args(set_clip_scale_parser)
|
|
873
|
+
set_clip_scale_parser.add_argument("--scale", type=float, required=True, help="Scale value (100 = original size)")
|
|
874
|
+
|
|
875
|
+
set_clip_rotation_parser = subparsers.add_parser(
|
|
876
|
+
"set-clip-rotation", help="Set the Rotation property (degrees) on a clip's Motion component"
|
|
877
|
+
)
|
|
878
|
+
_add_clip_addressing_args(set_clip_rotation_parser)
|
|
879
|
+
set_clip_rotation_parser.add_argument("--degrees", type=float, required=True, help="Rotation in degrees")
|
|
880
|
+
|
|
881
|
+
set_clip_anchor_point_parser = subparsers.add_parser(
|
|
882
|
+
"set-clip-anchor-point", help="Set the Anchor Point property (pixels) on a clip's Motion component"
|
|
883
|
+
)
|
|
884
|
+
_add_clip_addressing_args(set_clip_anchor_point_parser)
|
|
885
|
+
set_clip_anchor_point_parser.add_argument("--x", type=float, required=True, help="Anchor point X in pixels")
|
|
886
|
+
set_clip_anchor_point_parser.add_argument("--y", type=float, required=True, help="Anchor point Y in pixels")
|
|
887
|
+
|
|
888
|
+
set_clip_opacity_parser = subparsers.add_parser(
|
|
889
|
+
"set-clip-opacity", help="Set the Opacity property (0-100) on a clip's Opacity component"
|
|
890
|
+
)
|
|
891
|
+
_add_clip_addressing_args(set_clip_opacity_parser)
|
|
892
|
+
set_clip_opacity_parser.add_argument("--opacity", type=float, required=True, help="Opacity value (0-100)")
|
|
893
|
+
|
|
894
|
+
set_uniform_scale_parser = subparsers.add_parser(
|
|
895
|
+
"set-uniform-scale", help="Toggle Uniform Scale on a clip's Motion component"
|
|
896
|
+
)
|
|
897
|
+
_add_clip_addressing_args(set_uniform_scale_parser)
|
|
898
|
+
set_uniform_scale_parser.add_argument(
|
|
899
|
+
"--uniform", required=True, choices=["true", "false"], help="Whether Scale Width/Height should be linked"
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
set_scale_width_height_parser = subparsers.add_parser(
|
|
903
|
+
"set-scale-width-height",
|
|
904
|
+
help="Set Scale Width and/or Scale Height independently (requires Uniform Scale to be off)",
|
|
905
|
+
)
|
|
906
|
+
_add_clip_addressing_args(set_scale_width_height_parser)
|
|
907
|
+
set_scale_width_height_parser.add_argument("--scale-width", type=float, help="Scale width percentage")
|
|
908
|
+
set_scale_width_height_parser.add_argument("--scale-height", type=float, help="Scale height percentage")
|
|
909
|
+
|
|
910
|
+
set_anti_alias_quality_parser = subparsers.add_parser(
|
|
911
|
+
"set-anti-alias-quality",
|
|
912
|
+
help="Set an anti-alias-quality-like property on a clip's Motion component (API uncertain — probed defensively)",
|
|
913
|
+
)
|
|
914
|
+
_add_clip_addressing_args(set_anti_alias_quality_parser)
|
|
915
|
+
set_anti_alias_quality_parser.add_argument("--amount", type=float, required=True, help="Anti-flicker filter amount, 0..1 (targets Motion's Anti-flicker Filter property)")
|
|
916
|
+
|
|
917
|
+
set_blend_mode_parser = subparsers.add_parser(
|
|
918
|
+
"set-blend-mode", help="Set the Blend Mode property (raw int enum, version-dependent) on a clip's Opacity component"
|
|
919
|
+
)
|
|
920
|
+
_add_clip_addressing_args(set_blend_mode_parser)
|
|
921
|
+
set_blend_mode_parser.add_argument(
|
|
922
|
+
"--blend-mode", type=int, required=True, help="Blend Mode enum value (int; mapping is version-dependent — see docs)"
|
|
923
|
+
)
|
|
924
|
+
|
|
925
|
+
set_clip_volume_parser = subparsers.add_parser(
|
|
926
|
+
"set-clip-volume", help="Set an audio clip's volume in dB (converted to linear amplitude — calibration uncertain, see docs)"
|
|
927
|
+
)
|
|
928
|
+
set_clip_volume_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
929
|
+
set_clip_volume_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
930
|
+
set_clip_volume_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
931
|
+
set_clip_volume_parser.add_argument("--db", type=float, required=True, help="Volume in dB (0 = unity, negative = quieter, positive = louder)")
|
|
932
|
+
set_clip_volume_parser.add_argument(
|
|
933
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
set_clip_pan_parser = subparsers.add_parser(
|
|
937
|
+
"set-clip-pan", help="Set an audio clip's pan/balance"
|
|
938
|
+
)
|
|
939
|
+
set_clip_pan_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
940
|
+
set_clip_pan_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
941
|
+
set_clip_pan_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
942
|
+
set_clip_pan_parser.add_argument("--pan", type=float, required=True, help="Pan value (-100 = full left, 0 = center, 100 = full right)")
|
|
943
|
+
set_clip_pan_parser.add_argument(
|
|
944
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
945
|
+
)
|
|
946
|
+
|
|
947
|
+
adjust_audio_levels_parser = subparsers.add_parser(
|
|
948
|
+
"adjust-audio-levels", help="Adjust an audio clip's level by a dB DELTA relative to its current level (calibration uncertain, see docs)"
|
|
949
|
+
)
|
|
950
|
+
adjust_audio_levels_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
951
|
+
adjust_audio_levels_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
952
|
+
adjust_audio_levels_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
953
|
+
adjust_audio_levels_parser.add_argument("--db", type=float, required=True, help="dB delta to apply relative to the clip's current level")
|
|
954
|
+
adjust_audio_levels_parser.add_argument(
|
|
955
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
956
|
+
)
|
|
957
|
+
|
|
958
|
+
add_audio_keyframes_parser = subparsers.add_parser(
|
|
959
|
+
"add-audio-keyframes", help="Add audio level keyframes to an audio clip (fades/level changes)"
|
|
960
|
+
)
|
|
961
|
+
add_audio_keyframes_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
962
|
+
add_audio_keyframes_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
963
|
+
add_audio_keyframes_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
964
|
+
add_audio_keyframes_parser.add_argument(
|
|
965
|
+
"--keyframes", required=True,
|
|
966
|
+
help='JSON string of [{"seconds": <clip-relative seconds>, "db": <level in dB>}, ...]',
|
|
967
|
+
)
|
|
968
|
+
add_audio_keyframes_parser.add_argument(
|
|
969
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
970
|
+
)
|
|
971
|
+
|
|
972
|
+
rename_clip_parser = subparsers.add_parser(
|
|
973
|
+
"rename-clip", help="Rename a timeline clip"
|
|
974
|
+
)
|
|
975
|
+
rename_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
976
|
+
rename_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
977
|
+
rename_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
978
|
+
rename_clip_parser.add_argument("--name", required=True, help="New clip name")
|
|
979
|
+
rename_clip_parser.add_argument(
|
|
980
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
batch_rename_clips_parser = subparsers.add_parser(
|
|
984
|
+
"batch-rename-clips", help="Rename multiple clips on a track using a {n}/{name} template (capped at 200)"
|
|
985
|
+
)
|
|
986
|
+
batch_rename_clips_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type")
|
|
987
|
+
batch_rename_clips_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
988
|
+
batch_rename_clips_parser.add_argument(
|
|
989
|
+
"--new-name-template", required=True,
|
|
990
|
+
help="Name template — use {n} for a sequential counter, {name} for the clip's existing name",
|
|
991
|
+
)
|
|
992
|
+
batch_rename_clips_parser.add_argument("--name-contains", help="Only rename clips whose current name contains this substring (case-insensitive)")
|
|
993
|
+
batch_rename_clips_parser.add_argument("--start-number", type=int, help="Starting number for {n} (default: 1)")
|
|
994
|
+
batch_rename_clips_parser.add_argument(
|
|
995
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
996
|
+
)
|
|
997
|
+
|
|
998
|
+
set_clip_enabled_parser = subparsers.add_parser(
|
|
999
|
+
"set-clip-enabled", help="Enable or disable a timeline clip"
|
|
1000
|
+
)
|
|
1001
|
+
set_clip_enabled_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1002
|
+
set_clip_enabled_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1003
|
+
set_clip_enabled_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1004
|
+
set_clip_enabled_parser.add_argument(
|
|
1005
|
+
"--enabled", required=True, choices=["true", "false"], help="Whether the clip should be enabled"
|
|
1006
|
+
)
|
|
1007
|
+
set_clip_enabled_parser.add_argument(
|
|
1008
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1009
|
+
)
|
|
1010
|
+
|
|
1011
|
+
batch_set_clips_enabled_parser = subparsers.add_parser(
|
|
1012
|
+
"batch-set-clips-enabled", help="Enable or disable multiple clips at once, optionally filtered (capped at 200)"
|
|
1013
|
+
)
|
|
1014
|
+
batch_set_clips_enabled_parser.add_argument(
|
|
1015
|
+
"--enabled", required=True, choices=["true", "false"], help="Whether the matched clips should be enabled"
|
|
1016
|
+
)
|
|
1017
|
+
batch_set_clips_enabled_parser.add_argument("--name-contains", help="Only affect clips whose name contains this substring (case-insensitive)")
|
|
1018
|
+
batch_set_clips_enabled_parser.add_argument(
|
|
1019
|
+
"--track-type", choices=["video", "audio", "both"], help="Restrict to this track type (default: both)"
|
|
1020
|
+
)
|
|
1021
|
+
batch_set_clips_enabled_parser.add_argument(
|
|
1022
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1023
|
+
)
|
|
1024
|
+
|
|
1025
|
+
set_frame_blend_parser = subparsers.add_parser(
|
|
1026
|
+
"set-frame-blend", help="Enable or disable frame blending on a clip (QE DOM)"
|
|
1027
|
+
)
|
|
1028
|
+
set_frame_blend_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1029
|
+
set_frame_blend_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1030
|
+
set_frame_blend_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1031
|
+
set_frame_blend_parser.add_argument(
|
|
1032
|
+
"--enabled", required=True, choices=["true", "false"], help="Whether frame blending should be enabled"
|
|
1033
|
+
)
|
|
1034
|
+
set_frame_blend_parser.add_argument(
|
|
1035
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1036
|
+
)
|
|
1037
|
+
|
|
1038
|
+
set_time_interpolation_parser = subparsers.add_parser(
|
|
1039
|
+
"set-time-interpolation", help="Set a clip's time interpolation type (QE DOM)"
|
|
1040
|
+
)
|
|
1041
|
+
set_time_interpolation_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1042
|
+
set_time_interpolation_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1043
|
+
set_time_interpolation_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1044
|
+
set_time_interpolation_parser.add_argument(
|
|
1045
|
+
"--type", type=int, required=True, choices=[0, 1, 2], help="0 = sampling, 1 = blending, 2 = optical flow"
|
|
1046
|
+
)
|
|
1047
|
+
set_time_interpolation_parser.add_argument(
|
|
1048
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1049
|
+
)
|
|
1050
|
+
|
|
1051
|
+
set_clip_properties_parser = subparsers.add_parser(
|
|
1052
|
+
"set-clip-properties", help="Set multiple properties on a clip in one call (opacity, speed, scale, position, rotation)"
|
|
1053
|
+
)
|
|
1054
|
+
set_clip_properties_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1055
|
+
set_clip_properties_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1056
|
+
set_clip_properties_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1057
|
+
set_clip_properties_parser.add_argument("--opacity", type=float, help="Opacity value (0-100)")
|
|
1058
|
+
set_clip_properties_parser.add_argument("--speed", type=float, help="Playback speed multiplier (1.0 = normal, 2.0 = double speed)")
|
|
1059
|
+
set_clip_properties_parser.add_argument("--scale", type=float, help="Scale percentage (100 = original size)")
|
|
1060
|
+
set_clip_properties_parser.add_argument("--position-x", type=float, help="Horizontal Motion position in pixels")
|
|
1061
|
+
set_clip_properties_parser.add_argument("--position-y", type=float, help="Vertical Motion position in pixels")
|
|
1062
|
+
set_clip_properties_parser.add_argument("--rotation", type=float, help="Rotation in degrees")
|
|
1063
|
+
set_clip_properties_parser.add_argument(
|
|
1064
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1065
|
+
)
|
|
1066
|
+
|
|
1067
|
+
set_item_metadata_parser = subparsers.add_parser(
|
|
1068
|
+
"set-item-metadata", help="Set a single project metadata field on a project item"
|
|
1069
|
+
)
|
|
1070
|
+
set_item_metadata_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
1071
|
+
set_item_metadata_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
1072
|
+
set_item_metadata_parser.add_argument(
|
|
1073
|
+
"--field-path", required=True, help="Metadata field path, e.g. 'Column.Intrinsic.Description'"
|
|
1074
|
+
)
|
|
1075
|
+
set_item_metadata_parser.add_argument("--value", required=True, help="Value to set at that field path")
|
|
1076
|
+
|
|
1077
|
+
set_color_label_parser = subparsers.add_parser(
|
|
1078
|
+
"set-color-label", help="Set the color label on a project item"
|
|
1079
|
+
)
|
|
1080
|
+
set_color_label_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
1081
|
+
set_color_label_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
1082
|
+
set_color_label_parser.add_argument(
|
|
1083
|
+
"--color-label", type=int, required=True, choices=range(16), metavar="0-15", help="Label color index (0=Violet ... 15=Yellow)"
|
|
1084
|
+
)
|
|
1085
|
+
|
|
1086
|
+
set_footage_interp_parser = subparsers.add_parser(
|
|
1087
|
+
"set-footage-interpretation", help="Set footage interpretation settings for a project item (at least one field required)"
|
|
1088
|
+
)
|
|
1089
|
+
set_footage_interp_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
1090
|
+
set_footage_interp_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
1091
|
+
set_footage_interp_parser.add_argument("--frame-rate", type=float, help="Override frame rate")
|
|
1092
|
+
set_footage_interp_parser.add_argument("--pixel-aspect-ratio", type=float, help="Pixel aspect ratio (1.0 = square pixels)")
|
|
1093
|
+
set_footage_interp_parser.add_argument("--field-type", type=int, help="Field type enum value (API uncertain — probe get-footage-interpretation first)")
|
|
1094
|
+
set_footage_interp_parser.add_argument("--alpha-usage", type=int, help="Alpha usage enum value (API uncertain — probe get-footage-interpretation first)")
|
|
1095
|
+
|
|
1096
|
+
set_xmp_metadata_parser = subparsers.add_parser(
|
|
1097
|
+
"set-xmp-metadata",
|
|
1098
|
+
help=(
|
|
1099
|
+
"REPLACE a project item's entire XMP metadata block (get-xmp-metadata first, "
|
|
1100
|
+
"modify, then pass the full result back here)"
|
|
1101
|
+
),
|
|
1102
|
+
)
|
|
1103
|
+
set_xmp_metadata_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
1104
|
+
set_xmp_metadata_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
1105
|
+
set_xmp_metadata_parser.add_argument("--xmp", help="Complete XMP metadata XML string (one of --xmp/--xmp-file is required)")
|
|
1106
|
+
set_xmp_metadata_parser.add_argument(
|
|
1107
|
+
"--xmp-file", help="Path to a local file containing the complete XMP metadata XML (read here, not on the command line; one of --xmp/--xmp-file is required)"
|
|
1108
|
+
)
|
|
1109
|
+
|
|
1110
|
+
apply_effect_parser = subparsers.add_parser(
|
|
1111
|
+
"apply-effect", help="Apply a video effect to a clip via the QE effect catalog"
|
|
1112
|
+
)
|
|
1113
|
+
_add_clip_addressing_args(apply_effect_parser)
|
|
1114
|
+
apply_effect_parser.add_argument("--effect-name", required=True, help="Effect name, e.g. 'Gaussian Blur' (see list-available-effects)")
|
|
1115
|
+
|
|
1116
|
+
apply_audio_effect_parser = subparsers.add_parser(
|
|
1117
|
+
"apply-audio-effect", help="Apply an audio effect to a clip via the QE effect catalog"
|
|
1118
|
+
)
|
|
1119
|
+
_add_clip_addressing_args(apply_audio_effect_parser)
|
|
1120
|
+
apply_audio_effect_parser.add_argument("--effect-name", required=True, help="Audio effect name (see list-available-audio-effects)")
|
|
1121
|
+
|
|
1122
|
+
remove_effect_parser = subparsers.add_parser(
|
|
1123
|
+
"remove-effect", help="Remove one component from a clip by its index into clip.components (Motion/Opacity refused)"
|
|
1124
|
+
)
|
|
1125
|
+
_add_clip_addressing_args(remove_effect_parser)
|
|
1126
|
+
remove_effect_parser.add_argument("--component-index", type=int, required=True, help="0-based index into the clip's components collection")
|
|
1127
|
+
|
|
1128
|
+
remove_effect_by_name_parser = subparsers.add_parser(
|
|
1129
|
+
"remove-effect-by-name", help="Remove every component on a clip matching a displayName/matchName (Motion/Opacity refused)"
|
|
1130
|
+
)
|
|
1131
|
+
_add_clip_addressing_args(remove_effect_by_name_parser)
|
|
1132
|
+
remove_effect_by_name_parser.add_argument("--effect-name", required=True, help="Component displayName or matchName to remove")
|
|
1133
|
+
|
|
1134
|
+
remove_all_effects_parser = subparsers.add_parser(
|
|
1135
|
+
"remove-all-effects", help="Strip all applied (non-built-in) effects from a clip via QE removeEffects()"
|
|
1136
|
+
)
|
|
1137
|
+
_add_clip_addressing_args(remove_all_effects_parser)
|
|
1138
|
+
|
|
1139
|
+
color_correct_parser = subparsers.add_parser(
|
|
1140
|
+
"color-correct", help="Apply/adjust Lumetri Color on a clip (at least one of the flat props required)"
|
|
1141
|
+
)
|
|
1142
|
+
_add_clip_addressing_args(color_correct_parser)
|
|
1143
|
+
color_correct_parser.add_argument("--exposure", type=float, help="Exposure adjustment")
|
|
1144
|
+
color_correct_parser.add_argument("--contrast", type=float, help="Contrast adjustment (-100 to 100)")
|
|
1145
|
+
color_correct_parser.add_argument("--saturation", type=float, help="Saturation (0-200, 100 = normal)")
|
|
1146
|
+
color_correct_parser.add_argument("--temperature", type=float, help="Color temperature adjustment")
|
|
1147
|
+
color_correct_parser.add_argument("--tint", type=float, help="Tint adjustment")
|
|
1148
|
+
|
|
1149
|
+
apply_lut_parser = subparsers.add_parser(
|
|
1150
|
+
"apply-lut", help="Apply a LUT file to a clip via Lumetri Color's Input LUT property"
|
|
1151
|
+
)
|
|
1152
|
+
_add_clip_addressing_args(apply_lut_parser)
|
|
1153
|
+
apply_lut_parser.add_argument("--lut-path", required=True, help="Absolute path to a .cube/.3dl LUT file")
|
|
1154
|
+
|
|
1155
|
+
stabilize_clip_parser = subparsers.add_parser(
|
|
1156
|
+
"stabilize-clip", help="Apply Warp Stabilizer to a video clip (analysis runs asynchronously in Premiere afterward)"
|
|
1157
|
+
)
|
|
1158
|
+
_add_clip_addressing_args(stabilize_clip_parser)
|
|
1159
|
+
stabilize_clip_parser.add_argument("--smoothness", type=float, help="Stabilization smoothness percentage")
|
|
1160
|
+
stabilize_clip_parser.add_argument(
|
|
1161
|
+
"--method", choices=["Subspace Warp", "Position", "Position, Scale, Rotation"], help="Stabilization method"
|
|
1162
|
+
)
|
|
1163
|
+
|
|
1164
|
+
def _add_source_target_addressing_args(p):
|
|
1165
|
+
p.add_argument("--source-sequence-name", help="Name of the source sequence (default: the currently active sequence)")
|
|
1166
|
+
p.add_argument("--source-track-type", required=True, choices=["video", "audio"], help="Track type the source clip is on")
|
|
1167
|
+
p.add_argument("--source-track-index", type=int, required=True, help="0-based index of the source track")
|
|
1168
|
+
p.add_argument("--source-clip-index", type=int, required=True, help="0-based index of the source clip on that track")
|
|
1169
|
+
p.add_argument("--target-sequence-name", help="Name of the target sequence (default: the currently active sequence)")
|
|
1170
|
+
p.add_argument("--target-track-type", required=True, choices=["video", "audio"], help="Track type the target clip is on")
|
|
1171
|
+
p.add_argument("--target-track-index", type=int, required=True, help="0-based index of the target track")
|
|
1172
|
+
p.add_argument("--target-clip-index", type=int, required=True, help="0-based index of the target clip on that track")
|
|
1173
|
+
|
|
1174
|
+
copy_effects_parser = subparsers.add_parser(
|
|
1175
|
+
"copy-effects-between-clips", help="Re-apply and copy property values for every (or one) effect from a source clip to a target clip"
|
|
1176
|
+
)
|
|
1177
|
+
_add_source_target_addressing_args(copy_effects_parser)
|
|
1178
|
+
copy_effects_parser.add_argument(
|
|
1179
|
+
"--effect-name", help="Copy only this effect (displayName); omit to copy all non-intrinsic effects (Motion/Opacity/Time Remapping/Volume/Channel Volume/Panner are always skipped)"
|
|
1180
|
+
)
|
|
1181
|
+
|
|
1182
|
+
copy_effect_values_parser = subparsers.add_parser(
|
|
1183
|
+
"copy-effect-values", help="Copy one effect's property values from a source clip to a target clip (effect must already exist on both)"
|
|
1184
|
+
)
|
|
1185
|
+
_add_source_target_addressing_args(copy_effect_values_parser)
|
|
1186
|
+
copy_effect_values_parser.add_argument("--effect-name", required=True, help="Effect displayName; must already be applied on both clips")
|
|
1187
|
+
|
|
1188
|
+
batch_apply_effect_parser = subparsers.add_parser(
|
|
1189
|
+
"batch-apply-effect", help="Apply an effect to multiple clips at once, optionally filtered (capped at 100)"
|
|
1190
|
+
)
|
|
1191
|
+
batch_apply_effect_parser.add_argument("--effect-name", required=True, help="Effect name to apply (video or audio catalog, chosen per matched clip's track type)")
|
|
1192
|
+
batch_apply_effect_parser.add_argument("--name-contains", help="Only affect clips whose name contains this substring (case-insensitive)")
|
|
1193
|
+
batch_apply_effect_parser.add_argument(
|
|
1194
|
+
"--track-type", choices=["video", "audio", "both"], help="Restrict to this track type (default: both)"
|
|
1195
|
+
)
|
|
1196
|
+
batch_apply_effect_parser.add_argument(
|
|
1197
|
+
"--track-index", type=int, help="Restrict to this 0-based track index (requires --track-type to be video or audio, not both)"
|
|
1198
|
+
)
|
|
1199
|
+
batch_apply_effect_parser.add_argument(
|
|
1200
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
def _add_component_property_args(p):
|
|
1204
|
+
_add_clip_addressing_args(p)
|
|
1205
|
+
p.add_argument("--component-name", required=True, help="Component display name or matchName (e.g. 'Motion', 'AE.ADBE Opacity', 'Lumetri Color')")
|
|
1206
|
+
p.add_argument("--property-name", required=True, help="Property display name (e.g. 'Scale', 'Opacity', 'Tint')")
|
|
1207
|
+
|
|
1208
|
+
get_effect_properties_parser = subparsers.add_parser(
|
|
1209
|
+
"get-effect-properties", help="List all properties of one named component on a clip (values, isTimeVarying, keyCount)"
|
|
1210
|
+
)
|
|
1211
|
+
_add_clip_addressing_args(get_effect_properties_parser)
|
|
1212
|
+
get_effect_properties_parser.add_argument("--component-name", required=True, help="Component display name or matchName (e.g. 'Motion', 'AE.ADBE Opacity', 'Lumetri Color')")
|
|
1213
|
+
|
|
1214
|
+
set_effect_property_parser = subparsers.add_parser(
|
|
1215
|
+
"set-effect-property", help="Set the value of one property on a named component (number/string/boolean)"
|
|
1216
|
+
)
|
|
1217
|
+
_add_component_property_args(set_effect_property_parser)
|
|
1218
|
+
set_effect_property_parser.add_argument("--value", required=True, help="Value to set — interpreted per --value-type")
|
|
1219
|
+
set_effect_property_parser.add_argument(
|
|
1220
|
+
"--value-type", required=True, choices=["number", "string", "boolean"], help="How to interpret --value"
|
|
1221
|
+
)
|
|
1222
|
+
|
|
1223
|
+
get_keyframes_parser = subparsers.add_parser(
|
|
1224
|
+
"get-keyframes", help="List every keyframe (time + value) on a named component property"
|
|
1225
|
+
)
|
|
1226
|
+
_add_component_property_args(get_keyframes_parser)
|
|
1227
|
+
|
|
1228
|
+
add_keyframe_parser = subparsers.add_parser(
|
|
1229
|
+
"add-keyframe", help="Add a keyframe to a component property at a clip-relative time"
|
|
1230
|
+
)
|
|
1231
|
+
_add_component_property_args(add_keyframe_parser)
|
|
1232
|
+
add_keyframe_parser.add_argument("--seconds", type=float, required=True, help="Clip-relative time for the new keyframe, in seconds")
|
|
1233
|
+
add_keyframe_parser.add_argument("--value", type=float, required=True, help="Value at the keyframe")
|
|
1234
|
+
|
|
1235
|
+
remove_keyframe_parser = subparsers.add_parser(
|
|
1236
|
+
"remove-keyframe", help="Remove a keyframe near a clip-relative time (tolerance: half a frame)"
|
|
1237
|
+
)
|
|
1238
|
+
_add_component_property_args(remove_keyframe_parser)
|
|
1239
|
+
remove_keyframe_parser.add_argument("--seconds", type=float, required=True, help="Clip-relative time of the keyframe to remove, in seconds")
|
|
1240
|
+
|
|
1241
|
+
remove_keyframe_range_parser = subparsers.add_parser(
|
|
1242
|
+
"remove-keyframe-range", help="Remove all keyframes within a clip-relative time range"
|
|
1243
|
+
)
|
|
1244
|
+
_add_component_property_args(remove_keyframe_range_parser)
|
|
1245
|
+
remove_keyframe_range_parser.add_argument("--start-seconds", type=float, required=True, help="Start of the range, clip-relative seconds")
|
|
1246
|
+
remove_keyframe_range_parser.add_argument("--end-seconds", type=float, required=True, help="End of the range, clip-relative seconds")
|
|
1247
|
+
|
|
1248
|
+
set_keyframe_interpolation_parser = subparsers.add_parser(
|
|
1249
|
+
"set-keyframe-interpolation",
|
|
1250
|
+
help="Set a keyframe's interpolation type (raw int — enum meaning is version-dependent, see docs)",
|
|
1251
|
+
)
|
|
1252
|
+
_add_component_property_args(set_keyframe_interpolation_parser)
|
|
1253
|
+
set_keyframe_interpolation_parser.add_argument("--seconds", type=float, required=True, help="Clip-relative time of the keyframe, in seconds")
|
|
1254
|
+
set_keyframe_interpolation_parser.add_argument(
|
|
1255
|
+
"--interpolation-type", type=int, required=True,
|
|
1256
|
+
help="Raw interpolation enum int (0=Linear/4=Hold/5=Bezier per one reference repo, 0/1/2 per another — disputed, see docs)",
|
|
1257
|
+
)
|
|
1258
|
+
|
|
1259
|
+
get_value_at_time_parser = subparsers.add_parser(
|
|
1260
|
+
"get-value-at-time", help="Get a component property's interpolated value at a clip-relative time"
|
|
1261
|
+
)
|
|
1262
|
+
_add_component_property_args(get_value_at_time_parser)
|
|
1263
|
+
get_value_at_time_parser.add_argument("--seconds", type=float, required=True, help="Clip-relative time to query, in seconds")
|
|
1264
|
+
|
|
1265
|
+
set_color_value_parser = subparsers.add_parser(
|
|
1266
|
+
"set-color-value", help="Set a color-typed property (e.g. a Lumetri tint or title fill color)"
|
|
1267
|
+
)
|
|
1268
|
+
_add_component_property_args(set_color_value_parser)
|
|
1269
|
+
set_color_value_parser.add_argument("--alpha", type=float, required=True, help="Alpha channel, 0-255")
|
|
1270
|
+
set_color_value_parser.add_argument("--red", type=float, required=True, help="Red channel, 0-255")
|
|
1271
|
+
set_color_value_parser.add_argument("--green", type=float, required=True, help="Green channel, 0-255")
|
|
1272
|
+
set_color_value_parser.add_argument("--blue", type=float, required=True, help="Blue channel, 0-255")
|
|
1273
|
+
|
|
1274
|
+
add_transition_parser = subparsers.add_parser(
|
|
1275
|
+
"add-transition", help="Add a video transition to a clip's start or end (QE DOM, disputed signature)"
|
|
1276
|
+
)
|
|
1277
|
+
add_transition_parser.add_argument("--track-type", required=True, choices=["video"], help="Track type the clip is on (video only)")
|
|
1278
|
+
add_transition_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the video track")
|
|
1279
|
+
add_transition_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1280
|
+
add_transition_parser.add_argument("--at-end", required=True, choices=["true", "false"], help="true = apply at the clip's end, false = at its start")
|
|
1281
|
+
add_transition_parser.add_argument("--transition-name", help="Transition name, e.g. 'Cross Dissolve' (omit for the default transition)")
|
|
1282
|
+
add_transition_parser.add_argument("--duration-seconds", type=float, help="Transition duration in seconds (default: 1.0)")
|
|
1283
|
+
add_transition_parser.add_argument(
|
|
1284
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
batch_add_transitions_parser = subparsers.add_parser(
|
|
1288
|
+
"batch-add-transitions", help="Add the same transition to every clip on one video track (capped at 100)"
|
|
1289
|
+
)
|
|
1290
|
+
batch_add_transitions_parser.add_argument("--track-type", choices=["video"], help="Track type (video only, default: video)")
|
|
1291
|
+
batch_add_transitions_parser.add_argument("--track-index", type=int, help="0-based index of the video track (default: 0)")
|
|
1292
|
+
batch_add_transitions_parser.add_argument("--at-end", choices=["true", "false"], help="true = apply at each clip's end (default), false = at its start")
|
|
1293
|
+
batch_add_transitions_parser.add_argument("--transition-name", help="Transition name, e.g. 'Cross Dissolve' (omit for the default transition)")
|
|
1294
|
+
batch_add_transitions_parser.add_argument("--duration-seconds", type=float, help="Transition duration in seconds (default: 1.0)")
|
|
1295
|
+
batch_add_transitions_parser.add_argument(
|
|
1296
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1297
|
+
)
|
|
1298
|
+
|
|
1299
|
+
remove_transition_parser = subparsers.add_parser(
|
|
1300
|
+
"remove-transition", help="Remove a transition from a track (standard DOM, disputed remove() arity); lists transitions if the index is out of range"
|
|
1301
|
+
)
|
|
1302
|
+
remove_transition_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the transition is on")
|
|
1303
|
+
remove_transition_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1304
|
+
remove_transition_parser.add_argument("--transition-index", type=int, required=True, help="0-based index into the track's transitions collection")
|
|
1305
|
+
remove_transition_parser.add_argument(
|
|
1306
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1307
|
+
)
|
|
1308
|
+
|
|
1309
|
+
add_to_timeline_parser = subparsers.add_parser(
|
|
1310
|
+
"add-to-timeline", help="Add a project item to the timeline (insert/overwrite)"
|
|
1311
|
+
)
|
|
1312
|
+
add_to_timeline_parser.add_argument("--node-id", help="Node ID of the project item to place (either this or --name is required)")
|
|
1313
|
+
add_to_timeline_parser.add_argument("--name", help="Exact name of the project item to place (either this or --node-id is required)")
|
|
1314
|
+
add_to_timeline_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type to place the clip on")
|
|
1315
|
+
add_to_timeline_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1316
|
+
add_to_timeline_parser.add_argument("--start-seconds", type=float, required=True, help="Start time on the timeline, in seconds")
|
|
1317
|
+
add_to_timeline_parser.add_argument("--mode", required=True, choices=["insert", "overwrite"], help="insert = ripple, overwrite = overwrite in place")
|
|
1318
|
+
add_to_timeline_parser.add_argument(
|
|
1319
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1320
|
+
)
|
|
1321
|
+
|
|
1322
|
+
remove_from_timeline_parser = subparsers.add_parser(
|
|
1323
|
+
"remove-from-timeline", help="Destructive: permanently remove a clip from the timeline"
|
|
1324
|
+
)
|
|
1325
|
+
remove_from_timeline_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1326
|
+
remove_from_timeline_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1327
|
+
remove_from_timeline_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1328
|
+
remove_from_timeline_parser.add_argument(
|
|
1329
|
+
"--ripple", required=True, choices=["true", "false"], help="true = ripple delete (close the gap), false = lift in place"
|
|
1330
|
+
)
|
|
1331
|
+
remove_from_timeline_parser.add_argument(
|
|
1332
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1333
|
+
)
|
|
1334
|
+
|
|
1335
|
+
move_clip_parser = subparsers.add_parser(
|
|
1336
|
+
"move-clip", help="Move a clip to a new absolute start time on the same track"
|
|
1337
|
+
)
|
|
1338
|
+
move_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1339
|
+
move_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1340
|
+
move_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1341
|
+
move_clip_parser.add_argument("--start-seconds", type=float, required=True, help="New absolute start time, in seconds")
|
|
1342
|
+
move_clip_parser.add_argument(
|
|
1343
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1344
|
+
)
|
|
1345
|
+
|
|
1346
|
+
trim_clip_parser = subparsers.add_parser(
|
|
1347
|
+
"trim-clip", help="Trim a clip's in and/or out point (source-media-relative seconds)"
|
|
1348
|
+
)
|
|
1349
|
+
trim_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1350
|
+
trim_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1351
|
+
trim_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1352
|
+
trim_clip_parser.add_argument("--in-point-seconds", type=float, help="New in-point, source-media-relative seconds")
|
|
1353
|
+
trim_clip_parser.add_argument("--out-point-seconds", type=float, help="New out-point, source-media-relative seconds")
|
|
1354
|
+
trim_clip_parser.add_argument(
|
|
1355
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1356
|
+
)
|
|
1357
|
+
|
|
1358
|
+
split_clip_parser = subparsers.add_parser(
|
|
1359
|
+
"split-clip", help="Split (razor) whichever clip covers a sequence-time position on one track (QE DOM)"
|
|
1360
|
+
)
|
|
1361
|
+
split_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type to razor")
|
|
1362
|
+
split_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1363
|
+
split_clip_parser.add_argument("--seconds", type=float, required=True, help="Sequence-time position to split at, in seconds")
|
|
1364
|
+
split_clip_parser.add_argument(
|
|
1365
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1366
|
+
)
|
|
1367
|
+
|
|
1368
|
+
duplicate_clip_parser = subparsers.add_parser(
|
|
1369
|
+
"duplicate-clip", help="Insert a new instance of a clip's own project item onto the same track"
|
|
1370
|
+
)
|
|
1371
|
+
duplicate_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1372
|
+
duplicate_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1373
|
+
duplicate_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1374
|
+
duplicate_clip_parser.add_argument(
|
|
1375
|
+
"--target-start-seconds", type=float, help="Start time for the duplicate (default: right after the original clip's own end)"
|
|
1376
|
+
)
|
|
1377
|
+
duplicate_clip_parser.add_argument(
|
|
1378
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1379
|
+
)
|
|
1380
|
+
|
|
1381
|
+
replace_clip_parser = subparsers.add_parser(
|
|
1382
|
+
"replace-clip", help="Destructive: remove a clip and reinsert a different project item at the same start time"
|
|
1383
|
+
)
|
|
1384
|
+
replace_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1385
|
+
replace_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1386
|
+
replace_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1387
|
+
replace_clip_parser.add_argument("--replacement-node-id", help="Node ID of the replacement project item (either this or --replacement-name is required)")
|
|
1388
|
+
replace_clip_parser.add_argument("--replacement-name", help="Exact name of the replacement project item (either this or --replacement-node-id is required)")
|
|
1389
|
+
replace_clip_parser.add_argument(
|
|
1390
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1391
|
+
)
|
|
1392
|
+
|
|
1393
|
+
set_clip_speed_parser = subparsers.add_parser(
|
|
1394
|
+
"set-clip-speed", help="Set a clip's playback speed (QE DOM, disputed setSpeed arity)"
|
|
1395
|
+
)
|
|
1396
|
+
set_clip_speed_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1397
|
+
set_clip_speed_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1398
|
+
set_clip_speed_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1399
|
+
set_clip_speed_parser.add_argument(
|
|
1400
|
+
"--speed-percent", type=float, required=True, help="Speed as percentage (100 = normal, 200 = double, negative = reversed)"
|
|
1401
|
+
)
|
|
1402
|
+
# --ripple / --maintain-audio kept for backward compatibility but IGNORED:
|
|
1403
|
+
# the calibrated setSpeed signature on this build (2026-07-17) has no such
|
|
1404
|
+
# knobs — see plugin/README.md's set-clip-speed entry.
|
|
1405
|
+
set_clip_speed_parser.add_argument("--ripple", choices=["true", "false"], help="IGNORED (kept for compatibility): the working setSpeed signature has no ripple knob")
|
|
1406
|
+
set_clip_speed_parser.add_argument("--maintain-audio", choices=["true", "false"], help="IGNORED (kept for compatibility): the working setSpeed signature has no audio-pitch knob")
|
|
1407
|
+
set_clip_speed_parser.add_argument(
|
|
1408
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
get_clip_speed_parser = subparsers.add_parser(
|
|
1412
|
+
"get-clip-speed", help="Get a clip's playback speed and reversed state"
|
|
1413
|
+
)
|
|
1414
|
+
get_clip_speed_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1415
|
+
get_clip_speed_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1416
|
+
get_clip_speed_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1417
|
+
get_clip_speed_parser.add_argument(
|
|
1418
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1419
|
+
)
|
|
1420
|
+
|
|
1421
|
+
ripple_delete_clip_parser = subparsers.add_parser(
|
|
1422
|
+
"ripple-delete-clip", help="Ripple-delete one clip, closing the gap (QE DOM). Destructive."
|
|
1423
|
+
)
|
|
1424
|
+
ripple_delete_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1425
|
+
ripple_delete_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1426
|
+
ripple_delete_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1427
|
+
ripple_delete_clip_parser.add_argument(
|
|
1428
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1429
|
+
)
|
|
1430
|
+
|
|
1431
|
+
roll_edit_parser = subparsers.add_parser(
|
|
1432
|
+
"roll-edit", help="Roll the edit point between a clip and its neighbor (QE DOM, signature unconfirmed)"
|
|
1433
|
+
)
|
|
1434
|
+
roll_edit_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1435
|
+
roll_edit_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1436
|
+
roll_edit_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1437
|
+
roll_edit_parser.add_argument("--offset-seconds", type=float, required=True, help="Positive rolls the edit point later, negative rolls it earlier")
|
|
1438
|
+
roll_edit_parser.add_argument(
|
|
1439
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1440
|
+
)
|
|
1441
|
+
|
|
1442
|
+
slide_edit_parser = subparsers.add_parser(
|
|
1443
|
+
"slide-edit", help="Slide a clip earlier/later without changing its own duration (QE DOM, signature unconfirmed)"
|
|
1444
|
+
)
|
|
1445
|
+
slide_edit_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1446
|
+
slide_edit_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1447
|
+
slide_edit_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1448
|
+
slide_edit_parser.add_argument("--offset-seconds", type=float, required=True, help="Positive slides later, negative slides earlier")
|
|
1449
|
+
slide_edit_parser.add_argument(
|
|
1450
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1451
|
+
)
|
|
1452
|
+
|
|
1453
|
+
slip_edit_parser = subparsers.add_parser(
|
|
1454
|
+
"slip-edit", help="Slip a clip's source in/out points without moving it on the timeline (QE DOM, signature unconfirmed)"
|
|
1455
|
+
)
|
|
1456
|
+
slip_edit_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1457
|
+
slip_edit_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1458
|
+
slip_edit_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1459
|
+
slip_edit_parser.add_argument("--offset-seconds", type=float, required=True, help="Positive slips forward in the source, negative slips backward")
|
|
1460
|
+
slip_edit_parser.add_argument(
|
|
1461
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1462
|
+
)
|
|
1463
|
+
|
|
1464
|
+
move_clip_to_track_parser = subparsers.add_parser(
|
|
1465
|
+
"move-clip-to-track", help="Move a clip to a different track of the same media type (lossy remove+re-add; effects/keyframes/speed/trims are NOT preserved)"
|
|
1466
|
+
)
|
|
1467
|
+
move_clip_to_track_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1468
|
+
move_clip_to_track_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the source track")
|
|
1469
|
+
move_clip_to_track_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1470
|
+
move_clip_to_track_parser.add_argument("--target-track-index", type=int, required=True, help="0-based index of the destination track (same trackType)")
|
|
1471
|
+
move_clip_to_track_parser.add_argument(
|
|
1472
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1473
|
+
)
|
|
1474
|
+
|
|
1475
|
+
reverse_clip_parser = subparsers.add_parser(
|
|
1476
|
+
"reverse-clip", help="Reverse (or un-reverse) a clip's playback direction (QE DOM)"
|
|
1477
|
+
)
|
|
1478
|
+
reverse_clip_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
1479
|
+
reverse_clip_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1480
|
+
reverse_clip_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1481
|
+
reverse_clip_parser.add_argument("--reverse", choices=["true", "false"], help="true to reverse, false for normal (default: true)")
|
|
1482
|
+
reverse_clip_parser.add_argument(
|
|
1483
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1484
|
+
)
|
|
1485
|
+
|
|
1486
|
+
link_selection_parser = subparsers.add_parser(
|
|
1487
|
+
"link-selection", help="Link the currently-selected video/audio clips in a sequence (standard DOM)"
|
|
1488
|
+
)
|
|
1489
|
+
link_selection_parser.add_argument(
|
|
1490
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1491
|
+
)
|
|
1492
|
+
|
|
1493
|
+
unlink_selection_parser = subparsers.add_parser(
|
|
1494
|
+
"unlink-selection", help="Unlink the currently-selected linked clip(s) in a sequence (standard DOM)"
|
|
1495
|
+
)
|
|
1496
|
+
unlink_selection_parser.add_argument(
|
|
1497
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1498
|
+
)
|
|
1499
|
+
|
|
1500
|
+
overwrite_clip_at_parser = subparsers.add_parser(
|
|
1501
|
+
"overwrite-clip-at", help="Overwrite a bin project item onto the timeline at a track/time. Destructive."
|
|
1502
|
+
)
|
|
1503
|
+
overwrite_clip_at_group = overwrite_clip_at_parser.add_mutually_exclusive_group(required=True)
|
|
1504
|
+
overwrite_clip_at_group.add_argument("--item-node-id", help="Node ID of the project item to place")
|
|
1505
|
+
overwrite_clip_at_group.add_argument("--item-name", help="Name of the project item to place (first match)")
|
|
1506
|
+
overwrite_clip_at_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type to place the clip on")
|
|
1507
|
+
overwrite_clip_at_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1508
|
+
overwrite_clip_at_parser.add_argument("--start-seconds", type=float, required=True, help="Start time in seconds on the timeline")
|
|
1509
|
+
overwrite_clip_at_parser.add_argument(
|
|
1510
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1511
|
+
)
|
|
1512
|
+
|
|
1513
|
+
razor_all_tracks_parser = subparsers.add_parser(
|
|
1514
|
+
"razor-all-tracks", help="Razor (split) every video+audio track at a given time (destructive-ish; QE only)"
|
|
1515
|
+
)
|
|
1516
|
+
razor_all_tracks_parser.add_argument("--seconds", type=float, help="Time to razor at (default: the sequence's own playhead position)")
|
|
1517
|
+
razor_all_tracks_parser.add_argument(
|
|
1518
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
set_item_in_out_parser = subparsers.add_parser(
|
|
1522
|
+
"set-item-in-out", help="Set in/out points on a PROJECT item (not a timeline clip)"
|
|
1523
|
+
)
|
|
1524
|
+
set_item_in_out_parser.add_argument("--node-id", help="Node ID of the project item")
|
|
1525
|
+
set_item_in_out_parser.add_argument("--name", help="Name of the project item (used if --node-id is omitted)")
|
|
1526
|
+
set_item_in_out_parser.add_argument("--in-seconds", type=float, help="In point in seconds")
|
|
1527
|
+
set_item_in_out_parser.add_argument("--out-seconds", type=float, help="Out point in seconds")
|
|
1528
|
+
set_item_in_out_parser.add_argument("--media-type", type=int, choices=[1, 2, 4], help="1=video, 2=audio, 4=all (default: 4)")
|
|
1529
|
+
|
|
1530
|
+
clear_item_in_out_parser = subparsers.add_parser(
|
|
1531
|
+
"clear-item-in-out", help="Clear in/out points on a PROJECT item (reset to full source duration)"
|
|
1532
|
+
)
|
|
1533
|
+
clear_item_in_out_parser.add_argument("--node-id", help="Node ID of the project item")
|
|
1534
|
+
clear_item_in_out_parser.add_argument("--name", help="Name of the project item (used if --node-id is omitted)")
|
|
1535
|
+
clear_item_in_out_parser.add_argument("--clear-in", choices=["true", "false"], help="Clear the in point (default: true)")
|
|
1536
|
+
clear_item_in_out_parser.add_argument("--clear-out", choices=["true", "false"], help="Clear the out point (default: true)")
|
|
1537
|
+
|
|
1538
|
+
clear_sequence_in_out_parser = subparsers.add_parser(
|
|
1539
|
+
"clear-sequence-in-out", help="Clear the active (or named) sequence's in/out points back to Premiere's unset sentinel"
|
|
1540
|
+
)
|
|
1541
|
+
clear_sequence_in_out_parser.add_argument(
|
|
1542
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1543
|
+
)
|
|
1544
|
+
|
|
1545
|
+
remove_selected_clips_parser = subparsers.add_parser(
|
|
1546
|
+
"remove-selected-clips", help="Remove every currently-selected clip from the timeline (destructive)"
|
|
1547
|
+
)
|
|
1548
|
+
remove_selected_clips_parser.add_argument("--ripple", choices=["true", "false"], help="true = close the gap after removing (default: false)")
|
|
1549
|
+
remove_selected_clips_parser.add_argument(
|
|
1550
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1551
|
+
)
|
|
1552
|
+
|
|
1553
|
+
lift_selection_parser = subparsers.add_parser(
|
|
1554
|
+
"lift-selection", help="Lift (remove without closing the gap) content between the sequence's in/out points (destructive; QE only)"
|
|
1555
|
+
)
|
|
1556
|
+
lift_selection_parser.add_argument(
|
|
1557
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1558
|
+
)
|
|
1559
|
+
|
|
1560
|
+
extract_selection_parser = subparsers.add_parser(
|
|
1561
|
+
"extract-selection", help="Extract (remove and close the gap) content between the sequence's in/out points (destructive; QE only)"
|
|
1562
|
+
)
|
|
1563
|
+
extract_selection_parser.add_argument(
|
|
1564
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1565
|
+
)
|
|
1566
|
+
|
|
1567
|
+
nest_clips_parser = subparsers.add_parser(
|
|
1568
|
+
"nest-clips", help="Nest the currently-selected clips into a new nested sequence (select clips first)"
|
|
1569
|
+
)
|
|
1570
|
+
nest_clips_parser.add_argument("--name", required=True, help="Name for the new nested sequence")
|
|
1571
|
+
nest_clips_parser.add_argument(
|
|
1572
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1573
|
+
)
|
|
1574
|
+
|
|
1575
|
+
freeze_frame_parser = subparsers.add_parser(
|
|
1576
|
+
"freeze-frame", help="Export a still from a clip and import it as a project item (mirrors the reference tool; does not place a frozen clip on the timeline)"
|
|
1577
|
+
)
|
|
1578
|
+
freeze_frame_parser.add_argument("--track-type", choices=["video", "audio"], help="Track type the clip is on (default: video)")
|
|
1579
|
+
freeze_frame_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
1580
|
+
freeze_frame_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
1581
|
+
freeze_frame_parser.add_argument("--at-seconds", type=float, help="Sequence-time position to freeze (default: the clip's own start time)")
|
|
1582
|
+
freeze_frame_parser.add_argument("--output-path", required=True, help="Full path for the exported still frame")
|
|
1583
|
+
freeze_frame_parser.add_argument(
|
|
1584
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1585
|
+
)
|
|
1586
|
+
|
|
1587
|
+
match_frame_parser = subparsers.add_parser(
|
|
1588
|
+
"match-frame", help="Find the source clip/time at a sequence position and open it in the Source Monitor"
|
|
1589
|
+
)
|
|
1590
|
+
match_frame_parser.add_argument("--track-type", choices=["video", "audio"], help="Track type to search (default: video)")
|
|
1591
|
+
match_frame_parser.add_argument("--track-index", type=int, help="0-based index of the track (default: 0)")
|
|
1592
|
+
match_frame_parser.add_argument("--seconds", type=float, help="Sequence-time position to match (default: the sequence's own playhead)")
|
|
1593
|
+
match_frame_parser.add_argument(
|
|
1594
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1595
|
+
)
|
|
1596
|
+
|
|
1597
|
+
add_adjustment_layer_parser = subparsers.add_parser(
|
|
1598
|
+
"add-adjustment-layer", help="Create an adjustment layer project item (QE) and place it on a video track"
|
|
1599
|
+
)
|
|
1600
|
+
add_adjustment_layer_parser.add_argument("--track-index", type=int, help="0-based index of the video track (default: 0)")
|
|
1601
|
+
add_adjustment_layer_parser.add_argument("--start-seconds", type=float, help="Timeline position to place the layer at (default: 0)")
|
|
1602
|
+
add_adjustment_layer_parser.add_argument("--duration-seconds", type=float, help="Requested duration in seconds (not currently applied — see command docs)")
|
|
1603
|
+
add_adjustment_layer_parser.add_argument(
|
|
1604
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1605
|
+
)
|
|
1606
|
+
|
|
1607
|
+
unnest_sequence_parser = subparsers.add_parser(
|
|
1608
|
+
"unnest-sequence", help="Replace a nested-sequence clip on the timeline with copies of its own clips"
|
|
1609
|
+
)
|
|
1610
|
+
unnest_sequence_parser.add_argument("--node-id", required=True, help="Node ID of the nested-sequence clip on the timeline")
|
|
1611
|
+
unnest_sequence_parser.add_argument(
|
|
1612
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1613
|
+
)
|
|
1614
|
+
|
|
1615
|
+
import_media_parser = subparsers.add_parser(
|
|
1616
|
+
"import-media", help="Import one or more media files into the project (safe-extension allowlist only)"
|
|
1617
|
+
)
|
|
1618
|
+
import_media_group = import_media_parser.add_mutually_exclusive_group(required=True)
|
|
1619
|
+
import_media_group.add_argument("--file-path", help="Single file path to import")
|
|
1620
|
+
import_media_group.add_argument("--file-paths", help="JSON array string of file paths to import")
|
|
1621
|
+
import_media_parser.add_argument(
|
|
1622
|
+
"--target-bin-path", help="'/'-separated bin path to import into (must already exist; default: project root)"
|
|
1623
|
+
)
|
|
1624
|
+
|
|
1625
|
+
import_folder_parser = subparsers.add_parser(
|
|
1626
|
+
"import-folder", help="Import every safe-extension file in a folder into the project"
|
|
1627
|
+
)
|
|
1628
|
+
import_folder_parser.add_argument("--folder-path", required=True, help="Path to the folder to import")
|
|
1629
|
+
import_folder_parser.add_argument(
|
|
1630
|
+
"--target-bin-path", help="'/'-separated bin path to import into (must already exist; default: project root)"
|
|
1631
|
+
)
|
|
1632
|
+
|
|
1633
|
+
import_image_sequence_parser = subparsers.add_parser(
|
|
1634
|
+
"import-image-sequence", help="Import a numbered image sequence as a single clip"
|
|
1635
|
+
)
|
|
1636
|
+
import_image_sequence_parser.add_argument(
|
|
1637
|
+
"--first-frame-path", required=True, help="Path to the first image in the sequence (e.g. /path/to/frame_001.png)"
|
|
1638
|
+
)
|
|
1639
|
+
import_image_sequence_parser.add_argument(
|
|
1640
|
+
"--target-bin-path", help="'/'-separated bin path to import into (must already exist; default: project root)"
|
|
1641
|
+
)
|
|
1642
|
+
|
|
1643
|
+
create_bin_parser = subparsers.add_parser(
|
|
1644
|
+
"create-bin", help="Create a bin (and any missing parent bins) at a '/'-separated path"
|
|
1645
|
+
)
|
|
1646
|
+
create_bin_parser.add_argument("--bin-path", required=True, help="'/'-separated bin path, e.g. 'B-Roll/Interviews'")
|
|
1647
|
+
|
|
1648
|
+
rename_bin_parser = subparsers.add_parser("rename-bin", help="Rename an existing bin")
|
|
1649
|
+
rename_bin_parser.add_argument("--bin-path", required=True, help="'/'-separated path to the existing bin")
|
|
1650
|
+
rename_bin_parser.add_argument("--new-name", required=True, help="New name for the bin")
|
|
1651
|
+
|
|
1652
|
+
move_items_to_bin_parser = subparsers.add_parser(
|
|
1653
|
+
"move-items-to-bin", help="Move one or more project items to a target bin (merges the reference project's single/multi-item move tools)"
|
|
1654
|
+
)
|
|
1655
|
+
move_items_to_bin_id_group = move_items_to_bin_parser.add_mutually_exclusive_group(required=True)
|
|
1656
|
+
move_items_to_bin_id_group.add_argument("--node-ids", help="JSON array string of node IDs to move")
|
|
1657
|
+
move_items_to_bin_id_group.add_argument("--node-id", help="Single node ID to move")
|
|
1658
|
+
move_items_to_bin_id_group.add_argument("--name", help="Single exact item name to move")
|
|
1659
|
+
move_items_to_bin_parser.add_argument(
|
|
1660
|
+
"--target-bin-path", required=True, help="'/'-separated bin path to move into (must already exist — call create-bin first)"
|
|
1661
|
+
)
|
|
1662
|
+
|
|
1663
|
+
relink_media_parser = subparsers.add_parser("relink-media", help="Relink an offline (or online) media item to a new file path")
|
|
1664
|
+
relink_media_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1665
|
+
relink_media_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1666
|
+
relink_media_parser.add_argument("--new-path", required=True, help="New file path for the media")
|
|
1667
|
+
|
|
1668
|
+
refresh_media_parser = subparsers.add_parser("refresh-media", help="Refresh a project item to pick up changes to its source file")
|
|
1669
|
+
refresh_media_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1670
|
+
refresh_media_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1671
|
+
|
|
1672
|
+
set_item_offline_parser = subparsers.add_parser(
|
|
1673
|
+
"set-item-offline", help="Destructive-ish: set a project item to offline status (unlinks its media)"
|
|
1674
|
+
)
|
|
1675
|
+
set_item_offline_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1676
|
+
set_item_offline_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1677
|
+
|
|
1678
|
+
detach_proxy_parser = subparsers.add_parser("detach-proxy", help="Detach the proxy attached to a project item")
|
|
1679
|
+
detach_proxy_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1680
|
+
detach_proxy_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1681
|
+
|
|
1682
|
+
set_override_frame_rate_parser = subparsers.add_parser(
|
|
1683
|
+
"set-override-frame-rate", help="Override a project item's interpreted frame rate"
|
|
1684
|
+
)
|
|
1685
|
+
set_override_frame_rate_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1686
|
+
set_override_frame_rate_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1687
|
+
set_override_frame_rate_parser.add_argument("--fps", type=float, required=True, help="Frame rate to set, e.g. 23.976, 24, 29.97, 30, 60")
|
|
1688
|
+
|
|
1689
|
+
set_override_par_parser = subparsers.add_parser(
|
|
1690
|
+
"set-override-pixel-aspect-ratio", help="Override a project item's interpreted pixel aspect ratio"
|
|
1691
|
+
)
|
|
1692
|
+
set_override_par_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1693
|
+
set_override_par_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1694
|
+
set_override_par_parser.add_argument("--numerator", type=float, required=True, help="PAR numerator (e.g. 1 for square pixels)")
|
|
1695
|
+
set_override_par_parser.add_argument("--denominator", type=float, required=True, help="PAR denominator (e.g. 1 for square pixels)")
|
|
1696
|
+
|
|
1697
|
+
set_scale_to_frame_size_parser = subparsers.add_parser(
|
|
1698
|
+
"set-scale-to-frame-size", help="Enable 'Scale to Frame Size' on a project item"
|
|
1699
|
+
)
|
|
1700
|
+
set_scale_to_frame_size_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1701
|
+
set_scale_to_frame_size_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1702
|
+
|
|
1703
|
+
set_item_start_time_parser = subparsers.add_parser(
|
|
1704
|
+
"set-item-start-time", help="Set a project item's start time (source-media timecode offset)"
|
|
1705
|
+
)
|
|
1706
|
+
set_item_start_time_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1707
|
+
set_item_start_time_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1708
|
+
set_item_start_time_parser.add_argument("--seconds", type=float, required=True, help="Start time in seconds")
|
|
1709
|
+
|
|
1710
|
+
rename_project_item_parser = subparsers.add_parser("rename-project-item", help="Rename a project item")
|
|
1711
|
+
rename_project_item_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
1712
|
+
rename_project_item_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
1713
|
+
rename_project_item_parser.add_argument("--new-name", required=True, help="New name for the item")
|
|
1714
|
+
|
|
1715
|
+
subparsers.add_parser("save-project", help="Save the currently open project (not yet live-tested)")
|
|
1716
|
+
|
|
1717
|
+
save_project_as_parser = subparsers.add_parser(
|
|
1718
|
+
"save-project-as",
|
|
1719
|
+
help="Save the currently open project to a new path — switches the open project to that new file (not yet live-tested)",
|
|
1720
|
+
)
|
|
1721
|
+
save_project_as_parser.add_argument("--path", required=True, help="Absolute path to save the project to")
|
|
1722
|
+
|
|
1723
|
+
open_project_parser = subparsers.add_parser(
|
|
1724
|
+
"open-project", help="Open a Premiere Pro project file (WARNING: may pop dialogs; not yet live-tested)"
|
|
1725
|
+
)
|
|
1726
|
+
open_project_parser.add_argument("--path", required=True, help="Absolute path to the .prproj file to open")
|
|
1727
|
+
|
|
1728
|
+
set_active_sequence_parser = subparsers.add_parser(
|
|
1729
|
+
"set-active-sequence", help="Make a specific sequence the active one (not yet live-tested)"
|
|
1730
|
+
)
|
|
1731
|
+
set_active_sequence_parser.add_argument("--sequence-name", required=True, help="Exact name of the sequence to activate")
|
|
1732
|
+
|
|
1733
|
+
find_items_by_media_path_parser = subparsers.add_parser(
|
|
1734
|
+
"find-items-by-media-path", help="Find project items whose media path contains a given substring"
|
|
1735
|
+
)
|
|
1736
|
+
find_items_by_media_path_parser.add_argument(
|
|
1737
|
+
"--path-contains", required=True, help="Case-insensitive substring to match against each item's media path"
|
|
1738
|
+
)
|
|
1739
|
+
|
|
1740
|
+
create_smart_bin_parser = subparsers.add_parser(
|
|
1741
|
+
"create-smart-bin", help="Create a smart (search) bin in the project panel (not yet live-tested)"
|
|
1742
|
+
)
|
|
1743
|
+
create_smart_bin_parser.add_argument("--name", required=True, help="Name for the smart bin")
|
|
1744
|
+
create_smart_bin_parser.add_argument("--query", required=True, help="Search query for the smart bin (Premiere's own search-bin query syntax)")
|
|
1745
|
+
|
|
1746
|
+
add_custom_metadata_field_parser = subparsers.add_parser(
|
|
1747
|
+
"add-custom-metadata-field",
|
|
1748
|
+
help="Add a project-wide custom metadata field to the schema (NOT removable from script; not yet live-tested)",
|
|
1749
|
+
)
|
|
1750
|
+
add_custom_metadata_field_parser.add_argument("--name", required=True, help="Internal name for the metadata field")
|
|
1751
|
+
add_custom_metadata_field_parser.add_argument("--label", help="Display label for the field (default: same as --name)")
|
|
1752
|
+
add_custom_metadata_field_parser.add_argument(
|
|
1753
|
+
"--type", type=int, choices=[0, 1, 2, 3], default=2,
|
|
1754
|
+
help="Field type: 0 = Integer, 1 = Real, 2 = String (default), 3 = Boolean",
|
|
1755
|
+
)
|
|
1756
|
+
|
|
1757
|
+
import_sequences_parser = subparsers.add_parser(
|
|
1758
|
+
"import-sequences-from-project", help="Import sequences from another Premiere Pro project file (not yet live-tested)"
|
|
1759
|
+
)
|
|
1760
|
+
import_sequences_parser.add_argument("--project-path", required=True, help="Absolute path to the source .prproj file")
|
|
1761
|
+
import_sequences_parser.add_argument(
|
|
1762
|
+
"--sequence-ids", help='JSON array of sequence IDs to import, e.g. \'["id1","id2"]\' (default: all sequences)'
|
|
1763
|
+
)
|
|
1764
|
+
|
|
1765
|
+
import_fcp_xml_parser = subparsers.add_parser(
|
|
1766
|
+
"import-fcp-xml", help="Import a Final Cut Pro XML file into the project (WARNING: may pop dialogs; not yet live-tested)"
|
|
1767
|
+
)
|
|
1768
|
+
import_fcp_xml_parser.add_argument("--xml-path", required=True, help="Absolute path to the FCP XML file")
|
|
1769
|
+
|
|
1770
|
+
import_ae_comps_parser = subparsers.add_parser(
|
|
1771
|
+
"import-ae-comps", help="Import After Effects compositions from an .aep file (WARNING: may pop dialogs; not yet live-tested)"
|
|
1772
|
+
)
|
|
1773
|
+
import_ae_comps_parser.add_argument("--aep-path", required=True, help="Absolute path to the .aep file")
|
|
1774
|
+
import_ae_comps_parser.add_argument(
|
|
1775
|
+
"--comp-names", help='JSON array of composition names to import, e.g. \'["Comp 1","Comp 2"]\' (default: all comps)'
|
|
1776
|
+
)
|
|
1777
|
+
import_ae_comps_parser.add_argument(
|
|
1778
|
+
"--target-bin-path", help="'/'-separated bin path to import into (must already exist; default: project root)"
|
|
1779
|
+
)
|
|
1780
|
+
|
|
1781
|
+
create_bars_and_tone_parser = subparsers.add_parser(
|
|
1782
|
+
"create-bars-and-tone", help="Create a Bars and Tone synthetic media item (not yet live-tested)"
|
|
1783
|
+
)
|
|
1784
|
+
create_bars_and_tone_parser.add_argument("--width", type=int, help="Frame width in pixels (default: 1920)")
|
|
1785
|
+
create_bars_and_tone_parser.add_argument("--height", type=int, help="Frame height in pixels (default: 1080)")
|
|
1786
|
+
create_bars_and_tone_parser.add_argument("--name", help="Name for the item (default: 'Bars and Tone')")
|
|
1787
|
+
|
|
1788
|
+
set_transcode_on_ingest_parser = subparsers.add_parser(
|
|
1789
|
+
"set-transcode-on-ingest",
|
|
1790
|
+
help="Enable or disable transcode-on-ingest for the project (API presence unconfirmed; not yet live-tested)",
|
|
1791
|
+
)
|
|
1792
|
+
set_transcode_on_ingest_parser.add_argument(
|
|
1793
|
+
"--enabled", required=True, choices=["true", "false"], help="Whether transcode-on-ingest should be enabled"
|
|
1794
|
+
)
|
|
1795
|
+
|
|
1796
|
+
set_project_panel_metadata_parser = subparsers.add_parser(
|
|
1797
|
+
"set-project-panel-metadata",
|
|
1798
|
+
help="REPLACE the Project panel's column/metadata configuration from XML (not a merge; not yet live-tested)",
|
|
1799
|
+
)
|
|
1800
|
+
set_project_panel_metadata_parser.add_argument(
|
|
1801
|
+
"--metadata", required=True, help="Complete Project panel metadata configuration as an XML string"
|
|
1802
|
+
)
|
|
1803
|
+
|
|
1804
|
+
subparsers.add_parser(
|
|
1805
|
+
"get-graphics-white-luminance", help="Get the project's HDR graphics white luminance value, in nits"
|
|
1806
|
+
)
|
|
1807
|
+
|
|
1808
|
+
set_graphics_white_luminance_parser = subparsers.add_parser(
|
|
1809
|
+
"set-graphics-white-luminance", help="Set the project's HDR graphics white luminance value, in nits (not yet live-tested)"
|
|
1810
|
+
)
|
|
1811
|
+
set_graphics_white_luminance_parser.add_argument("--value", type=float, required=True, help="White luminance value in nits")
|
|
1812
|
+
|
|
1813
|
+
duplicate_sequence_parser = subparsers.add_parser(
|
|
1814
|
+
"duplicate-sequence", help="Duplicate a sequence via seq.clone(), then rename the copy"
|
|
1815
|
+
)
|
|
1816
|
+
duplicate_sequence_parser.add_argument("--new-name", required=True, help="Name for the duplicated sequence")
|
|
1817
|
+
duplicate_sequence_parser.add_argument(
|
|
1818
|
+
"--sequence-name", help="Name of the sequence to duplicate (default: the currently active sequence)"
|
|
1819
|
+
)
|
|
1820
|
+
|
|
1821
|
+
set_sequence_settings_parser = subparsers.add_parser(
|
|
1822
|
+
"set-sequence-settings",
|
|
1823
|
+
help="Set one or more sequence settings (frame rate, resolution, audio sample rate, pixel aspect ratio, field type, display format) — merges 7 reference tools into one command",
|
|
1824
|
+
)
|
|
1825
|
+
set_sequence_settings_parser.add_argument("--frame-rate", type=float, help="New frame rate in fps (e.g. 25, 23.976)")
|
|
1826
|
+
set_sequence_settings_parser.add_argument("--width", type=int, help="New frame width in pixels")
|
|
1827
|
+
set_sequence_settings_parser.add_argument("--height", type=int, help="New frame height in pixels")
|
|
1828
|
+
set_sequence_settings_parser.add_argument("--audio-sample-rate", type=int, help="New audio sample rate (e.g. 48000)")
|
|
1829
|
+
set_sequence_settings_parser.add_argument("--par-numerator", type=float, help="Pixel aspect ratio numerator (requires --par-denominator)")
|
|
1830
|
+
set_sequence_settings_parser.add_argument("--par-denominator", type=float, help="Pixel aspect ratio denominator (requires --par-numerator)")
|
|
1831
|
+
set_sequence_settings_parser.add_argument("--field-type", type=int, help="Field order: 0=Progressive, 1=Upper Field First, 2=Lower Field First")
|
|
1832
|
+
set_sequence_settings_parser.add_argument("--display-format", type=int, help="Video timecode display format (raw int — see reference docs)")
|
|
1833
|
+
set_sequence_settings_parser.add_argument(
|
|
1834
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
1835
|
+
)
|
|
1836
|
+
|
|
1837
|
+
create_subsequence_parser = subparsers.add_parser(
|
|
1838
|
+
"create-subsequence", help="Create a subsequence via seq.createSubsequence() (does not enforce or rename — see nest-clips for that)"
|
|
1839
|
+
)
|
|
1840
|
+
create_subsequence_parser.add_argument(
|
|
1841
|
+
"--ignore-track-targeting", required=True, choices=["true", "false"], help="Whether to ignore track targeting when nesting"
|
|
1842
|
+
)
|
|
1843
|
+
create_subsequence_parser.add_argument(
|
|
1844
|
+
"--sequence-name", help="Name of the sequence to nest (default: the currently active sequence)"
|
|
1845
|
+
)
|
|
1846
|
+
|
|
1847
|
+
auto_reframe_sequence_parser = subparsers.add_parser(
|
|
1848
|
+
"auto-reframe-sequence", help="Auto-reframe a sequence to a new aspect ratio via seq.autoReframeSequence()"
|
|
1849
|
+
)
|
|
1850
|
+
auto_reframe_sequence_parser.add_argument("--numerator", type=float, required=True, help="Target aspect ratio numerator")
|
|
1851
|
+
auto_reframe_sequence_parser.add_argument("--denominator", type=float, required=True, help="Target aspect ratio denominator")
|
|
1852
|
+
auto_reframe_sequence_parser.add_argument(
|
|
1853
|
+
"--motion-preset", required=True, choices=["slower", "default", "faster"], help="Auto-reframe motion preset"
|
|
1854
|
+
)
|
|
1855
|
+
auto_reframe_sequence_parser.add_argument("--new-name", required=True, help="Name for the new reframed sequence")
|
|
1856
|
+
auto_reframe_sequence_parser.add_argument(
|
|
1857
|
+
"--nest", required=True, choices=["true", "false"], help="Whether to nest the original sequence inside the new one"
|
|
1858
|
+
)
|
|
1859
|
+
auto_reframe_sequence_parser.add_argument(
|
|
1860
|
+
"--sequence-name", help="Name of the sequence to reframe (default: the currently active sequence)"
|
|
1861
|
+
)
|
|
1862
|
+
|
|
1863
|
+
create_sequence_from_preset_parser = subparsers.add_parser(
|
|
1864
|
+
"create-sequence-from-preset", help="Create a new sequence from a caller-supplied .sqpreset file (QE, no dialog)"
|
|
1865
|
+
)
|
|
1866
|
+
create_sequence_from_preset_parser.add_argument("--name", required=True, help="Name for the new sequence")
|
|
1867
|
+
create_sequence_from_preset_parser.add_argument("--preset-path", required=True, help="Full path to the .sqpreset file")
|
|
1868
|
+
|
|
1869
|
+
create_sequence_from_clips_parser = subparsers.add_parser(
|
|
1870
|
+
"create-sequence-from-clips", help="Create a new sequence by placing project items in order"
|
|
1871
|
+
)
|
|
1872
|
+
create_sequence_from_clips_parser.add_argument("--name", required=True, help="Name for the new sequence")
|
|
1873
|
+
create_sequence_from_clips_parser.add_argument(
|
|
1874
|
+
"--node-ids", required=True, help="JSON array of project item nodeIds to include, in order, e.g. '[\"1\",\"2\"]'"
|
|
1875
|
+
)
|
|
1876
|
+
create_sequence_from_clips_parser.add_argument(
|
|
1877
|
+
"--target-bin-path", help="'/'-separated bin path to place the new sequence in (must already exist — not auto-created)"
|
|
1878
|
+
)
|
|
1879
|
+
|
|
1880
|
+
attach_custom_property_parser = subparsers.add_parser(
|
|
1881
|
+
"attach-custom-property", help="Attach a custom key/value property to a sequence (no confirmed read-back API)"
|
|
1882
|
+
)
|
|
1883
|
+
attach_custom_property_parser.add_argument("--property-id", required=True, help="Unique identifier for the custom property")
|
|
1884
|
+
attach_custom_property_parser.add_argument("--value", required=True, help="Value for the custom property")
|
|
1885
|
+
attach_custom_property_parser.add_argument(
|
|
1886
|
+
"--sequence-name", help="Name of the sequence to attach to (default: the currently active sequence)"
|
|
1887
|
+
)
|
|
1888
|
+
|
|
1889
|
+
close_sequence_parser = subparsers.add_parser(
|
|
1890
|
+
"close-sequence", help="Close a sequence's UI tab via seq.close() (does not delete the sequence from the project)"
|
|
1891
|
+
)
|
|
1892
|
+
close_sequence_parser.add_argument(
|
|
1893
|
+
"--sequence-name", help="Name of the sequence to close (default: the currently active sequence)"
|
|
1894
|
+
)
|
|
1895
|
+
|
|
1896
|
+
export_sequence_as_project_parser = subparsers.add_parser(
|
|
1897
|
+
"export-sequence-as-project", help="Export a sequence as a standalone .prproj file via seq.exportAsProject()"
|
|
1898
|
+
)
|
|
1899
|
+
export_sequence_as_project_parser.add_argument("--output-path", required=True, help="Full path for the exported .prproj file")
|
|
1900
|
+
export_sequence_as_project_parser.add_argument(
|
|
1901
|
+
"--sequence-name", help="Name of the sequence to export (default: the currently active sequence)"
|
|
1902
|
+
)
|
|
1903
|
+
|
|
1904
|
+
scene_edit_detection_parser = subparsers.add_parser(
|
|
1905
|
+
"scene-edit-detection", help="Run scene edit detection on the current SELECTION via seq.performSceneEditDetectionOnSelection()"
|
|
1906
|
+
)
|
|
1907
|
+
scene_edit_detection_parser.add_argument("--mode", required=True, choices=["ApplyCuts", "CreateMarkers"], help="What to do with detected scene changes")
|
|
1908
|
+
scene_edit_detection_parser.add_argument(
|
|
1909
|
+
"--apply-to-linked-audio", required=True, choices=["true", "false"], help="Whether to also apply to linked audio"
|
|
1910
|
+
)
|
|
1911
|
+
scene_edit_detection_parser.add_argument("--sensitivity", required=True, choices=["Low", "Medium", "High"], help="Detection sensitivity")
|
|
1912
|
+
scene_edit_detection_parser.add_argument(
|
|
1913
|
+
"--sequence-name", help="Name of the sequence to run detection on (default: the currently active sequence)"
|
|
1914
|
+
)
|
|
1915
|
+
|
|
1916
|
+
# --- Export & encoding (wave 6) ---
|
|
1917
|
+
|
|
1918
|
+
export_sequence_parser = subparsers.add_parser(
|
|
1919
|
+
"export-sequence", help="Export a sequence to a local file via a blocking exportAsMediaDirect() call"
|
|
1920
|
+
)
|
|
1921
|
+
export_sequence_parser.add_argument("--output", required=True, help="Absolute path to write the exported file to")
|
|
1922
|
+
export_sequence_parser.add_argument("--preset-path", required=True, help="Absolute path to an export preset (.epr)")
|
|
1923
|
+
export_sequence_parser.add_argument(
|
|
1924
|
+
"--range", choices=["entire", "in-to-out", "work-area"], default=None,
|
|
1925
|
+
help="Export range (default: entire)",
|
|
1926
|
+
)
|
|
1927
|
+
export_sequence_parser.add_argument(
|
|
1928
|
+
"--sequence-name", help="Name of the sequence to export (default: the currently active sequence)"
|
|
1929
|
+
)
|
|
1930
|
+
|
|
1931
|
+
export_fcp_xml_parser = subparsers.add_parser(
|
|
1932
|
+
"export-fcp-xml", help="Export a sequence as a Final Cut Pro XML file"
|
|
1933
|
+
)
|
|
1934
|
+
export_fcp_xml_parser.add_argument("--output", required=True, help="Absolute path to write the exported XML to")
|
|
1935
|
+
export_fcp_xml_parser.add_argument(
|
|
1936
|
+
"--sequence-name", help="Name of the sequence to export (default: the currently active sequence)"
|
|
1937
|
+
)
|
|
1938
|
+
|
|
1939
|
+
export_aaf_parser = subparsers.add_parser(
|
|
1940
|
+
"export-aaf", help="Export a sequence as an AAF file (for Pro Tools, etc.)"
|
|
1941
|
+
)
|
|
1942
|
+
export_aaf_parser.add_argument("--output", required=True, help="Absolute path to write the exported AAF to")
|
|
1943
|
+
export_aaf_parser.add_argument(
|
|
1944
|
+
"--mixdown", choices=["true", "false"], default=None, help="Mix down video to a single track (default: true)"
|
|
1945
|
+
)
|
|
1946
|
+
export_aaf_parser.add_argument(
|
|
1947
|
+
"--mono", choices=["true", "false"], default=None, help="Explode multichannel audio to mono (default: false)"
|
|
1948
|
+
)
|
|
1949
|
+
export_aaf_parser.add_argument("--rate", type=int, help="Audio sample rate (default: 48000)")
|
|
1950
|
+
export_aaf_parser.add_argument("--bits", type=int, help="Audio bit depth (default: 16)")
|
|
1951
|
+
export_aaf_parser.add_argument(
|
|
1952
|
+
"--sequence-name", help="Name of the sequence to export (default: the currently active sequence)"
|
|
1953
|
+
)
|
|
1954
|
+
|
|
1955
|
+
export_omf_parser = subparsers.add_parser(
|
|
1956
|
+
"export-omf", help="Export a sequence as an OMF file (Open Media Framework, for audio post-production)"
|
|
1957
|
+
)
|
|
1958
|
+
export_omf_parser.add_argument("--output", required=True, help="Absolute path to write the exported OMF to")
|
|
1959
|
+
export_omf_parser.add_argument("--title", help="OMF title (default: 'OMFTitle')")
|
|
1960
|
+
export_omf_parser.add_argument("--rate", type=int, help="Audio sample rate (default: 48000)")
|
|
1961
|
+
export_omf_parser.add_argument("--bits", type=int, help="Audio bit depth (default: 16)")
|
|
1962
|
+
export_omf_parser.add_argument(
|
|
1963
|
+
"--audio-encapsulated", choices=["true", "false"], default=None,
|
|
1964
|
+
help="Embed audio in the OMF (true) or reference external files (false) (default: true)",
|
|
1965
|
+
)
|
|
1966
|
+
export_omf_parser.add_argument(
|
|
1967
|
+
"--audio-file-format", type=int, help="Audio format: 0=AIFF, 1=WAV (default: 1)"
|
|
1968
|
+
)
|
|
1969
|
+
export_omf_parser.add_argument(
|
|
1970
|
+
"--trim-audio-files", choices=["true", "false"], default=None,
|
|
1971
|
+
help="Trim audio to the used range plus handles (default: true)",
|
|
1972
|
+
)
|
|
1973
|
+
export_omf_parser.add_argument("--handle-frames", type=int, help="Handle length in frames when trimming (default: 1000)")
|
|
1974
|
+
export_omf_parser.add_argument(
|
|
1975
|
+
"--sequence-name", help="Name of the sequence to export (default: the currently active sequence)"
|
|
1976
|
+
)
|
|
1977
|
+
|
|
1978
|
+
add_to_render_queue_parser = subparsers.add_parser(
|
|
1979
|
+
"add-to-render-queue",
|
|
1980
|
+
help="Queue a sequence for export in Adobe Media Encoder (fire-and-forget, no progress API)",
|
|
1981
|
+
)
|
|
1982
|
+
add_to_render_queue_parser.add_argument("--output", required=True, help="Absolute path for the rendered output file")
|
|
1983
|
+
add_to_render_queue_parser.add_argument("--preset-path", required=True, help="Absolute path to an export preset (.epr)")
|
|
1984
|
+
add_to_render_queue_parser.add_argument(
|
|
1985
|
+
"--range", choices=["entire", "in-to-out", "work-area"], default=None,
|
|
1986
|
+
help="Export range (default: entire)",
|
|
1987
|
+
)
|
|
1988
|
+
add_to_render_queue_parser.add_argument(
|
|
1989
|
+
"--sequence-name", help="Name of the sequence to queue (default: the currently active sequence)"
|
|
1990
|
+
)
|
|
1991
|
+
add_to_render_queue_parser.add_argument(
|
|
1992
|
+
"--start-batch", choices=["true", "false"], default=None,
|
|
1993
|
+
help="Start the Adobe Media Encoder batch immediately (default: false — queues only)",
|
|
1994
|
+
)
|
|
1995
|
+
|
|
1996
|
+
create_subclip_parser = subparsers.add_parser(
|
|
1997
|
+
"create-subclip", help="Create a subclip project item from a source item's in/out range"
|
|
1998
|
+
)
|
|
1999
|
+
create_subclip_parser.add_argument("--node-id", help="Node ID of the source project item (one of --node-id/--item-name is required)")
|
|
2000
|
+
create_subclip_parser.add_argument("--item-name", help="Exact name of the source project item (one of --node-id/--item-name is required)")
|
|
2001
|
+
create_subclip_parser.add_argument("--subclip-name", required=True, help="Name for the new subclip")
|
|
2002
|
+
create_subclip_parser.add_argument("--in-seconds", type=float, required=True, help="In-point in seconds")
|
|
2003
|
+
create_subclip_parser.add_argument("--out-seconds", type=float, required=True, help="Out-point in seconds")
|
|
2004
|
+
create_subclip_parser.add_argument(
|
|
2005
|
+
"--take-video", choices=["true", "false"], default=None, help="Include video in the subclip (default: true)"
|
|
2006
|
+
)
|
|
2007
|
+
create_subclip_parser.add_argument(
|
|
2008
|
+
"--take-audio", choices=["true", "false"], default=None, help="Include audio in the subclip (default: true)"
|
|
2009
|
+
)
|
|
2010
|
+
|
|
2011
|
+
encode_project_item_parser = subparsers.add_parser(
|
|
2012
|
+
"encode-project-item",
|
|
2013
|
+
help="Queue a project item (not a sequence) for export in Adobe Media Encoder (fire-and-forget)",
|
|
2014
|
+
)
|
|
2015
|
+
encode_project_item_parser.add_argument("--node-id", help="Node ID of the project item (one of --node-id/--name is required)")
|
|
2016
|
+
encode_project_item_parser.add_argument("--name", help="Exact name of the project item (one of --node-id/--name is required)")
|
|
2017
|
+
encode_project_item_parser.add_argument("--output", required=True, help="Absolute path for the rendered output file")
|
|
2018
|
+
encode_project_item_parser.add_argument("--preset-path", required=True, help="Absolute path to an export preset (.epr)")
|
|
2019
|
+
encode_project_item_parser.add_argument(
|
|
2020
|
+
"--start-batch", choices=["true", "false"], default=None,
|
|
2021
|
+
help="Start the Adobe Media Encoder batch immediately (default: false — queues only)",
|
|
2022
|
+
)
|
|
2023
|
+
|
|
2024
|
+
encode_file_parser = subparsers.add_parser(
|
|
2025
|
+
"encode-file", help="Queue an external file (not in the project) for export in Adobe Media Encoder (fire-and-forget)"
|
|
2026
|
+
)
|
|
2027
|
+
encode_file_parser.add_argument("--input", required=True, help="Absolute path to the input file")
|
|
2028
|
+
encode_file_parser.add_argument("--output", required=True, help="Absolute path for the rendered output file")
|
|
2029
|
+
encode_file_parser.add_argument("--preset-path", required=True, help="Absolute path to an export preset (.epr)")
|
|
2030
|
+
encode_file_parser.add_argument(
|
|
2031
|
+
"--start-batch", choices=["true", "false"], default=None,
|
|
2032
|
+
help="Start the Adobe Media Encoder batch immediately (default: false — queues only)",
|
|
2033
|
+
)
|
|
2034
|
+
|
|
2035
|
+
manage_proxies_parser = subparsers.add_parser(
|
|
2036
|
+
"manage-proxies", help="Attach a proxy file to a project item, or enable/disable proxy playback project-wide"
|
|
2037
|
+
)
|
|
2038
|
+
manage_proxies_parser.add_argument("--action", required=True, choices=["attach", "enable", "disable"], help="Action to perform")
|
|
2039
|
+
manage_proxies_parser.add_argument("--node-id", help="Node ID of the project item (attach only; one of --node-id/--name required)")
|
|
2040
|
+
manage_proxies_parser.add_argument("--name", help="Exact name of the project item (attach only; one of --node-id/--name required)")
|
|
2041
|
+
manage_proxies_parser.add_argument("--proxy-path", help="Path to an existing, already-rendered proxy file (required for attach)")
|
|
2042
|
+
manage_proxies_parser.add_argument(
|
|
2043
|
+
"--is-hi-res", choices=["true", "false"], default=None, help="Whether the proxy is a hi-res proxy (default: false)"
|
|
2044
|
+
)
|
|
2045
|
+
|
|
2046
|
+
open_in_source_parser = subparsers.add_parser(
|
|
2047
|
+
"open-in-source", help="Open a project item in the Source Monitor"
|
|
2048
|
+
)
|
|
2049
|
+
open_in_source_parser.add_argument("--node-id", help="Node ID of the project item to open (either this or --name is required)")
|
|
2050
|
+
open_in_source_parser.add_argument("--name", help="Exact name of the project item to open (either this or --node-id is required)")
|
|
2051
|
+
|
|
2052
|
+
close_source_monitor_parser = subparsers.add_parser(
|
|
2053
|
+
"close-source-monitor", help="Close the clip currently open in the Source Monitor"
|
|
2054
|
+
)
|
|
2055
|
+
|
|
2056
|
+
close_all_source_clips_parser = subparsers.add_parser(
|
|
2057
|
+
"close-all-source-clips", help="Close all clips open in the Source Monitor"
|
|
2058
|
+
)
|
|
2059
|
+
|
|
2060
|
+
set_source_in_out_parser = subparsers.add_parser(
|
|
2061
|
+
"set-source-in-out", help="Set in/out points on the clip open in the Source Monitor"
|
|
2062
|
+
)
|
|
2063
|
+
set_source_in_out_parser.add_argument("--in-seconds", type=float, help="New in point, in seconds")
|
|
2064
|
+
set_source_in_out_parser.add_argument("--out-seconds", type=float, help="New out point, in seconds")
|
|
2065
|
+
|
|
2066
|
+
insert_from_source_parser = subparsers.add_parser(
|
|
2067
|
+
"insert-from-source", help="Insert the Source Monitor's clip at the playhead (ripple)"
|
|
2068
|
+
)
|
|
2069
|
+
insert_from_source_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Target track type")
|
|
2070
|
+
insert_from_source_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the target track")
|
|
2071
|
+
insert_from_source_parser.add_argument("--at-seconds", type=float, help="Sequence position to insert at (default: the sequence's own playhead)")
|
|
2072
|
+
insert_from_source_parser.add_argument(
|
|
2073
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
2074
|
+
)
|
|
2075
|
+
|
|
2076
|
+
overwrite_from_source_parser = subparsers.add_parser(
|
|
2077
|
+
"overwrite-from-source", help="Overwrite the Source Monitor's clip at the playhead (destructive)"
|
|
2078
|
+
)
|
|
2079
|
+
overwrite_from_source_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Target track type")
|
|
2080
|
+
overwrite_from_source_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the target track")
|
|
2081
|
+
overwrite_from_source_parser.add_argument("--at-seconds", type=float, help="Sequence position to overwrite at (default: the sequence's own playhead)")
|
|
2082
|
+
overwrite_from_source_parser.add_argument(
|
|
2083
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
2084
|
+
)
|
|
2085
|
+
|
|
2086
|
+
add_text_overlay_parser = subparsers.add_parser(
|
|
2087
|
+
"add-text-overlay", help="Add a subtitle-style text overlay via the Captions API (no title-creation API exists)"
|
|
2088
|
+
)
|
|
2089
|
+
add_text_overlay_parser.add_argument("--text", required=True, help="Text content to display")
|
|
2090
|
+
add_text_overlay_parser.add_argument("--start-seconds", type=float, help="Start time in seconds (default: 0)")
|
|
2091
|
+
add_text_overlay_parser.add_argument("--duration-seconds", type=float, help="Duration in seconds (default: 5)")
|
|
2092
|
+
add_text_overlay_parser.add_argument(
|
|
2093
|
+
"--caption-format", choices=["subtitle", "608", "708", "teletext"], help="Caption format (default: subtitle)"
|
|
2094
|
+
)
|
|
2095
|
+
|
|
2096
|
+
import_mogrt_parser = subparsers.add_parser(
|
|
2097
|
+
"import-mogrt", help="Import a .mogrt file directly onto the timeline"
|
|
2098
|
+
)
|
|
2099
|
+
import_mogrt_parser.add_argument("--mogrt-path", required=True, help="Full path to the .mogrt file")
|
|
2100
|
+
import_mogrt_parser.add_argument("--start-seconds", type=float, required=True, help="Start time on the timeline, in seconds")
|
|
2101
|
+
import_mogrt_parser.add_argument("--video-track-index", type=int, required=True, help="0-based video track index")
|
|
2102
|
+
import_mogrt_parser.add_argument("--audio-track-index", type=int, required=True, help="0-based audio track index")
|
|
2103
|
+
import_mogrt_parser.add_argument(
|
|
2104
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
2105
|
+
)
|
|
2106
|
+
|
|
2107
|
+
import_mogrt_from_library_parser = subparsers.add_parser(
|
|
2108
|
+
"import-mogrt-from-library", help="Import a MOGRT from an Adobe Library by name"
|
|
2109
|
+
)
|
|
2110
|
+
import_mogrt_from_library_parser.add_argument("--library-name", required=True, help="Name of the Adobe Library containing the MOGRT")
|
|
2111
|
+
import_mogrt_from_library_parser.add_argument("--mogrt-name", required=True, help="Name of the MOGRT within the library")
|
|
2112
|
+
import_mogrt_from_library_parser.add_argument("--start-seconds", type=float, required=True, help="Start time on the timeline, in seconds")
|
|
2113
|
+
import_mogrt_from_library_parser.add_argument("--video-track-index", type=int, required=True, help="0-based video track index")
|
|
2114
|
+
import_mogrt_from_library_parser.add_argument("--audio-track-index", type=int, required=True, help="0-based audio track index")
|
|
2115
|
+
import_mogrt_from_library_parser.add_argument(
|
|
2116
|
+
"--sequence-name", help="Name of the sequence to edit (default: the currently active sequence)"
|
|
2117
|
+
)
|
|
2118
|
+
|
|
2119
|
+
get_mogrt_component_parser = subparsers.add_parser(
|
|
2120
|
+
"get-mogrt-component", help="Read a MOGRT clip's component parameters"
|
|
2121
|
+
)
|
|
2122
|
+
get_mogrt_component_parser.add_argument("--track-type", required=True, choices=["video", "audio"], help="Track type the clip is on")
|
|
2123
|
+
get_mogrt_component_parser.add_argument("--track-index", type=int, required=True, help="0-based index of the track")
|
|
2124
|
+
get_mogrt_component_parser.add_argument("--clip-index", type=int, required=True, help="0-based index of the clip on that track")
|
|
2125
|
+
get_mogrt_component_parser.add_argument(
|
|
2126
|
+
"--sequence-name", help="Name of the sequence to read (default: the currently active sequence)"
|
|
2127
|
+
)
|
|
2128
|
+
|
|
2129
|
+
create_caption_track_parser = subparsers.add_parser(
|
|
2130
|
+
"create-caption-track", help="Create a caption/subtitle track from an imported caption project item (e.g. .srt)"
|
|
2131
|
+
)
|
|
2132
|
+
create_caption_track_parser.add_argument("--node-id", help="Node ID of the caption project item (either this or --name is required)")
|
|
2133
|
+
create_caption_track_parser.add_argument("--name", help="Exact name of the caption project item (either this or --node-id is required)")
|
|
2134
|
+
create_caption_track_parser.add_argument("--start-seconds", type=float, required=True, help="Offset in seconds from the start of the sequence")
|
|
2135
|
+
create_caption_track_parser.add_argument(
|
|
2136
|
+
"--format", choices=["subtitle", "608", "708", "teletext", "ebu", "op42", "op47"], help="Caption format (default: subtitle)"
|
|
2137
|
+
)
|
|
2138
|
+
|
|
2139
|
+
replace_clip_media_parser = subparsers.add_parser(
|
|
2140
|
+
"replace-clip-media", help="Destructive-ish: swap a project item's underlying media file"
|
|
2141
|
+
)
|
|
2142
|
+
replace_clip_media_parser.add_argument("--node-id", help="Node ID of the project item (either this or --name is required)")
|
|
2143
|
+
replace_clip_media_parser.add_argument("--name", help="Exact name of the project item (either this or --node-id is required)")
|
|
2144
|
+
replace_clip_media_parser.add_argument("--new-media-path", required=True, help="Full path to the replacement media file")
|
|
2145
|
+
|
|
2146
|
+
args = parser.parse_args()
|
|
2147
|
+
|
|
2148
|
+
# Local setup subcommands — handled entirely in Python, never sent to the
|
|
2149
|
+
# panel's /command endpoint.
|
|
2150
|
+
if args.subcommand == "install-panel":
|
|
2151
|
+
from premiere_cli import panel_install
|
|
2152
|
+
|
|
2153
|
+
sys.exit(panel_install.install_panel(symlink=args.symlink))
|
|
2154
|
+
if args.subcommand == "doctor":
|
|
2155
|
+
from premiere_cli import panel_install
|
|
2156
|
+
|
|
2157
|
+
sys.exit(panel_install.doctor(port=args.port))
|
|
2158
|
+
|
|
2159
|
+
if args.subcommand == "create-sequence":
|
|
2160
|
+
command_args = {"name": args.name, "bin": args.bin, "fps": args.fps, "width": args.width, "height": args.height}
|
|
2161
|
+
elif args.subcommand == "extract-audio-track":
|
|
2162
|
+
if (args.start_seconds is None) != (args.end_seconds is None):
|
|
2163
|
+
parser.error("--start-seconds and --end-seconds must be given together, or not at all")
|
|
2164
|
+
command_args = {
|
|
2165
|
+
"outputPath": args.output,
|
|
2166
|
+
"audioTrackIndex": args.audio_track_index,
|
|
2167
|
+
"sequenceName": args.sequence_name,
|
|
2168
|
+
"startSeconds": args.start_seconds,
|
|
2169
|
+
"endSeconds": args.end_seconds,
|
|
2170
|
+
"format": args.format,
|
|
2171
|
+
"presetPath": args.preset_path,
|
|
2172
|
+
}
|
|
2173
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2174
|
+
elif args.subcommand == "remove-track-intervals":
|
|
2175
|
+
try:
|
|
2176
|
+
intervals = _parse_intervals_file(args.intervals_file)
|
|
2177
|
+
except (OSError, ValueError) as exc:
|
|
2178
|
+
parser.error(str(exc))
|
|
2179
|
+
if not intervals:
|
|
2180
|
+
parser.error(f"no intervals found in {args.intervals_file}")
|
|
2181
|
+
command_args = {
|
|
2182
|
+
"sequenceName": args.sequence_name,
|
|
2183
|
+
"audioTrackIndex": args.audio_track_index,
|
|
2184
|
+
"videoTrackIndices": args.video_track_index or [],
|
|
2185
|
+
"intervals": intervals,
|
|
2186
|
+
}
|
|
2187
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2188
|
+
elif args.subcommand == "export-frame":
|
|
2189
|
+
command_args = {
|
|
2190
|
+
"outputPath": args.output,
|
|
2191
|
+
"timecode": args.timecode,
|
|
2192
|
+
"sequenceName": args.sequence_name,
|
|
2193
|
+
}
|
|
2194
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2195
|
+
elif args.subcommand == "move-playhead":
|
|
2196
|
+
if (args.timecode is None) == (args.seconds is None):
|
|
2197
|
+
parser.error("exactly one of --timecode or --seconds is required")
|
|
2198
|
+
command_args = {
|
|
2199
|
+
"timecode": args.timecode,
|
|
2200
|
+
"seconds": args.seconds,
|
|
2201
|
+
"sequenceName": args.sequence_name,
|
|
2202
|
+
}
|
|
2203
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2204
|
+
elif args.subcommand == "search-project-items":
|
|
2205
|
+
if not any([args.name_contains, args.extension, args.offline_only, args.color_label is not None]):
|
|
2206
|
+
parser.error("at least one of --name-contains, --extension, --offline-only, --color-label is required")
|
|
2207
|
+
command_args = {
|
|
2208
|
+
"nameContains": args.name_contains,
|
|
2209
|
+
"extension": args.extension,
|
|
2210
|
+
"colorLabel": args.color_label,
|
|
2211
|
+
}
|
|
2212
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2213
|
+
if args.offline_only:
|
|
2214
|
+
command_args["offlineOnly"] = True
|
|
2215
|
+
elif args.subcommand == "get-full-sequence-info":
|
|
2216
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2217
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2218
|
+
elif args.subcommand == "get-full-clip-info":
|
|
2219
|
+
command_args = {
|
|
2220
|
+
"sequenceName": args.sequence_name,
|
|
2221
|
+
"trackType": args.track_type,
|
|
2222
|
+
"trackIndex": args.track_index,
|
|
2223
|
+
"clipIndex": args.clip_index,
|
|
2224
|
+
}
|
|
2225
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2226
|
+
elif args.subcommand == "get-timeline-summary":
|
|
2227
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2228
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2229
|
+
elif args.subcommand == "debug-qe-try-mutate":
|
|
2230
|
+
command_args = {"sequenceName": args.sequence_name, "skipRemoveTest": args.skip_remove_test}
|
|
2231
|
+
elif args.subcommand == "inspect-dom-object":
|
|
2232
|
+
command_args = {"expression": args.expression}
|
|
2233
|
+
elif args.subcommand == "set-active-project":
|
|
2234
|
+
if not args.name and not args.path:
|
|
2235
|
+
parser.error("at least one of --name, --path is required")
|
|
2236
|
+
command_args = {"name": args.name, "path": args.path}
|
|
2237
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2238
|
+
elif args.subcommand == "get-work-area":
|
|
2239
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2240
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2241
|
+
elif args.subcommand == "set-work-area":
|
|
2242
|
+
command_args = {
|
|
2243
|
+
"startSeconds": args.start_seconds,
|
|
2244
|
+
"endSeconds": args.end_seconds,
|
|
2245
|
+
"sequenceName": args.sequence_name,
|
|
2246
|
+
}
|
|
2247
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2248
|
+
elif args.subcommand == "get-sequence-in-out":
|
|
2249
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2250
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2251
|
+
elif args.subcommand == "set-sequence-in-out":
|
|
2252
|
+
command_args = {
|
|
2253
|
+
"inSeconds": args.in_seconds,
|
|
2254
|
+
"outSeconds": args.out_seconds,
|
|
2255
|
+
"sequenceName": args.sequence_name,
|
|
2256
|
+
}
|
|
2257
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2258
|
+
elif args.subcommand == "is-work-area-enabled":
|
|
2259
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2260
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2261
|
+
elif args.subcommand == "get-export-file-extension":
|
|
2262
|
+
command_args = {"presetPath": args.preset_path, "sequenceName": args.sequence_name}
|
|
2263
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2264
|
+
elif args.subcommand == "set-workspace":
|
|
2265
|
+
command_args = {"name": args.name}
|
|
2266
|
+
elif args.subcommand == "play-source-monitor":
|
|
2267
|
+
command_args = {"speed": args.speed}
|
|
2268
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2269
|
+
elif args.subcommand == "get-bin-contents":
|
|
2270
|
+
command_args = {"binPath": args.bin_path}
|
|
2271
|
+
elif args.subcommand == "get-project-item-info":
|
|
2272
|
+
if not args.node_id and not args.tree_path:
|
|
2273
|
+
parser.error("at least one of --node-id, --tree-path is required")
|
|
2274
|
+
command_args = {"nodeId": args.node_id, "treePath": args.tree_path}
|
|
2275
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2276
|
+
elif args.subcommand == "get-timeline-gaps":
|
|
2277
|
+
command_args = {
|
|
2278
|
+
"sequenceName": args.sequence_name,
|
|
2279
|
+
"trackType": args.track_type,
|
|
2280
|
+
"minGapSeconds": args.min_gap_seconds,
|
|
2281
|
+
}
|
|
2282
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2283
|
+
elif args.subcommand == "get-used-media-report":
|
|
2284
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2285
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2286
|
+
elif args.subcommand == "get-clip-links":
|
|
2287
|
+
command_args = {
|
|
2288
|
+
"sequenceName": args.sequence_name,
|
|
2289
|
+
"trackType": args.track_type,
|
|
2290
|
+
"trackIndex": args.track_index,
|
|
2291
|
+
"clipIndex": args.clip_index,
|
|
2292
|
+
}
|
|
2293
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2294
|
+
elif args.subcommand == "list-markers":
|
|
2295
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2296
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2297
|
+
elif args.subcommand == "get-clip-markers":
|
|
2298
|
+
command_args = {
|
|
2299
|
+
"sequenceName": args.sequence_name,
|
|
2300
|
+
"trackType": args.track_type,
|
|
2301
|
+
"trackIndex": args.track_index,
|
|
2302
|
+
"clipIndex": args.clip_index,
|
|
2303
|
+
}
|
|
2304
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2305
|
+
elif args.subcommand == "get-sequence-markers-by-type":
|
|
2306
|
+
command_args = {"type": args.type, "sequenceName": args.sequence_name}
|
|
2307
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2308
|
+
elif args.subcommand in (
|
|
2309
|
+
"get-item-metadata",
|
|
2310
|
+
"get-color-label",
|
|
2311
|
+
"get-footage-interpretation",
|
|
2312
|
+
"get-xmp-metadata",
|
|
2313
|
+
"get-color-space",
|
|
2314
|
+
):
|
|
2315
|
+
if not args.node_id and not args.name:
|
|
2316
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2317
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
2318
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2319
|
+
elif args.subcommand == "get-clip-at-position":
|
|
2320
|
+
if args.track_index is not None and args.track_type is None:
|
|
2321
|
+
parser.error("--track-index requires --track-type")
|
|
2322
|
+
command_args = {
|
|
2323
|
+
"seconds": args.seconds,
|
|
2324
|
+
"trackType": args.track_type,
|
|
2325
|
+
"trackIndex": args.track_index,
|
|
2326
|
+
"sequenceName": args.sequence_name,
|
|
2327
|
+
}
|
|
2328
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2329
|
+
elif args.subcommand == "get-clip-at-playhead":
|
|
2330
|
+
command_args = {"trackType": args.track_type, "sequenceName": args.sequence_name}
|
|
2331
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2332
|
+
elif args.subcommand == "get-next-edit-point":
|
|
2333
|
+
command_args = {
|
|
2334
|
+
"direction": args.direction,
|
|
2335
|
+
"trackType": args.track_type,
|
|
2336
|
+
"sequenceName": args.sequence_name,
|
|
2337
|
+
}
|
|
2338
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2339
|
+
elif args.subcommand == "get-total-clip-count":
|
|
2340
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2341
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2342
|
+
elif args.subcommand == "get-target-tracks":
|
|
2343
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2344
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2345
|
+
elif args.subcommand == "get-track-info":
|
|
2346
|
+
command_args = {
|
|
2347
|
+
"trackType": args.track_type,
|
|
2348
|
+
"trackIndex": args.track_index,
|
|
2349
|
+
"sequenceName": args.sequence_name,
|
|
2350
|
+
}
|
|
2351
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2352
|
+
elif args.subcommand == "get-encoder-presets":
|
|
2353
|
+
command_args = {"format": args.format}
|
|
2354
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2355
|
+
elif args.subcommand == "get-qe-clip-info":
|
|
2356
|
+
command_args = {
|
|
2357
|
+
"trackType": args.track_type,
|
|
2358
|
+
"trackIndex": args.track_index,
|
|
2359
|
+
"clipIndex": args.clip_index,
|
|
2360
|
+
"sequenceName": args.sequence_name,
|
|
2361
|
+
}
|
|
2362
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2363
|
+
elif args.subcommand == "get-clip-adjustment-layer":
|
|
2364
|
+
command_args = {
|
|
2365
|
+
"trackType": args.track_type,
|
|
2366
|
+
"trackIndex": args.track_index,
|
|
2367
|
+
"clipIndex": args.clip_index,
|
|
2368
|
+
"sequenceName": args.sequence_name,
|
|
2369
|
+
}
|
|
2370
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2371
|
+
elif args.subcommand == "add-marker":
|
|
2372
|
+
command_args = {
|
|
2373
|
+
"seconds": args.seconds,
|
|
2374
|
+
"name": args.name,
|
|
2375
|
+
"comments": args.comments,
|
|
2376
|
+
"type": args.type,
|
|
2377
|
+
"durationSeconds": args.duration_seconds,
|
|
2378
|
+
"colorIndex": args.color_index,
|
|
2379
|
+
"sequenceName": args.sequence_name,
|
|
2380
|
+
}
|
|
2381
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2382
|
+
elif args.subcommand == "update-marker":
|
|
2383
|
+
command_args = {
|
|
2384
|
+
"guid": args.guid,
|
|
2385
|
+
"name": args.name,
|
|
2386
|
+
"comments": args.comments,
|
|
2387
|
+
"type": args.type,
|
|
2388
|
+
"colorIndex": args.color_index,
|
|
2389
|
+
"durationSeconds": args.duration_seconds,
|
|
2390
|
+
"endSeconds": args.end_seconds,
|
|
2391
|
+
"sequenceName": args.sequence_name,
|
|
2392
|
+
}
|
|
2393
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2394
|
+
elif args.subcommand == "delete-marker":
|
|
2395
|
+
if not args.guid and not args.marker_name:
|
|
2396
|
+
parser.error("one of --guid, --marker-name is required")
|
|
2397
|
+
command_args = {
|
|
2398
|
+
"guid": args.guid,
|
|
2399
|
+
"markerName": args.marker_name,
|
|
2400
|
+
"sequenceName": args.sequence_name,
|
|
2401
|
+
"nodeId": args.node_id,
|
|
2402
|
+
"itemName": args.item_name,
|
|
2403
|
+
}
|
|
2404
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2405
|
+
elif args.subcommand == "add-marker-to-project-item":
|
|
2406
|
+
if not args.node_id and not args.name:
|
|
2407
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2408
|
+
command_args = {
|
|
2409
|
+
"nodeId": args.node_id,
|
|
2410
|
+
"name": args.name,
|
|
2411
|
+
"seconds": args.seconds,
|
|
2412
|
+
"markerName": args.marker_name,
|
|
2413
|
+
"comments": args.comments,
|
|
2414
|
+
"type": args.type,
|
|
2415
|
+
"durationSeconds": args.duration_seconds,
|
|
2416
|
+
"colorIndex": args.color_index,
|
|
2417
|
+
}
|
|
2418
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2419
|
+
elif args.subcommand == "undo":
|
|
2420
|
+
command_args = {"count": args.count}
|
|
2421
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2422
|
+
elif args.subcommand == "move-playhead-to-edit":
|
|
2423
|
+
command_args = {"direction": args.direction, "sequenceName": args.sequence_name}
|
|
2424
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2425
|
+
elif args.subcommand == "set-poster-frame":
|
|
2426
|
+
if not args.node_id and not args.name:
|
|
2427
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2428
|
+
command_args = {"nodeId": args.node_id, "name": args.name, "seconds": args.seconds}
|
|
2429
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2430
|
+
elif args.subcommand == "select-project-item":
|
|
2431
|
+
if not args.node_id and not args.name:
|
|
2432
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2433
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
2434
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2435
|
+
elif args.subcommand == "select-clips-by-name":
|
|
2436
|
+
command_args = {
|
|
2437
|
+
"nameContains": args.name_contains,
|
|
2438
|
+
"addToSelection": args.add_to_selection,
|
|
2439
|
+
"sequenceName": args.sequence_name,
|
|
2440
|
+
}
|
|
2441
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2442
|
+
elif args.subcommand == "select-all-clips":
|
|
2443
|
+
command_args = {"trackType": args.track_type, "sequenceName": args.sequence_name}
|
|
2444
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2445
|
+
elif args.subcommand == "deselect-all-clips":
|
|
2446
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2447
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2448
|
+
elif args.subcommand == "select-clips-in-range":
|
|
2449
|
+
command_args = {
|
|
2450
|
+
"startSeconds": args.start_seconds,
|
|
2451
|
+
"endSeconds": args.end_seconds,
|
|
2452
|
+
"sequenceName": args.sequence_name,
|
|
2453
|
+
}
|
|
2454
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2455
|
+
elif args.subcommand == "select-clips-by-color":
|
|
2456
|
+
command_args = {"colorLabel": args.color_label, "sequenceName": args.sequence_name}
|
|
2457
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2458
|
+
elif args.subcommand == "invert-selection":
|
|
2459
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2460
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2461
|
+
elif args.subcommand == "select-disabled-clips":
|
|
2462
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
2463
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2464
|
+
elif args.subcommand == "set-clip-selection":
|
|
2465
|
+
command_args = {
|
|
2466
|
+
"trackType": args.track_type,
|
|
2467
|
+
"trackIndex": args.track_index,
|
|
2468
|
+
"clipIndex": args.clip_index,
|
|
2469
|
+
"selected": args.selected,
|
|
2470
|
+
"sequenceName": args.sequence_name,
|
|
2471
|
+
}
|
|
2472
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2473
|
+
elif args.subcommand == "add-track":
|
|
2474
|
+
command_args = {
|
|
2475
|
+
"trackType": args.track_type,
|
|
2476
|
+
"index": args.index,
|
|
2477
|
+
"count": args.count,
|
|
2478
|
+
"sequenceName": args.sequence_name,
|
|
2479
|
+
}
|
|
2480
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2481
|
+
elif args.subcommand == "lock-track":
|
|
2482
|
+
command_args = {
|
|
2483
|
+
"trackType": args.track_type,
|
|
2484
|
+
"trackIndex": args.track_index,
|
|
2485
|
+
"locked": args.locked == "true",
|
|
2486
|
+
"sequenceName": args.sequence_name,
|
|
2487
|
+
}
|
|
2488
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2489
|
+
elif args.subcommand == "set-track-visibility":
|
|
2490
|
+
command_args = {
|
|
2491
|
+
"trackType": "video",
|
|
2492
|
+
"trackIndex": args.track_index,
|
|
2493
|
+
"visible": args.visible == "true",
|
|
2494
|
+
"sequenceName": args.sequence_name,
|
|
2495
|
+
}
|
|
2496
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2497
|
+
elif args.subcommand == "set-track-mute":
|
|
2498
|
+
command_args = {
|
|
2499
|
+
"trackType": args.track_type,
|
|
2500
|
+
"trackIndex": args.track_index,
|
|
2501
|
+
"muted": args.muted == "true",
|
|
2502
|
+
"sequenceName": args.sequence_name,
|
|
2503
|
+
}
|
|
2504
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2505
|
+
elif args.subcommand == "rename-track":
|
|
2506
|
+
command_args = {
|
|
2507
|
+
"trackType": args.track_type,
|
|
2508
|
+
"trackIndex": args.track_index,
|
|
2509
|
+
"name": args.name,
|
|
2510
|
+
"sequenceName": args.sequence_name,
|
|
2511
|
+
}
|
|
2512
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2513
|
+
elif args.subcommand == "set-target-track":
|
|
2514
|
+
command_args = {
|
|
2515
|
+
"trackType": args.track_type,
|
|
2516
|
+
"trackIndex": args.track_index,
|
|
2517
|
+
"targeted": args.targeted == "true",
|
|
2518
|
+
"sequenceName": args.sequence_name,
|
|
2519
|
+
}
|
|
2520
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2521
|
+
elif args.subcommand == "set-all-tracks-targeted":
|
|
2522
|
+
command_args = {
|
|
2523
|
+
"targeted": args.targeted == "true",
|
|
2524
|
+
"trackType": args.track_type,
|
|
2525
|
+
"sequenceName": args.sequence_name,
|
|
2526
|
+
}
|
|
2527
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2528
|
+
elif args.subcommand == "set-clip-position":
|
|
2529
|
+
command_args = {
|
|
2530
|
+
"trackType": args.track_type,
|
|
2531
|
+
"trackIndex": args.track_index,
|
|
2532
|
+
"clipIndex": args.clip_index,
|
|
2533
|
+
"x": args.x,
|
|
2534
|
+
"y": args.y,
|
|
2535
|
+
"sequenceName": args.sequence_name,
|
|
2536
|
+
}
|
|
2537
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2538
|
+
elif args.subcommand == "set-clip-scale":
|
|
2539
|
+
command_args = {
|
|
2540
|
+
"trackType": args.track_type,
|
|
2541
|
+
"trackIndex": args.track_index,
|
|
2542
|
+
"clipIndex": args.clip_index,
|
|
2543
|
+
"scale": args.scale,
|
|
2544
|
+
"sequenceName": args.sequence_name,
|
|
2545
|
+
}
|
|
2546
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2547
|
+
elif args.subcommand == "set-clip-rotation":
|
|
2548
|
+
command_args = {
|
|
2549
|
+
"trackType": args.track_type,
|
|
2550
|
+
"trackIndex": args.track_index,
|
|
2551
|
+
"clipIndex": args.clip_index,
|
|
2552
|
+
"degrees": args.degrees,
|
|
2553
|
+
"sequenceName": args.sequence_name,
|
|
2554
|
+
}
|
|
2555
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2556
|
+
elif args.subcommand == "set-clip-anchor-point":
|
|
2557
|
+
command_args = {
|
|
2558
|
+
"trackType": args.track_type,
|
|
2559
|
+
"trackIndex": args.track_index,
|
|
2560
|
+
"clipIndex": args.clip_index,
|
|
2561
|
+
"x": args.x,
|
|
2562
|
+
"y": args.y,
|
|
2563
|
+
"sequenceName": args.sequence_name,
|
|
2564
|
+
}
|
|
2565
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2566
|
+
elif args.subcommand == "set-clip-opacity":
|
|
2567
|
+
command_args = {
|
|
2568
|
+
"trackType": args.track_type,
|
|
2569
|
+
"trackIndex": args.track_index,
|
|
2570
|
+
"clipIndex": args.clip_index,
|
|
2571
|
+
"opacity": args.opacity,
|
|
2572
|
+
"sequenceName": args.sequence_name,
|
|
2573
|
+
}
|
|
2574
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2575
|
+
elif args.subcommand == "set-uniform-scale":
|
|
2576
|
+
command_args = {
|
|
2577
|
+
"trackType": args.track_type,
|
|
2578
|
+
"trackIndex": args.track_index,
|
|
2579
|
+
"clipIndex": args.clip_index,
|
|
2580
|
+
"uniform": args.uniform == "true",
|
|
2581
|
+
"sequenceName": args.sequence_name,
|
|
2582
|
+
}
|
|
2583
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2584
|
+
elif args.subcommand == "set-scale-width-height":
|
|
2585
|
+
if args.scale_width is None and args.scale_height is None:
|
|
2586
|
+
parser.error("at least one of --scale-width or --scale-height is required")
|
|
2587
|
+
command_args = {
|
|
2588
|
+
"trackType": args.track_type,
|
|
2589
|
+
"trackIndex": args.track_index,
|
|
2590
|
+
"clipIndex": args.clip_index,
|
|
2591
|
+
"scaleWidth": args.scale_width,
|
|
2592
|
+
"scaleHeight": args.scale_height,
|
|
2593
|
+
"sequenceName": args.sequence_name,
|
|
2594
|
+
}
|
|
2595
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2596
|
+
elif args.subcommand == "set-anti-alias-quality":
|
|
2597
|
+
command_args = {
|
|
2598
|
+
"trackType": args.track_type,
|
|
2599
|
+
"trackIndex": args.track_index,
|
|
2600
|
+
"clipIndex": args.clip_index,
|
|
2601
|
+
"amount": args.amount,
|
|
2602
|
+
"sequenceName": args.sequence_name,
|
|
2603
|
+
}
|
|
2604
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2605
|
+
elif args.subcommand == "set-blend-mode":
|
|
2606
|
+
command_args = {
|
|
2607
|
+
"trackType": args.track_type,
|
|
2608
|
+
"trackIndex": args.track_index,
|
|
2609
|
+
"clipIndex": args.clip_index,
|
|
2610
|
+
"blendMode": args.blend_mode,
|
|
2611
|
+
"sequenceName": args.sequence_name,
|
|
2612
|
+
}
|
|
2613
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2614
|
+
elif args.subcommand == "set-clip-volume":
|
|
2615
|
+
command_args = {
|
|
2616
|
+
"trackType": args.track_type,
|
|
2617
|
+
"trackIndex": args.track_index,
|
|
2618
|
+
"clipIndex": args.clip_index,
|
|
2619
|
+
"db": args.db,
|
|
2620
|
+
"sequenceName": args.sequence_name,
|
|
2621
|
+
}
|
|
2622
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2623
|
+
elif args.subcommand == "set-clip-pan":
|
|
2624
|
+
command_args = {
|
|
2625
|
+
"trackType": args.track_type,
|
|
2626
|
+
"trackIndex": args.track_index,
|
|
2627
|
+
"clipIndex": args.clip_index,
|
|
2628
|
+
"pan": args.pan,
|
|
2629
|
+
"sequenceName": args.sequence_name,
|
|
2630
|
+
}
|
|
2631
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2632
|
+
elif args.subcommand == "adjust-audio-levels":
|
|
2633
|
+
command_args = {
|
|
2634
|
+
"trackType": args.track_type,
|
|
2635
|
+
"trackIndex": args.track_index,
|
|
2636
|
+
"clipIndex": args.clip_index,
|
|
2637
|
+
"db": args.db,
|
|
2638
|
+
"sequenceName": args.sequence_name,
|
|
2639
|
+
}
|
|
2640
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2641
|
+
elif args.subcommand == "add-audio-keyframes":
|
|
2642
|
+
try:
|
|
2643
|
+
json.loads(args.keyframes)
|
|
2644
|
+
except json.JSONDecodeError as exc:
|
|
2645
|
+
parser.error(f"--keyframes is not valid JSON: {exc}")
|
|
2646
|
+
command_args = {
|
|
2647
|
+
"trackType": args.track_type,
|
|
2648
|
+
"trackIndex": args.track_index,
|
|
2649
|
+
"clipIndex": args.clip_index,
|
|
2650
|
+
"keyframes": args.keyframes,
|
|
2651
|
+
"sequenceName": args.sequence_name,
|
|
2652
|
+
}
|
|
2653
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2654
|
+
elif args.subcommand == "rename-clip":
|
|
2655
|
+
command_args = {
|
|
2656
|
+
"trackType": args.track_type,
|
|
2657
|
+
"trackIndex": args.track_index,
|
|
2658
|
+
"clipIndex": args.clip_index,
|
|
2659
|
+
"name": args.name,
|
|
2660
|
+
"sequenceName": args.sequence_name,
|
|
2661
|
+
}
|
|
2662
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2663
|
+
elif args.subcommand == "batch-rename-clips":
|
|
2664
|
+
command_args = {
|
|
2665
|
+
"trackType": args.track_type,
|
|
2666
|
+
"trackIndex": args.track_index,
|
|
2667
|
+
"newNameTemplate": args.new_name_template,
|
|
2668
|
+
"nameContains": args.name_contains,
|
|
2669
|
+
"startNumber": args.start_number,
|
|
2670
|
+
"sequenceName": args.sequence_name,
|
|
2671
|
+
}
|
|
2672
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2673
|
+
elif args.subcommand == "set-clip-enabled":
|
|
2674
|
+
command_args = {
|
|
2675
|
+
"trackType": args.track_type,
|
|
2676
|
+
"trackIndex": args.track_index,
|
|
2677
|
+
"clipIndex": args.clip_index,
|
|
2678
|
+
"enabled": args.enabled == "true",
|
|
2679
|
+
"sequenceName": args.sequence_name,
|
|
2680
|
+
}
|
|
2681
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2682
|
+
elif args.subcommand == "batch-set-clips-enabled":
|
|
2683
|
+
command_args = {
|
|
2684
|
+
"enabled": args.enabled == "true",
|
|
2685
|
+
"nameContains": args.name_contains,
|
|
2686
|
+
"trackType": args.track_type,
|
|
2687
|
+
"sequenceName": args.sequence_name,
|
|
2688
|
+
}
|
|
2689
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2690
|
+
elif args.subcommand == "set-frame-blend":
|
|
2691
|
+
command_args = {
|
|
2692
|
+
"trackType": args.track_type,
|
|
2693
|
+
"trackIndex": args.track_index,
|
|
2694
|
+
"clipIndex": args.clip_index,
|
|
2695
|
+
"enabled": args.enabled == "true",
|
|
2696
|
+
"sequenceName": args.sequence_name,
|
|
2697
|
+
}
|
|
2698
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2699
|
+
elif args.subcommand == "set-time-interpolation":
|
|
2700
|
+
command_args = {
|
|
2701
|
+
"trackType": args.track_type,
|
|
2702
|
+
"trackIndex": args.track_index,
|
|
2703
|
+
"clipIndex": args.clip_index,
|
|
2704
|
+
"type": args.type,
|
|
2705
|
+
"sequenceName": args.sequence_name,
|
|
2706
|
+
}
|
|
2707
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2708
|
+
elif args.subcommand == "set-clip-properties":
|
|
2709
|
+
if not any([
|
|
2710
|
+
args.opacity is not None, args.speed is not None, args.scale is not None,
|
|
2711
|
+
args.position_x is not None, args.position_y is not None, args.rotation is not None,
|
|
2712
|
+
]):
|
|
2713
|
+
parser.error("at least one of --opacity, --speed, --scale, --position-x, --position-y, --rotation is required")
|
|
2714
|
+
command_args = {
|
|
2715
|
+
"trackType": args.track_type,
|
|
2716
|
+
"trackIndex": args.track_index,
|
|
2717
|
+
"clipIndex": args.clip_index,
|
|
2718
|
+
"opacity": args.opacity,
|
|
2719
|
+
"speed": args.speed,
|
|
2720
|
+
"scale": args.scale,
|
|
2721
|
+
"positionX": args.position_x,
|
|
2722
|
+
"positionY": args.position_y,
|
|
2723
|
+
"rotation": args.rotation,
|
|
2724
|
+
"sequenceName": args.sequence_name,
|
|
2725
|
+
}
|
|
2726
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2727
|
+
elif args.subcommand == "set-item-metadata":
|
|
2728
|
+
if not args.node_id and not args.name:
|
|
2729
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2730
|
+
command_args = {
|
|
2731
|
+
"nodeId": args.node_id,
|
|
2732
|
+
"name": args.name,
|
|
2733
|
+
"fieldPath": args.field_path,
|
|
2734
|
+
"value": args.value,
|
|
2735
|
+
}
|
|
2736
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2737
|
+
elif args.subcommand == "set-color-label":
|
|
2738
|
+
if not args.node_id and not args.name:
|
|
2739
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2740
|
+
command_args = {
|
|
2741
|
+
"nodeId": args.node_id,
|
|
2742
|
+
"name": args.name,
|
|
2743
|
+
"colorLabel": args.color_label,
|
|
2744
|
+
}
|
|
2745
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2746
|
+
elif args.subcommand == "set-footage-interpretation":
|
|
2747
|
+
if not args.node_id and not args.name:
|
|
2748
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2749
|
+
if (
|
|
2750
|
+
args.frame_rate is None
|
|
2751
|
+
and args.pixel_aspect_ratio is None
|
|
2752
|
+
and args.field_type is None
|
|
2753
|
+
and args.alpha_usage is None
|
|
2754
|
+
):
|
|
2755
|
+
parser.error("at least one of --frame-rate, --pixel-aspect-ratio, --field-type, --alpha-usage is required")
|
|
2756
|
+
command_args = {
|
|
2757
|
+
"nodeId": args.node_id,
|
|
2758
|
+
"name": args.name,
|
|
2759
|
+
"frameRate": args.frame_rate,
|
|
2760
|
+
"pixelAspectRatio": args.pixel_aspect_ratio,
|
|
2761
|
+
"fieldType": args.field_type,
|
|
2762
|
+
"alphaUsage": args.alpha_usage,
|
|
2763
|
+
}
|
|
2764
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2765
|
+
elif args.subcommand == "set-xmp-metadata":
|
|
2766
|
+
if not args.node_id and not args.name:
|
|
2767
|
+
parser.error("at least one of --node-id, --name is required")
|
|
2768
|
+
if not args.xmp and not args.xmp_file:
|
|
2769
|
+
parser.error("one of --xmp, --xmp-file is required")
|
|
2770
|
+
if args.xmp and args.xmp_file:
|
|
2771
|
+
parser.error("only one of --xmp, --xmp-file may be given")
|
|
2772
|
+
xmp_value = args.xmp
|
|
2773
|
+
if args.xmp_file:
|
|
2774
|
+
try:
|
|
2775
|
+
with open(args.xmp_file, "r", encoding="utf-8") as fh:
|
|
2776
|
+
xmp_value = fh.read()
|
|
2777
|
+
except OSError as exc:
|
|
2778
|
+
parser.error(f"could not read --xmp-file {args.xmp_file}: {exc}")
|
|
2779
|
+
command_args = {
|
|
2780
|
+
"nodeId": args.node_id,
|
|
2781
|
+
"name": args.name,
|
|
2782
|
+
"xmp": xmp_value,
|
|
2783
|
+
}
|
|
2784
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2785
|
+
elif args.subcommand == "apply-effect":
|
|
2786
|
+
command_args = {
|
|
2787
|
+
"trackType": args.track_type,
|
|
2788
|
+
"trackIndex": args.track_index,
|
|
2789
|
+
"clipIndex": args.clip_index,
|
|
2790
|
+
"effectName": args.effect_name,
|
|
2791
|
+
"sequenceName": args.sequence_name,
|
|
2792
|
+
}
|
|
2793
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2794
|
+
elif args.subcommand == "apply-audio-effect":
|
|
2795
|
+
command_args = {
|
|
2796
|
+
"trackType": args.track_type,
|
|
2797
|
+
"trackIndex": args.track_index,
|
|
2798
|
+
"clipIndex": args.clip_index,
|
|
2799
|
+
"effectName": args.effect_name,
|
|
2800
|
+
"sequenceName": args.sequence_name,
|
|
2801
|
+
}
|
|
2802
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2803
|
+
elif args.subcommand == "remove-effect":
|
|
2804
|
+
command_args = {
|
|
2805
|
+
"trackType": args.track_type,
|
|
2806
|
+
"trackIndex": args.track_index,
|
|
2807
|
+
"clipIndex": args.clip_index,
|
|
2808
|
+
"componentIndex": args.component_index,
|
|
2809
|
+
"sequenceName": args.sequence_name,
|
|
2810
|
+
}
|
|
2811
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2812
|
+
elif args.subcommand == "remove-effect-by-name":
|
|
2813
|
+
command_args = {
|
|
2814
|
+
"trackType": args.track_type,
|
|
2815
|
+
"trackIndex": args.track_index,
|
|
2816
|
+
"clipIndex": args.clip_index,
|
|
2817
|
+
"effectName": args.effect_name,
|
|
2818
|
+
"sequenceName": args.sequence_name,
|
|
2819
|
+
}
|
|
2820
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2821
|
+
elif args.subcommand == "remove-all-effects":
|
|
2822
|
+
command_args = {
|
|
2823
|
+
"trackType": args.track_type,
|
|
2824
|
+
"trackIndex": args.track_index,
|
|
2825
|
+
"clipIndex": args.clip_index,
|
|
2826
|
+
"sequenceName": args.sequence_name,
|
|
2827
|
+
}
|
|
2828
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2829
|
+
elif args.subcommand == "color-correct":
|
|
2830
|
+
if not any([
|
|
2831
|
+
args.exposure is not None, args.contrast is not None, args.saturation is not None,
|
|
2832
|
+
args.temperature is not None, args.tint is not None,
|
|
2833
|
+
]):
|
|
2834
|
+
parser.error("at least one of --exposure, --contrast, --saturation, --temperature, --tint is required")
|
|
2835
|
+
command_args = {
|
|
2836
|
+
"trackType": args.track_type,
|
|
2837
|
+
"trackIndex": args.track_index,
|
|
2838
|
+
"clipIndex": args.clip_index,
|
|
2839
|
+
"exposure": args.exposure,
|
|
2840
|
+
"contrast": args.contrast,
|
|
2841
|
+
"saturation": args.saturation,
|
|
2842
|
+
"temperature": args.temperature,
|
|
2843
|
+
"tint": args.tint,
|
|
2844
|
+
"sequenceName": args.sequence_name,
|
|
2845
|
+
}
|
|
2846
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2847
|
+
elif args.subcommand == "apply-lut":
|
|
2848
|
+
command_args = {
|
|
2849
|
+
"trackType": args.track_type,
|
|
2850
|
+
"trackIndex": args.track_index,
|
|
2851
|
+
"clipIndex": args.clip_index,
|
|
2852
|
+
"lutPath": args.lut_path,
|
|
2853
|
+
"sequenceName": args.sequence_name,
|
|
2854
|
+
}
|
|
2855
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2856
|
+
elif args.subcommand == "stabilize-clip":
|
|
2857
|
+
command_args = {
|
|
2858
|
+
"trackType": args.track_type,
|
|
2859
|
+
"trackIndex": args.track_index,
|
|
2860
|
+
"clipIndex": args.clip_index,
|
|
2861
|
+
"smoothness": args.smoothness,
|
|
2862
|
+
"method": args.method,
|
|
2863
|
+
"sequenceName": args.sequence_name,
|
|
2864
|
+
}
|
|
2865
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2866
|
+
elif args.subcommand in ("copy-effects-between-clips", "copy-effect-values"):
|
|
2867
|
+
command_args = {
|
|
2868
|
+
"sourceSequenceName": args.source_sequence_name,
|
|
2869
|
+
"sourceTrackType": args.source_track_type,
|
|
2870
|
+
"sourceTrackIndex": args.source_track_index,
|
|
2871
|
+
"sourceClipIndex": args.source_clip_index,
|
|
2872
|
+
"targetSequenceName": args.target_sequence_name,
|
|
2873
|
+
"targetTrackType": args.target_track_type,
|
|
2874
|
+
"targetTrackIndex": args.target_track_index,
|
|
2875
|
+
"targetClipIndex": args.target_clip_index,
|
|
2876
|
+
"effectName": args.effect_name,
|
|
2877
|
+
}
|
|
2878
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2879
|
+
elif args.subcommand == "batch-apply-effect":
|
|
2880
|
+
command_args = {
|
|
2881
|
+
"effectName": args.effect_name,
|
|
2882
|
+
"nameContains": args.name_contains,
|
|
2883
|
+
"trackType": args.track_type,
|
|
2884
|
+
"trackIndex": args.track_index,
|
|
2885
|
+
"sequenceName": args.sequence_name,
|
|
2886
|
+
}
|
|
2887
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2888
|
+
elif args.subcommand == "get-effect-properties":
|
|
2889
|
+
command_args = {
|
|
2890
|
+
"trackType": args.track_type,
|
|
2891
|
+
"trackIndex": args.track_index,
|
|
2892
|
+
"clipIndex": args.clip_index,
|
|
2893
|
+
"componentName": args.component_name,
|
|
2894
|
+
"sequenceName": args.sequence_name,
|
|
2895
|
+
}
|
|
2896
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2897
|
+
elif args.subcommand == "set-effect-property":
|
|
2898
|
+
if args.value_type == "number":
|
|
2899
|
+
try:
|
|
2900
|
+
coerced_value = float(args.value)
|
|
2901
|
+
except ValueError:
|
|
2902
|
+
parser.error(f"--value {args.value!r} is not a valid number for --value-type number")
|
|
2903
|
+
elif args.value_type == "boolean":
|
|
2904
|
+
lowered = args.value.strip().lower()
|
|
2905
|
+
if lowered not in ("true", "false"):
|
|
2906
|
+
parser.error(f"--value {args.value!r} must be 'true' or 'false' for --value-type boolean")
|
|
2907
|
+
coerced_value = lowered == "true"
|
|
2908
|
+
else:
|
|
2909
|
+
coerced_value = args.value
|
|
2910
|
+
command_args = {
|
|
2911
|
+
"trackType": args.track_type,
|
|
2912
|
+
"trackIndex": args.track_index,
|
|
2913
|
+
"clipIndex": args.clip_index,
|
|
2914
|
+
"componentName": args.component_name,
|
|
2915
|
+
"propertyName": args.property_name,
|
|
2916
|
+
"value": coerced_value,
|
|
2917
|
+
"valueType": args.value_type,
|
|
2918
|
+
"sequenceName": args.sequence_name,
|
|
2919
|
+
}
|
|
2920
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2921
|
+
elif args.subcommand == "get-keyframes":
|
|
2922
|
+
command_args = {
|
|
2923
|
+
"trackType": args.track_type,
|
|
2924
|
+
"trackIndex": args.track_index,
|
|
2925
|
+
"clipIndex": args.clip_index,
|
|
2926
|
+
"componentName": args.component_name,
|
|
2927
|
+
"propertyName": args.property_name,
|
|
2928
|
+
"sequenceName": args.sequence_name,
|
|
2929
|
+
}
|
|
2930
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2931
|
+
elif args.subcommand == "add-keyframe":
|
|
2932
|
+
command_args = {
|
|
2933
|
+
"trackType": args.track_type,
|
|
2934
|
+
"trackIndex": args.track_index,
|
|
2935
|
+
"clipIndex": args.clip_index,
|
|
2936
|
+
"componentName": args.component_name,
|
|
2937
|
+
"propertyName": args.property_name,
|
|
2938
|
+
"seconds": args.seconds,
|
|
2939
|
+
"value": args.value,
|
|
2940
|
+
"sequenceName": args.sequence_name,
|
|
2941
|
+
}
|
|
2942
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2943
|
+
elif args.subcommand == "remove-keyframe":
|
|
2944
|
+
command_args = {
|
|
2945
|
+
"trackType": args.track_type,
|
|
2946
|
+
"trackIndex": args.track_index,
|
|
2947
|
+
"clipIndex": args.clip_index,
|
|
2948
|
+
"componentName": args.component_name,
|
|
2949
|
+
"propertyName": args.property_name,
|
|
2950
|
+
"seconds": args.seconds,
|
|
2951
|
+
"sequenceName": args.sequence_name,
|
|
2952
|
+
}
|
|
2953
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2954
|
+
elif args.subcommand == "remove-keyframe-range":
|
|
2955
|
+
command_args = {
|
|
2956
|
+
"trackType": args.track_type,
|
|
2957
|
+
"trackIndex": args.track_index,
|
|
2958
|
+
"clipIndex": args.clip_index,
|
|
2959
|
+
"componentName": args.component_name,
|
|
2960
|
+
"propertyName": args.property_name,
|
|
2961
|
+
"startSeconds": args.start_seconds,
|
|
2962
|
+
"endSeconds": args.end_seconds,
|
|
2963
|
+
"sequenceName": args.sequence_name,
|
|
2964
|
+
}
|
|
2965
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2966
|
+
elif args.subcommand == "set-keyframe-interpolation":
|
|
2967
|
+
command_args = {
|
|
2968
|
+
"trackType": args.track_type,
|
|
2969
|
+
"trackIndex": args.track_index,
|
|
2970
|
+
"clipIndex": args.clip_index,
|
|
2971
|
+
"componentName": args.component_name,
|
|
2972
|
+
"propertyName": args.property_name,
|
|
2973
|
+
"seconds": args.seconds,
|
|
2974
|
+
"interpolationType": args.interpolation_type,
|
|
2975
|
+
"sequenceName": args.sequence_name,
|
|
2976
|
+
}
|
|
2977
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2978
|
+
elif args.subcommand == "get-value-at-time":
|
|
2979
|
+
command_args = {
|
|
2980
|
+
"trackType": args.track_type,
|
|
2981
|
+
"trackIndex": args.track_index,
|
|
2982
|
+
"clipIndex": args.clip_index,
|
|
2983
|
+
"componentName": args.component_name,
|
|
2984
|
+
"propertyName": args.property_name,
|
|
2985
|
+
"seconds": args.seconds,
|
|
2986
|
+
"sequenceName": args.sequence_name,
|
|
2987
|
+
}
|
|
2988
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
2989
|
+
elif args.subcommand == "set-color-value":
|
|
2990
|
+
command_args = {
|
|
2991
|
+
"trackType": args.track_type,
|
|
2992
|
+
"trackIndex": args.track_index,
|
|
2993
|
+
"clipIndex": args.clip_index,
|
|
2994
|
+
"componentName": args.component_name,
|
|
2995
|
+
"propertyName": args.property_name,
|
|
2996
|
+
"alpha": args.alpha,
|
|
2997
|
+
"red": args.red,
|
|
2998
|
+
"green": args.green,
|
|
2999
|
+
"blue": args.blue,
|
|
3000
|
+
"sequenceName": args.sequence_name,
|
|
3001
|
+
}
|
|
3002
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3003
|
+
elif args.subcommand == "add-transition":
|
|
3004
|
+
command_args = {
|
|
3005
|
+
"trackType": args.track_type,
|
|
3006
|
+
"trackIndex": args.track_index,
|
|
3007
|
+
"clipIndex": args.clip_index,
|
|
3008
|
+
"atEnd": args.at_end == "true",
|
|
3009
|
+
"transitionName": args.transition_name,
|
|
3010
|
+
"durationSeconds": args.duration_seconds,
|
|
3011
|
+
"sequenceName": args.sequence_name,
|
|
3012
|
+
}
|
|
3013
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3014
|
+
elif args.subcommand == "batch-add-transitions":
|
|
3015
|
+
command_args = {
|
|
3016
|
+
"trackType": args.track_type,
|
|
3017
|
+
"trackIndex": args.track_index,
|
|
3018
|
+
"atEnd": args.at_end == "true" if args.at_end is not None else None,
|
|
3019
|
+
"transitionName": args.transition_name,
|
|
3020
|
+
"durationSeconds": args.duration_seconds,
|
|
3021
|
+
"sequenceName": args.sequence_name,
|
|
3022
|
+
}
|
|
3023
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3024
|
+
elif args.subcommand == "remove-transition":
|
|
3025
|
+
command_args = {
|
|
3026
|
+
"trackType": args.track_type,
|
|
3027
|
+
"trackIndex": args.track_index,
|
|
3028
|
+
"transitionIndex": args.transition_index,
|
|
3029
|
+
"sequenceName": args.sequence_name,
|
|
3030
|
+
}
|
|
3031
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3032
|
+
elif args.subcommand == "add-to-timeline":
|
|
3033
|
+
if not args.node_id and not args.name:
|
|
3034
|
+
parser.error("either --node-id or --name is required")
|
|
3035
|
+
command_args = {
|
|
3036
|
+
"nodeId": args.node_id,
|
|
3037
|
+
"name": args.name,
|
|
3038
|
+
"trackType": args.track_type,
|
|
3039
|
+
"trackIndex": args.track_index,
|
|
3040
|
+
"startSeconds": args.start_seconds,
|
|
3041
|
+
"mode": args.mode,
|
|
3042
|
+
"sequenceName": args.sequence_name,
|
|
3043
|
+
}
|
|
3044
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3045
|
+
elif args.subcommand == "remove-from-timeline":
|
|
3046
|
+
command_args = {
|
|
3047
|
+
"trackType": args.track_type,
|
|
3048
|
+
"trackIndex": args.track_index,
|
|
3049
|
+
"clipIndex": args.clip_index,
|
|
3050
|
+
"ripple": args.ripple == "true",
|
|
3051
|
+
"sequenceName": args.sequence_name,
|
|
3052
|
+
}
|
|
3053
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3054
|
+
elif args.subcommand == "move-clip":
|
|
3055
|
+
command_args = {
|
|
3056
|
+
"trackType": args.track_type,
|
|
3057
|
+
"trackIndex": args.track_index,
|
|
3058
|
+
"clipIndex": args.clip_index,
|
|
3059
|
+
"startSeconds": args.start_seconds,
|
|
3060
|
+
"sequenceName": args.sequence_name,
|
|
3061
|
+
}
|
|
3062
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3063
|
+
elif args.subcommand == "trim-clip":
|
|
3064
|
+
if args.in_point_seconds is None and args.out_point_seconds is None:
|
|
3065
|
+
parser.error("at least one of --in-point-seconds or --out-point-seconds is required")
|
|
3066
|
+
command_args = {
|
|
3067
|
+
"trackType": args.track_type,
|
|
3068
|
+
"trackIndex": args.track_index,
|
|
3069
|
+
"clipIndex": args.clip_index,
|
|
3070
|
+
"inPointSeconds": args.in_point_seconds,
|
|
3071
|
+
"outPointSeconds": args.out_point_seconds,
|
|
3072
|
+
"sequenceName": args.sequence_name,
|
|
3073
|
+
}
|
|
3074
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3075
|
+
elif args.subcommand == "split-clip":
|
|
3076
|
+
command_args = {
|
|
3077
|
+
"trackType": args.track_type,
|
|
3078
|
+
"trackIndex": args.track_index,
|
|
3079
|
+
"seconds": args.seconds,
|
|
3080
|
+
"sequenceName": args.sequence_name,
|
|
3081
|
+
}
|
|
3082
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3083
|
+
elif args.subcommand == "duplicate-clip":
|
|
3084
|
+
command_args = {
|
|
3085
|
+
"trackType": args.track_type,
|
|
3086
|
+
"trackIndex": args.track_index,
|
|
3087
|
+
"clipIndex": args.clip_index,
|
|
3088
|
+
"targetStartSeconds": args.target_start_seconds,
|
|
3089
|
+
"sequenceName": args.sequence_name,
|
|
3090
|
+
}
|
|
3091
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3092
|
+
elif args.subcommand == "replace-clip":
|
|
3093
|
+
if not args.replacement_node_id and not args.replacement_name:
|
|
3094
|
+
parser.error("either --replacement-node-id or --replacement-name is required")
|
|
3095
|
+
command_args = {
|
|
3096
|
+
"trackType": args.track_type,
|
|
3097
|
+
"trackIndex": args.track_index,
|
|
3098
|
+
"clipIndex": args.clip_index,
|
|
3099
|
+
"replacementNodeId": args.replacement_node_id,
|
|
3100
|
+
"replacementName": args.replacement_name,
|
|
3101
|
+
"sequenceName": args.sequence_name,
|
|
3102
|
+
}
|
|
3103
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3104
|
+
elif args.subcommand == "set-clip-speed":
|
|
3105
|
+
command_args = {
|
|
3106
|
+
"trackType": args.track_type,
|
|
3107
|
+
"trackIndex": args.track_index,
|
|
3108
|
+
"clipIndex": args.clip_index,
|
|
3109
|
+
"speedPercent": args.speed_percent,
|
|
3110
|
+
"ripple": args.ripple == "true" if args.ripple is not None else None,
|
|
3111
|
+
"maintainAudio": args.maintain_audio == "true" if args.maintain_audio is not None else None,
|
|
3112
|
+
"sequenceName": args.sequence_name,
|
|
3113
|
+
}
|
|
3114
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3115
|
+
elif args.subcommand == "get-clip-speed":
|
|
3116
|
+
command_args = {
|
|
3117
|
+
"trackType": args.track_type,
|
|
3118
|
+
"trackIndex": args.track_index,
|
|
3119
|
+
"clipIndex": args.clip_index,
|
|
3120
|
+
"sequenceName": args.sequence_name,
|
|
3121
|
+
}
|
|
3122
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3123
|
+
elif args.subcommand == "ripple-delete-clip":
|
|
3124
|
+
command_args = {
|
|
3125
|
+
"trackType": args.track_type,
|
|
3126
|
+
"trackIndex": args.track_index,
|
|
3127
|
+
"clipIndex": args.clip_index,
|
|
3128
|
+
"sequenceName": args.sequence_name,
|
|
3129
|
+
}
|
|
3130
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3131
|
+
elif args.subcommand == "roll-edit":
|
|
3132
|
+
command_args = {
|
|
3133
|
+
"trackType": args.track_type,
|
|
3134
|
+
"trackIndex": args.track_index,
|
|
3135
|
+
"clipIndex": args.clip_index,
|
|
3136
|
+
"offsetSeconds": args.offset_seconds,
|
|
3137
|
+
"sequenceName": args.sequence_name,
|
|
3138
|
+
}
|
|
3139
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3140
|
+
elif args.subcommand == "slide-edit":
|
|
3141
|
+
command_args = {
|
|
3142
|
+
"trackType": args.track_type,
|
|
3143
|
+
"trackIndex": args.track_index,
|
|
3144
|
+
"clipIndex": args.clip_index,
|
|
3145
|
+
"offsetSeconds": args.offset_seconds,
|
|
3146
|
+
"sequenceName": args.sequence_name,
|
|
3147
|
+
}
|
|
3148
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3149
|
+
elif args.subcommand == "slip-edit":
|
|
3150
|
+
command_args = {
|
|
3151
|
+
"trackType": args.track_type,
|
|
3152
|
+
"trackIndex": args.track_index,
|
|
3153
|
+
"clipIndex": args.clip_index,
|
|
3154
|
+
"offsetSeconds": args.offset_seconds,
|
|
3155
|
+
"sequenceName": args.sequence_name,
|
|
3156
|
+
}
|
|
3157
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3158
|
+
elif args.subcommand == "move-clip-to-track":
|
|
3159
|
+
command_args = {
|
|
3160
|
+
"trackType": args.track_type,
|
|
3161
|
+
"trackIndex": args.track_index,
|
|
3162
|
+
"clipIndex": args.clip_index,
|
|
3163
|
+
"targetTrackIndex": args.target_track_index,
|
|
3164
|
+
"sequenceName": args.sequence_name,
|
|
3165
|
+
}
|
|
3166
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3167
|
+
elif args.subcommand == "reverse-clip":
|
|
3168
|
+
command_args = {
|
|
3169
|
+
"trackType": args.track_type,
|
|
3170
|
+
"trackIndex": args.track_index,
|
|
3171
|
+
"clipIndex": args.clip_index,
|
|
3172
|
+
"reverse": (args.reverse == "true") if args.reverse is not None else None,
|
|
3173
|
+
"sequenceName": args.sequence_name,
|
|
3174
|
+
}
|
|
3175
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3176
|
+
elif args.subcommand == "link-selection":
|
|
3177
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3178
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3179
|
+
elif args.subcommand == "unlink-selection":
|
|
3180
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3181
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3182
|
+
elif args.subcommand == "overwrite-clip-at":
|
|
3183
|
+
command_args = {
|
|
3184
|
+
"itemNodeId": args.item_node_id,
|
|
3185
|
+
"itemName": args.item_name,
|
|
3186
|
+
"trackType": args.track_type,
|
|
3187
|
+
"trackIndex": args.track_index,
|
|
3188
|
+
"startSeconds": args.start_seconds,
|
|
3189
|
+
"sequenceName": args.sequence_name,
|
|
3190
|
+
}
|
|
3191
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3192
|
+
elif args.subcommand == "razor-all-tracks":
|
|
3193
|
+
command_args = {"seconds": args.seconds, "sequenceName": args.sequence_name}
|
|
3194
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3195
|
+
elif args.subcommand == "set-item-in-out":
|
|
3196
|
+
if not args.node_id and not args.name:
|
|
3197
|
+
parser.error("either --node-id or --name is required")
|
|
3198
|
+
if args.in_seconds is None and args.out_seconds is None:
|
|
3199
|
+
parser.error("at least one of --in-seconds/--out-seconds is required")
|
|
3200
|
+
command_args = {
|
|
3201
|
+
"nodeId": args.node_id,
|
|
3202
|
+
"name": args.name,
|
|
3203
|
+
"inSeconds": args.in_seconds,
|
|
3204
|
+
"outSeconds": args.out_seconds,
|
|
3205
|
+
"mediaType": args.media_type,
|
|
3206
|
+
}
|
|
3207
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3208
|
+
elif args.subcommand == "clear-item-in-out":
|
|
3209
|
+
if not args.node_id and not args.name:
|
|
3210
|
+
parser.error("either --node-id or --name is required")
|
|
3211
|
+
command_args = {
|
|
3212
|
+
"nodeId": args.node_id,
|
|
3213
|
+
"name": args.name,
|
|
3214
|
+
"clearIn": args.clear_in == "true" if args.clear_in is not None else None,
|
|
3215
|
+
"clearOut": args.clear_out == "true" if args.clear_out is not None else None,
|
|
3216
|
+
}
|
|
3217
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3218
|
+
elif args.subcommand == "clear-sequence-in-out":
|
|
3219
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3220
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3221
|
+
elif args.subcommand == "remove-selected-clips":
|
|
3222
|
+
command_args = {
|
|
3223
|
+
"ripple": args.ripple == "true" if args.ripple is not None else None,
|
|
3224
|
+
"sequenceName": args.sequence_name,
|
|
3225
|
+
}
|
|
3226
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3227
|
+
elif args.subcommand == "lift-selection":
|
|
3228
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3229
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3230
|
+
elif args.subcommand == "extract-selection":
|
|
3231
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3232
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3233
|
+
elif args.subcommand == "nest-clips":
|
|
3234
|
+
command_args = {"name": args.name, "sequenceName": args.sequence_name}
|
|
3235
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3236
|
+
elif args.subcommand == "freeze-frame":
|
|
3237
|
+
command_args = {
|
|
3238
|
+
"trackType": args.track_type,
|
|
3239
|
+
"trackIndex": args.track_index,
|
|
3240
|
+
"clipIndex": args.clip_index,
|
|
3241
|
+
"atSeconds": args.at_seconds,
|
|
3242
|
+
"outputPath": args.output_path,
|
|
3243
|
+
"sequenceName": args.sequence_name,
|
|
3244
|
+
}
|
|
3245
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3246
|
+
elif args.subcommand == "match-frame":
|
|
3247
|
+
command_args = {
|
|
3248
|
+
"trackType": args.track_type,
|
|
3249
|
+
"trackIndex": args.track_index,
|
|
3250
|
+
"seconds": args.seconds,
|
|
3251
|
+
"sequenceName": args.sequence_name,
|
|
3252
|
+
}
|
|
3253
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3254
|
+
elif args.subcommand == "add-adjustment-layer":
|
|
3255
|
+
command_args = {
|
|
3256
|
+
"trackIndex": args.track_index,
|
|
3257
|
+
"startSeconds": args.start_seconds,
|
|
3258
|
+
"durationSeconds": args.duration_seconds,
|
|
3259
|
+
"sequenceName": args.sequence_name,
|
|
3260
|
+
}
|
|
3261
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3262
|
+
elif args.subcommand == "unnest-sequence":
|
|
3263
|
+
command_args = {"nodeId": args.node_id, "sequenceName": args.sequence_name}
|
|
3264
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3265
|
+
elif args.subcommand == "import-media":
|
|
3266
|
+
command_args = {
|
|
3267
|
+
"filePath": args.file_path,
|
|
3268
|
+
"filePaths": args.file_paths,
|
|
3269
|
+
"targetBinPath": args.target_bin_path,
|
|
3270
|
+
}
|
|
3271
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3272
|
+
elif args.subcommand == "import-folder":
|
|
3273
|
+
command_args = {
|
|
3274
|
+
"folderPath": args.folder_path,
|
|
3275
|
+
"targetBinPath": args.target_bin_path,
|
|
3276
|
+
}
|
|
3277
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3278
|
+
elif args.subcommand == "import-image-sequence":
|
|
3279
|
+
command_args = {
|
|
3280
|
+
"firstFramePath": args.first_frame_path,
|
|
3281
|
+
"targetBinPath": args.target_bin_path,
|
|
3282
|
+
}
|
|
3283
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3284
|
+
elif args.subcommand == "create-bin":
|
|
3285
|
+
command_args = {"binPath": args.bin_path}
|
|
3286
|
+
elif args.subcommand == "rename-bin":
|
|
3287
|
+
command_args = {"binPath": args.bin_path, "newName": args.new_name}
|
|
3288
|
+
elif args.subcommand == "move-items-to-bin":
|
|
3289
|
+
command_args = {
|
|
3290
|
+
"nodeIds": args.node_ids,
|
|
3291
|
+
"nodeId": args.node_id,
|
|
3292
|
+
"name": args.name,
|
|
3293
|
+
"targetBinPath": args.target_bin_path,
|
|
3294
|
+
}
|
|
3295
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3296
|
+
elif args.subcommand == "relink-media":
|
|
3297
|
+
if not args.node_id and not args.name:
|
|
3298
|
+
parser.error("either --node-id or --name is required")
|
|
3299
|
+
command_args = {"nodeId": args.node_id, "name": args.name, "newPath": args.new_path}
|
|
3300
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3301
|
+
elif args.subcommand == "refresh-media":
|
|
3302
|
+
if not args.node_id and not args.name:
|
|
3303
|
+
parser.error("either --node-id or --name is required")
|
|
3304
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
3305
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3306
|
+
elif args.subcommand == "set-item-offline":
|
|
3307
|
+
if not args.node_id and not args.name:
|
|
3308
|
+
parser.error("either --node-id or --name is required")
|
|
3309
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
3310
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3311
|
+
elif args.subcommand == "detach-proxy":
|
|
3312
|
+
if not args.node_id and not args.name:
|
|
3313
|
+
parser.error("either --node-id or --name is required")
|
|
3314
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
3315
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3316
|
+
elif args.subcommand == "set-override-frame-rate":
|
|
3317
|
+
if not args.node_id and not args.name:
|
|
3318
|
+
parser.error("either --node-id or --name is required")
|
|
3319
|
+
command_args = {"nodeId": args.node_id, "name": args.name, "fps": args.fps}
|
|
3320
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3321
|
+
elif args.subcommand == "set-override-pixel-aspect-ratio":
|
|
3322
|
+
if not args.node_id and not args.name:
|
|
3323
|
+
parser.error("either --node-id or --name is required")
|
|
3324
|
+
command_args = {
|
|
3325
|
+
"nodeId": args.node_id,
|
|
3326
|
+
"name": args.name,
|
|
3327
|
+
"numerator": args.numerator,
|
|
3328
|
+
"denominator": args.denominator,
|
|
3329
|
+
}
|
|
3330
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3331
|
+
elif args.subcommand == "set-scale-to-frame-size":
|
|
3332
|
+
if not args.node_id and not args.name:
|
|
3333
|
+
parser.error("either --node-id or --name is required")
|
|
3334
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
3335
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3336
|
+
elif args.subcommand == "set-item-start-time":
|
|
3337
|
+
if not args.node_id and not args.name:
|
|
3338
|
+
parser.error("either --node-id or --name is required")
|
|
3339
|
+
command_args = {"nodeId": args.node_id, "name": args.name, "seconds": args.seconds}
|
|
3340
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3341
|
+
elif args.subcommand == "rename-project-item":
|
|
3342
|
+
if not args.node_id and not args.name:
|
|
3343
|
+
parser.error("either --node-id or --name is required")
|
|
3344
|
+
command_args = {"nodeId": args.node_id, "name": args.name, "newName": args.new_name}
|
|
3345
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3346
|
+
elif args.subcommand == "save-project":
|
|
3347
|
+
command_args = {}
|
|
3348
|
+
elif args.subcommand == "save-project-as":
|
|
3349
|
+
command_args = {"path": args.path}
|
|
3350
|
+
elif args.subcommand == "open-project":
|
|
3351
|
+
command_args = {"path": args.path}
|
|
3352
|
+
elif args.subcommand == "set-active-sequence":
|
|
3353
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3354
|
+
elif args.subcommand == "find-items-by-media-path":
|
|
3355
|
+
command_args = {"pathContains": args.path_contains}
|
|
3356
|
+
elif args.subcommand == "create-smart-bin":
|
|
3357
|
+
command_args = {"name": args.name, "query": args.query}
|
|
3358
|
+
elif args.subcommand == "add-custom-metadata-field":
|
|
3359
|
+
command_args = {"name": args.name, "label": args.label, "type": args.type}
|
|
3360
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3361
|
+
elif args.subcommand == "import-sequences-from-project":
|
|
3362
|
+
sequence_ids = None
|
|
3363
|
+
if args.sequence_ids is not None:
|
|
3364
|
+
try:
|
|
3365
|
+
sequence_ids = json.loads(args.sequence_ids)
|
|
3366
|
+
except json.JSONDecodeError as exc:
|
|
3367
|
+
parser.error(f"--sequence-ids is not valid JSON: {exc}")
|
|
3368
|
+
if not isinstance(sequence_ids, list):
|
|
3369
|
+
parser.error("--sequence-ids must be a JSON array")
|
|
3370
|
+
command_args = {"projectPath": args.project_path, "sequenceIds": sequence_ids}
|
|
3371
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3372
|
+
elif args.subcommand == "import-fcp-xml":
|
|
3373
|
+
command_args = {"xmlPath": args.xml_path}
|
|
3374
|
+
elif args.subcommand == "import-ae-comps":
|
|
3375
|
+
comp_names = None
|
|
3376
|
+
if args.comp_names is not None:
|
|
3377
|
+
try:
|
|
3378
|
+
comp_names = json.loads(args.comp_names)
|
|
3379
|
+
except json.JSONDecodeError as exc:
|
|
3380
|
+
parser.error(f"--comp-names is not valid JSON: {exc}")
|
|
3381
|
+
if not isinstance(comp_names, list):
|
|
3382
|
+
parser.error("--comp-names must be a JSON array")
|
|
3383
|
+
command_args = {
|
|
3384
|
+
"aepPath": args.aep_path,
|
|
3385
|
+
"compNames": comp_names,
|
|
3386
|
+
"targetBinPath": args.target_bin_path,
|
|
3387
|
+
}
|
|
3388
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3389
|
+
elif args.subcommand == "create-bars-and-tone":
|
|
3390
|
+
command_args = {"width": args.width, "height": args.height, "name": args.name}
|
|
3391
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3392
|
+
elif args.subcommand == "set-transcode-on-ingest":
|
|
3393
|
+
command_args = {"enabled": args.enabled == "true"}
|
|
3394
|
+
elif args.subcommand == "set-project-panel-metadata":
|
|
3395
|
+
command_args = {"metadata": args.metadata}
|
|
3396
|
+
elif args.subcommand == "get-graphics-white-luminance":
|
|
3397
|
+
command_args = {}
|
|
3398
|
+
elif args.subcommand == "set-graphics-white-luminance":
|
|
3399
|
+
command_args = {"value": args.value}
|
|
3400
|
+
elif args.subcommand == "duplicate-sequence":
|
|
3401
|
+
command_args = {"newName": args.new_name, "sequenceName": args.sequence_name}
|
|
3402
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3403
|
+
elif args.subcommand == "set-sequence-settings":
|
|
3404
|
+
if (args.par_numerator is None) != (args.par_denominator is None):
|
|
3405
|
+
parser.error("--par-numerator and --par-denominator must be given together")
|
|
3406
|
+
if not any([
|
|
3407
|
+
args.frame_rate is not None,
|
|
3408
|
+
args.width is not None,
|
|
3409
|
+
args.height is not None,
|
|
3410
|
+
args.audio_sample_rate is not None,
|
|
3411
|
+
args.par_numerator is not None,
|
|
3412
|
+
args.field_type is not None,
|
|
3413
|
+
args.display_format is not None,
|
|
3414
|
+
]):
|
|
3415
|
+
parser.error(
|
|
3416
|
+
"at least one of --frame-rate, --width, --height, --audio-sample-rate, "
|
|
3417
|
+
"--par-numerator+--par-denominator, --field-type, --display-format is required"
|
|
3418
|
+
)
|
|
3419
|
+
command_args = {
|
|
3420
|
+
"frameRate": args.frame_rate,
|
|
3421
|
+
"width": args.width,
|
|
3422
|
+
"height": args.height,
|
|
3423
|
+
"audioSampleRate": args.audio_sample_rate,
|
|
3424
|
+
"parNumerator": args.par_numerator,
|
|
3425
|
+
"parDenominator": args.par_denominator,
|
|
3426
|
+
"fieldType": args.field_type,
|
|
3427
|
+
"displayFormat": args.display_format,
|
|
3428
|
+
"sequenceName": args.sequence_name,
|
|
3429
|
+
}
|
|
3430
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3431
|
+
elif args.subcommand == "create-subsequence":
|
|
3432
|
+
command_args = {
|
|
3433
|
+
"ignoreTrackTargeting": args.ignore_track_targeting == "true",
|
|
3434
|
+
"sequenceName": args.sequence_name,
|
|
3435
|
+
}
|
|
3436
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3437
|
+
elif args.subcommand == "auto-reframe-sequence":
|
|
3438
|
+
command_args = {
|
|
3439
|
+
"numerator": args.numerator,
|
|
3440
|
+
"denominator": args.denominator,
|
|
3441
|
+
"motionPreset": args.motion_preset,
|
|
3442
|
+
"newName": args.new_name,
|
|
3443
|
+
"nest": args.nest == "true",
|
|
3444
|
+
"sequenceName": args.sequence_name,
|
|
3445
|
+
}
|
|
3446
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3447
|
+
elif args.subcommand == "create-sequence-from-preset":
|
|
3448
|
+
command_args = {"name": args.name, "presetPath": args.preset_path}
|
|
3449
|
+
elif args.subcommand == "create-sequence-from-clips":
|
|
3450
|
+
try:
|
|
3451
|
+
node_ids = json.loads(args.node_ids)
|
|
3452
|
+
except json.JSONDecodeError as exc:
|
|
3453
|
+
parser.error(f"--node-ids is not valid JSON: {exc}")
|
|
3454
|
+
if not isinstance(node_ids, list) or not node_ids:
|
|
3455
|
+
parser.error("--node-ids must be a non-empty JSON array")
|
|
3456
|
+
command_args = {
|
|
3457
|
+
"name": args.name,
|
|
3458
|
+
"nodeIds": node_ids,
|
|
3459
|
+
"targetBinPath": args.target_bin_path,
|
|
3460
|
+
}
|
|
3461
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3462
|
+
elif args.subcommand == "attach-custom-property":
|
|
3463
|
+
command_args = {
|
|
3464
|
+
"propertyId": args.property_id,
|
|
3465
|
+
"value": args.value,
|
|
3466
|
+
"sequenceName": args.sequence_name,
|
|
3467
|
+
}
|
|
3468
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3469
|
+
elif args.subcommand == "close-sequence":
|
|
3470
|
+
command_args = {"sequenceName": args.sequence_name}
|
|
3471
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3472
|
+
elif args.subcommand == "export-sequence-as-project":
|
|
3473
|
+
command_args = {"outputPath": args.output_path, "sequenceName": args.sequence_name}
|
|
3474
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3475
|
+
elif args.subcommand == "scene-edit-detection":
|
|
3476
|
+
command_args = {
|
|
3477
|
+
"mode": args.mode,
|
|
3478
|
+
"applyToLinkedAudio": args.apply_to_linked_audio == "true",
|
|
3479
|
+
"sensitivity": args.sensitivity,
|
|
3480
|
+
"sequenceName": args.sequence_name,
|
|
3481
|
+
}
|
|
3482
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3483
|
+
elif args.subcommand == "export-sequence":
|
|
3484
|
+
command_args = {
|
|
3485
|
+
"outputPath": args.output,
|
|
3486
|
+
"presetPath": args.preset_path,
|
|
3487
|
+
"range": args.range,
|
|
3488
|
+
"sequenceName": args.sequence_name,
|
|
3489
|
+
}
|
|
3490
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3491
|
+
elif args.subcommand == "export-fcp-xml":
|
|
3492
|
+
command_args = {"outputPath": args.output, "sequenceName": args.sequence_name}
|
|
3493
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3494
|
+
elif args.subcommand == "export-aaf":
|
|
3495
|
+
command_args = {
|
|
3496
|
+
"outputPath": args.output,
|
|
3497
|
+
"mixdown": None if args.mixdown is None else args.mixdown == "true",
|
|
3498
|
+
"mono": None if args.mono is None else args.mono == "true",
|
|
3499
|
+
"rate": args.rate,
|
|
3500
|
+
"bits": args.bits,
|
|
3501
|
+
"sequenceName": args.sequence_name,
|
|
3502
|
+
}
|
|
3503
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3504
|
+
elif args.subcommand == "export-omf":
|
|
3505
|
+
command_args = {
|
|
3506
|
+
"outputPath": args.output,
|
|
3507
|
+
"title": args.title,
|
|
3508
|
+
"rate": args.rate,
|
|
3509
|
+
"bits": args.bits,
|
|
3510
|
+
"audioEncapsulated": None if args.audio_encapsulated is None else args.audio_encapsulated == "true",
|
|
3511
|
+
"audioFileFormat": args.audio_file_format,
|
|
3512
|
+
"trimAudioFiles": None if args.trim_audio_files is None else args.trim_audio_files == "true",
|
|
3513
|
+
"handleFrames": args.handle_frames,
|
|
3514
|
+
"sequenceName": args.sequence_name,
|
|
3515
|
+
}
|
|
3516
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3517
|
+
elif args.subcommand == "add-to-render-queue":
|
|
3518
|
+
command_args = {
|
|
3519
|
+
"outputPath": args.output,
|
|
3520
|
+
"presetPath": args.preset_path,
|
|
3521
|
+
"range": args.range,
|
|
3522
|
+
"sequenceName": args.sequence_name,
|
|
3523
|
+
"startBatch": None if args.start_batch is None else args.start_batch == "true",
|
|
3524
|
+
}
|
|
3525
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3526
|
+
elif args.subcommand == "create-subclip":
|
|
3527
|
+
if not args.node_id and not args.item_name:
|
|
3528
|
+
parser.error("at least one of --node-id, --item-name is required")
|
|
3529
|
+
command_args = {
|
|
3530
|
+
"nodeId": args.node_id,
|
|
3531
|
+
"itemName": args.item_name,
|
|
3532
|
+
"subclipName": args.subclip_name,
|
|
3533
|
+
"inSeconds": args.in_seconds,
|
|
3534
|
+
"outSeconds": args.out_seconds,
|
|
3535
|
+
"takeVideo": None if args.take_video is None else args.take_video == "true",
|
|
3536
|
+
"takeAudio": None if args.take_audio is None else args.take_audio == "true",
|
|
3537
|
+
}
|
|
3538
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3539
|
+
elif args.subcommand == "encode-project-item":
|
|
3540
|
+
if not args.node_id and not args.name:
|
|
3541
|
+
parser.error("at least one of --node-id, --name is required")
|
|
3542
|
+
command_args = {
|
|
3543
|
+
"nodeId": args.node_id,
|
|
3544
|
+
"name": args.name,
|
|
3545
|
+
"outputPath": args.output,
|
|
3546
|
+
"presetPath": args.preset_path,
|
|
3547
|
+
"startBatch": None if args.start_batch is None else args.start_batch == "true",
|
|
3548
|
+
}
|
|
3549
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3550
|
+
elif args.subcommand == "encode-file":
|
|
3551
|
+
command_args = {
|
|
3552
|
+
"inputPath": args.input,
|
|
3553
|
+
"outputPath": args.output,
|
|
3554
|
+
"presetPath": args.preset_path,
|
|
3555
|
+
"startBatch": None if args.start_batch is None else args.start_batch == "true",
|
|
3556
|
+
}
|
|
3557
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3558
|
+
elif args.subcommand == "manage-proxies":
|
|
3559
|
+
if args.action == "attach" and not args.node_id and not args.name:
|
|
3560
|
+
parser.error("--action attach requires at least one of --node-id, --name")
|
|
3561
|
+
if args.action == "attach" and not args.proxy_path:
|
|
3562
|
+
parser.error("--action attach requires --proxy-path")
|
|
3563
|
+
command_args = {
|
|
3564
|
+
"action": args.action,
|
|
3565
|
+
"nodeId": args.node_id,
|
|
3566
|
+
"name": args.name,
|
|
3567
|
+
"proxyPath": args.proxy_path,
|
|
3568
|
+
"isHiRes": None if args.is_hi_res is None else args.is_hi_res == "true",
|
|
3569
|
+
}
|
|
3570
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3571
|
+
elif args.subcommand == "open-in-source":
|
|
3572
|
+
if not args.node_id and not args.name:
|
|
3573
|
+
parser.error("either --node-id or --name is required")
|
|
3574
|
+
command_args = {"nodeId": args.node_id, "name": args.name}
|
|
3575
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3576
|
+
elif args.subcommand == "close-source-monitor":
|
|
3577
|
+
command_args = {}
|
|
3578
|
+
elif args.subcommand == "close-all-source-clips":
|
|
3579
|
+
command_args = {}
|
|
3580
|
+
elif args.subcommand == "set-source-in-out":
|
|
3581
|
+
if args.in_seconds is None and args.out_seconds is None:
|
|
3582
|
+
parser.error("at least one of --in-seconds/--out-seconds is required")
|
|
3583
|
+
command_args = {"inSeconds": args.in_seconds, "outSeconds": args.out_seconds}
|
|
3584
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3585
|
+
elif args.subcommand == "insert-from-source":
|
|
3586
|
+
command_args = {
|
|
3587
|
+
"trackType": args.track_type,
|
|
3588
|
+
"trackIndex": args.track_index,
|
|
3589
|
+
"atSeconds": args.at_seconds,
|
|
3590
|
+
"sequenceName": args.sequence_name,
|
|
3591
|
+
}
|
|
3592
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3593
|
+
elif args.subcommand == "overwrite-from-source":
|
|
3594
|
+
command_args = {
|
|
3595
|
+
"trackType": args.track_type,
|
|
3596
|
+
"trackIndex": args.track_index,
|
|
3597
|
+
"atSeconds": args.at_seconds,
|
|
3598
|
+
"sequenceName": args.sequence_name,
|
|
3599
|
+
}
|
|
3600
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3601
|
+
elif args.subcommand == "add-text-overlay":
|
|
3602
|
+
command_args = {
|
|
3603
|
+
"text": args.text,
|
|
3604
|
+
"startSeconds": args.start_seconds,
|
|
3605
|
+
"durationSeconds": args.duration_seconds,
|
|
3606
|
+
"captionFormat": args.caption_format,
|
|
3607
|
+
}
|
|
3608
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3609
|
+
elif args.subcommand == "import-mogrt":
|
|
3610
|
+
command_args = {
|
|
3611
|
+
"mogrtPath": args.mogrt_path,
|
|
3612
|
+
"startSeconds": args.start_seconds,
|
|
3613
|
+
"videoTrackIndex": args.video_track_index,
|
|
3614
|
+
"audioTrackIndex": args.audio_track_index,
|
|
3615
|
+
"sequenceName": args.sequence_name,
|
|
3616
|
+
}
|
|
3617
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3618
|
+
elif args.subcommand == "import-mogrt-from-library":
|
|
3619
|
+
command_args = {
|
|
3620
|
+
"libraryName": args.library_name,
|
|
3621
|
+
"mogrtName": args.mogrt_name,
|
|
3622
|
+
"startSeconds": args.start_seconds,
|
|
3623
|
+
"videoTrackIndex": args.video_track_index,
|
|
3624
|
+
"audioTrackIndex": args.audio_track_index,
|
|
3625
|
+
"sequenceName": args.sequence_name,
|
|
3626
|
+
}
|
|
3627
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3628
|
+
elif args.subcommand == "get-mogrt-component":
|
|
3629
|
+
command_args = {
|
|
3630
|
+
"trackType": args.track_type,
|
|
3631
|
+
"trackIndex": args.track_index,
|
|
3632
|
+
"clipIndex": args.clip_index,
|
|
3633
|
+
"sequenceName": args.sequence_name,
|
|
3634
|
+
}
|
|
3635
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3636
|
+
elif args.subcommand == "create-caption-track":
|
|
3637
|
+
if not args.node_id and not args.name:
|
|
3638
|
+
parser.error("either --node-id or --name is required")
|
|
3639
|
+
command_args = {
|
|
3640
|
+
"nodeId": args.node_id,
|
|
3641
|
+
"name": args.name,
|
|
3642
|
+
"startSeconds": args.start_seconds,
|
|
3643
|
+
"format": args.format,
|
|
3644
|
+
}
|
|
3645
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3646
|
+
elif args.subcommand == "replace-clip-media":
|
|
3647
|
+
if not args.node_id and not args.name:
|
|
3648
|
+
parser.error("either --node-id or --name is required")
|
|
3649
|
+
command_args = {
|
|
3650
|
+
"nodeId": args.node_id,
|
|
3651
|
+
"name": args.name,
|
|
3652
|
+
"newMediaPath": args.new_media_path,
|
|
3653
|
+
}
|
|
3654
|
+
command_args = {k: v for k, v in command_args.items() if v is not None}
|
|
3655
|
+
else:
|
|
3656
|
+
command_args = {}
|
|
3657
|
+
|
|
3658
|
+
result = submit_command(args.subcommand, args=command_args, port=args.port)
|
|
3659
|
+
print(json.dumps(result))
|
|
3660
|
+
sys.exit(0 if result.get("ok") else 1)
|
|
3661
|
+
|
|
3662
|
+
|
|
3663
|
+
if __name__ == "__main__":
|
|
3664
|
+
main()
|