-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Actual command string #76
Comments
First off, how are you executing the command? This library provides a few different ways. You may call the FFmpegBuilder.build() to get a List of the arguments, for example: List<String> args = new FFmpegBuilder()
.setInput("input.mp4")
.addOutput("output.mp4")
.build() If you call FFmpeg ffmpeg = new FFmpeg("/path/to/ffmpeg");
ffmpeg.run(builder) then that basically calls You could also hook into FFmpeg, for example: ffmpeg = new FFmpeg("/path/to/ffmpeg", new ProcessFunction() {
final ProcessFunction runner = new RunProcessFunction();
@Override
public Process run(List<String> args) throws IOException {
System.out.println(args);
return runner.run(args);
}
}); I'm open to suggestions on a way to make this easier for your usecase. |
FFmpegBuilder.build() is protected. It would be neat to be able to do
or similar. Just to see what exactly is being called for debugging. |
I have a situation where the same code works on a windows machine but not on Debian. The error I get is
Which is why I really would like to see the exact command being executed rather than a list of arguments. |
The culprit turns out to be
The args list is
where the culprit is the empty argument. For some reason this works on windows but not on Debian. With a clear command string I could have spotted this in the logs rightaway. Anyways, thanks again for a great lib! |
I will also not allow empty extra args. Finally, the reason it is return as a list of arguments is because that is how it is passed to the ffmpeg binary. For example if there is a single element in the array with spaces in the middle, when it is executed the process see it as if the full argument had quotes around it. However, I guess there is a subtle difference in how window and Linux parses a empty arguments. I'll keep this bug open while I address my first two points. |
Is there a way to get the actual string being executed? Would be extremely useful for debugging.
The text was updated successfully, but these errors were encountered: