FileDocCategorySizeDatePackage
FragmentFileSet.javaAPI Docmp4parser 1.0-RC-172857Wed Dec 19 20:10:21 GMT 2012com.googlecode.mp4parser.tools.smoothstreamingfragmenter

FragmentFileSet

public class FragmentFileSet extends Object

Fields Summary
private static Logger
LOG
protected List
inputFiles
protected File
outputDir
boolean
debug
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        FragmentFileSet fragmentFileSet = new FragmentFileSet();
        fragmentFileSet.parseCmdLine(args);
        fragmentFileSet.run();
    
private voidparseCmdLine(java.lang.String[] args)

        CmdLineParser parser = new CmdLineParser(this);
        parser.setUsageWidth(80); // width of the error display area


        try {
            parser.parseArgument(args);
        } catch (CmdLineException e) {

            System.err.println(e.getMessage());
            System.err.println();
            // print the list of available options
            System.err.println("java -jar smooth-streaming-fragmenter-version.jar [options] in_1.mp4, in_2.mp4, ...");
            System.err.println();
            parser.printUsage(System.err);
            System.err.println();
            System.exit(1);
        }

    
public voidrun()

        FlatPackageWriterImpl flatPackageWriter = new FlatPackageWriterImpl(0);
        flatPackageWriter.setDebugOutput(debug);
        flatPackageWriter.setOutputDirectory(outputDir);
        Movie movie = new Movie();
        for (File input : inputFiles) {
            System.err.println(input.getAbsolutePath());
            Movie m = MovieCreator.build(new FileInputStream(input).getChannel());
            for (Track track : m.getTracks()) {
                movie.addTrack(track);
            }

        }
        flatPackageWriter.write(movie);