Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6442 closed defect (invalid)

libavcodec shouldn't advertise hardware specific codecs on systems without such hardware

Reported by: Dave Plater Owned by:
Priority: normal Component: avcodec
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug: >= ffmpeg-3.3: browser won't play youtube video due to advertised h264_cuvid codec being present but not functional.
How to reproduce:
When using the official crippled avcodec in openSUSE the h264 codec is not present but the h264_cuvid decoder is advertised and the browser engine attempts to use this codec on no nvidia hardware. I have fixed this by disabling cuvid and cuda in the build. I can most probably enable cuda and just disable cuvid as a user with the crippled avcodec would most likely have the uncrippled version from Packman installed and I can confirm that when the normal h264 is available it is used and the youtube video works.
There is also an anomaly that I can't explain which was also fixed when I disabled cuvid and cuda relating to gstreamer's libav see:
Unfortunately I can't reproduce that bug as I have intel graphics but I have two low end nvida cards which I will try at a later stage, when I have time to risk breaking my system.
In that bug (1039163) the user has 4 different computers with nvidia graphics and gstreamer's libav timed out when attempting to read mpeg-1 and 2 video, I'm not sure yet if the user has official nvidia drivers or the kernel's nouveau drivers in use.

Change History (6)

comment:1 by Carl Eugen Hoyos, 7 years ago

Resolution: invalid
Status: newclosed

We know that Opensuse is abusing the name of our libraries, there is nothing we can do about it.
Please do not mix different issues in one ticket.

comment:2 by Dave Plater, 7 years ago

I'm confused, what abuse of libavcodec's name are you referring to? If there is naming abuse I will fix it. Full build log for ffmpeg in question:
I apologize for the second issue, I was merely asking for advice as to whether there was a relation between the two. Possibly another openSUSE maintainer was less than polite in the past?

comment:3 by Timo R., 7 years ago

This is more a bug in the application using the libraries.
libavcodec can't possibly know in advance which hw codecs are supported on a system, and it's up to the individual application to do a proper fallback.

comment:4 by Dave Plater, 7 years ago

This is more of a feature request for runtime detection of the gpu that would solve the browsers issues. One has apparently acknowledged the problem but WONTFIX. The other issue seems to be gstreamer's problem that is fixed in later releases. What ffmpeg version introduced cuvid decoders?

comment:5 by Hendrik, 7 years ago

The cuvid decoder already has runtime detection, if you try to use it and its not supported, it'll instantly fail and the application knows to use something else.

comment:6 by Dave Plater, 7 years ago

The gst-libav issue is fixed in their git. Both issues were exposed by ffmpeg >= 3.3 enabling cuvid by default.

Note: See TracTickets for help on using tickets.