
AppleScriptまたはAutomatorを使用して、Finderで選択したビデオファイルを一括エクスポートするにはどうすればよいですか?ない選択できる形式が 4 つしかない「選択したビデオ ファイルのエンコード」サービス メソッドを使用するのですか?
基本的に、QuickTime 7 から最後にビデオをエクスポートしたときに選択した「最新の設定」を使用してビデオをエクスポートするか、QuickTime 7 のエクスポート ダイアログを使用して設定を指定するオプションを使用して、選択したビデオに必要な特定のフォーマットを選択する必要があります。
コーデックを「Apple ProRes 422 LT」にする必要がある場合もあれば、通常の「Apple ProRes 422」を使用する必要がある場合もあります。また、ソース ファイルのフレーム レートに関係なく、フレーム レートが 30 に設定され、寸法が 1280x720 または 1920x1080 になるようにする必要があります。
最後に、異なるビデオのオーディオ エンコードに対して異なるオプションを設定する必要もあります。
誰かにやり方を知っていればいいのですが。ここや Google でいろいろ調べましたが、わかりませんでした。オンラインで見つけた情報のほとんどは、同じ方法、つまり「選択したビデオ ファイルをエンコード」サービスを使用する方法を説明していただけのようです。
答え1
やったー! 実際に機能する Automator ワークフローをオンラインで見つけました。 画像の代わりにムービー ファイルを入力として受け取るように変更するだけです。 QuickTime 7 の「最新の設定」を使用するので、最初のビデオを手動でエクスポートして設定を正しく入力するだけで、残りは選択してバッチ処理できます。 やったー!
情報とワークフロー ファイルが記載されている元のページは次のとおりです。 http://ptrbrtz.net/batch-convert-animated-gifs-to-videos-using-applescript-automator-quicktime-7-on-os-x/
リンクしたページが消えてしまった場合に備えて、ここにもスクリプトを追加します。これは、Finder からのムービー ファイルを入力として、Automator にサービスとして追加するだけです。
これがサービスに追加する AppleScript です。サービスを「Export_mov_via_QuickTime7.workflow」として保存しました。
on run {inputFiles}
if inputFiles is equal to {} then
set inputFiles to (choose file with prompt "Select the file(s) to convert:" with multiple selections allowed without invisibles)
end if
open inputFiles
end run
on open droppedItems
tell application "Finder" to set inputFolder to (container of first item of droppedItems) as Unicode text
set outputFolder to (choose folder with prompt "Select output folder:" default location (inputFolder as alias)) as Unicode text
display dialog "Most recent QuickTime 7 export settings will be used.
Existing files will be overwritten/moved to trash!
Beware of evil QT7 Gamma shift!"
tell application "QuickTime Player 7"
activate
close every window
end tell
repeat with currentItem in droppedItems
tell application "Finder" to set fileName to name of currentItem as Unicode text
tell application "QuickTime Player 7"
open currentItem
tell front document to set frameCount to count of frames of first track
end tell
set outputFileName to (outputFolder & fileName & ".mov")
tell application "Finder"
if exists file outputFileName then
delete file outputFileName
end if
end tell
tell application "QuickTime Player 7"
if frameCount is greater than 1 then
with timeout of 86400 seconds -- 24 hours
export front document to outputFileName as QuickTime movie using most recent settings
end timeout
end if
close front document
end tell
end repeat
quit application "QuickTime Player 7"
end open
これで、QuickTime Player 7 Pro を使用して、任意の設定でビデオを一括エクスポートしたいときはいつでも、エクスポートしたい他のすべてのビデオを選択し、Finder -> サービス メニューでサービスを選択して、すべてのビデオが変換される間にコーヒー ブレイクを楽しむだけです。=D