Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video 在QuickTime中自动打开-保存-关闭多个文件_Video_Osx Yosemite_Encode_Quicktime_Automator - Fatal编程技术网

Video 在QuickTime中自动打开-保存-关闭多个文件

Video 在QuickTime中自动打开-保存-关闭多个文件,video,osx-yosemite,encode,quicktime,automator,Video,Osx Yosemite,Encode,Quicktime,Automator,我有很多视频文件要在QuickTime中转换。我用于转换每个文件的过程如下所示: 1-使用QuickTime应用程序(默认应用程序)打开文件 2-文件-->保存(cmd+S) 3-接受保存对话框,保留与原始文件相同的默认文件名(简介) 4-关闭文件(cmd+W) 从下一个文件重新开始 有没有办法通过使用Automator或任何脚本来自动化这个过程? 谢谢这在Automator中似乎不可能实现,但以下AppleScript应该适用于您: set mtsFolder to choose folder

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

从下一个文件重新开始

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

这在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的文件-->导出中列出的、可用于MTS文件的任何选项中进行选择


祝你好运,

原始文件是哪种格式的?MTS,我想将它们转换成mov文件谢谢。我正试图应用你的建议,但我不知道怎么做。我已经创建了一个新的automator文档,并添加了“RunAppleScript”,在其中我粘贴了您的代码。我想我必须指出我的mst文件夹的某个地方,但我不确定在哪里。再次感谢您最简单的解决方案是打开脚本编辑器并将代码粘贴到那里,然后运行脚本。您可以转到脚本编辑器的首选项并选中菜单栏中的“显示脚本菜单”框,然后可以随时访问脚本。