我有两次(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);
}
}
}