// insert media into track
videoTrack.insertMedia(0, 0, videoMedia.getDuration(), 1);
// save changes made into file and add to movie
OpenMovieFile omf = OpenMovieFile.asWrite(movFile);
newmovie.addResource(omf, StdQTConstants.movieInDataForkResID,
movFile.getName());
// delete file created; prevent any thread problems by terminating
// current thread
try
{
Thread.sleep(1000);
} // try
catch (InterruptedException ie)
{
// do nothing
} // catch (InterruptedException)
movFile.deleteOnExit();
omf.getFile().deleteOnExit();
} // try
catch (QTException qte)
{
qte.printStackTrace();
} // catch (QTException)