I try to get file informations via ffprobe in a java-application.
I am using the following command:
/usr/bin/ffprobe -v quiet -print_format json -show_format -show_streams TESTVIDEOPATH
Running that command in bash, it works like a charm: It returns the JSON-String and error code is "0". Running that command in Java results in error code "254" and result is:
{\n}\n
When I modify the command, so that ffprobe accepts a stream as input:
/usr/bin/ffprobe -v quiet -i - -print_format json -show_format -show_streams
it works in both bash and Java.
In Java the following is used:
ProcessBuilder processBuilder = new ProcessBuilder(command.split(" "));
this.process = processBuilder.start();
this.process.waitFor();
int exitCode = this.process.exitValue();
this.outputOfProcess = this.process.getInputStream();
Can anyone tell me what the error code 254 means? I couldn't find anything about it.
Edit: ffmpeg version 0.10.7-6:0.10.7-0jon1~quantal is used
Error code 254 for FFprobe means: File not found.
Thanks to blahdiblah for the tip removing
-v quiet
from the command.The TESTVIDEOPATH was given with
"
at the beginning and end to get spaces in the pathname to work. When executing it, Java excaped these"
and put some extra around.