I have an applescript used to create image sequences from videos. It works great for movies taken with my nikon camera. It creates a bunch of solid green images for movies taken with my canon camera. The weird thing is that if I use quicktime to export the image sequence manually it works fine (no green images). Only when run via the script does quicktime create the green frames (all green frames by the way).
Below is the code :
#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