ffmpeg running on windows with java

Viewed 4715

I have simple test class as

public static void main(String[] args) throws IOException {

         String[] line = {"ffmpeg -i D:\\hadoop-video\\testVideo\\xyz.mp4 %d.png"};
         Runtime.getRuntime().exec(line);

    }

when I try to run this I am getting

Exception in thread "main" java.io.IOException: Cannot run program "ffmpeg -i D:/hadoop-video/testVideo/xyz.mp4 %d.png": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at ImageTest.main(ImageTest.java:13)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified

however file is present on my windows7 machine with location

D:\hadoop-video\testVideo\xyz.mp4

i tried removing .mp4 and then run also not working . please suggest what might be wrong

1 Answers
Related