You are not logged in.

#1 2019-06-06 04:24:31

archinoob
Member
Registered: 2016-06-03
Posts: 46

mpv hardware decoding fails for 10-bit HEVC [Solved]

Computer specifications:

System:
 Kernel: 5.1.7-arch1-1-ARCH x86_64 bits: 64 compiler: gcc 
  v: 8.3.0 Desktop: Gnome 3.32.2 Distro: Arch Linux 
CPU:
  Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP 
  arch: Kaby Lake rev: A L2 cache: 8192 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 31880 
  Speed: 800 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 4: 800 5: 800 6: 800 7: 800 8: 800 
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 
  Device-2: NVIDIA GP108M [GeForce MX150] vendor: Hewlett-Packard 
  driver: nvidia v: 430.14 bus ID: 01:00.0 
  Display: wayland server: X.org 1.20.5 driver: nvidia 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) 
  v: 4.5 Mesa 19.0.5 direct render: Yes 

I am using the modesetting driver for the Intel UHD Graphics 620 and bumblebee to run it in conjunction with the NVIDIA MX150.

After adding

 export LIBVA_DRIVER_NAME=iHD 

to

/etc/environment

, I was able to get vainfo to output

vainfo: VA-API version: 1.4 (libva 2.4.1)
vainfo: Driver version: Intel iHD driver - 1.0.0
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointFEI
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD

However, when I try to use hardware decoding on 10-bit HEVC files (e.g. http://jell.yfish.us/media/jellyfish-40 … -10bit.mkv), all I see is a blue screen.

For example, when I run

mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' --hwdec=vaapi -v

,
I get the output

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '--hwdec=vaapi' '-v'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.5.1 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'x11probe'
[vo/gpu/x11] X11 opening display: :0
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/x11] X11 running at 3840x2160 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (XWAYLAND0): [0, 0, 3840, 2160] @ 59.980927 FPS
[vo/gpu/x11] Current display FPS: 59.980927
[vo/gpu/opengl] GLX chose FB config with ID 0xee
[vo/gpu/opengl] GLX chose visual with ID 0x2af
[vo/gpu/opengl] Creating OpenGL 4.4 context...
[vo/gpu] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu] Detected desktop OpenGL 4.5.
[vo/gpu] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Loaded extension GLX_MESA_swap_control.
[vo/gpu] Loaded extension GLX_SGI_video_sync.
[vo/gpu/opengl] No vdpau support found - probing more things.
[vo/gpu/x11] uninit ...
[vo/gpu/opengl] Initializing GPU context 'x11egl'
[vo/gpu/x11] X11 opening display: :0
[vo/gpu/x11] X11 running at 3840x2160 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (XWAYLAND0): [0, 0, 3840, 2160] @ 59.980927 FPS
[vo/gpu/x11] Current display FPS: 59.980927
[vo/gpu/opengl] EGL_VERSION=1.4
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/opengl] chose visual 0x24
[vo/gpu/opengl] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu/opengl] Detected desktop OpenGL 4.5.
[vo/gpu/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu/opengl] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Assuming 59.980927 FPS for display sync.
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-vaapi...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl/vaapi] libva: VA-API version 1.4.0
[vo/gpu/vaapi-egl/vaapi] libva: va_getDriverName() returns -1
[vo/gpu/vaapi-egl/vaapi] libva: User requested driver 'iHD'
[vo/gpu/vaapi-egl/vaapi] libva: Trying to open /usr/lib/dri/iHD_drv_video.so
[vo/gpu/vaapi-egl/vaapi] libva: Found init function __vaDriverInit_1_4
[vo/gpu/vaapi-egl/vaapi] libva: va_openDriver() returns 0
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.4
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] Supported formats:
[vo/gpu/vaapi-egl]  rgba
[vo/gpu/vaapi-egl]  nv12
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  gray
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: invalid OpenGL or DirectX context
[vo/gpu/cuda-nvdec] cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_INVALID_CONTEXT: invalid device context
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via hevc-vaapi.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Pixel formats supported by decoder: vaapi_vld cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'vaapi_vld' from decoder.
[vd] Using hardware decoding (vaapi).
[vd] Decoder format: 1920x1080 vaapi[p010] auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 vaapi[p010]
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/x11] not waiting for MapNotify
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu/vaapi-egl] unsupported VA image format p010
[vo/gpu] Initializing texture for hardware decoding failed.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Medium.ttf, 0, NotoSans-Medium
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/x11] Disabling screensaver.
[statusline] V: 00:00:01 / 00:00:30 (4%)
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x256.
[statusline] V: 00:00:28 / 00:00:30 (95%)
[mkv] EOF reached.
[statusline] V: 00:00:29 / 00:00:30 (99%)
[vf] filter input EOF
[vf] filter output EOF
[statusline] V: 00:00:30 / 00:00:30 (99%)
[cplayer] video EOF reached
[cplayer] EOF code: 1  
[vd] Uninit decoder.
[cplayer] finished playback, success (reason 0)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (End of file)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/x11] Enabling screensaver.
[vo/gpu/x11] uninit ...

