Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does flattening a movie (composed of same type segments) create multiple video tracks?



Thanks for the tip Alex. I've already tried this and it does create a single video track but the problem is that the exporter does not play nice in a multithreaded scenario. If i start 2 exporters at the same time, each in it's own thread, the first exporter will block the second one until it's done. Any thoughts on why this happens and how to do exports in parallel would be greatly appreciated.

Thank, Erik

On 5 aug 2006, at 04.49, Alex Shaykevich wrote:

What you want is to export the movie rather than flatten.  There's code in Chris' book and code on this list on how to save and use export settings programmatically.  Do a search on 'atom container' and 'movie exporter settings'.

Cheers,

Alex

Erik Hedenström <email@hidden> wrote:
Hi all,

I have a problem flattening a movie. My goal is to flatten a series
of merged movies into a movie that contains a single mjpeg track and
a single audio track. The flattened movie will then be passed to
ffmpeg that creates a flash video.

My problem is that the flattening of the merged movie creates a new
movie that contains 2 mjpeg tracks and a single audio track.

All the movies that are merged contain a single mjpeg (dimension
320x240) and audio track. The movies are merged using the following
method...

public static Movie merge(Movie[] movies) throws QTException {

QTSessionCheck.check();

Movie mergedMovie = new Movie();
for (Movie movie : movies) {
fitInto(movie, maxWidth, maxHeight);
movie.insertSegment(mergedMovie, 0, movie.getDuration(),
mergedMovie.getDuration());
}

return mergedMovie;

}

...and then the merged movie is flattened using the following method....

Movie merged = QTMovieMerger.merge(movies);

QTFile flatFile = new QTFile(new File(outputPath,
ticket + ".mov"));

merged.flatten
(StdQTConstants.flattenAddMovieToDataFork |

StdQTConstants.flattenForceMovieResourceBeforeMovieData, //
movieFlattenFlags
flatFile, // fileOut
StdQTConstants.kMoviePlayer, // creator
IOConstants.smSystemScript, // scriptTag

StdQTConstants.createMovieFileDeleteCurFile, // createQTFileFlags
StdQTConstants.movieInDataForkResID, // resID
null); // resName

Anyone have any idea why this produces two mjpeg tracks in the
flattened movie? The first and last movies in the movie array become
one track,

Thanks in advance, Erik Hedenström

P.S. I agree with Shay Telfer, if you haven't bought Chris Adamson's
"QuickTime for Java: A Developer's Notebook" go get it immediately.
It saved me a ton of time, and kept me from posting silly questions
(hopefully the one above isn't) to this forum. _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden



Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden

References: 
 >Re: Why does flattening a movie (composed of same type segments) create multiple video tracks? (From: Alex Shaykevich <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.