【问题标题】:Automate Open - Save - Close with several files in QuickTime使用 QuickTime 中的多个文件自动打开 - 保存 - 关闭
【发布时间】:2015-10-03 12:48:42
【问题描述】:

我有许多要在 QuickTime 中转换的视频文件。我用来转换每个文件的过程如下: 1- 使用 QuickTime 应用程序(默认应用程序)打开文件 2-文件->保存(cmd + S) 3-接受保存对话框,保留与原始文件相同的默认文件名(介绍) 4- 关闭文件 (cmd+W)

从下一个文件重新开始

有没有办法通过使用 Automator 或任何脚本来自动化这个过程? 谢谢你

【问题讨论】:

  • 原始文件是什么格式的?
  • MTS,我想将它们转换成 mov 文件

标签: video osx-yosemite encode quicktime automator


【解决方案1】:

Automator 似乎无法做到这一点,但以下 AppleScript 应该适合您:

set mtsFolder to choose folder

tell application "Finder" to set targets to every file in folder mtsFolder whose name extension = "MTS"

repeat with eTarget in targets
    set movName to my JustTheName(eTarget) & "mov"
    tell application "Finder" to set movDestination to (eTarget's container as text) & movName
    tell application "QuickTime Player"
        open eTarget as alias
        delay 2
        export front document in movDestination using settings preset "720p"  -- This can be set to whatever is available in QuickTime
        close front document
    end tell
end repeat


to JustTheName(f)
    tell application "Finder"
        set fName to f's name
        set fExt to f's name extension
    end tell
    return characters 1 thru -((fExt's length) + 1) of fName as text
end JustTheName

设置为以 720p 分辨率保存 .mov 文件。您可以从 QuickTime 的 File--> Export 中列出的任何选项中进行选择,该选项可用于您的 MTS 文件。

祝你好运,

【讨论】:

  • 谢谢你。我正在尝试应用您的建议,但我不知道该怎么做。我创建了一个新的自动化文档,并添加了“运行 AppleScript”,我在其中粘贴了您的代码。我想我必须在某个地方指出我的 mst 文件夹,但我不确定在哪里。再次感谢您
  • 最简单的解决方案是打开脚本编辑器并将代码粘贴到那里,然后运行脚本。您可以转到脚本编辑器的首选项并选中在菜单栏中显示脚本菜单框,然后您可以随时访问脚本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-11-24
  • 1970-01-01
相关资源
最近更新 更多