and all I see is a blue screen.

Last edited by archinoob (2019-06-06 16:31:34)

Offline

#2 2019-06-06 05:33:44

seth
Member
Registered: 2012-09-03
Posts: 57,144

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

[vo/gpu/x11] Display 0 (XWAYLAND0): [0, 0, 3840, 2160] @ 59.980927 FPS

What if you try this from an actual X11 session?

Offline

#3 2019-06-06 14:47:13

archinoob
Member
Registered: 2016-06-03
Posts: 46

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

Hello Seth.

I switched to GNOME with Xorg (verified with the command

echo $XDG_SESSION_TYPE

, which outputs x11).

Here is the new output of

mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' --hwdec=vaapi -v

.

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '--hwdec=vaapi' '-v'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.5.1 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'x11probe'
[vo/gpu/x11] X11 opening display: :0
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/x11] X11 running at 3840x2160 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (eDP-1): [0, 0, 3840, 2160] @ 59.996625 FPS
[vo/gpu/x11] Current display FPS: 59.996625
[vo/gpu/opengl] GLX chose FB config with ID 0xcf
[vo/gpu/opengl] GLX chose visual with ID 0x146
[vo/gpu/opengl] Creating OpenGL 4.4 context...
[vo/gpu] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu] Detected desktop OpenGL 4.5.
[vo/gpu] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Loaded extension GLX_SGI_swap_control.
[vo/gpu] Loaded extension GLX_MESA_swap_control.
[vo/gpu] Loaded extension GLX_SGI_video_sync.
[vo/gpu/opengl] No vdpau support found - probing more things.
[vo/gpu/x11] uninit ...
[vo/gpu/opengl] Initializing GPU context 'x11egl'
[vo/gpu/x11] X11 opening display: :0
[vo/gpu/x11] X11 running at 3840x2160 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (eDP-1): [0, 0, 3840, 2160] @ 59.996625 FPS
[vo/gpu/x11] Current display FPS: 59.996625
[vo/gpu/opengl] EGL_VERSION=1.4
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/opengl] chose visual 0x21
[vo/gpu/opengl] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu/opengl] Detected desktop OpenGL 4.5.
[vo/gpu/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu/opengl] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Assuming 59.996625 FPS for display sync.
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-vaapi...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl/vaapi] libva: VA-API version 1.4.0
[vo/gpu/vaapi-egl/vaapi] libva: va_getDriverName() returns 0
[vo/gpu/vaapi-egl/vaapi] libva: User requested driver 'iHD'
[vo/gpu/vaapi-egl/vaapi] libva: Trying to open /usr/lib/dri/iHD_drv_video.so
[vo/gpu/vaapi-egl/vaapi] libva: Found init function __vaDriverInit_1_4
[vo/gpu/vaapi-egl/vaapi] libva: va_openDriver() returns 0
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.4
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] Supported formats:
[vo/gpu/vaapi-egl]  rgba
[vo/gpu/vaapi-egl]  nv12
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  gray
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: invalid OpenGL or DirectX context
[vo/gpu/cuda-nvdec] cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_INVALID_CONTEXT: invalid device context
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via hevc-vaapi.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Pixel formats supported by decoder: vaapi_vld cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'vaapi_vld' from decoder.
[vd] Using hardware decoding (vaapi).
[vd] Decoder format: 1920x1080 vaapi[p010] auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 vaapi[p010]
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/x11] not waiting for MapNotify
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu/vaapi-egl] unsupported VA image format p010
[vo/gpu] Initializing texture for hardware decoding failed.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Medium.ttf, 0, NotoSans-Medium
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/x11] Disabling screensaver.
[statusline] V: 00:00:00 / 00:00:30 (2%)
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x256.
[statusline] V: 00:00:01 / 00:00:30 (4%)
[mkv] EOF reached.
[cplayer] EOF code: 5  
[vd] Uninit decoder.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/x11] Enabling screensaver.
[vo/gpu/x11] uninit ...

.
Again, all I see is a blue screen.

Curiously, if I add the --gpu-context=x11 parameter, mpv switches to software decoding.

So, if I run

mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' --hwdec=vaapi --gpu-context=x11 -v

, I get

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '--hwdec=vaapi' '--gpu-context=x11' '-v'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.5.1 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu/opengl] Initializing GPU context 'x11'
[vo/gpu/x11] X11 opening display: :0
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/x11] X11 running at 3840x2160 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (eDP-1): [0, 0, 3840, 2160] @ 59.996625 FPS
[vo/gpu/x11] Current display FPS: 59.996625
[vo/gpu/opengl] GLX chose FB config with ID 0xcf
[vo/gpu/opengl] GLX chose visual with ID 0x146
[vo/gpu/opengl] Creating OpenGL 4.4 context...
[vo/gpu] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu] Detected desktop OpenGL 4.5.
[vo/gpu] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Loaded extension GLX_SGI_swap_control.
[vo/gpu] Loaded extension GLX_MESA_swap_control.
[vo/gpu] Loaded extension GLX_SGI_video_sync.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Assuming 59.996625 FPS for display sync.
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-vaapi...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> CUDA_ERROR_UNKNOWN: unknown error
[vo/gpu/cuda-nvdec] cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_INVALID_CONTEXT: invalid device context
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] No hardware decoding available for this codec.
[vd] Using software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Using software decoding.
[vd] Decoder format: 1920x1080 yuv420p10 auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 yuv420p10
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/x11] not waiting for MapNotify
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Texture for plane 0: 1920x1080
[vo/gpu] Texture for plane 1: 960x540
[vo/gpu] Texture for plane 2: 960x540
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] DR enabled: yes
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Medium.ttf, 0, NotoSans-Medium
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/x11] Disabling screensaver.
[statusline] V: 00:00:00 / 00:00:30 (1%)
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x256.
[statusline] V: 00:00:00 / 00:00:30 (2%)
[cplayer] EOF code: 5  
[vd] Uninit decoder.
[vo/gpu/x11] Enabling screensaver.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/x11] uninit ...

.

Last edited by archinoob (2019-06-06 14:54:44)

Offline

#4 2019-06-06 14:54:24

archinoob
Member
Registered: 2016-06-03
Posts: 46

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

I would prefer to fix the issue in Wayland as that is my display server protocol of choice. Switching back to GNOME with Wayland, running

mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' --hwdec=vaapi --gpu-context=wayland -v

does not switch mpv to software decoding, unlike when I passed --gpu-context=x11 in the x11 session.

The output of this command in Wayland is

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '--hwdec=vaapi' '--gpu-context=wayland' '-v'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.5.1 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu] Enabling event driven renderloop!
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] Compositor doesn't support the org_kde_kwin_server_decoration_manager protocol!
[vo/gpu/wayland] Compositor doesn't support the zwp_idle_inhibit_manager_v1 protocol!
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/opengl] EGL_VERSION=1.4
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu/wayland] Detected desktop OpenGL 4.5.
[vo/gpu/wayland] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu/wayland] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/wayland] Registered output BOE 0x06c3 (0x4):
[vo/gpu/wayland] 	x: 0px, y: 0px
[vo/gpu/wayland] 	w: 3840px (340mm), h: 2160px (190mm)
[vo/gpu/wayland] 	scale: 2
[vo/gpu/wayland] 	Hz: 59.997000
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-vaapi...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl] Trying to open a wayland VA display...
[vo/gpu/vaapi-egl/vaapi] libva: VA-API version 1.4.0
[vo/gpu/vaapi-egl/vaapi] libva: va_getDriverName() returns 0
[vo/gpu/vaapi-egl/vaapi] libva: User requested driver 'iHD'
[vo/gpu/vaapi-egl/vaapi] libva: Trying to open /usr/lib/dri/iHD_drv_video.so
[vo/gpu/vaapi-egl/vaapi] libva: Found init function __vaDriverInit_1_4
[vo/gpu/vaapi-egl/vaapi] libva: va_openDriver() returns 0
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.4
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] Supported formats:
[vo/gpu/vaapi-egl]  rgba
[vo/gpu/vaapi-egl]  nv12
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  gray
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: invalid OpenGL or DirectX context
[vo/gpu/cuda-nvdec] cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_INVALID_CONTEXT: invalid device context
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via hevc-vaapi.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Pixel formats supported by decoder: vaapi_vld cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'vaapi_vld' from decoder.
[vd] Using hardware decoding (vaapi).
[vd] Decoder format: 1920x1080 vaapi[p010] auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 vaapi[p010]
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu/vaapi-egl] unsupported VA image format p010
[vo/gpu] Initializing texture for hardware decoding failed.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Medium.ttf, 0, NotoSans-Medium
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/wayland] Surface entered output BOE 0x06c3 (0x4), scale = 2
[statusline] V: 00:00:00 / 00:00:30 (0%)
[vo/gpu] Assuming 59.997000 FPS for display sync.
[statusline] V: 00:00:01 / 00:00:30 (3%)
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x256.
[statusline] V: 00:00:02 / 00:00:30 (9%)
[cplayer] EOF code: 5  
[vd] Uninit decoder.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/wayland] Deregistering output BOE 0x06c3 (0x4)

Finally, I would like to note that my mpv.conf file is empty, so I am not passing any undocumented parameters to mpv.

Last edited by archinoob (2019-06-06 14:57:59)

Offline

#5 2019-06-06 15:34:12

seth
Member
Registered: 2012-09-03
Posts: 57,144

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

[vo/gpu/vaapi-egl] unsupported VA image format p010

I assume offloading it to the nvidia chip and playing it w/ "--hwdec=nvdec" works?

Offline

#6 2019-06-06 15:43:13

archinoob
Member
Registered: 2016-06-03
Posts: 46

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

I have found that offloading to the nvidia chip does not work.
Running

optirun mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' --hwdec=nvdec --gpu-context=wayland -v

causes mpv to switch to software decoding mode.
The output I get from running the above command is

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '--hwdec=nvdec' '--gpu-context=wayland' '-v'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.5.1 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu] Enabling event driven renderloop!
[vo/gpu/wayland] Registered for protocol wl_compositor
[vo/gpu/wayland] Registered for protocol wl_shm
[vo/gpu/wayland] Registered for protocol wl_output
[vo/gpu/wayland] Registered for protocol wl_data_device_manager
[vo/gpu/wayland] Registered for protocol xdg_wm_base
[vo/gpu/wayland] Registered for protocol wl_seat
[vo/gpu/wayland] Compositor doesn't support the org_kde_kwin_server_decoration_manager protocol!
[vo/gpu/wayland] Compositor doesn't support the zwp_idle_inhibit_manager_v1 protocol!
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/opengl] EGL_VERSION=1.4
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/wayland] GL_VERSION='4.5 (Core Profile) Mesa 19.0.5'
[vo/gpu/wayland] Detected desktop OpenGL 4.5.
[vo/gpu/wayland] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu/wayland] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu/wayland] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/wayland] Registered output BOE 0x06c3 (0x4):
[vo/gpu/wayland] 	x: 0px, y: 0px
[vo/gpu/wayland] 	w: 3840px (340mm), h: 2160px (190mm)
[vo/gpu/wayland] 	scale: 2
[vo/gpu/wayland] 	Hz: 59.997000
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-nvdec...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl] Trying to open a wayland VA display...
[vo/gpu/vaapi-egl/vaapi] libva: VA-API version 1.4.0
[vo/gpu/vaapi-egl/vaapi] libva: va_getDriverName() returns 0
[vo/gpu/vaapi-egl/vaapi] libva: User requested driver 'iHD'
[vo/gpu/vaapi-egl/vaapi] libva: Trying to open /usr/lib/dri/iHD_drv_video.so
[vo/gpu/vaapi-egl/vaapi] libva: Found init function __vaDriverInit_1_4
[vo/gpu/vaapi-egl/vaapi] libva: va_openDriver() returns 0
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.4
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] Supported formats:
[vo/gpu/vaapi-egl]  rgba
[vo/gpu/vaapi-egl]  nv12
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  gray
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuGLGetDevices(&device_count, &display_dev, 1, CU_GL_DEVICE_LIST_ALL) failed -> CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: invalid OpenGL or DirectX context
[vo/gpu/cuda-nvdec] cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_INVALID_CONTEXT: invalid device context
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] No hardware decoding available for this codec.
[vd] Using software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Using software decoding.
[vd] Decoder format: 1920x1080 yuv420p10 auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 yuv420p10
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/wayland] Reconfiguring!
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Texture for plane 0: 1920x1080
[vo/gpu] Texture for plane 1: 960x540
[vo/gpu] Texture for plane 2: 960x540
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/wayland] Handling resize on the egl side
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] DR enabled: yes
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Medium.ttf, 0, NotoSans-Medium
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/wayland] Surface entered output BOE 0x06c3 (0x4), scale = 2
[statusline] V: 00:00:00 / 00:00:30 (0%)
[vo/gpu] Assuming 59.997000 FPS for display sync.
[statusline] V: 00:00:00 / 00:00:30 (3%)
[cplayer] EOF code: 5  
[vd] Uninit decoder.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/wayland] Deregistering output BOE 0x06c3 (0x4)

.

Offline

#7 2019-06-06 15:45:02

seth
Member
Registered: 2012-09-03
Posts: 57,144

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

*not* on wayland. optimus support on wayland is virtually non-existent and you're not using the GPU in that log.

Offline

#8 2019-06-06 15:51:53

archinoob
Member
Registered: 2016-06-03
Posts: 46

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

Offloading to the nvidia GPU in x11 works.
Running

optirun mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' --hwdec=nvdec --gpu-context=x11 -v

gives

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '--hwdec=nvdec' '--gpu-context=x11' '-v'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.5.1 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu/opengl] Initializing GPU context 'x11'
[vo/gpu/x11] X11 opening display: :0
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/x11] X11 running at 3840x2160 (":0" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (eDP-1): [0, 0, 3840, 2160] @ 59.996625 FPS
[vo/gpu/x11] Current display FPS: 59.996625
[vo/gpu/opengl] GLX chose FB config with ID 0xad
[vo/gpu/opengl] GLX chose visual with ID 0x21
[vo/gpu/opengl] Creating OpenGL 4.4 context...
[vo/gpu] GL_VERSION='4.4.0 NVIDIA 430.14'
[vo/gpu] Detected desktop OpenGL 4.4.
[vo/gpu] GL_VENDOR='NVIDIA Corporation'
[vo/gpu] GL_RENDERER='GeForce MX150/PCIe/SSE2'
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.40 NVIDIA via Cg compiler'
[vo/gpu] Loaded extension GLX_SGI_swap_control.
[vo/gpu] Loaded extension GL_NV_vdpau_interop.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Assuming 59.996625 FPS for display sync.
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-nvdec...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu] Loading hwdec driver 'vdpau-glx'
Failed to open VDPAU backend libvdpau_i965.so: cannot open shared object file: No such file or directory
[vo/gpu/vdpau-glx] Error when calling vdp_device_create_x11: 1
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via hevc-nvdec.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Pixel formats supported by decoder: vaapi_vld cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'cuda' from decoder.
[ffmpeg/video] hevc: Hardware is lacking required capabilities
[ffmpeg/video] hevc: Failed setup for format cuda: hwaccel initialisation returned error.
[vd] Pixel formats supported by decoder: vaapi_vld yuv420p10le yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'yuv420p10le' from decoder.
[vd] Falling back to software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
[vd] Using software decoding.
[vd] Decoder format: 1920x1080 yuv420p10 auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 yuv420p10
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 yuv420p10 bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/x11] not waiting for MapNotify
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Texture for plane 0: 1920x1080
[vo/gpu] Texture for plane 1: 960x540
[vo/gpu] Texture for plane 2: 960x540
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] DR enabled: yes
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/noto/NotoSans-Medium.ttf, 0, NotoSans-Medium
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/x11] Disabling screensaver.
[statusline] V: 00:00:08 / 00:00:30 (27%)
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x256.
[statusline] V: 00:00:11 / 00:00:30 (38%)
[mkv] EOF reached.
[cplayer] EOF code: 5  
[vd] Uninit decoder.
[vo/gpu/x11] Enabling screensaver.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/x11] uninit ...

.

Offline

#9 2019-06-06 16:05:03

archinoob
Member
Registered: 2016-06-03
Posts: 46

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

However, I would like to use the UHD 620 for hardware decoding for energy efficiency reasons. Offloading to the nvidia GPU defeats the primary benefit of hardware decoding for me.

I have another laptop running Gnome Wayland with the same CPU and GPU that successfully employs hardware decoding.
On this laptop running

mpv 'jellyfish-40-mbps-hd-hevc-10bit.mkv' -v --hwdec=auto

outputs

[cplayer] Command line options: 'jellyfish-40-mbps-hd-hevc-10bit.mkv' '-v' '--hwdec=auto'
[cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Fri Apr 19 20:49:51 UTC 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.22.100
[cplayer]    libavcodec      58.35.100
[cplayer]    libavformat     58.20.100
[cplayer]    libswscale      5.3.100
[cplayer]    libavfilter     7.40.101
[cplayer]    libswresample   3.3.100
[cplayer] ffmpeg version: n4.1.3
[cplayer] 
[cplayer] Configuration: ./waf configure --prefix=/usr --confdir=/etc/mpv --enable-cdda --enable-dvb --enable-dvdnav --enable-libarchive --enable-libmpv-shared --enable-libsmbclient --enable-tv --enable-zsh-comp
[cplayer] List of enabled features: 52arch alsa asm atomics audio-input build-date caca cdda cplayer cplugins cuda-hwaccel debug-build drm drmprime dvbin dvdnav dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg ffnvcodec gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jack jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libdl libm libmpv-shared librt libsmbclient libv4l2 linux-fstatfs lua optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads pulse rubberband shaderc shaderc-shared stdatomic tv tv-v4l2 uchardet vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 videodev vt.h vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/user/.config/mpv/mpv.conf
[cplayer] Waiting for scripts...
[ytdl_hook] script-opts/ytdl_hook.conf not found. 
[ytdl_hook] lua-settings/ytdl_hook.conf not found. 
[stats] script-opts/stats.conf not found. 
[stats] lua-settings/stats.conf not found. 
[osc] script-opts/osc.conf not found. 
[osc] lua-settings/osc.conf not found. 
[cplayer] Done loading scripts.
[cplayer] Playing: jellyfish-40-mbps-hd-hevc-10bit.mkv
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook 
[ytdl_hook] not a ytdl:// url 
[ifo] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[ifo_dvdnav] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[osd/libass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 2.4.0 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[file] Opening jellyfish-40-mbps-hd-hevc-10bit.mkv
[demux] Trying demuxers for level=normal.
[mkv] Found the head...
[mkv] + a segment...
[mkv] Parsing seek head...
[mkv] |+ segment information...
[mkv] | + muxing app: Lavf56.3.100
[mkv] | + writing app: Lavf56.3.100
[mkv] | + timecode scale: 1000000
[mkv] | + duration: 30.097s
[mkv] | + segment uid 0d 36 9c 7b af c1 82 0c 52 25 12 76 8e 94 f2 34
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Video track
[mkv] |   + Pixel width: 1920
[mkv] |   + Pixel height: 1080
[mkv] |  + Codec ID: V_MPEGH/ISO/HEVC
[mkv] |  + CodecPrivate, length 111
[mkv] |  + Language: und
[mkv] |  + Default duration: 33.367ms ( = 29.970 fps)
[mkv] |+ found cluster
[mkv] Deferring reading cues.
[mkv] All headers are parsed!
[demux] Detected file format: Matroska
[cplayer] Opening done: jellyfish-40-mbps-hd-hevc-10bit.mkv
[find_files] Loading external files in .
[cplayer] Running hook: ytdl_hook/on_preloaded
[mkv] select track 0
[cplayer]  (+) Video --vid=1 (*) (hevc 1920x1080 29.970fps)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'x11probe'
[vo/gpu/x11] X11 opening display: :1
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[vo/gpu/x11] X11 running at 3840x2160 (":1" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (eDP1): [0, 0, 3840, 2160] @ 59.996625 FPS
[vo/gpu/x11] Current display FPS: 59.996625
[vo/gpu/opengl] GLX chose FB config with ID 0x99
[vo/gpu/opengl] GLX chose visual with ID 0x110
[vo/gpu/opengl] Creating OpenGL 4.4 context...
[vo/gpu] GL_VERSION='4.5 (Core Profile) Mesa 19.0.4'
[vo/gpu] Detected desktop OpenGL 4.5.
[vo/gpu] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Loaded extension GLX_SGI_swap_control.
[vo/gpu] Loaded extension GLX_MESA_swap_control.
[vo/gpu] Loaded extension GLX_SGI_video_sync.
[vo/gpu/opengl] No vdpau support found - probing more things.
[vo/gpu/x11] uninit ...
[vo/gpu/opengl] Initializing GPU context 'x11egl'
[vo/gpu/x11] X11 opening display: :1
[vo/gpu/x11] X11 running at 3840x2160 (":1" => local display)
[vo/gpu/x11] Detected wm supports NetWM.
[vo/gpu/x11] Detected wm supports FULLSCREEN state.
[vo/gpu/x11] Detected wm supports ABOVE state.
[vo/gpu/x11] Detected wm supports BELOW state.
[vo/gpu/x11] Display 0 (eDP1): [0, 0, 3840, 2160] @ 59.996625 FPS
[vo/gpu/x11] Current display FPS: 59.996625
[vo/gpu/opengl] EGL_VERSION=1.4
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/opengl] chose visual 0x20
[vo/gpu/opengl] GL_VERSION='4.5 (Core Profile) Mesa 19.0.4'
[vo/gpu/opengl] Detected desktop OpenGL 4.5.
[vo/gpu/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/gpu/opengl] GL_RENDERER='Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '
[vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.50'
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Assuming 59.996625 FPS for display sync.
[vd] Container reported FPS: 29.969999
[vd] Codec list:
[vd]     hevc - HEVC (High Efficiency Video Coding)
[vd]     hevc_v4l2m2m (hevc) - V4L2 mem2mem HEVC decoder wrapper
[vd]     hevc_cuvid (hevc) - Nvidia CUVID HEVC decoder
[vd] Opening decoder hevc
[vd] Looking at hwdec hevc-nvdec...
[vo/gpu] Loading hwdec driver 'vaapi-egl'
[vo/gpu/vaapi-egl] Trying to open a x11 VA display...
[vo/gpu/vaapi-egl/vaapi] libva: VA-API version 1.4.0
[vo/gpu/vaapi-egl/vaapi] libva: va_getDriverName() returns 0
[vo/gpu/vaapi-egl/vaapi] libva: Trying to open /usr/lib/dri/i965_drv_video.so
[vo/gpu/vaapi-egl/vaapi] libva: Found init function __vaDriverInit_1_3
[vo/gpu/vaapi-egl/vaapi] libva: va_openDriver() returns 0
[vo/gpu/vaapi-egl/vaapi] Initialized VAAPI: version 1.4
[vo/gpu/vaapi-egl] using VAAPI EGL interop
[vo/gpu/vaapi-egl/vaapi] libva: vaExportSurfaceHandle: fourcc 48323234 is not supported for export as separate planes.
[vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID)
[vo/gpu/vaapi-egl] Supported formats:
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  yuv420p
[vo/gpu/vaapi-egl]  nv12
[vo/gpu/vaapi-egl]  rgb0
[vo/gpu/vaapi-egl]  bgr0
[vo/gpu/vaapi-egl]  p010
[vo/gpu] Loading hwdec driver 'cuda-nvdec'
[vo/gpu/cuda-nvdec] cu->cuInit(0) failed -> CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
[vo/gpu/cuda-nvdec] cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'vdpau-glx'
[vo/gpu] Loading failed.
[vo/gpu] Loading hwdec driver 'drmprime-drm'
[vo/gpu/drmprime-drm] Failed to retrieve DRM fd from native display.
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] Looking at hwdec hevc-vdpau...
[vd] Could not create device.
[vd] Looking at hwdec hevc-vaapi...
[vd] Trying hardware decoding via hevc-vaapi.
[vd] Selected codec: hevc (HEVC (High Efficiency Video Coding))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] Pixel formats supported by decoder: vaapi_vld cuda yuv420p10le
[vd] Codec profile: Main 10 (0x2)
[vd] Requesting pixfmt 'vaapi_vld' from decoder.
[vd] Using hardware decoding (vaapi).
[vd] Decoder format: 1920x1080 vaapi[p010] auto/auto/auto/limited/auto CL=unknown (auto 0.000000/0.000000/0.000000)
[vd] Using container aspect ratio.
[vf] [in] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vf] [convert] (disabled)
[vf] [out] 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[cplayer] VO: [gpu] 1920x1080 vaapi[p010]
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1920x1080 vaapi[p010] bt.709/bt.709/bt.1886/limited/display SP=1.000000 CL=mpeg2/4/h264
[vo/gpu/x11] not waiting for MapNotify
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/TTF/Vera.ttf, 0, BitstreamVeraSans-Roman
[cplayer] first video frame after restart shown
[cplayer] playback restart complete
[vo/gpu/x11] Disabling screensaver.
[statusline] V: 00:00:01 / 00:00:30 (3%)
[osd/libass] fontselect: (mpv-osd-symbols, 400, 0) -> mpv-osd-symbols-Regular, 0, mpv-osd-symbols-Regular
[vo/gpu] Reallocating OSD texture to 2048x256.
[statusline] V: 00:00:02 / 00:00:30 (9%)
[cplayer] EOF code: 5  
[vd] Uninit decoder.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[stats] Exiting...
[osc] Exiting...
[vo/gpu/x11] Enabling screensaver.
[vo/gpu/x11] uninit ...

