Utilize ffmpeg exit code

Use this forum to request features. Maybe you'll get lucky!
Post Reply
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Utilize ffmpeg exit code

Post 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!
emcodem, wrapping since 2009 you got the rhyme?
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Utilize ffmpeg exit code

Post 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
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Utilize ffmpeg exit code

Post 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:)
emcodem, wrapping since 2009 you got the rhyme?
Post Reply