Skip to content

avcodec decoder error: existing hardware acceleration cannot be reused

Hi,

the bug was already reported but closed here: https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/1740142

For a bunch of videos (.mkv, h264) I get the following messages:

> [000055a66a020930] main audio output error: too low audio sample frequency (0)
[00007f7a341f8a30] main decoder error: failed to create audio output
[000055a66a020930] vlcpulse audio output error: digital pass-through stream connection failure: Nicht unterstützt
[000055a66a020930] main audio output error: module not functional
[00007f7a341f8a30] main decoder error: failed to create audio output
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
[00007f7a3417a360] avcodec decoder: Using G3DVL VDPAU Driver Shared Library version 1.0 for hardware decoding
[00007f7a3417a360] avcodec decoder error: existing hardware acceleration cannot be reused
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0

The important part is

avcodec decoder error: existing hardware acceleration cannot be reused

Also notice how the libva info is printed two times instead of just once (like it is done when playing other videos). It almost seems like vlc is trying to generate two accelerated video streams?

Everytime this appears vlc will use a lot of cpu while playing the video and the video will freeze from time to time. Most likely because the hardware acceleration fails:

[00007f7a18c175b0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f7a18c175b0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f7a18c175b0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[h264 @ 0x7f7a18c19ac0] co located POCs unavailable
[h264 @ 0x7f7a18c6c760] co located POCs unavailable

I can provide a sample file. But due to copyright reasons I'd rather not post it with everyone being able to download it from your site. So how can I send it to you?

VLC-Version 3.0.0-rc8 Vetinari (3.0.0-rc8-0-g440b1820)

Linux 4.14.0-3-amd64 #1 (closed) SMP Debian 4.14.17-1 (2018-02-14) x86_64 GNU/Linux

file info:

+----[ Stream 0 ]
|
| Videoauflösung: 1280x720
| Farbsättigungslage: Links
| Codec: H264 - MPEG-4 AVC (part 10) (avc1)
| Decodiertes Format: Planar 4:2:0 YUV
| Ausrichtung: Oben links
| Bildwiederholrate: 25
| Pufferabmessungen: 1280x738
| Typ: Video
|
+----[ Stream 1 ]
|
| Kanäle: 3F2M/LFE
| Codec: A52 Audio (aka AC3) (a52 )
| Abtastrate: 48000 Hz
| Typ: Audio
| Bits pro Sample: 32
| Sprache: Deutsch
|
+----[ Stream 2 ]
|
| Beschreibung: English AC3 2.0
| Codec: A52 Audio (aka AC3) (a52 )
| Abtastrate: 48000 Hz
| Typ: Audio
| Sprache: Englisch
|
+----[ Stream 3 ]
|
| Beschreibung: English
| Codec: Text subtitles with various tags (subt)
| Typ: Untertitel
|
+----[ end of stream info ]
$ dpkg -l | grep libva
ii  libva-drm1:amd64                                                 1.8.3-2                                amd64        Video Acceleration (VA) API for Linux -- DRM runtime
ii  libva-drm1:i386                                                  1.8.3-2                                i386         Video Acceleration (VA) API for Linux -- DRM runtime
ii  libva-drm2:amd64                                                 2.1.0-3                                amd64        Video Acceleration (VA) API for Linux -- DRM runtime
ii  libva-drm2:i386                                                  2.1.0-3                                i386         Video Acceleration (VA) API for Linux -- DRM runtime
ii  libva-wayland2:amd64                                             2.1.0-3                                amd64        Video Acceleration (VA) API for Linux -- Wayland runtime
ii  libva-x11-1:amd64                                                1.8.3-2                                amd64        Video Acceleration (VA) API for Linux -- X11 runtime
ii  libva-x11-1:i386                                                 1.8.3-2                                i386         Video Acceleration (VA) API for Linux -- X11 runtime
ii  libva-x11-2:amd64                                                2.1.0-3                                amd64        Video Acceleration (VA) API for Linux -- X11 runtime
ii  libva-x11-2:i386                                                 2.1.0-3                                i386         Video Acceleration (VA) API for Linux -- X11 runtime
ii  libva1:amd64                                                     1.8.3-2                                amd64        Video Acceleration (VA) API for Linux -- runtime
ii  libva1:i386                                                      1.8.3-2                                i386         Video Acceleration (VA) API for Linux -- runtime
ii  libva2:amd64                                                     2.1.0-3                                amd64        Video Acceleration (VA) API for Linux -- runtime
ii  libva2:i386                                                      2.1.0-3                                i386         Video Acceleration (VA) API for Linux -- runtime
$ dpkg -l | grep vdpau
ii  libvdpau1:amd64                                                  1.1.1-8                                amd64        Video Decode and Presentation API for Unix (libraries)
ii  libvdpau1:i386                                                   1.1.1-8                                i386         Video Decode and Presentation API for Unix (libraries)
ii  mesa-vdpau-drivers:amd64                                         17.3.9-1                               amd64        Mesa VDPAU video acceleration drivers
ii  mesa-vdpau-drivers:i386                                          17.3.9-1                               i386         Mesa VDPAU video acceleration drivers
ii  vdpau-va-driver:amd64                                            0.7.4-dmo8                             amd64        VDPAU-based backend for VA API
ii  vdpau-va-driver:i386                                             0.7.4-dmo8                             i386         VDPAU-based backend for VA API
ii  vdpauinfo                                                        1.0-3                                  amd64        Video Decode and Presentation API for Unix (vdpauinfo utility)
$ dpkg -l | grep radeon
ii  libdrm-radeon1:amd64                                             2.4.91-2                               amd64        Userspace interface to radeon-specific kernel DRM services -- runtime
ii  libdrm-radeon1:i386                                              2.4.91-2                               i386         Userspace interface to radeon-specific kernel DRM services -- runtime
ii  radeontop                                                        1.0-1                                  amd64        Utility to show Radeon GPU utilization
ii  xserver-xorg-video-radeon                                        1:18.0.1-1                             amd64        X.Org X server -- AMD/ATI Radeon display driver
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information