This log indicates that GPU decoding on the UHD 620 in Wayland is possible. It may also be useful in identifying what is going wrong with my setup.

Offline

#10 2019-06-06 16:08:10

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

For Intel with VAAPI, try the other driver. So instead of installing intel-media-driver and doing LIBVA_DRIVER_NAME=iHD, install libva-intel-driver and do LIBVA_DRIVER_NAME=i965

I'm using libva-intel-driver and playing that video works here. I don't use wayland though, but that shouldn't make a difference.

Edit: Didn't see your last post when writing the above. Now I have, and indeed in here you're using i965 instead of iHD. It seems that iHD doesn't support 10bit video. Which I find a bit strange, but that's what it looks like.

Last edited by Gusar (2019-06-06 16:10:23)

Offline

#11 2019-06-06 16:30:51

archinoob
Member
Registered: 2016-06-03
Posts: 46

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

Gusar, this does fix my issue, so I will mark this thread as solved.

However, according to https://wiki.archlinux.org/index.php/Ha … tion#Intel, the intel-media-driver should support H.265/HEVC 10bit decoding on "Broxton/Apollo Lake and newer" and H.265/HEVC 10bit encoding on "Kaby Lake and newer". This agrees with the output of vainfo when I was running the intel-media-driver.

Last edited by archinoob (2019-06-20 09:50:35)

Offline

#12 2019-06-06 16:46:32

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: mpv hardware decoding fails for 10-bit HEVC [Solved]

Yes, iHD should support 10bit video. But something goes wrong somewhere. And it's not about decoding the video, it's about image formats - mpv receives the info that the 10bit image format isn't supported. As to why that is, who knows - could be a driver bug, could be a bug in the negotiation between mpv and the driver, could be Intel being just plain weird. I'd say the latter, Intel is quite often just plain weird smile

Offline

Board footer

Powered by FluxBB