예제 #1
0
파일: Flattern.java 프로젝트: 2php/jcodec
 public void flattern(MovieBox movie, File video) throws IOException {
   Platform.deleteFile(video);
   SeekableByteChannel out = null;
   try {
     out = writableChannel(video);
     flatternChannel(movie, out);
   } finally {
     if (out != null) out.close();
   }
 }
예제 #2
0
파일: Flattern.java 프로젝트: 2php/jcodec
 public static void main1(String[] args) throws Exception {
   if (args.length < 2) {
     System.out.println("Syntax: self <ref movie> <out movie>");
     System.exit(-1);
   }
   File outFile = new File(args[1]);
   Platform.deleteFile(outFile);
   SeekableByteChannel input = null;
   try {
     input = readableChannel(new File(args[0]));
     MovieBox movie = MP4Util.parseMovieChannel(input);
     new Flattern().flattern(movie, outFile);
   } finally {
     if (input != null) input.close();
   }
 }