title: xuggler video cut
body: <p>I have two times (long time1, time2;), input file and output directory. i want to cut the video from time1 to time2 and save it in the outdir, can someone provide a simple expample of working code?</p>
  
  <pre><code>public class CutAndSaveVideoTest {
  
      public static void main(String[] args) {
  
          long timeStart=0, timeEnd=0;
  
          String filename = "C:\\Documents and Settings\\...\\File.avi"; 
          String outDir = "C:\\Documents and Settings\\...";
          String outFileName = "Test.mp4";
          String outDirFileName = (outDir +"\\" +outFileName );
  
          IContainer container = IContainer.make(); 
  
  
          if (container.open(filename, IContainer.Type.READ, null) &lt; 0){
              throw new IllegalArgumentException("could not open file: " + filename);
          }
  
      }
  
  }
  </code></pre>