applescript - quicktime导出到图像序列问题

时间:2009-06-23 19:40:49

标签: applescript quicktime

我正在尝试使用Quicktime导出电影的快照。这是执行快照的代码:

export document 1 to file target_file as image sequence using settings "JPEG, 10 fps"

这会将图像保存为PNG而非JPEG文件。

当我使用以下代码时:

export document 1 to file target_file as image sequence using settings preset "JPEG, 25 fps"

它可以正常使用预设设置。但是使用我的自定义设置,它无法创建JPEG,而是创建了PNG。

我正在尝试阅读支持文档但无法找到任何内容。

提前感谢您的帮助!

1 个答案:

答案 0 :(得分:2)

根据QuickTime Player字典进行设置需要包含设置的文件(特别是.qtes.set文件)。

您可以使用以下AppleScript保存最近使用的图像序列设置的.qtes文件:

set file2save to (choose file name default location (path to desktop) default name "setting.qtes")

tell application "QuickTime Player"
    tell first document
        save export settings for image sequence to file2save
    end tell
end tell

原始来源:MacScripter

之后将代码更改为:

tell application "QuickTime Player"
    #Change this path to wherever the .qtes file is
    set settings_file to "Macintosh HD:setting.qtes" 
    export document 1 to file "prefix" as image sequence using settings alias settings_file
end tell

请记住将脚本中的“Macintosh HD”更改为.qtes文件所在卷的名称 - 如果不是,您将获得.png文件。

相关问题