How can I export a movie with audio and a text track to a mpeg4 movie

Hello,

What I want is to create a movie (mpeg4) of a quicktime movie which has an audio track and a text track.
I couldn’t find a way to do this with quicktime and an export option. It results in a movie with only the audio.

So I made an applescript that exports the original movie with the text track as image sequence, this image sequence is then opened by the script, it sets the duration of each frame to the correct time which is set in the original movie.

This movie, the movie with only the text as an image sequence, is then added to the original movie, the original text track is deleted.

After this it is possible to export this movie to a mpeg4 movie and the text is shown.

My question, and trouble, is:
Is there a way to export a movie with audio and a text track to a mpeg4 movie and that will show the text?
Because my solution is maybe too complicated, and that is maybe because I am not new in programming but I am with applescript…

I use this for the export as image sequence:

tell application "Quicktime player"
			set seqName to "tmp:img"
			set theSet to "Macintosh HD:Users:me:imgJpg_set"
			export the front movie to seqName as image sequence using settings (theSet as alias) with replacing
end tell

And this for open:

tell application "Quicktime player"
			set seqName to "tmp:img"
			set seqImg to seqName & " 01.jpg"
			set frameSecs to (round (the duration of the front movie) / ( the time scale of the front movie)) + 1 -- need enough time to cut the frames  
			open image sequence seqImg seconds per frame frameSecs
end tell

My question is here: How can I find out if a file exists? Because I need to open the first image of the sequence, and this could be “img 01.jpg” or “img 001.jpg” ?
What confused me was this:


tell application "Finder"
	return exists file "Macintosh HD:private:tmp:img 01.jpg"
end tell

→ returns true, that is OK the file exists.

but:


tell application "Finder"
	return exists file "Macintosh HD:private:tmp:img 000001.jpg"
end tell

→ returns true, although the file does not exist.

Another thing that confused me is the use of a settings file.
The line with the export command in my script looks like:

tell application "Quicktime player"
set theMovie to "Macintosh HD:Users:me:movie1.mp4"
					export the front movie to theMovie as MPEG4 using settings "Macintosh HD:Users:me:mp4set" replacing yes
end tell

The settings file was created with AppleScript: (I could not find another way to do this…)

tell application "Quicktime player"
	save export settings the front movie for MPEG4 to "Users:me:mp4set" with replacing
end tell

This settings file looks like a Mac OS 9 quicktime settings file. It can not be opened with Quicktime for OS X .
What is in this file? And how can I use it? And is this file compatible with another Mac OS X system?

Thanks in advance for your answer and time.


Model: Powerbook G4
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi,

a different way to check if a file exists is this subroutine

check_file("Macintosh HD:private:tmp:img 00001.jpg")

on check_file(f)
	try
		f as alias
		return true
	on error
		return false
	end try
end check_file

Do you know Apple’s QuickTime Player script collection.
For example there is a sample script to save an export settings file