Re: Another Quicktime question
Re: Another Quicktime question
- Subject: Re: Another Quicktime question
- From: Olivier Ringenbach <email@hidden>
- Date: Sat, 08 Dec 2007 17:00:19 +0100
- Thread-topic: Another Quicktime question
Hi Rainer,
Le 7/12/07 21:02, « email@hidden »
<email@hidden> a écrit :
> I know how to locate to a frame by its index:
> tell movie 1 set current time to time of frame 32 of track 1
> I am wondering if it's possible get the index of the current frame
> after I set the current time to an arbitrary time (expressed in
> 'clicks', in the time scale of the movie). In brief, after setting
> the time to lets say 3497, can I ask what frame I'm on?
Assuming you're talking about video track, this should do the trick:
tell application "QuickTime Player"
tell document 1
set pos to current time
set vTrck to first track whose video depth 0
tell vTrck
set d1 to duration of frame 1 -- frame 1 may have been cut
set vd to duration of frame 2 -- standard duration
if d1 < vd then set pos to pos + vd - d1
set frameIndex to 1 + (round (pos / vd) rounding down)
end tell
end tell
end tell
HTH,
Olivier
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden