Enhanced QT External

Trevor DeVore lists at mangomultimedia.com
Wed Mar 23 15:23:29 EST 2005


On Mar 23, 2005, at 11:49 AM, Stephen King wrote:

> Hi,
>
> Is it possible to extract an audio track from a QT movie, edit this in 
> an editor then paste back into the movie?
>
> I can find QTDeleteTrack but no AddTrack function.
>
> I can also find QTCopyTrackToScrap, but I tried this with Track 2 (by 
> trial and error of QTSetTrackEnabled) and nothing appeared in the 
> clipboard of my editing application.
>
> I am using Windows XP with the Beta 4 Enhanced QT External, but expect 
> that I am doing something terribly wrong!
>
> My aim is simply to advance the audio track of the movie by 200mS due 
> to a sync problem. The ends don't matter.
>
> Any help would be greatly appreciated

Hi Stephen,

What you want to do is possible.  A couple of things:

1) qtCopyTrackToScrap puts the track you specify on the clipboard and 
you can then paste it another movie from within Revolution or using a 
program like QuickTime Player.  I haven't tested this with other apps 
however.

2) To insert the current movie/track on the clipboard into a player 
object in Revolution you can use qtAddMovieSegment which will insert 
the clipboard at the currentTime of the player object in Revolution.

3) There is no call to delete a track (I will add one though, didn't 
realize that was missing).  This means you will have to do a workaround 
to accomplish what you want using the external.

If you just want to move a track forward 200ms then you could do the 
following:

1) Create two player objects.

2) Load your original movie into player object 1.  Call 
qtInitializeEditing.

3) Call qtNewMovie with the path where you could like to create your 
new movie.  Load this into player 2.  The currentTime should be 0.

4) For all tracks except the audio track in player object 1 you would 
call qtCopyTrackToScrap then add the track to player object 2 using 
qtAddMovieSegment (do not add scaled).

5) For the audio track use qtCopyTrackToScrap as well.  Then set the 
currentTime of player 2 to the time where you want the audio to begin.  
Now call qtAddMovieSegment and the audio will be placed at the new 
time.

6) Use qtSaveAs to save the file.

7) Go vote for bug 2254 
<http://support.runrev.com/bugdatabase/show_bug.cgi?id=2254> because 
you really don't want to have to call qtSaveAs after editing.  You want 
to be able to call qtSave :)

Accomplishing this same thing will be much easier once I add a 
qtCutTrack/qtDeleteTrack call.  I will try to get this in before I (one 
day) release version 1.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list