2013-01-12 4 views
0

비디오에서 이미지 시퀀스를 만드는 데 사용되는 AppleScript가 있습니다. 그것은 내 니콘 카메라로 찍은 영화에 좋습니다. 그것은 내 캐논 카메라로 찍은 영화에 대한 단색 녹색 이미지를 만듭니다. 기이 한 일은 quicktime을 사용하여 수동으로 이미지 시퀀스를 내보내는 경우 잘 작동합니다 (녹색 이미지 없음). 스크립트를 통해 실행될 때만 퀵타임이 녹색 프레임 (모든 녹색 프레임)을 만듭니다. 다음은 퀵타임 이미지 시퀀스 내보내기가 녹색 프레임을 만듭니다.

코드입니다 :

#set vFile to (choose file with prompt "Select a video file:") 
on open of finderObjects -- "open" handler triggered by drag'n'drop launches 
    repeat with vFile in (finderObjects) -- in case multiple objects dropped on applet 
     tell application "Finder" 
      list folder ":Library:QuickTime:Presets" 
      set theList to result 
      set qSet to (choose from list theList) 
      set vBase to the name of vFile 
     end tell 

     tell application "Finder" 
      if (folder ((path to movies folder as string) & "TLTemp") exists) then 
       delete folder ((path to movies folder as string) & "TLTemp") 
      end if 

      if not (folder ((path to movies folder as string) & "TLTemp") exists) then 
       set TLDir to make new folder at (path to movies folder as string) with properties ¬ 
        {name:"TLTemp"} 
      end if 
     end tell 


     #tell application "QuickTime Player 7" to open vFile 
     tell application "QuickTime Player 7" 
      open vFile 
      set settings_file to (":Library:QuickTime:Presets:" & qSet) 
      set TLtemp to ((path to movies folder as string) & "TLTemp:" & vBase) 
      with timeout of 500 seconds 
       export document 1 to TLtemp as image sequence using settings settings_file 
      end timeout 
      #export document 1 to TLtemp as image sequence 

      close document 1 
     end tell 

     set the item_list to list folder ((path to movies folder as string) & "TLTemp:") without invisibles 
     set pictureFile to ((path to movies folder as string) & "TLTemp:" & item 1 of item_list) 
     tell application "QuickTime Player 7" 
      activate 
      open image sequence pictureFile frames per second 30 
      set the looping of document 1 to true 
      play document 1 
     end tell 



    end repeat 
end open 

답변

0

나는 이미지 시퀀스와 함께 일한 적이했지만, 난 퀵타임 7 Finder의 선택 항목을 열고 PICT 파일로 스틸 이미지 (10)를 캡처 애플 스크립트가 있습니다. 앞면 문서의 현재 시간을 한 프레임 씩 늘린 경우 (지속 시간/11 시간 대신), 도움이 될까요?

-- Use iPhoto to convert these PICT files to PNGs. 
set exportFolder to (path to the desktop as text) & "photos from QuickTime:" 
set picturesPerVideo to 10 



tell application "Finder" to set theSelection to the selection as list 
repeat with i from 1 to (count of theSelection) 
    set theItem to item i of theSelection 
    tell application "Finder" 
     set finderPath to (file (theItem as text))'s POSIX path 
     set theName to theItem's name 
     open theItem using (path to application "QuickTime Player 7") 
    end tell 
    set theCurrentDate to current date 
    tell application "System Events" to set process "QuickTime Player 7"'s visible to false 
    tell application "QuickTime Player 7" 
     repeat until front document's path = finderPath 
      if ((current date) - 15) > theCurrentDate then error "Timeout." 
      delay 1 
     end repeat 

     repeat with j from 1 to picturesPerVideo 
      set timeInVideo to j/(picturesPerVideo + 1) 
      set front document's current time to (front document's duration) * timeInVideo 
      set exportPath to exportFolder & theName & "_" & j & ".pict" 
      export front document to exportPath as picture replacing yes 
     end repeat 
     close front document 
    end tell 
end repeat 

그리고 늦게 답변드립니다. 나는 방금 당신의 게시물을 발견했습니다.

+0

문제는 퀵타임 내보내기 프로세스 중에 발생하기 때문에 내 문제가 해결되지 않습니다. iPhoto에는 비디오 파일에서 프레임을 내보낼 수있는 기능이 없습니다. – tavis

+0

QuickTime 7을 사용하여 .PICT 이미지를 생성 한 다음 iPhoto를 사용하여 이미지를 다른 이미지 형식으로 변환합니다. 위의 AppleScript로 단색 녹색 이미지가 생성된다고 말하는가? 시험 할 스 니펫 비디오를 나에게 줄 수 있니? [이 스크립트는 저에게 효과적입니다.] (http://dl.dropbox.com/u/475192/2013_03_22.mov) –

+0

이 스크립트는 nikon 카메라로 촬영 한 비디오에서 작동합니다. 하지만 내 캐논 powershot 나는 이미지 시퀀스 내보내기를 할 때 모든 단색 녹색 이미지를 얻을. – tavis

관련 문제