java:Xuggler无法找到路径

时间:2018-07-02 00:45:43

标签: java xuggler

我使用Xuggler命令行将mxf转换为flv

public class Test {

public static void main(String args[]) {


    File file=new File("C:\\Users\\HP\\Downloads\\color.mxf");

    System.out.println(file.isFile());

    String commandStr[] = { "ffmpeg -f dv -i \"C:\\Users\\HP\\Downloads\\color.mxf\" -ar 44100 -v codec libx264 -maxrate 2000k -bufsize 2000k -vf scale=\"iw/2:ih/2\" -strict experimental -vstats_file \"C:\\progress.txt\" \"C:\\0001NYoutput-short1.mov\"" };
    // print the command to execute
    for (String x : commandStr) {
        System.out.print(x + " ");
    }

    // execute ffmpeg with the command generated by the previous segment
    try {
        ProcessBuilder proc =  new ProcessBuilder(commandStr);
        proc.directory(new File("C:\\Downloads"));
        //proc.command(commandStr);
        proc.start();

    } catch (IOException ex) {          
        ex.getMessage();
        ex.printStackTrace();
    }
}
}

这是错误:

  

at java.base / java.lang.ProcessBuilder.start(未知源)           在java.base / java.lang.ProcessBuilder.start(未知源)           在converter.Test.main(Test.java:27)       由以下原因引起:java.io.IOException:CreateProcess错误= 2,系统找不到指定的文件           在java.base / java.lang.ProcessImpl.create(本机方法)           在java.base / java.lang.ProcessImpl。(未知源)           在java.base / java.lang.ProcessImpl.start(未知源)           ..另外3个

0 个答案:

没有答案
相关问题