• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Another Quicktime question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Another Quicktime question
      • From: Rainer Standke <email@hidden>
  • Prev by Date: dev tools [was: Re: What makes AppleScript COOL!]
  • Next by Date: Re: AppleScript-Users Digest, Vol 4, Issue 626
  • Previous by thread: Another Quicktime question
  • Next by thread: Re: Another Quicktime question
  • Index(es):
    • Date
    • Thread