-
Notifications
You must be signed in to change notification settings - Fork 90
Description
Hi,
Currently the library provides ability to build command for ffmpeg in builder-like style and then execute it, but I didn't find a way how to get raw ffmpeg command which will be executed
Result of execution contains some useful data about processing, though also misses what command was executed
To Reproduce
var result = FFmpeg.atPath()
.addInput(UrlInput.fromUrl(pathToSrc))
.setOverwriteOutput(true)
.addArguments("-movflags", "faststart")
.addOutput(UrlOutput.toUrl(pathToDst))
.execute() // how to get command which will be executed?
Expected behavior
extra method or way to get raw ffmpeg command. Smth like this:
ProcessHandler<FFmpegResult> runner = Ffmpeg.atPath()
... // constructing command
.build();
String rawCliCommand = runner.getRawCmd();
runner.execute();
currently, I din't find a way how to solve this via subclassing, because I cannot override ProcessHandler<FFmpegResult> runner creation to create another runner with extended info.
Additional context
Cases where raw ffmpeg command is useful
- unit tests - I want to have regression that I create proper commands
- logs - I want to add ffmpeg command to error logs to immediately correlate what command produced an error, especially if logs contain several executions in parallel. Jafree has logs but I cannot override them anyhow and having way to obtain raw ffmpeg command gives more possibilities for custom logs.
any feedback is appreciated, if you can implement these possibilities or just advise how I can bypass this with some workarounds, for instance how to override and enhance this behavior without creating separate fork. Thanks.
P.S. I really like this lib, good and convenient api.