@synthetic-ai/premiere-mcp 2.2.0 → 2.3.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +135 -135
- package/LICENSE +21 -21
- package/README.md +242 -242
- package/cep-plugin/.debug +8 -8
- package/cep-plugin/CSInterface.js +92 -92
- package/cep-plugin/host.jsx +7 -7
- package/cep-plugin/index.html +472 -472
- package/cep-plugin/main.js +6 -0
- package/cep-plugin/premiere.jsx +24947 -24947
- package/dist/bridge/script-builder.js +378 -378
- package/dist/license.js +38 -0
- package/dist/server.js +60 -60
- package/dist/tools/advanced.js +357 -357
- package/dist/tools/audio-advanced.js +1049 -1049
- package/dist/tools/audio.js +42 -42
- package/dist/tools/captions.js +27 -27
- package/dist/tools/clipboard.js +214 -214
- package/dist/tools/color-advanced.js +253 -253
- package/dist/tools/discovery.js +291 -291
- package/dist/tools/effects.js +285 -285
- package/dist/tools/export-presets.js +206 -206
- package/dist/tools/export.js +255 -255
- package/dist/tools/health.js +10 -10
- package/dist/tools/inspection.js +885 -885
- package/dist/tools/keyframes.js +369 -369
- package/dist/tools/markers.js +89 -89
- package/dist/tools/media.js +178 -178
- package/dist/tools/metadata.js +94 -94
- package/dist/tools/multicam.js +50 -50
- package/dist/tools/playback.js +15 -15
- package/dist/tools/playhead.js +95 -95
- package/dist/tools/project-manager.js +21 -21
- package/dist/tools/project.js +149 -149
- package/dist/tools/scripting.js +319 -319
- package/dist/tools/selection.js +202 -202
- package/dist/tools/sequence-advanced.js +379 -379
- package/dist/tools/sequence-settings.js +564 -564
- package/dist/tools/sequence.js +167 -167
- package/dist/tools/source-monitor.js +68 -68
- package/dist/tools/text.js +58 -58
- package/dist/tools/timeline.js +312 -312
- package/dist/tools/track-management.js +446 -446
- package/dist/tools/track-targeting.js +635 -635
- package/dist/tools/tracks.js +87 -87
- package/dist/tools/transitions-motion.js +174 -174
- package/dist/tools/transitions.js +111 -111
- package/dist/tools/utility.js +606 -606
- package/dist/tools/workspace.js +29 -29
- package/package.json +66 -66
- package/scripts/build-chat-dmg.sh +210 -210
- package/scripts/build-chat-zip.sh +291 -291
- package/scripts/install-cep-windows.ps1 +99 -99
- package/scripts/install-cep.sh +66 -66
- package/scripts/install-chat-plugin.bat +67 -67
- package/scripts/install-chat-plugin.sh +85 -85
- package/scripts/install-windows.bat +95 -95
- package/scripts/package.mjs +254 -254
|
@@ -19,12 +19,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
19
19
|
const workAreaType = args.work_area_type ?? 0;
|
|
20
20
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
21
21
|
const presetPathEsc = args.preset_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
22
|
-
const script = buildToolScript(`
|
|
23
|
-
if (typeof exportDirect === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
24
|
-
var result = exportDirect(${seqIndex}, "${outputPathEsc}", "${presetPathEsc}", ${workAreaType});
|
|
25
|
-
var parsed = JSON.parse(result);
|
|
26
|
-
if (!parsed.success) return __error(parsed.error);
|
|
27
|
-
return __result(parsed.data);
|
|
22
|
+
const script = buildToolScript(`
|
|
23
|
+
if (typeof exportDirect === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
24
|
+
var result = exportDirect(${seqIndex}, "${outputPathEsc}", "${presetPathEsc}", ${workAreaType});
|
|
25
|
+
var parsed = JSON.parse(result);
|
|
26
|
+
if (!parsed.success) return __error(parsed.error);
|
|
27
|
+
return __result(parsed.data);
|
|
28
28
|
`);
|
|
29
29
|
return sendCommand(script, bridgeOptions);
|
|
30
30
|
},
|
|
@@ -48,12 +48,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
48
48
|
const removeOnDone = args.remove_on_done ?? false;
|
|
49
49
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
50
50
|
const presetPathEsc = args.preset_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
51
|
-
const script = buildToolScript(`
|
|
52
|
-
if (typeof exportViaAME === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
53
|
-
var result = exportViaAME(${seqIndex}, "${outputPathEsc}", "${presetPathEsc}", ${workAreaType}, ${removeOnDone});
|
|
54
|
-
var parsed = JSON.parse(result);
|
|
55
|
-
if (!parsed.success) return __error(parsed.error);
|
|
56
|
-
return __result(parsed.data);
|
|
51
|
+
const script = buildToolScript(`
|
|
52
|
+
if (typeof exportViaAME === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
53
|
+
var result = exportViaAME(${seqIndex}, "${outputPathEsc}", "${presetPathEsc}", ${workAreaType}, ${removeOnDone});
|
|
54
|
+
var parsed = JSON.parse(result);
|
|
55
|
+
if (!parsed.success) return __error(parsed.error);
|
|
56
|
+
return __result(parsed.data);
|
|
57
57
|
`);
|
|
58
58
|
return sendCommand(script, bridgeOptions);
|
|
59
59
|
},
|
|
@@ -73,12 +73,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
73
73
|
const seqIndex = args.sequence_index ?? 0;
|
|
74
74
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
75
75
|
const presetPathEsc = args.preset_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
76
|
-
const script = buildToolScript(`
|
|
77
|
-
if (typeof exportAudioOnly === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
78
|
-
var result = exportAudioOnly(${seqIndex}, "${outputPathEsc}", "${presetPathEsc}");
|
|
79
|
-
var parsed = JSON.parse(result);
|
|
80
|
-
if (!parsed.success) return __error(parsed.error);
|
|
81
|
-
return __result(parsed.data);
|
|
76
|
+
const script = buildToolScript(`
|
|
77
|
+
if (typeof exportAudioOnly === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
78
|
+
var result = exportAudioOnly(${seqIndex}, "${outputPathEsc}", "${presetPathEsc}");
|
|
79
|
+
var parsed = JSON.parse(result);
|
|
80
|
+
if (!parsed.success) return __error(parsed.error);
|
|
81
|
+
return __result(parsed.data);
|
|
82
82
|
`);
|
|
83
83
|
return sendCommand(script, bridgeOptions);
|
|
84
84
|
},
|
|
@@ -98,12 +98,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
98
98
|
const seqIndex = args.sequence_index ?? 0;
|
|
99
99
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
100
100
|
const optionsJson = JSON.stringify(JSON.stringify(args.options || {}));
|
|
101
|
-
const script = buildToolScript(`
|
|
102
|
-
if (typeof exportAAF === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
103
|
-
var result = exportAAF(${seqIndex}, "${outputPathEsc}", ${optionsJson});
|
|
104
|
-
var parsed = JSON.parse(result);
|
|
105
|
-
if (!parsed.success) return __error(parsed.error);
|
|
106
|
-
return __result(parsed.data);
|
|
101
|
+
const script = buildToolScript(`
|
|
102
|
+
if (typeof exportAAF === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
103
|
+
var result = exportAAF(${seqIndex}, "${outputPathEsc}", ${optionsJson});
|
|
104
|
+
var parsed = JSON.parse(result);
|
|
105
|
+
if (!parsed.success) return __error(parsed.error);
|
|
106
|
+
return __result(parsed.data);
|
|
107
107
|
`);
|
|
108
108
|
return sendCommand(script, bridgeOptions);
|
|
109
109
|
},
|
|
@@ -119,12 +119,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
119
119
|
},
|
|
120
120
|
handler: async (args) => {
|
|
121
121
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
122
|
-
const script = buildToolScript(`
|
|
123
|
-
if (typeof exportFCPXML === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
124
|
-
var result = exportFCPXML("${outputPathEsc}");
|
|
125
|
-
var parsed = JSON.parse(result);
|
|
126
|
-
if (!parsed.success) return __error(parsed.error);
|
|
127
|
-
return __result(parsed.data);
|
|
122
|
+
const script = buildToolScript(`
|
|
123
|
+
if (typeof exportFCPXML === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
124
|
+
var result = exportFCPXML("${outputPathEsc}");
|
|
125
|
+
var parsed = JSON.parse(result);
|
|
126
|
+
if (!parsed.success) return __error(parsed.error);
|
|
127
|
+
return __result(parsed.data);
|
|
128
128
|
`);
|
|
129
129
|
return sendCommand(script, bridgeOptions);
|
|
130
130
|
},
|
|
@@ -144,12 +144,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
144
144
|
const sequenceIndicesJson = JSON.stringify(JSON.stringify(args.sequence_indices));
|
|
145
145
|
const outputDirEsc = args.output_dir.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
146
146
|
const presetPathEsc = args.preset_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
147
|
-
const script = buildToolScript(`
|
|
148
|
-
if (typeof batchExportSequences === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
149
|
-
var result = batchExportSequences(${sequenceIndicesJson}, "${outputDirEsc}", "${presetPathEsc}");
|
|
150
|
-
var parsed = JSON.parse(result);
|
|
151
|
-
if (!parsed.success) return __error(parsed.error);
|
|
152
|
-
return __result(parsed.data);
|
|
147
|
+
const script = buildToolScript(`
|
|
148
|
+
if (typeof batchExportSequences === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
149
|
+
var result = batchExportSequences(${sequenceIndicesJson}, "${outputDirEsc}", "${presetPathEsc}");
|
|
150
|
+
var parsed = JSON.parse(result);
|
|
151
|
+
if (!parsed.success) return __error(parsed.error);
|
|
152
|
+
return __result(parsed.data);
|
|
153
153
|
`);
|
|
154
154
|
return sendCommand(script, bridgeOptions);
|
|
155
155
|
},
|
|
@@ -167,12 +167,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
167
167
|
handler: async (args) => {
|
|
168
168
|
const outputDirEsc = args.output_dir.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
169
169
|
const presetPathEsc = args.preset_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
170
|
-
const script = buildToolScript(`
|
|
171
|
-
if (typeof exportAllSequences === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
172
|
-
var result = exportAllSequences("${outputDirEsc}", "${presetPathEsc}");
|
|
173
|
-
var parsed = JSON.parse(result);
|
|
174
|
-
if (!parsed.success) return __error(parsed.error);
|
|
175
|
-
return __result(parsed.data);
|
|
170
|
+
const script = buildToolScript(`
|
|
171
|
+
if (typeof exportAllSequences === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
172
|
+
var result = exportAllSequences("${outputDirEsc}", "${presetPathEsc}");
|
|
173
|
+
var parsed = JSON.parse(result);
|
|
174
|
+
if (!parsed.success) return __error(parsed.error);
|
|
175
|
+
return __result(parsed.data);
|
|
176
176
|
`);
|
|
177
177
|
return sendCommand(script, bridgeOptions);
|
|
178
178
|
},
|
|
@@ -185,32 +185,32 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
185
185
|
required: [],
|
|
186
186
|
},
|
|
187
187
|
handler: async (_args) => {
|
|
188
|
-
const script = buildToolScript(`
|
|
189
|
-
var exporters = [
|
|
190
|
-
{ index: 0, name: "H.264", fileExtension: "mp4", description: "H.264/AVC video (most common web/delivery format)" },
|
|
191
|
-
{ index: 1, name: "H.265 (HEVC)", fileExtension: "mp4", description: "H.265/HEVC video (efficient high-quality encoding)" },
|
|
192
|
-
{ index: 2, name: "QuickTime", fileExtension: "mov", description: "QuickTime MOV container (ProRes, Animation, etc.)" },
|
|
193
|
-
{ index: 3, name: "MPEG2", fileExtension: "mpg", description: "MPEG-2 video" },
|
|
194
|
-
{ index: 4, name: "MPEG2-DVD", fileExtension: "mpg", description: "MPEG-2 DVD compliant" },
|
|
195
|
-
{ index: 5, name: "MPEG2 Blu-ray", fileExtension: "m2v", description: "MPEG-2 Blu-ray compliant" },
|
|
196
|
-
{ index: 6, name: "MPEG4", fileExtension: "mp4", description: "MPEG-4 Part 2 video" },
|
|
197
|
-
{ index: 7, name: "Windows Media", fileExtension: "wmv", description: "Windows Media Video (WMV)" },
|
|
198
|
-
{ index: 8, name: "AVI", fileExtension: "avi", description: "AVI container (uncompressed or DV)" },
|
|
199
|
-
{ index: 9, name: "AVI (Uncompressed)", fileExtension: "avi", description: "Uncompressed AVI" },
|
|
200
|
-
{ index: 10, name: "AAC Audio", fileExtension: "aac", description: "AAC audio only" },
|
|
201
|
-
{ index: 11, name: "MP3", fileExtension: "mp3", description: "MP3 audio only" },
|
|
202
|
-
{ index: 12, name: "AIFF", fileExtension: "aif", description: "AIFF audio only" },
|
|
203
|
-
{ index: 13, name: "Wave", fileExtension: "wav", description: "WAV audio only" },
|
|
204
|
-
{ index: 14, name: "Wraptor DCP", fileExtension: "mxf", description: "Digital Cinema Package (DCP)" },
|
|
205
|
-
{ index: 15, name: "MXF OP1a", fileExtension: "mxf", description: "MXF OP1a container" },
|
|
206
|
-
{ index: 16, name: "DNxHR/DNxHD MXF OP1a", fileExtension: "mxf", description: "Avid DNxHD/DNxHR in MXF" },
|
|
207
|
-
{ index: 17, name: "GIF", fileExtension: "gif", description: "Animated GIF" },
|
|
208
|
-
{ index: 18, name: "BMP", fileExtension: "bmp", description: "BMP image sequence" },
|
|
209
|
-
{ index: 19, name: "JPEG", fileExtension: "jpg", description: "JPEG image sequence" },
|
|
210
|
-
{ index: 20, name: "PNG", fileExtension: "png", description: "PNG image sequence" },
|
|
211
|
-
{ index: 21, name: "TIFF", fileExtension: "tif", description: "TIFF image sequence" }
|
|
212
|
-
];
|
|
213
|
-
return __result({ exporters: exporters, count: exporters.length, note: "Static list of common Premiere Pro exporters. Actual available formats depend on your installation." });
|
|
188
|
+
const script = buildToolScript(`
|
|
189
|
+
var exporters = [
|
|
190
|
+
{ index: 0, name: "H.264", fileExtension: "mp4", description: "H.264/AVC video (most common web/delivery format)" },
|
|
191
|
+
{ index: 1, name: "H.265 (HEVC)", fileExtension: "mp4", description: "H.265/HEVC video (efficient high-quality encoding)" },
|
|
192
|
+
{ index: 2, name: "QuickTime", fileExtension: "mov", description: "QuickTime MOV container (ProRes, Animation, etc.)" },
|
|
193
|
+
{ index: 3, name: "MPEG2", fileExtension: "mpg", description: "MPEG-2 video" },
|
|
194
|
+
{ index: 4, name: "MPEG2-DVD", fileExtension: "mpg", description: "MPEG-2 DVD compliant" },
|
|
195
|
+
{ index: 5, name: "MPEG2 Blu-ray", fileExtension: "m2v", description: "MPEG-2 Blu-ray compliant" },
|
|
196
|
+
{ index: 6, name: "MPEG4", fileExtension: "mp4", description: "MPEG-4 Part 2 video" },
|
|
197
|
+
{ index: 7, name: "Windows Media", fileExtension: "wmv", description: "Windows Media Video (WMV)" },
|
|
198
|
+
{ index: 8, name: "AVI", fileExtension: "avi", description: "AVI container (uncompressed or DV)" },
|
|
199
|
+
{ index: 9, name: "AVI (Uncompressed)", fileExtension: "avi", description: "Uncompressed AVI" },
|
|
200
|
+
{ index: 10, name: "AAC Audio", fileExtension: "aac", description: "AAC audio only" },
|
|
201
|
+
{ index: 11, name: "MP3", fileExtension: "mp3", description: "MP3 audio only" },
|
|
202
|
+
{ index: 12, name: "AIFF", fileExtension: "aif", description: "AIFF audio only" },
|
|
203
|
+
{ index: 13, name: "Wave", fileExtension: "wav", description: "WAV audio only" },
|
|
204
|
+
{ index: 14, name: "Wraptor DCP", fileExtension: "mxf", description: "Digital Cinema Package (DCP)" },
|
|
205
|
+
{ index: 15, name: "MXF OP1a", fileExtension: "mxf", description: "MXF OP1a container" },
|
|
206
|
+
{ index: 16, name: "DNxHR/DNxHD MXF OP1a", fileExtension: "mxf", description: "Avid DNxHD/DNxHR in MXF" },
|
|
207
|
+
{ index: 17, name: "GIF", fileExtension: "gif", description: "Animated GIF" },
|
|
208
|
+
{ index: 18, name: "BMP", fileExtension: "bmp", description: "BMP image sequence" },
|
|
209
|
+
{ index: 19, name: "JPEG", fileExtension: "jpg", description: "JPEG image sequence" },
|
|
210
|
+
{ index: 20, name: "PNG", fileExtension: "png", description: "PNG image sequence" },
|
|
211
|
+
{ index: 21, name: "TIFF", fileExtension: "tif", description: "TIFF image sequence" }
|
|
212
|
+
];
|
|
213
|
+
return __result({ exporters: exporters, count: exporters.length, note: "Static list of common Premiere Pro exporters. Actual available formats depend on your installation." });
|
|
214
214
|
`);
|
|
215
215
|
return sendCommand(script, bridgeOptions);
|
|
216
216
|
},
|
|
@@ -226,53 +226,53 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
226
226
|
},
|
|
227
227
|
handler: async (args) => {
|
|
228
228
|
const exporterIndex = args.exporter_index ?? 0;
|
|
229
|
-
const script = buildToolScript(`
|
|
230
|
-
var exporterIdx = ${exporterIndex};
|
|
231
|
-
var presetsByExporter = {
|
|
232
|
-
0: [
|
|
233
|
-
{ name: "Match Source - Adaptive High Bitrate", description: "Matches source resolution and frame rate, high bitrate" },
|
|
234
|
-
{ name: "Match Source - Adaptive Medium Bitrate", description: "Matches source, medium bitrate" },
|
|
235
|
-
{ name: "Match Source - Adaptive Low Bitrate", description: "Matches source, low bitrate" },
|
|
236
|
-
{ name: "YouTube 1080p Full HD", description: "1920x1080, optimized for YouTube" },
|
|
237
|
-
{ name: "YouTube 720p HD", description: "1280x720, optimized for YouTube" },
|
|
238
|
-
{ name: "YouTube 4K UHD", description: "3840x2160, optimized for YouTube" },
|
|
239
|
-
{ name: "Vimeo 1080p Full HD", description: "1920x1080, optimized for Vimeo" },
|
|
240
|
-
{ name: "Twitter - 1080p", description: "Optimized for Twitter" },
|
|
241
|
-
{ name: "Facebook 1080p Full HD", description: "Optimized for Facebook" },
|
|
242
|
-
{ name: "HD 1080i 25", description: "1920x1080 interlaced 25fps" },
|
|
243
|
-
{ name: "HD 1080p 25", description: "1920x1080 progressive 25fps" },
|
|
244
|
-
{ name: "HD 1080p 29.97", description: "1920x1080 progressive 29.97fps" }
|
|
245
|
-
],
|
|
246
|
-
1: [
|
|
247
|
-
{ name: "Match Source - Adaptive High Bitrate (HEVC)", description: "H.265 high bitrate" },
|
|
248
|
-
{ name: "YouTube 4K HEVC", description: "4K optimized for YouTube using H.265" }
|
|
249
|
-
],
|
|
250
|
-
2: [
|
|
251
|
-
{ name: "Apple ProRes 4444", description: "ProRes 4444 (highest quality with alpha)" },
|
|
252
|
-
{ name: "Apple ProRes 422", description: "ProRes 422 standard" },
|
|
253
|
-
{ name: "Apple ProRes 422 HQ", description: "ProRes 422 HQ (high quality)" },
|
|
254
|
-
{ name: "Apple ProRes 422 LT", description: "ProRes 422 LT (lighter)" },
|
|
255
|
-
{ name: "Apple ProRes 422 Proxy", description: "ProRes 422 Proxy (offline editing)" },
|
|
256
|
-
{ name: "Animation", description: "Lossless animation codec" }
|
|
257
|
-
],
|
|
258
|
-
10: [
|
|
259
|
-
{ name: "AAC 320kbps", description: "High quality AAC audio" },
|
|
260
|
-
{ name: "AAC 192kbps", description: "Medium quality AAC audio" },
|
|
261
|
-
{ name: "AAC 128kbps", description: "Standard quality AAC audio" }
|
|
262
|
-
],
|
|
263
|
-
11: [
|
|
264
|
-
{ name: "MP3 320kbps", description: "Highest quality MP3" },
|
|
265
|
-
{ name: "MP3 192kbps", description: "High quality MP3" },
|
|
266
|
-
{ name: "MP3 128kbps", description: "Standard quality MP3" }
|
|
267
|
-
],
|
|
268
|
-
13: [
|
|
269
|
-
{ name: "WAV 48kHz 16-bit", description: "Standard broadcast WAV" },
|
|
270
|
-
{ name: "WAV 48kHz 24-bit", description: "High quality WAV" },
|
|
271
|
-
{ name: "WAV 44.1kHz 16-bit", description: "CD quality WAV" }
|
|
272
|
-
]
|
|
273
|
-
};
|
|
274
|
-
var presets = presetsByExporter[exporterIdx] || [{ name: "Default", description: "Default preset for this exporter" }];
|
|
275
|
-
return __result({ exporterIndex: exporterIdx, presets: presets, note: "Static list of common presets. Actual presets depend on your installation and custom .epr files." });
|
|
229
|
+
const script = buildToolScript(`
|
|
230
|
+
var exporterIdx = ${exporterIndex};
|
|
231
|
+
var presetsByExporter = {
|
|
232
|
+
0: [
|
|
233
|
+
{ name: "Match Source - Adaptive High Bitrate", description: "Matches source resolution and frame rate, high bitrate" },
|
|
234
|
+
{ name: "Match Source - Adaptive Medium Bitrate", description: "Matches source, medium bitrate" },
|
|
235
|
+
{ name: "Match Source - Adaptive Low Bitrate", description: "Matches source, low bitrate" },
|
|
236
|
+
{ name: "YouTube 1080p Full HD", description: "1920x1080, optimized for YouTube" },
|
|
237
|
+
{ name: "YouTube 720p HD", description: "1280x720, optimized for YouTube" },
|
|
238
|
+
{ name: "YouTube 4K UHD", description: "3840x2160, optimized for YouTube" },
|
|
239
|
+
{ name: "Vimeo 1080p Full HD", description: "1920x1080, optimized for Vimeo" },
|
|
240
|
+
{ name: "Twitter - 1080p", description: "Optimized for Twitter" },
|
|
241
|
+
{ name: "Facebook 1080p Full HD", description: "Optimized for Facebook" },
|
|
242
|
+
{ name: "HD 1080i 25", description: "1920x1080 interlaced 25fps" },
|
|
243
|
+
{ name: "HD 1080p 25", description: "1920x1080 progressive 25fps" },
|
|
244
|
+
{ name: "HD 1080p 29.97", description: "1920x1080 progressive 29.97fps" }
|
|
245
|
+
],
|
|
246
|
+
1: [
|
|
247
|
+
{ name: "Match Source - Adaptive High Bitrate (HEVC)", description: "H.265 high bitrate" },
|
|
248
|
+
{ name: "YouTube 4K HEVC", description: "4K optimized for YouTube using H.265" }
|
|
249
|
+
],
|
|
250
|
+
2: [
|
|
251
|
+
{ name: "Apple ProRes 4444", description: "ProRes 4444 (highest quality with alpha)" },
|
|
252
|
+
{ name: "Apple ProRes 422", description: "ProRes 422 standard" },
|
|
253
|
+
{ name: "Apple ProRes 422 HQ", description: "ProRes 422 HQ (high quality)" },
|
|
254
|
+
{ name: "Apple ProRes 422 LT", description: "ProRes 422 LT (lighter)" },
|
|
255
|
+
{ name: "Apple ProRes 422 Proxy", description: "ProRes 422 Proxy (offline editing)" },
|
|
256
|
+
{ name: "Animation", description: "Lossless animation codec" }
|
|
257
|
+
],
|
|
258
|
+
10: [
|
|
259
|
+
{ name: "AAC 320kbps", description: "High quality AAC audio" },
|
|
260
|
+
{ name: "AAC 192kbps", description: "Medium quality AAC audio" },
|
|
261
|
+
{ name: "AAC 128kbps", description: "Standard quality AAC audio" }
|
|
262
|
+
],
|
|
263
|
+
11: [
|
|
264
|
+
{ name: "MP3 320kbps", description: "Highest quality MP3" },
|
|
265
|
+
{ name: "MP3 192kbps", description: "High quality MP3" },
|
|
266
|
+
{ name: "MP3 128kbps", description: "Standard quality MP3" }
|
|
267
|
+
],
|
|
268
|
+
13: [
|
|
269
|
+
{ name: "WAV 48kHz 16-bit", description: "Standard broadcast WAV" },
|
|
270
|
+
{ name: "WAV 48kHz 24-bit", description: "High quality WAV" },
|
|
271
|
+
{ name: "WAV 44.1kHz 16-bit", description: "CD quality WAV" }
|
|
272
|
+
]
|
|
273
|
+
};
|
|
274
|
+
var presets = presetsByExporter[exporterIdx] || [{ name: "Default", description: "Default preset for this exporter" }];
|
|
275
|
+
return __result({ exporterIndex: exporterIdx, presets: presets, note: "Static list of common presets. Actual presets depend on your installation and custom .epr files." });
|
|
276
276
|
`);
|
|
277
277
|
return sendCommand(script, bridgeOptions);
|
|
278
278
|
},
|
|
@@ -290,12 +290,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
290
290
|
handler: async (args) => {
|
|
291
291
|
const inSeconds = args.in_seconds !== undefined ? args.in_seconds : -1;
|
|
292
292
|
const outSeconds = args.out_seconds !== undefined ? args.out_seconds : -1;
|
|
293
|
-
const script = buildToolScript(`
|
|
294
|
-
if (typeof renderSequencePreview === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
295
|
-
var result = renderSequencePreview(${inSeconds}, ${outSeconds});
|
|
296
|
-
var parsed = JSON.parse(result);
|
|
297
|
-
if (!parsed.success) return __error(parsed.error);
|
|
298
|
-
return __result(parsed.data);
|
|
293
|
+
const script = buildToolScript(`
|
|
294
|
+
if (typeof renderSequencePreview === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
295
|
+
var result = renderSequencePreview(${inSeconds}, ${outSeconds});
|
|
296
|
+
var parsed = JSON.parse(result);
|
|
297
|
+
if (!parsed.success) return __error(parsed.error);
|
|
298
|
+
return __result(parsed.data);
|
|
299
299
|
`);
|
|
300
300
|
return sendCommand(script, bridgeOptions);
|
|
301
301
|
},
|
|
@@ -308,12 +308,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
308
308
|
required: [],
|
|
309
309
|
},
|
|
310
310
|
handler: async (_args) => {
|
|
311
|
-
const script = buildToolScript(`
|
|
312
|
-
if (typeof startAMEBatch === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
313
|
-
var result = startAMEBatch();
|
|
314
|
-
var parsed = JSON.parse(result);
|
|
315
|
-
if (!parsed.success) return __error(parsed.error);
|
|
316
|
-
return __result(parsed.data);
|
|
311
|
+
const script = buildToolScript(`
|
|
312
|
+
if (typeof startAMEBatch === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
313
|
+
var result = startAMEBatch();
|
|
314
|
+
var parsed = JSON.parse(result);
|
|
315
|
+
if (!parsed.success) return __error(parsed.error);
|
|
316
|
+
return __result(parsed.data);
|
|
317
317
|
`);
|
|
318
318
|
return sendCommand(script, bridgeOptions);
|
|
319
319
|
},
|
|
@@ -326,12 +326,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
326
326
|
required: [],
|
|
327
327
|
},
|
|
328
328
|
handler: async (_args) => {
|
|
329
|
-
const script = buildToolScript(`
|
|
330
|
-
if (typeof launchAME === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
331
|
-
var result = launchAME();
|
|
332
|
-
var parsed = JSON.parse(result);
|
|
333
|
-
if (!parsed.success) return __error(parsed.error);
|
|
334
|
-
return __result(parsed.data);
|
|
329
|
+
const script = buildToolScript(`
|
|
330
|
+
if (typeof launchAME === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
331
|
+
var result = launchAME();
|
|
332
|
+
var parsed = JSON.parse(result);
|
|
333
|
+
if (!parsed.success) return __error(parsed.error);
|
|
334
|
+
return __result(parsed.data);
|
|
335
335
|
`);
|
|
336
336
|
return sendCommand(script, bridgeOptions);
|
|
337
337
|
},
|
|
@@ -347,32 +347,32 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
347
347
|
},
|
|
348
348
|
handler: async (args) => {
|
|
349
349
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
350
|
-
const script = buildToolScript(`
|
|
351
|
-
if (typeof exportMarkersAsCSV !== "undefined") {
|
|
352
|
-
var result = exportMarkersAsCSV("${outputPathEsc}");
|
|
353
|
-
var parsed = JSON.parse(result);
|
|
354
|
-
if (!parsed.success) return __error(parsed.error);
|
|
355
|
-
return __result(parsed.data);
|
|
356
|
-
}
|
|
357
|
-
var seq = app.project.activeSequence;
|
|
358
|
-
if (!seq) return __error("No active sequence");
|
|
359
|
-
var markers = seq.markers;
|
|
360
|
-
if (!markers) return __result({ note: "No markers found or markers not accessible.", outputPath: "${outputPathEsc}" });
|
|
361
|
-
var csvLines = ["Name,Start,End,Type,Comment"];
|
|
362
|
-
for (var i = 0; i < markers.numMarkers; i++) {
|
|
363
|
-
var marker = markers[i];
|
|
364
|
-
var startSecs = marker.start ? __ticksToSeconds(marker.start.ticks) : 0;
|
|
365
|
-
var endSecs = marker.end ? __ticksToSeconds(marker.end.ticks) : startSecs;
|
|
366
|
-
var name = (marker.name || "").replace(/,/g, ";");
|
|
367
|
-
var comment = (marker.comments || "").replace(/,/g, ";");
|
|
368
|
-
csvLines.push(name + "," + startSecs + "," + endSecs + "," + (marker.type || "Comment") + "," + comment);
|
|
369
|
-
}
|
|
370
|
-
var csvContent = csvLines.join("\\n");
|
|
371
|
-
var f = new File("${outputPathEsc}");
|
|
372
|
-
f.open("w");
|
|
373
|
-
f.write(csvContent);
|
|
374
|
-
f.close();
|
|
375
|
-
return __result({ outputPath: "${outputPathEsc}", markersExported: markers.numMarkers });
|
|
350
|
+
const script = buildToolScript(`
|
|
351
|
+
if (typeof exportMarkersAsCSV !== "undefined") {
|
|
352
|
+
var result = exportMarkersAsCSV("${outputPathEsc}");
|
|
353
|
+
var parsed = JSON.parse(result);
|
|
354
|
+
if (!parsed.success) return __error(parsed.error);
|
|
355
|
+
return __result(parsed.data);
|
|
356
|
+
}
|
|
357
|
+
var seq = app.project.activeSequence;
|
|
358
|
+
if (!seq) return __error("No active sequence");
|
|
359
|
+
var markers = seq.markers;
|
|
360
|
+
if (!markers) return __result({ note: "No markers found or markers not accessible.", outputPath: "${outputPathEsc}" });
|
|
361
|
+
var csvLines = ["Name,Start,End,Type,Comment"];
|
|
362
|
+
for (var i = 0; i < markers.numMarkers; i++) {
|
|
363
|
+
var marker = markers[i];
|
|
364
|
+
var startSecs = marker.start ? __ticksToSeconds(marker.start.ticks) : 0;
|
|
365
|
+
var endSecs = marker.end ? __ticksToSeconds(marker.end.ticks) : startSecs;
|
|
366
|
+
var name = (marker.name || "").replace(/,/g, ";");
|
|
367
|
+
var comment = (marker.comments || "").replace(/,/g, ";");
|
|
368
|
+
csvLines.push(name + "," + startSecs + "," + endSecs + "," + (marker.type || "Comment") + "," + comment);
|
|
369
|
+
}
|
|
370
|
+
var csvContent = csvLines.join("\\n");
|
|
371
|
+
var f = new File("${outputPathEsc}");
|
|
372
|
+
f.open("w");
|
|
373
|
+
f.write(csvContent);
|
|
374
|
+
f.close();
|
|
375
|
+
return __result({ outputPath: "${outputPathEsc}", markersExported: markers.numMarkers });
|
|
376
376
|
`);
|
|
377
377
|
return sendCommand(script, bridgeOptions);
|
|
378
378
|
},
|
|
@@ -388,12 +388,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
388
388
|
},
|
|
389
389
|
handler: async (args) => {
|
|
390
390
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
391
|
-
const script = buildToolScript(`
|
|
392
|
-
if (typeof exportMarkersAsEDL === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
393
|
-
var result = exportMarkersAsEDL("${outputPathEsc}");
|
|
394
|
-
var parsed = JSON.parse(result);
|
|
395
|
-
if (!parsed.success) return __error(parsed.error);
|
|
396
|
-
return __result(parsed.data);
|
|
391
|
+
const script = buildToolScript(`
|
|
392
|
+
if (typeof exportMarkersAsEDL === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
393
|
+
var result = exportMarkersAsEDL("${outputPathEsc}");
|
|
394
|
+
var parsed = JSON.parse(result);
|
|
395
|
+
if (!parsed.success) return __error(parsed.error);
|
|
396
|
+
return __result(parsed.data);
|
|
397
397
|
`);
|
|
398
398
|
return sendCommand(script, bridgeOptions);
|
|
399
399
|
},
|
|
@@ -409,12 +409,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
409
409
|
},
|
|
410
410
|
handler: async (args) => {
|
|
411
411
|
const csvPathEsc = args.csv_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
412
|
-
const script = buildToolScript(`
|
|
413
|
-
if (typeof importMarkersFromCSV === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
414
|
-
var result = importMarkersFromCSV("${csvPathEsc}");
|
|
415
|
-
var parsed = JSON.parse(result);
|
|
416
|
-
if (!parsed.success) return __error(parsed.error);
|
|
417
|
-
return __result(parsed.data);
|
|
412
|
+
const script = buildToolScript(`
|
|
413
|
+
if (typeof importMarkersFromCSV === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
414
|
+
var result = importMarkersFromCSV("${csvPathEsc}");
|
|
415
|
+
var parsed = JSON.parse(result);
|
|
416
|
+
if (!parsed.success) return __error(parsed.error);
|
|
417
|
+
return __result(parsed.data);
|
|
418
418
|
`);
|
|
419
419
|
return sendCommand(script, bridgeOptions);
|
|
420
420
|
},
|
|
@@ -427,35 +427,35 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
427
427
|
required: [],
|
|
428
428
|
},
|
|
429
429
|
handler: async (_args) => {
|
|
430
|
-
const script = buildToolScript(`
|
|
431
|
-
var codecs = {
|
|
432
|
-
video: [
|
|
433
|
-
{ name: "H.264", type: "video", hardware: false },
|
|
434
|
-
{ name: "H.265 (HEVC)", type: "video", hardware: false },
|
|
435
|
-
{ name: "Apple ProRes 4444", type: "video", hardware: false },
|
|
436
|
-
{ name: "Apple ProRes 422", type: "video", hardware: false },
|
|
437
|
-
{ name: "Apple ProRes 422 HQ", type: "video", hardware: false },
|
|
438
|
-
{ name: "Apple ProRes 422 LT", type: "video", hardware: false },
|
|
439
|
-
{ name: "Apple ProRes 422 Proxy", type: "video", hardware: false },
|
|
440
|
-
{ name: "DNxHD 145", type: "video", hardware: false },
|
|
441
|
-
{ name: "DNxHD 220", type: "video", hardware: false },
|
|
442
|
-
{ name: "DNxHR HQ", type: "video", hardware: false },
|
|
443
|
-
{ name: "MPEG-2", type: "video", hardware: false },
|
|
444
|
-
{ name: "Animation", type: "video", hardware: false },
|
|
445
|
-
{ name: "None (Uncompressed)", type: "video", hardware: false },
|
|
446
|
-
{ name: "DV NTSC", type: "video", hardware: false },
|
|
447
|
-
{ name: "DV PAL", type: "video", hardware: false },
|
|
448
|
-
{ name: "DVCPRO HD", type: "video", hardware: false }
|
|
449
|
-
],
|
|
450
|
-
audio: [
|
|
451
|
-
{ name: "AAC", type: "audio" },
|
|
452
|
-
{ name: "MP3", type: "audio" },
|
|
453
|
-
{ name: "PCM (uncompressed)", type: "audio" },
|
|
454
|
-
{ name: "AIFF", type: "audio" },
|
|
455
|
-
{ name: "AC3 Dolby Digital", type: "audio" }
|
|
456
|
-
]
|
|
457
|
-
};
|
|
458
|
-
return __result({ codecs: codecs, note: "Static list of common codecs. Actual installed codecs depend on your Premiere Pro version and third-party plugin installations." });
|
|
430
|
+
const script = buildToolScript(`
|
|
431
|
+
var codecs = {
|
|
432
|
+
video: [
|
|
433
|
+
{ name: "H.264", type: "video", hardware: false },
|
|
434
|
+
{ name: "H.265 (HEVC)", type: "video", hardware: false },
|
|
435
|
+
{ name: "Apple ProRes 4444", type: "video", hardware: false },
|
|
436
|
+
{ name: "Apple ProRes 422", type: "video", hardware: false },
|
|
437
|
+
{ name: "Apple ProRes 422 HQ", type: "video", hardware: false },
|
|
438
|
+
{ name: "Apple ProRes 422 LT", type: "video", hardware: false },
|
|
439
|
+
{ name: "Apple ProRes 422 Proxy", type: "video", hardware: false },
|
|
440
|
+
{ name: "DNxHD 145", type: "video", hardware: false },
|
|
441
|
+
{ name: "DNxHD 220", type: "video", hardware: false },
|
|
442
|
+
{ name: "DNxHR HQ", type: "video", hardware: false },
|
|
443
|
+
{ name: "MPEG-2", type: "video", hardware: false },
|
|
444
|
+
{ name: "Animation", type: "video", hardware: false },
|
|
445
|
+
{ name: "None (Uncompressed)", type: "video", hardware: false },
|
|
446
|
+
{ name: "DV NTSC", type: "video", hardware: false },
|
|
447
|
+
{ name: "DV PAL", type: "video", hardware: false },
|
|
448
|
+
{ name: "DVCPRO HD", type: "video", hardware: false }
|
|
449
|
+
],
|
|
450
|
+
audio: [
|
|
451
|
+
{ name: "AAC", type: "audio" },
|
|
452
|
+
{ name: "MP3", type: "audio" },
|
|
453
|
+
{ name: "PCM (uncompressed)", type: "audio" },
|
|
454
|
+
{ name: "AIFF", type: "audio" },
|
|
455
|
+
{ name: "AC3 Dolby Digital", type: "audio" }
|
|
456
|
+
]
|
|
457
|
+
};
|
|
458
|
+
return __result({ codecs: codecs, note: "Static list of common codecs. Actual installed codecs depend on your Premiere Pro version and third-party plugin installations." });
|
|
459
459
|
`);
|
|
460
460
|
return sendCommand(script, bridgeOptions);
|
|
461
461
|
},
|
|
@@ -475,12 +475,12 @@ export function getExportPresetsTools(bridgeOptions) {
|
|
|
475
475
|
const seqIndex = args.sequence_index ?? 0;
|
|
476
476
|
const outputPathEsc = args.output_path.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
477
477
|
const optionsJson = JSON.stringify(JSON.stringify(args.options || {}));
|
|
478
|
-
const script = buildToolScript(`
|
|
479
|
-
if (typeof exportOMF === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
480
|
-
var result = exportOMF(${seqIndex}, "${outputPathEsc}", ${optionsJson});
|
|
481
|
-
var parsed = JSON.parse(result);
|
|
482
|
-
if (!parsed.success) return __error(parsed.error);
|
|
483
|
-
return __result(parsed.data);
|
|
478
|
+
const script = buildToolScript(`
|
|
479
|
+
if (typeof exportOMF === "undefined") return __error("Export functions require premiere.jsx to be loaded. Try restarting the CEP panel.");
|
|
480
|
+
var result = exportOMF(${seqIndex}, "${outputPathEsc}", ${optionsJson});
|
|
481
|
+
var parsed = JSON.parse(result);
|
|
482
|
+
if (!parsed.success) return __error(parsed.error);
|
|
483
|
+
return __result(parsed.data);
|
|
484
484
|
`);
|
|
485
485
|
return sendCommand(script, bridgeOptions);
|
|
486
486
|
},
|