• 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 Pro 7 Captions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QuickTime Pro 7 Captions


  • Subject: Re: QuickTime Pro 7 Captions
  • From: Gil Dawson <email@hidden>
  • Date: Sun, 13 Apr 2014 15:15:06 -0700

Hi, Andreas--

There's some QT stuff that is scriptable, though you cannot depend on the dictionary for every definition.  Here's a script, for example,  that merges a file of captions in scc format with a movie file in mp4 format:

tell application "QuickTime Player 7"
activate  
open sccFile
tell document 1
select all
copy
close front window
end tell
open mp4File
tell document 1
select all
rewind
add


repeat with aTrack in tracks
tell aTrack
if kind is "Video" then set vTrack to aTrack
if kind is "Closed Caption" then set ccTrack to aTrack
end tell
end repeat

set vTrackDims to the dimensions of vTrack
set the dimensions of ccTrack to vTrackDims


end tell
end tell
tell application "System Events"
tell process "QuickTime Player 7"
set frontmost to true
keystroke "t" using {command down, option down}
end tell
end tell
log "Done."


Most of the code is in the form of QT direct commands.  They are not all, however, taken from the .sdef.  Thanks to Jim Weisbin for the proper incantation to "add" the captions track to the movie.  I'm hoping someone (maybe Jim?) will know the proper incantation for the last step.


On Apr 13, 2014, at 12:24 PM, blinkboks wrote:

Btw, it's possible to 'get' values etc. but I have not yet succeded 'setting' then...

/Andreas

Den 13/04/2014 kl. 21.20 skrev blinkboks <email@hidden>:

I have just spent a week making QT 7 pro scripts. Its dictionary or 'scriptability' seems to be broken. Took me a loooong time to figure out how to script it, with apparantly no help from the net.

Had to do everything via gui scripting. Even mousetools, that I normally use for gui clicking, needed an extra 'release click' – never seen that with other apps.

Would love to see a fix for this (QT 7), as my scripts would be a lot more smooth, and probably faster...

/Andreas Blinkenberg
Denmark

Den 13/04/2014 kl. 21.02 skrev Gil Dawson <email@hidden>:

Hi--

Does anyone perchance know the proper syntax to get QuickTime Pro 7 to turn on captions?  

(Manually, you'd click on View -> Show Closed Captioning ⌥⌘T)

QT's dictionary shows a property of the application which looks promising:

show closed captioning when available (boolean) : show closed captioning (when supported by content)

However, a naîve interpretation...

tell application "QuickTime Player 7"
set show closed captioning when available to true
end tell

...doesn't seem to do anything.

This works:

tell application "System Events"
tell process "QuickTime Player 7"
set frontmost to true
keystroke "t" using {command down, option down}
end tell
end tell

But it makes QT frontmost, which mars my script's generality.  
Also, ⌥⌘T is a toggle.  If you do it again, it turns captions off.

Any ideas? 

--Gil

 _______________________________________________
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 Pro 7 Captions
      • From: Andreas Blinkenberg <email@hidden>
References: 
 >QuickTime Pro 7 Captions (From: Gil Dawson <email@hidden>)
 >Re: QuickTime Pro 7 Captions (From: blinkboks <email@hidden>)
 >Re: QuickTime Pro 7 Captions (From: blinkboks <email@hidden>)

  • Prev by Date: Re: QuickTime Pro 7 Captions
  • Next by Date: Re: Recent Items
  • Previous by thread: Re: QuickTime Pro 7 Captions
  • Next by thread: Re: QuickTime Pro 7 Captions
  • Index(es):
    • Date
    • Thread