首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Premiere的ExtendScript连接将导入的文件添加到序列中

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

Stack Overflow用户
提问于 2013-10-07 20:39:52
回答 1查看 7.2K关注 0票数 177

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

我知道Adobe没有关于Premiere脚本的正式文档,所以我一直在使用数据浏览器(在ExtendScript ToolkitESTK中)和一组方便的类引用,我找到了here

我已经成功地加载了CSV文件,该文件指定了所需的信息,并且知道如何导入视频文件并创建一个新的序列(如解释的here)。我现在遇到的麻烦是将导入的文件正确地剪裁并放入序列中。我看到activeSequence有像setInPoint和setOutPoint这样的方法,但这似乎不能在导出时得到正确的裁剪。

下面是我的代码和注释,以显示整个脚本的流程:

代码语言:javascript
复制
#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
EN

回答 1

Stack Overflow用户

发布于 2015-08-25 22:18:20

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

将剪辑从源代码复制到序列可以通过多种方式完成,而且应该非常容易。

所以,我的建议是尝试使用源,而不是剪辑的顺序。也许运气会更好。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19234310

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档