xuggler视频剪辑

时间:2013-02-28 20:06:14

标签: java video video-processing xuggler

我有两次(long time1,time2;),输入文件和输出目录。我想将视频从time1切换到time2并将其保存在outdir中,有人可以提供一个简单的工作代码示例吗?

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) < 0){
            throw new IllegalArgumentException("could not open file: " + filename);
        }

    }

}

0 个答案:

没有答案