On Mar 30, 2006, at 12:04 PM, Peter Laurens wrote:
I'm looking for a way to get basic information about a Quicktime
movie, for example, QuicktimePlayer provides information such as
the format (such as "MPEG-4 Video, 704 x 544, Millions AAC, Stereo
(L R), 44.100 kHz"), data-rate, etc.
I am using QTKit in Cocoa, and I have been able to retrieve a lot
of information from the attribute dictionaries such as resolution,
duration, etc. But there is one main piece of info I can't seem to
get via QTKit, and that is the Video and Sound formats of the
tracks in the movie.
For example, I would like to be able to get the format of the video
track, e.g. "MPEG-4, Millions of Colors", and also the format of
the audio track, e.g. "AAC, Stereo, 44.100kHz"
Like I said, I'm using QTKit in Cocoa at the moment, I don't mind
dropping to the native Quicktime API, but I haven't done any native
Quicktime before so might need some hand-holding
QTKit does not currently provide this information, but you are not
the first to ask for it. You will indeed need to drop into the native
QuickTime API to get it. Getting the audio format is easy; something
like this should work:
If this completes successfully, str should be a CFStringRef (a.k.a.
NSString) that holds the info you want. Be sure to CFRelease the
string when you are finished with it. Try googling
kQTAudioPropertyID_SummaryString for more info.
The video part is slightly trickier. In theory one would do something
like this on a video track:
But the identifier "kICMImageDescriptionPropertyID_SummaryString" is
not defined in any public header file that I have seen (and googling
it comes up empty). Given that kQTAudioPropertyID_SummaryString is
'asum', one could make some reasonable guesses about what
kICMImageDescriptionPropertyID_SummaryString might be. But I fear I
have said too much already....
To get back to QTKit, a localized summary string describing the track
format would make a fine addition to the attributes returned by -
[QTTrack trackAttributes]. I will file an enhancement request.
Tim Monroe
QuickTime Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden