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

Thread: mpv and hardware acceleration

  1. #1
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default mpv and hardware acceleration

    hit

    i use kde under wayland on a lenovo t450

    when i watch a video with mpv, cpu come to 300%


    vainfo command return
    Code:
    libva info: VA-API version 1.4.0
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
    libva info: Found init function __vaDriverInit_1_4
    failed to open /usr/lib64/dri/hybrid_drv_video.so
    Not using hybrid_drv_video.so
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.4 (libva 2.3.0)
    vainfo: Driver version: Intel i965 driver for Intel(R) Broadwell - 2.3.0
    vainfo: Supported profile and entrypoints
          VAProfileMPEG2Simple            : VAEntrypointVLD
          VAProfileMPEG2Simple            : VAEntrypointEncSlice
          VAProfileMPEG2Main              : VAEntrypointVLD
          VAProfileMPEG2Main              : VAEntrypointEncSlice
          VAProfileH264ConstrainedBaseline: VAEntrypointVLD
          VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
          VAProfileH264Main               : VAEntrypointVLD
          VAProfileH264Main               : VAEntrypointEncSlice
          VAProfileH264High               : VAEntrypointVLD
          VAProfileH264High               : VAEntrypointEncSlice
          VAProfileH264MultiviewHigh      : VAEntrypointVLD
          VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
          VAProfileH264StereoHigh         : VAEntrypointVLD
          VAProfileH264StereoHigh         : VAEntrypointEncSlice
          VAProfileVC1Simple              : VAEntrypointVLD
          VAProfileVC1Main                : VAEntrypointVLD
          VAProfileVC1Advanced            : VAEntrypointVLD
          VAProfileNone                   : VAEntrypointVideoProc
          VAProfileJPEGBaseline           : VAEntrypointVLD
          VAProfileVP8Version0_3          : VAEntrypointVLD
    tried

    Code:
    mpv --hwdec vaapi --opengl-backend=wayland myvideo.mp4

    get same result



    thanks
    www.laboiteaprog.com

  2. #2
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: mpv and hardware acceleration

    when load previous command

    Code:
    (+) Video --vid=1 (*) (h264 1920x1080 29.970fps)
     (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
    [vaapi] libva: va_getDriverName() failed with unknown libva error,driver_name=(null)
    [ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1                                                                                                                                                                     
    [ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA                                                                                                                                                              
    libva info: VA-API version 1.4.0
    libva info: va_getDriverName() returns -1
    libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
    failed to open /usr/lib64/dri/hybrid_drv_video.so
    Not using hybrid_drv_video.so
    [ffmpeg/video] h264: Failed setup for format vaapi_vld: hwaccel initialisation returned error.
    AO: [pulse] 48000Hz stereo 2ch float
    VO: [gpu] 1920x1080 yuv420p
    AV: 00:00:13 / 00:09:44 (2%) A-V:  0.092 Dropped: 16
    like loading driver issue?
    www.laboiteaprog.com

  3. #3
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: mpv and hardware acceleration

    collinm@linux-77w7:~/bin> sha1sum /usr/lib64/dri/*
    Code:
    1473bd6c1c4a96193ea170b4e912fd02dd26bc89  /usr/lib64/dri/i915_dri.so
    1473bd6c1c4a96193ea170b4e912fd02dd26bc89  /usr/lib64/dri/i965_dri.so
    a2b6a129c22dfa66edcd1aeb8b02d721d2f99cbe  /usr/lib64/dri/i965_drv_video.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/kms_swrast_dri.so
    7713f6df3302ca0b09c280f7fa430baa250b7354  /usr/lib64/dri/nouveau_drv_video.so
    1473bd6c1c4a96193ea170b4e912fd02dd26bc89  /usr/lib64/dri/r200_dri.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/r300_dri.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/r600_dri.so
    7713f6df3302ca0b09c280f7fa430baa250b7354  /usr/lib64/dri/r600_drv_video.so
    1473bd6c1c4a96193ea170b4e912fd02dd26bc89  /usr/lib64/dri/radeon_dri.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/radeonsi_dri.so
    7713f6df3302ca0b09c280f7fa430baa250b7354  /usr/lib64/dri/radeonsi_drv_video.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/swrast_dri.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/virtio_gpu_dri.so
    c6f043bb6712c4a72567e100ac85fa27febe2aec  /usr/lib64/dri/vmwgfx_dri.so
    video card it's a intel hd 5000 (broadwell gt2)
    www.laboiteaprog.com

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,397
    Blog Entries
    2

    Default Re: mpv and hardware acceleration

    I keep the following link handy...

    https://trac.ffmpeg.org/wiki/HWAccelIntro

    It's a treasure of info stuffed in very few words,
    Among other things, describes the various hardware acceleration capabilities and options available for various GPUs, if you're not satisfied with your current perfromance perhaps another method is possible.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5

    Default Re: mpv and hardware acceleration

    I've had the same issue with Wayland but currently use X11.
    VAAPI acceleration works fine for me under X11.
    This is with intel-vaapi-driver package installed through zypper.

    It would be nice if a guide outlined VAAPI acceleration options in mpv under Wayland/EGL since don't have time to play around with it right now.
    Especially since mpv is the backend for so many players.

    The following options might have improved the situation under Wayland.

    mpv --hwdec=vaapi-copy,vaapi --gpu-context=wayland --vo=gpu myvideo.mp4

  6. #6

    Default Re: mpv and hardware acceleration

    Some people have apparently had success with...

    mpv --vo=opengl --hwdec=vaapi --opengl-backend=wayland video.mp4

    MPV reports that VAAPI is enabled but I get frozen video.

  7. #7

    Default Re: mpv and hardware acceleration

    The following gives me the best result under Wayland.

    mpv --vo=opengl --hwdec=vaapi-copy video.mp4

    Now get accelerated playback without freezes and error message [vo/opengl/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)

    Not using hybrid_drv_video.so
    Using hardware decoding (vaapi-copy).
    AO: [pulse] 48000Hz stereo 2ch float
    VO: [gpu] 1280x720 nv12
    AV: 00:00:29 / 00:21:35 (2%) A-V: 0.000



  8. #8
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    436

    Default Re: mpv and hardware acceleration

    get same result... high cpu and mpv display these info

    (+) Video --vid=1 (*) (h264 1920x1080 29.970fps)
    (+) Audio --aid=1 (*) (aac 2ch 48000Hz)
    failed to open /usr/lib64/dri/hybrid_drv_video.so
    Not using hybrid_drv_video.so
    [ffmpeg/video] h264: Failed setup for format vaapi_vld: hwaccel initialisation returned error.
    AO: [pulse] 48000Hz stereo 2ch float
    VO: [gpu] 1920x1080 yuv420p
    AV: 00:00:17 / 00:09:44 (2%) A-V: 0.146 Dropped: 152
    www.laboiteaprog.com

  9. #9

    Default Re: mpv and hardware acceleration

    Doesn't look like you're getting hardware acceleration unfortunately.

    MPV will return something like
    Using hardware decoding (vaapi-copy) if vaapi is active.
    That might be why CPU usage is so high if video playback is high quality at that resolution.

    Not sure why VAAPI doesn't initialize. You could possibly try to see if acceleration is available on other videos.



  10. #10
    Join Date
    Sep 2012
    Posts
    5,203

    Default Re: mpv and hardware acceleration

    Quote Originally Posted by collinm View Post
    i use kde under wayland
    Sounds similar to https://github.com/intel/intel-vaapi-driver/issues/203

    Forcing native wayland may work.

Page 1 of 2 12 LastLast

Posting Permissions

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