• 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: Sun, 14 Dec 2014 09:07:12 -0500

I got this working - it didn’t like “the quoted form of…” an an URL

set original_file to get original file of document 1
set posix_file to POSIX path of original_file
set output to current application's NSURL's fileURLWithPath:(posix_file)
set theAsset to current application's AVURLAsset's URLAssetWithURL:output options:(missing value)
set theTrack to (theAsset's tracksWithMediaType:(current application's AVMediaTypeVideo))'s objectAtIndex:0
set FPS to theTrack's nominalFrameRate()
set theSize to theTrack's naturalSize()
set the size_text_wid to theSize's width
set the size_text_ht to theSize's height


display dialog "FPS = " & FPS & "
 Width = " & size_text_wid & "
 Height = " & size_text_ht



However, when I get to the part where Quicktime saves the file:

tell application id "com.apple.quicktimeplayer"
tell document 1
save self contained in the_new_name
end tell
end tell

It throws the exception ”movie contains an incorrect time value”

So the problem seems to be Quicktime. I suppose I should rewrite the whole thing in AVFoundation, but that is daunting

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


 _______________________________________________
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: Shane Stanley <email@hidden>
References: 
 >Re: Quicktime frame rate calculation error (From: Jim Weisbin <email@hidden>)

  • Prev by Date: Re: Quicktime frame rate calculation error
  • 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