44
Extract Metadata from a QuickTime Movie
The QuickTime movie player application has a useful scripting interface for examining metadata and any other video, audio or data tracks in a movie.
This fragment of AppleScript presents the image rectangle for a video clip:
tell application “QuickTime Player”
set myMovieSize to natural dimensions of front movie
set myMovieWidth to item 1 of myMovieSize
set myMovieHeight to item 2 of myMovieSize
display dialog myMovieWidth
display dialog myMovieHeight
end tell
Note that we measure the natural dimensions. Omitting the word natural yields the current playback size instead of the source dimensions ...
Get Developing Quality Metadata now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.