Where ffmpeg.exe is installed? try to use full path to execute the ffmpeg.exe
e.g.
D:\ffmpeg\bin\ffmpeg.exe
then
String cmd[] = {"D:\\ffmpeg\\bin\\ffmpeg","-i","D:\\ffmpeg\\hadoop.mp4","D:\\ffmpeg\\img%d.png"};
Runtime.getRuntime().exec(cmd);
or
Process process = new ProcessBuilder(Arrays.asList(cmd)).start();
网友评论