2012-08-27 3 views
1

초보다는 프레임 번호마다 비디오 파일을 트리밍하고 싶습니다. 는 지금까지 몇 가지 옵션을 시도하고이 지금까지 가장 성공적인 하나입니다퀵타임에서 애플 스크립트 트림 동영상

set start_trim to 5 
set end_trim to 6 

tell application "QuickTime Player" 
    activate 
    try 
     set movieFile to (the POSIX path of ("PathToMovieFolder")) & "MyMovie.mov" 
    on error errorMsg number errorNum 
     display alert errorMsg & space & errorNum message ¬ 
      "An error occured trying to find the file " & movieFile & "." & return & ¬ 
      "Check the file path exists, and the file spelling." as warning giving up after 60 
    end try 
    try 
     open movieFile with presenting 
     delay (0.25) 
     present document 1 
     delay (0.25) 
     trim document 1 from start_trim to end_trim 
     display alert errorMsg & space & errorNum message ¬ 
      "An error occured trying to open & play the file " & movieFile & "." & return & ¬ 
      "Check the file path exists, and the set delay time" as warning giving up after 60 
    end try 
end tell 

그것이 무엇을하는가 초보다는 정확한 프레임에 트림이다. 해결 방법에 대한 아이디어가 있으십니까?

답변

1

프레임이 QuickTime Player 사전에 없습니다. 그러나 QuickTime Player 7 사전에 있습니다. 오히려 초보다 프레임을 사용하여 손질해야하는 경우 나 퀵타임 플레이어 7

의 사본을 찾는 제안 또는 어쩌면 당신이 뭔가를 할 수 있습니다 :

set FPS to 29.97 
set start_trim to 5 
set end_trim to 7 

set startFrame to start_trim/FPS 
set endFrame to end_trim/FPS 

tell application "QuickTime Player" 
    activate 
    trim document 1 from startFrame to endFrame 
end tell 
+0

감사 남자! 완벽하게 작동하는 것 같습니다. – user1627273