ffmpeg-cli-wrapper
ffmpeg-cli-wrapper copied to clipboard
How to know whether this execution is successful?
I saw the state enumeration value provided by ffmpegjob, but I didn't see it in the source code, such as echo $? Is it my negligence to ask again whether the command was executed successfully?
echo $1 is just a "workaround" used in bash, which reads the exit code of the last process and prints it. When spawning processes in another language, you usually don't (and can't) do this, as there is no shell running in between. But we can keep track of the process and ask the operating system. This is done in FFcommon, which tests if the exit code has been 0 and otherwise throws an IOException.
Therefore, you know that the execution succeeded (as far as the library is capable of detecting) if no Exception has been thrown.
I'll close this for now because the question seems answered. If necessary, feel free to reopen or create a new issue.