Vi è mai successo che un filmato fosse fuori sincrono, audio e video?
A me sì, e siccome mettersi ad estrarre e riunire le tracce era scomodo, mi sono fatto questo piccolo script per ritardare con semplicità e precisione l’inizio della riproduzione di una traccia (audio o video) in QuickTime Player. Il codice on run
set mylist to {}
tell application "QuickTime Player"
set theMovie to document 1
set theMovieName to name of theMovie
set timeScale to (time scale of theMovie)
repeat with _t in every track of theMovie
get "" & (index of _t) & " " & (type of _t) & " " & ¬
(data format of _t) & " " & (language of _t)
set the end of mylist to the result
end repeat
end tell
tell me to activate
set ttd to (choose from list mylist with title ¬
"Choose in " & theMovieName with prompt ¬
"Set the start delay for:" without multiple selections allowed and empty selection allowed)
if ttd is false then return
set ttd to (the first word of (ttd as text)) as integer
tell application "QuickTime Player" to set dda to start time of track ttd of theMovie
set da to the the text returned of (display dialog "Integer, " & timeScale & " = 1 sec" & return & ¬
return & "Set “" & (item ttd of mylist) & "” to:" with title "Start Delay" default answer dda ¬
with icon POSIX file (POSIX path of (path to application "QuickTime Player") & ¬
"Contents/Resources/QuickTimePlayer.icns"))
try
set da to (word 1 of da) as integer
on error
return
end try
tell application "QuickTime Player" to set start time of track ttd of theMovie to da
end run
Come utilizzarlo Salvarlo come applet ed utilizzarlo quando occorre.
In alternativa si può salvare come script, poi andiamo a creare nella propria home le cartelle che non esistono lungo questo percorso:
~/Library/Scripts/Applications/QuickTime Player
Al suo interno posizionare lo script.
Se da Script Utility si attiva il menu Applescript, vedremo lo script in questo menu ogni volta che utilizzeremo QuickTime Player. © e Credits Software originale di faqintosh.com
Autore: Marco Balestra
Questo software è distribuito senza garanzia.
È gratuito, ma non public domain: per la ridistribuzione è necessaria una autorizzazione esplicita dell'autore.
|