2 * jTsSplitter - java based mpeg2ts splitter.
3 * Copyright (C) 2009-2012 Yukikaze
12 * @author Administrator
17 * @param args the command line arguments
20 public static void main(String[] args) {
21 // TODO code application logic here
27 System.out.println("USAGE : \njava -jar jTsSplitter.jar <Input file> <Output file> [Option ch number]");
28 System.out.println("Option ch number is used in CS splitting.\n");
29 for (int i = 0; i < args.length; i++) {
30 System.out.println(((Integer)i).toString()+":"+args[i]);
32 if (args.length > 1) {
33 if (args[0].trim().toUpperCase().equals("-ch".toUpperCase())){
34 Chlist chl=new Chlist();
35 chl.writeCHList(args[1], args[2],-1,-1);
37 }else if (args[0].trim().toUpperCase().equals("-bs".toUpperCase())){
38 Chlist chl=new Chlist();
39 chl.writeCHList(args[1], args[2],-1,290);
41 }else if (args[0].trim().toUpperCase().equals("-cs".toUpperCase())){
42 Chlist chl=new Chlist();
43 chl.writeCHList(args[1], args[2],-1,-1);
49 if (args.length > 2) {
50 ch = Integer.parseInt(args[2].trim(), 10);
55 Tsfile t1 = new Tsfile();
57 if (f.length()>1000*1000){
58 t1.splitTS_byte(inf, outf, ch);