Re: Another Quicktime question
Re: Another Quicktime question
- Subject: Re: Another Quicktime question
- From: Rainer Standke <email@hidden>
- Date: Sat, 8 Dec 2007 11:15:29 -0800
Hi Oliver,
thanks for your reply. I understand you are compensating for a
potentially non-standard-length of the first frame, but are assuming
that all frames thereafter are uniform in length. You seem to be
using 'clicks' to determine the current frame's index.
What I am after is to determine whether a 'click' value actually is
the first 'click' on a frame. I am looking for click-independent
confirmation, so to speak. Is there a way to ask for the current
frame's index?
I'm wondering why you didn't use time scale in your code. You don't
think that's reliable?
Merci,
Rainer
On Dec 8, 2007, at 8:00 , Olivier Ringenbach wrote:
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 (applescript-
email@hidden)
Help/Unsubscribe/Update your Subscription:
40standke.com
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
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