Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Broken video hardware acceleration on Ubuntu 20.04

  1. #1
    Join Date
    Nov 2021
    Beans
    11

    Broken video hardware acceleration on Ubuntu 20.04

    Hi everyone!

    I have a problem with hardware video decoding with mpv. It was working more or less effectively but some time ago it just broke. My guess was to install a new version of mpv, but it didn't help. I have installed VAAPI and VDPAU, but both deny to work in somehow similar manner. I'm not a nerd at all, I don't have a clue if I could do something to fix it.
    I have an old AMD A6-5200 APU (with KABINI graphics). The outputs of both 'vainfo' and 'vdpauinfo' seem just fine, for example vainfo reports:

    libva info: VA-API version 1.7.0
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
    libva info: Found init function __vaDriverInit_1_7
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.7 (libva 2.6.0)
    vainfo: Driver version: Mesa Gallium driver 21.0.3 for AMD KABINI (DRM 2.50.0, 5.11.0-051100-generic, LLVM 12.0.0)
    vainfo: Supported profile and entrypoints
    VAProfileMPEG2Simple : VAEntrypointVLD
    VAProfileMPEG2Main : VAEntrypointVLD
    VAProfileVC1Simple : VAEntrypointVLD
    VAProfileVC1Main : VAEntrypointVLD
    VAProfileVC1Advanced : VAEntrypointVLD
    VAProfileH264ConstrainedBaseline: VAEntrypointVLD
    VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
    VAProfileH264Main : VAEntrypointVLD
    VAProfileH264Main : VAEntrypointEncSlice
    VAProfileH264High : VAEntrypointVLD
    VAProfileH264High : VAEntrypointEncSlice
    VAProfileNone : VAEntrypointVideoProc

    But when I run mpv, the hardware decoding (in this case VAAPI) is apparently not used and mpv reports:
    ...
    [ffmpeg] AVHWFramesContext: Failed to create surface: 2 (resource allocation failed).
    [ffmpeg] AVHWFramesContext: Unable to allocate a surface from internal buffer pool.
    Failed to allocate hw frames.
    AO: [pulse] 48000Hz stereo 2ch float
    VO: [gpu] 1280x688 yuv420p
    ...

    Does anybody have an idea what could be done to get it working again?

    Thanks in advance,
    Bo

  2. #2
    Join Date
    Aug 2013
    Beans
    4,790

    Re: Broken video hardware acceleration on Ubuntu 20.04

    I don't know if this applies,same errors but seems the guy is using vaapi with vdpau backend.
    https://github.com/mpv-player/mpv/issues/4408

  3. #3
    Join Date
    Nov 2021
    Beans
    11

    Re: Broken video hardware acceleration on Ubuntu 20.04

    Quote Originally Posted by monkeybrain20122 View Post
    I don't know if this applies,same errors but seems the guy is using vaapi with vdpau backend.
    https://github.com/mpv-player/mpv/issues/4408
    Thanks, but VDPAU also doesn't work. 'vdapauinfo' gives some reasonable result but mpv (or rather ffmpeg?) reports errors:

    [ffmpeg] AVHWFramesContext: Failed to create surface: 2 (resource allocation failed).
    [ffmpeg] AVHWFramesContext: Unable to allocate a surface from internal buffer pool.

  4. #4
    Join Date
    Aug 2013
    Beans
    4,790

    Re: Broken video hardware acceleration on Ubuntu 20.04

    Ubuntu and mpv versions? Adm doesn't do vdpau unless you install libvdpau-va-gl but it is not needed since mpv should work with vaapi.

  5. #5
    Join Date
    Nov 2021
    Beans
    11

    Re: Broken video hardware acceleration on Ubuntu 20.04

    Quote Originally Posted by monkeybrain20122 View Post
    Ubuntu and mpv versions? Adm doesn't do vdpau unless you install libvdpau-va-gl but it is not needed since mpv should work with vaapi.
    Ubuntu 20.04.3 LTS

    mpv 0.34.0 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
    built on Sun Nov 14 19:37:55 UTC 2021
    FFmpeg library versions:
    libavutil 56.70.100
    libavcodec 58.134.100
    libavformat 58.76.100
    libswscale 5.9.100
    libavfilter 7.110.100
    libswresample 3.9.100
    FFmpeg version: 4.4.1

  6. #6
    Join Date
    Aug 2013
    Beans
    4,790

    Re: Broken video hardware acceleration on Ubuntu 20.04

    Did you build mpv and ffmpeg yourself? Or is it a snap?
    Last edited by monkeybrain20122; November 17th, 2021 at 09:26 PM.

  7. #7
    Join Date
    Nov 2021
    Beans
    11

    Re: Broken video hardware acceleration on Ubuntu 20.04

    Quote Originally Posted by monkeybrain20122 View Post
    Did you build mpv and ffmpeg yourself? Or is it a snap?
    I've installed mpv from a deb package downloaded from https://non-gnu.uvt.nl/debian (it is listed on https://mpv.io/installation/ web page).
    It behaves however (in this regard) exactly as my previous version of mpv (which was installed by default while installing Ubuntu).

  8. #8
    Join Date
    Aug 2013
    Beans
    4,790

    Re: Broken video hardware acceleration on Ubuntu 20.04

    I don't know if there is a ffmpeg version mismatch since ffmpeg should be at version 4.1 for Ubuntu 20.4 and yours says ffmpeg 4.4.1, Where did you get ffmpeg?

  9. #9
    Join Date
    Nov 2021
    Beans
    11

    Re: Broken video hardware acceleration on Ubuntu 20.04

    Quote Originally Posted by monkeybrain20122 View Post
    I don't know if there is a ffmpeg version mismatch since ffmpeg should be at version 4.1 for Ubuntu 20.4 and yours says ffmpeg 4.4.1, Where did you get ffmpeg?
    I've read somewhere it is statically linked with this version of mpv. I don't fully understand whats going on. I didn't install it separately.

  10. #10
    Join Date
    Aug 2013
    Beans
    4,790

    Re: Broken video hardware acceleration on Ubuntu 20.04

    So can you check your ffmpeg version (just type ffmpeg in terminal) and then to rule out possibilities, uninstall mpv and reinstall it from https://launchpad.net/~mc3man/+archive/ubuntu/mpv-tests
    and test?

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •