AppleScript나 Automator를 사용하여 Finder에서 선택한 비디오 파일을 일괄적으로 내보내려면 어떻게 해야 합니까?아니다4가지 형식만 선택할 수 있는 "선택한 비디오 파일 인코딩" 서비스 방법을 사용하시나요?
기본적으로 QuickTime 7에서 마지막으로 비디오를 내보낼 때 선택한 "최근 설정"을 사용하여 비디오를 내보내거나 특정 형식을 선택하기 위해 QuickTime 7의 내보내기 대화 상자를 사용하여 설정을 지정하는 옵션이 있어야 합니다. 내가 선택한 동영상이 필요합니다.
때로는 코덱이 "Apple ProRes 422 LT"여야 하고, 다른 경우에는 일반 "Apple ProRes 422"를 사용해야 합니다. 또한 소스 파일 프레임 속도에 관계없이 프레임 속도가 30으로 설정되어 있고 크기가 1280x720 또는 1920x1080인지 확인해야 합니다.
마지막으로, 다양한 비디오의 오디오 인코딩에 대해 다른 옵션도 설정해야 합니다.
누군가가 이 작업을 수행하는 방법을 알고 있기를 바랍니다. 이곳저곳과 구글을 뒤져보았으나 찾지 못했습니다. 내가 온라인에서 찾은 대부분의 정보는 사람들에게 "선택한 비디오 파일 인코딩" 서비스를 사용하는 동일한 방법을 사용하는 방법을 알려주는 것 같습니다.
답변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->서비스 메뉴에서 서비스를 선택한 다음 멋진 커피를 즐기면 됩니다. 모든 비디오가 변환되는 동안 휴식을 취하세요! =디