//Movie video = mc.build(Channels.newChannel(ReadWriteExample.class.getResourceAsStream("/smoothstreaming/video-128h-75kbps.mp4")));
Movie video = MovieCreator.build(new FileInputStream("/home/sannies/scm/svn/mp4parser/Solekai022_854_29_640x75_MaxSdSubtitle.uvu").getChannel());
//IsoFile out1 = new FragmentedMp4Builder().build(video);
IsoFile out2 = new DefaultMp4Builder().build(video);
/* long starttime1 = System.currentTimeMillis();
FileChannel fc1 = new RandomAccessFile("video-128h-75kbps.fmp4", "rw").getChannel();
fc1.position(0);
out1.getBox(fc1);
long size1 = fc1.size();
fc1.truncate(fc1.position());
fc1.close();
System.err.println("Writing " + size1 / 1024 / 1024 + "MB took " + (System.currentTimeMillis() - starttime1));*/
long starttime2 = System.currentTimeMillis();
FileChannel fc2 = new RandomAccessFile("output_uvu.mp4", "rw").getChannel();
fc2.position(0);
out2.getBox(fc2);
long size2 = fc2.size();
fc2.truncate(fc2.position());
fc2.close();
System.err.println("Writing " + size2 / 1024 / 1024 + "MB took " + (System.currentTimeMillis() - starttime2));