Page 1 of 1

Utilize ffmpeg exit code

Posted: Thu Jul 25, 2019 11:51 am
by emcodem
Hey steinar,

is there a reason why you don't look for the Exit code of the spawned ffmpeg child process in _Simple_MediaOutput? Anyway, from These 2 cases at least, i did get the Feeling that it could be a good idea to collect ffmpeg Exit code and accordingly react to it:
viewtopic.php?f=5&t=899
viewtopic.php?f=4&t=887

As i see it, in both cases ffmpeg was interrupted but the resulting file was found to be OK by the follow up internal media_checks, so the worfklow just went on even if the transcoding obviously failed. Is it a valid usecase to go on the success path even if ffmpeg returned with failure?

cheers!

Re: Utilize ffmpeg exit code

Posted: Sat Jul 27, 2019 2:42 pm
by admin
Hi emcodem,

I have already improved the the routine in the new code so files that came out as success but failed will now show error and the error message from ffmpeg. Though currently I'm not using the exit code.
I have read somewhere that the exit codes might not be trusted but I will take a closer look at it after my holiday is done in a few days.

-steinar

Re: Utilize ffmpeg exit code

Posted: Sat Jul 27, 2019 3:48 pm
by emcodem
Thats great news:)
Fom my understanding, depending on the usecase, return code 0 is not a guarantee that everything worked as the user expected (users sometimes expect strange things too...)

In difference i believe any other return code indicates there was definitely some problem.
I's like to go safe with that and ask in the user list but the question is relatively complex...

Anyway if that part in your code already changed, let us see how it works out:)