我正在尝试使用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。

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

提前感谢您的帮助!

有帮助吗?

解决方案

根据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文件。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top