• 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: Quicktime frame rate calculation error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quicktime frame rate calculation error


  • Subject: Re: Quicktime frame rate calculation error
  • From: Jim Weisbin <email@hidden>
  • Date: Sat, 13 Dec 2014 16:42:01 -0500

I was mistaken, I can get the path to the original file in Quicktime with "get original file of document 1"

However, this throws an "out of bounds" error:

tell application id "com.apple.quicktimeplayer"
activate
set original_file to get original file of document 1
set posix_file to quoted form of POSIX path of original_file
set anNSURL to current application's NSURL's fileURLWithPath:posix_file
set theAsset to current application's AVURLAsset's URLAssetWithURL:myURL options:(missing value)
set theTrack to (theAsset's tracksWithMediaType:(current application's AVMediaTypeVideo))'s objectAtIndex:0
set theFrameRate to theTrack's nominalFrameRate()
set theSize to theTrack's naturalSize()
return {theFrameRate, width of theSize, height of theSize}


Jim Weisbin | C.T.O. | human | 138 Fifth Avenue | 3rd Floor | New York, NY | 10011 |  (212) 352-0211 |  (917) 375-2272 | Los Angeles Office | 2046 Broadway | Santa Monica, CA | 90404 |  (310) 264-0211 telephone | www.humanworldwide.com

Click here to view our online reel


 _______________________________________________
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: Quicktime frame rate calculation error
      • From: Jim Weisbin <email@hidden>
    • Re: Quicktime frame rate calculation error
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Javascript for automation quastions
  • Next by Date: Re: Quicktime frame rate calculation error
  • Previous by thread: Re: Quicktime frame rate calculation error
  • Next by thread: Re: Quicktime frame rate calculation error
  • Index(es):
    • Date
    • Thread