We have a number of videos that need to have closed captioning .mov files added to them. Our process is to take two text files, one for English and one for Spanish, and drop them onto quicktime pro (they have a header and time codes for the captioning). This creates two mov files with the closed captioning in them, we select all and copy, then mosey on over to the video file itself and “add to selection and scale”. We get to do that process twice, once for English and once for Spanish. At that point we save the resulting video file with both closed captioning added and save it as a self contained movie. The movie file and English captioning file are the exact same name, and the Spanish file is the same name with _ESP at the end before the file extension. I did manage to put together a script that converts the txt files into movie files. Can anyone help me with building a script to combine the three mov files together and save it?
I know, this is a big crazy request…
Here is one script I found on here that sounds like the guy is trying to do something a little similar, but doesn’t look like he was able to figure out how to add to selection and scale. Is that even possible?
on open dropped_items
tell application "QuickTime Player"
activate
close every window
end tell
repeat with this_item in dropped_items
tell application "QuickTime Player"
open this_item
set poster_text_file_name to name of the front document as string
set poster_text_export_location to this_item as string
set poster_export_new_name to poster_text_export_location as string
set poster_export_new_name to my remove_extension(poster_export_new_name)
(export front document to (poster_export_new_name & "_tmp" & ".txt") as text file using settings preset "Text with Descriptors")
close window poster_text_file_name
open poster_export_new_name & "_tmp.txt"
set poster_text_with_description_name to name of front document as string
choose file with prompt "Your poster image file please:"
open (result)
select all last document
copy last document
select all front document
add front document with scaled
set name of last track of front document to "HREFTrack"
set enabled of last track of front document to false
close last document
save self contained front document in poster_export_new_name & ".mov"
end tell
end repeat
end open
on remove_extension(this_name)
if this_name contains "." then
set this_name to ¬
(the reverse of every character of this_name) as string
set x to the offset of "." in this_name
set this_name to (text (x + 1) thru -1 of this_name)
set this_name to (the reverse of every character of this_name) as string
end if
return this_name
end remove_extension
When I run this script I get an error based on the movie 1, not sure what to do with that. If some one can just point me in the right direction on where to look for more information that would be helpful, or if you have any input to changing some of this code to get me closer to the end goal, you would be my hero!
Thanks!