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: generate mov/mpg from mpg



This is a follow-up to my initial mail. For further scrutiny this is the code in question.
It works fine with QT movs but not with mpg neither as source nor as destination. It would be cool to at least have an mpg as input file, mov as output is ok.
 
 
    // one piece of the source movie is extracted and inserted into the destination copiedMovie
    public void doCopy(String srcFile, int start, int duration) throws QTException {
        copiedMovie = new Movie();
        OpenMovieFile omf = OpenMovieFile.asRead (new QTFile(new File(path + srcFile)  )  );
        movie = Movie.fromFile (omf);
        
        movie.insertSegment (copiedMovie,
                             start, //startTime
                             duration, //duration in ms
                             0);  //startTime in other movie
    }
 
 
    // dest copiedMovie is saved
    public void doFlatten(String dstFile) throws QTException{
        file = new QTFile(new File(path + dstFile) );          
     
      copiedMovie.flatten(StdQTConstants.flattenAddMovieToDataFork |
                          StdQTConstants.flattenForceMovieResourceBeforeMovieData,
                          file,
                          StdQTConstants.kMoviePlayer,
                          IOConstants.smSystemScript,
                          StdQTConstants.createMovieFileDeleteCurFile,
                          StdQTConstants.movieInDataForkResID,
                          null
      );
    }
 
 
Hope somebody can help me out
Thomas
 
----- Original Message -----
Sent: Monday, October 17, 2005 2:55 PM
Subject: Re: generate mov/mpg from mpg

That's right Thomas.  QT's support for mpeg is limited to mpeg1 and is limited in general, though I'm not sure why the scenario you describe shouldn't work, in theory at least.  Hard to say what's going on without seeing your code.  Why don't you post the relevant snippet to the list.
 
Good luck.
 
--Alex

Thomas Loder <email@hidden> wrote:
Hello Everyone,

I am new to this list and new to QTJ.
I hope someone can help me with this problem.
I'd like to copy a piece of a movie and generate a new movie (rather mpg
than mov) from it using insertSegment() and flatten(). This part works fine
as long as I'm dealing with qt movs. As soon as I take an mpg movie as
source it screws up. I only get the first frame in my destination movie.
Maybe it's got something to do with the StdQTConstants. Or is it a general
shortcoming that QTJ doesn't support MPEG?

Many thanks in advance
Thomas

_______________________________________________
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: generate mov/mpg from mpg (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.