HEVC acceleration in vlc with NVidia proprietary driver not working because of libavcodec57

Hi

I upgraded from 15.0 to 15.1 to 15.2. Did I do something wrong when I fought with installation of codecs/vlc (packman) or is it normal that I end up with a “/usr/lib64/vlc/plugins/codec/libavcodec_plugin.so” which uses libavcodec57 instead of libavcodec58?

Problem is libavcodec57 source code in vdpau.c does:


| if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 &&|
|---|
|


|        !(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) {|
|---|
|


|        av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.
|
");|
|


|        return AVERROR(ENOTSUP);|
|---|
|


    }

while libavcodec58 source code does:


|    if (avctx->codec_id == AV_CODEC_ID_HEVC && strncmp(info_string, "NVIDIA ", 7) == 0 &&|
|---|
|


|        !(avctx->hwaccel_flags & AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH)) {|
|---|
|


|        int driver_version = 0;|
|---|
|


|        sscanf(info_string, "NVIDIA VDPAU Driver Shared Library  %d", &driver_version);|
|---|
|


|        if (driver_version < 410) {|
|---|
|


|            av_log(avctx, AV_LOG_VERBOSE, "HEVC with NVIDIA VDPAU drivers is buggy, skipping.
|
");|
|


|            return AVERROR(ENOTSUP);|
|---|
|


|        }|
|---|
|


    }

So libavcodec57 always thinks HEVC with NVIDIA VDPAU is buggy, while according to libavcodec58 it is only buggy in older versions of the driver.

Hack: if I change the string "NVIDIA " in “usr/lib64/libavcodec.so.57” to "nVIDIA " with a hexeditor, accelerated video playback of HEVC with vlc works.

Have you been able to file a bug report against this?

I have not tried and don’t know what the deal is with this 57 and 58 versions of libavcodec. Is 57 obsolete? Are they incompatible? Is all software supposed to move to 58? In my brother’s Ubuntu distribution vlc uses avcodec 58. Why does OpenSUSE vlc still use 57? Same for vlc in packman/videoloan repositories?

Hi
Because that’s the version in Leap 15.2, version updates do not occur, just bug fixes etc, hence filing a bug report against it is the best method to see if it can be fixed (not sure since it’s an Nvidia thing…)…

The packman version is just a rebuild of whatever is in openSUSE…

openSUSE:Submitting bug reports - openSUSE

  1. You need to perform vendor change to Packman.
  2. You may install libavcodec58 from Packman.
  3. You need VDPAU to use nVidia’s hardware acceleration.
  4. Try to install vlc-vdpau package.

vlc-vdpau - Additional vdpau codecs for the VLC media player

This package enhances the functionality of the VLC media player by vdpau codecs that are not available in the stock openSUSE distribution.

vlc-vdpau - Additional vdpau codecs for the VLC media player

/usr/lib64/vlc/libvlc_vdpau.so.0
/usr/lib64/vlc/libvlc_vdpau.so.0.0.0
/usr/lib64/vlc/plugins/vdpau
/usr/lib64/vlc/plugins/vdpau/libvdpau_adjust_plugin.so
/usr/lib64/vlc/plugins/vdpau/libvdpau_avcodec_plugin.so
/usr/lib64/vlc/plugins/vdpau/libvdpau_chroma_plugin.so
/usr/lib64/vlc/plugins/vdpau/libvdpau_deinterlace_plugin.so
/usr/lib64/vlc/plugins/vdpau/libvdpau_display_plugin.so
/usr/lib64/vlc/plugins/vdpau/libvdpau_sharpen_plugin.so
/usr/lib64/vlc/plugins/video_output/libglconv_vdpau_plugin.so

  1. Try to use SVP.

Hi
The packman and openSUSE builds ONLY use and compiled with libavcodec57… installing libavcodec58 doesn’t change it…

VLC - Settings - All - Input/Codecs - Video codecs - FFmpeg - Decode - set desired parameters.

You may install VLC from VLC: https://www.videolan.org/vlc/#download .

Hi
If you install from the VLC repositories, then don’t use packman! It’s one or the other.

Again what part of compiling an application to support a specific library (in this case ffmpeg-3/libavcodec57) ensures it will use some arbitrary install of a later version of an unsupported library?