[FFmpeg-devel] [PATCH] libvmaf: exit gracefully if the library fails.

Ronald S. Bultje rsbultje at gmail.com
Sat Dec 9 15:47:57 EET 2017


Hi,

On Sat, Dec 9, 2017 at 2:34 AM, Gyan Doshi <gyandoshi at gmail.com> wrote:

>
> On 12/9/2017 7:05 AM, Ronald S. Bultje wrote:
>
>> Fixes trac issue #6884 and Netflix/vmaf issue #124.
>>
>
>   static void *call_vmaf(void *ctx)
>>   {
>>
> >   ...
>
>>       pthread_exit(NULL);
>>   }
>>
>
> Fails to build unless I add  'return NULL;'  in call_vmaf. Pre-existing
> issue. Open ticket is #6878.
>

I can fix that in the same patch also, sure.

Is it possible to have distinctive error messages? I get the same message
> whether the model is not found or found but not successfully parsed. Pasted
> below. Earlier, the console would have the exception reporting if "No
> newline at end o string". The error for missing file was generic, like now.
>
> ----
> t C:\avutils\ffmpeg-libs\compiled\share\model\nflxtrain_vmfv3a.pkl cannot
> be read successfully.
> Caught VmafException: Error loading model (.pkl): Trouble reading the
> file:C:\avutils\ffmpeg-libs\compiled\share\model\nflxtrain_vmfv3a.pkl
> [Parsed_libvmaf_0 @ 000000000050b4a0] libvmaf encountered an error, check
> log for details
> Error while filtering: Invalid argument
> Failed to inject frame into filter network: Invalid argument
> Error while processing the decoded data for stream #1:0
> Conversion failed!
> ----
>
> But no more "This application has requested the Runtime to terminate it in
> an unusual way.". Thanks.


This should be done in libvmaf. Right now it returns 0 or 1, and that's all
FFmpeg knows. If we want more, we have to ask Zhi to return more specific
error codes (or messages), so we can display more specific error messages.

Ronald


More information about the ffmpeg-devel mailing list