views:

810

answers:

1

I am trying to export a snapshot of a movie using Quicktime. This is the code that does the snapshot:

export document 1 to file target_file as image sequence using settings "JPEG, 10 fps"

This saves the image as PNG rather a JPEG file.

When I use the below code:

export document 1 to file target_file as image sequence using settings preset "JPEG, 25 fps"

it works fine with the preset settings. But with my custom settings it fails to create the JPEG but created a PNG instead.

I am trying to read the support docs but couldnt find anything.

Thanks in advance for any help!

+1  A: 

Setting according to the QuickTime Player dictionary is expecting a file (specifically a .qtes or .set file) containing the settings.

You can save a .qtes file of your most recently used Image Sequence settings by using the following AppleScript:

set file2save to (choose file name default location (path to desktop) default name "setting.qtes")

tell application "QuickTime Player"
    tell first document
        save export settings for image sequence to file2save
    end tell
end tell

Original source: MacScripter

After that change the code to:

tell application "QuickTime Player"
    #Change this path to wherever the .qtes file is
    set settings_file to "Macintosh HD:setting.qtes" 
    export document 1 to file "prefix" as image sequence using settings alias settings_file
end tell

Remember to change "Macintosh HD" in the script to the name of your volume the .qtes file is on - if not you'll get the .png files.

Chealion
Many thanks!!!!
Pradeep