Applescript not returning all Quicktime properties

according to the quicktime dictionary, properties like data rate, audio channels, etc. should be accessible by applescript, but:

tell QuickTime file (myFile) to set fileProperties to properties of tracks

returns “missing value” or 0 for most of the properties. Other permutations with “Quicktime data,” “tracks,” and “contents” yield the same results.

Ideas? Using Leopard.5.1.

Hi,

QuickTime file is an element of “System Events”, try this


set QTfile to POSIX path of (choose file)
tell application "System Events"
	tell QuickTime file QTfile
		set fileProperties to properties of tracks
	end tell
end tell

sorry, my mistake - the full script I used was as you just posted. It still only returns duration, dimensions, and size.

I have for each track:

{class:track, audio sample size:0, duration:3041352, high quality:false, dimensions:{0.0, 0.0}, data size:40646935, enabled:true, type:missing value, visual characteristic:false, modification time:date "Dienstag, 15. Februar 2005 4:07:27 Uhr", video depth:0, creation time:date "Montag, 14. Februar 2005 19:26:29 Uhr", kind:missing value, data rate:0, name:missing value, audio characteristic:false, start time:0, type class:missing value, audio channel count:0, audio sample rate:0.0, href:missing value, data format:missing value}

You’re getting a couple more results than me, but still no audio properties or data rate. I’m getting from properties of tracks:

from an .m2v
{{audio sample size:0, duration:4100180, high quality:false, dimensions:{0.0, 0.0}, data size:8036352, enabled:true, type:missing value, visual characteristic:false, modification time:missing value, video depth:0, creation time:missing value, kind:missing value, data rate:0, name:missing value, audio characteristic:false, start time:0, type class:missing value, audio channel count:0, class:track, audio sample rate:0.0, href:missing value, data format:missing value}, {audio sample size:0, duration:2694003, high quality:false, dimensions:{640.0, 480.0}, data size:22504521, enabled:true, type:missing value, visual characteristic:false, modification time:missing value, video depth:0, creation time:missing value, kind:missing value, data rate:0, name:missing value, audio characteristic:false, start time:0, type class:missing value, audio channel count:0, class:track, audio sample rate:0.0, href:missing value, data format:missing value}}

from a .wav
{audio sample size:0, duration:27334, high quality:false, dimensions:{0.0, 0.0}, data size:8036196, enabled:true, type:missing value, visual characteristic:false, modification time:missing value, video depth:0, creation time:missing value, kind:missing value, data rate:0, name:missing value, audio characteristic:false, start time:0, type class:missing value, audio channel count:0, class:track, audio sample rate:0.0, href:missing value, data format:missing value}

When using “properties” (not “properties of tracks”) I get:

{time scale:90000, resizable:stop, auto play:false, duration:4100180, data size:30540873, auto present:false, modification time:date “Tuesday, December 18, 2007 7:48:17 AM”, preferred volume:256, creation time:date “Tuesday, December 18, 2007 7:48:17 AM”, presentation mode:stop, looping:false, preview time:0, bounds:{0, 0, 640, 480}, class:movie data, auto quit when done:false, natural dimensions:{0, 0, 640, 480}, preview duration:0, stored stream:false, href:“file://localhost/Volumes/Macintosh %20HD/myFile.m2v”, preferred rate:65536}

The Quicktime Inspector will show me the values I need, but the quicktime suite will not. Quicktime is 7.3.1.