This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I'm trying to convert a .mov video file to a .flv format using FFMPEG. When I execute it on command line, it works. However, when I invoke it from my java code, a Windows Vista dialog window pops up saying "FFMpeg has Stopped working". I don't idea what the problem is.
Process process = Runtime.getRuntime().exec(command); InputStreamHandler errorHandler = new InputStreamHandler(process.getErrorStream(), "Error Stream"); errorHandler.start(); InputStreamHandler inputHandler = new InputStreamHandler(process.getInputStream(), "Output Stream"); inputHandler.start();
process.waitFor();
if (process.exitValue() == 0) { // do something; System.out.println("completed"); } System.out.println("exit code: " + process.exitValue());