gpt4 book ai didi

extendscript - 使用 Premiere Pro 的 ExtendScript 连接将导入的文件添加到序列中

转载 作者:行者123 更新时间:2023-12-03 04:14:57 27 4
gpt4 key购买 nike

我正在尝试在 Premiere Pro 的 ExtendScript 中创建一个脚本,该脚本将加载指定的视频文件,在指定的开始和停止时间剪辑它们,将它们放入序列中,然后导出由此产生的电影。

据我所知,Adobe 没有关于 Premiere Pro 脚本编写的官方文档,因此我一直使用数据浏览器(在 ExtendScript ToolkitESTK)以及我发现的一系列方便的类引用 here

我已成功加载指定所需信息的 CSV 文件,并且还知道如何导入视频文件并创建新序列(如 here 所述)。我现在遇到的麻烦是如何正确剪辑导入的文件并将其放入序列中。我看到 activeSequence 具有 setInPoint 和 setOutPoint 等方法,但这似乎不会导致导出时正确的修剪。

这是我的代码,带有注释以显示整个脚本的流程:

#target premierepro

var myDir = "G:\\directoryWithVideoFiles\\";
// defined "indexOf" subfunction here
// ***** begin main body of script *****
// (dataRuns has fields runName, startVideo, startTime, stopVideo, stopTime)
// Import video files listed in dataRuns
var vidFiles = new Array;
for (i=0; i<dataRuns.length; i++) {
if (indexOf.call(vidFiles,myDir + dataRuns[i].startVideo + '.MPG') == -1) {
vidFiles.push(myDir + dataRuns[i].startVideo + '.MPG');
}
if (indexOf.call(vidFiles,myDir + dataRuns[i].stopVideo + '.MPG') == -1) {
vidFiles.push(myDir + dataRuns[i].stopVideo + '.MPG');
}
app.project.createNewSequence(dataRuns[i].runName,'');
}
app.project.importFiles(vidFiles);
// at this point, for each run (called runName) I need to:
// - take a clip of the startVideo from the startTime to the end of the video
// - take a clip of the stopVideo from the start of the video to the stopTime
// - put clip 1 at the beginning of the associated sequence, & clip 2 right after
// - export the sequence as a new video file

最佳答案

与其在事件序列上设置输入/输出点,不如将原始视频加载到源窗口中,并在那里设置输入/输出点,然后在事件序列内构建最终版本。

可以通过多种方式将剪辑从源复制到序列,而且应该非常简单。

所以,是的,我的建议是尝试使用源而不是剪辑序列。可能会有更好的运气。

关于extendscript - 使用 Premiere Pro 的 ExtendScript 连接将导入的文件添加到序列中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19234310/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com