mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.5k stars 2.92k forks source link

HEVC Support on latest Skylake processors (linux) #2912

Closed mgcrea closed 8 years ago

mgcrea commented 8 years ago

I'm trying to make this HEVC-8bit file to play with hardware acceleration on latest NuC6i5 on linux

I'm running an up-to-date Ubuntu 14.04.4LTS with xorg-edgers/ppa.

Linux foobar 4.2.0-30-generic #36~14.04.1-Ubuntu SMP Fri Feb 26 18:49:23 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

According to this link, it should work:

6th Generation Intel Core processors (Skylake) Supports hardware accelerated HEVC 8-bit decode and encode.

Also vainfo reports support for a VAProfileHEVCMain:

$ vainfo 
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 1.5.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
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD

Some more info:

$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.0.2
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 11.0.2
OpenGL shading language version string: 1.30

MPV version:

$ mpv --version
mpv git-a19307d (C) 2000-2016 mpv/MPlayer/mplayer2 projects
 built on Thu Mar  3 17:46:13 UTC 2016
ffmpeg library versions:
   libavutil       55.19.100
   libavcodec      57.27.101
   libavformat     57.27.102
   libswscale      4.0.100
   libavfilter     6.39.100
   libswresample   2.0.101
ffmpeg version: N-78877-gba687ae

Forked from #2664

ghost commented 8 years ago

Full log with -v required.

mgcrea commented 8 years ago

Full log:

Updated mpv to v0.16 (from v0.15):

[cplayer] Command line options: '/srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/LG_4K_View-the-Feeling.mp4' '--hwdec=auto' '-v'
[cplayer] mpv git-a19307d (C) 2000-2016 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Thu Mar  3 17:46:13 UTC 2016
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.19.100
[cplayer]    libavcodec      57.27.101
[cplayer]    libavformat     57.27.102
[cplayer]    libswscale      4.0.100
[cplayer]    libavfilter     6.39.100
[cplayer]    libswresample   2.0.101
[cplayer] ffmpeg version: N-78877-gba687ae
[cplayer] 
[cplayer] Configuration: ./waf configure --enable-pdf-build --prefix=/usr --confdir=/etc/mpv
[cplayer] List of enabled features: alsa any-gl asm atomic-builtins atomics audio-input av-avpacket-int64-duration av-new-pixdesc av-pix-fmt-mmal av-subtitle-nopict av-version-info avcodec-chroma-pos-api avcodec-profile-name avframe-metadata avframe-skip-samples build-date cdda cplayer debug-build desktop-gl dlopen drm dvbin dvdnav dvdread encoding fchmod gl gl-x11 glibc-thread-name glob iconv jack jpeg lcms2 libass libass-osd libav libavdevice libavfilter libbluray libdl libguess libm librt libsmbclient libswresample libv4l2 linux-fstatfs lua nanosleep optimize oss-audio oss-audio-native posix posix-or-mingw posix-spawn pthreads pulse resampler rubberband shm sse4-intrinsics subprocess termios tv tv-v4l2 uchardet vaapi vaapi-glx vaapi-hwaccel vaapi-x11 vdpau vdpau-gl-x11 vdpau-hwaccel videodev vt.h x11 xext xinerama xrandr xss xv zlib
[global] config path: '' -> '/home/carlipa/.config/mpv'
[global] config path: 'mpv.conf' -/-> '/home/carlipa/.config/mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/carlipa/.config/mpv/config'
[global] config path: 'mpv.conf' -/-> '/home/carlipa/.mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/carlipa/.mpv/config'
[global] config path: 'mpv.conf' -/-> '/etc/mpv/mpv.conf'
[global] config path: 'config' -/-> '/etc/mpv/config'
[cplayer] Setting option 'hwdec' = 'auto' (flags = 8)
[cplayer] Setting option 'v' = '' (flags = 8)
[global] config path: 'input.conf' -/-> '/home/carlipa/.config/mpv/input.conf'
[global] config path: 'input.conf' -/-> '/home/carlipa/.mpv/input.conf'
[global] config path: 'input.conf' -/-> '/etc/mpv/input.conf'
[input] Falling back on default (hardcoded) input config
[osc] Loading script @osc.lua...
[global] config path: 'scripts' -/-> '/home/carlipa/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/carlipa/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[osc] loading mp.defaults
[osc] loading @osc.lua
[global] config path: 'lua-settings/osc.conf' -/-> '/home/carlipa/.config/mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> '/home/carlipa/.mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> '/etc/mpv/lua-settings/osc.conf'
[osc] lua-settings/osc.conf not found. 
[cplayer] Run command: define-section, flags=0, args=[showhide, mouse_move script-binding osc/__keybinding1
[cplayer] mouse_leave script-binding osc/__keybinding2
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[showhide, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input, mouse_btn0 script-binding osc/__keybinding3
[cplayer] shift+mouse_btn0 script-binding osc/__keybinding4
[cplayer] mouse_btn2 script-binding osc/__keybinding5
[cplayer] mouse_btn0_dbl ignore
[cplayer] shift+mouse_btn0_dbl ignore
[cplayer] mouse_btn2_dbl ignore
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[input, ]
[cplayer] Run command: define-section, flags=0, args=[input_osc, del script-binding osc/__keybinding6
[cplayer] , default]
[cplayer] Run command: enable-section, flags=0, args=[input_osc, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input_forced_osc, , force]
[cplayer] Run command: enable-section, flags=0, args=[input_forced_osc, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: disable-section, flags=0, args=[input]
[cplayer] Done loading @osc.lua.
[ytdl_hook] Loading script @ytdl_hook.lua...
[global] config path: 'scripts' -/-> '/home/carlipa/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/carlipa/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[ytdl_hook] loading mp.defaults
[ytdl_hook] loading @ytdl_hook.lua
[cplayer] Run command: hook-add, flags=0, args=[on_load, 1, 10]
[cplayer] Done loading @ytdl_hook.lua.
[global] config path: 'scripts' -/-> '/home/carlipa/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/carlipa/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[global] config path: 'watch_later' -> '/home/carlipa/.config/mpv/watch_later'
[cplayer] Playing: /srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/LG_4K_View-the-Feeling.mp4
[cplayer] Running hook: ytdl_hook/on_load
[cplayer] Run command: hook-ack, flags=0, args=[on_load]
[ifo] Opening /srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/LG_4K_View-the-Feeling.mp4
[ifo/dvdnav] Opening /srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/LG_4K_View-the-Feeling.mp4
[bdmv/bluray] Opening /srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/LG_4K_View-the-Feeling.mp4
[file] Opening /srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/LG_4K_View-the-Feeling.mp4
[file] Stream opened successfully.
[demux] Trying demuxers for level=normal.
[lavf] Found 'mpegts' at score=100 size=2048.
[lavf] avformat_find_stream_info() finished after 0 bytes.
[demux] Detected file format: mpegts (libavformat)
[find_files] Loading external files in /srv/player/data/media/56ddcb76-1e5c-4bb2-9b6e-0056ac110002/media/
[global] config path: 'sub/' -/-> '/home/carlipa/.config/mpv/sub/'
[global] config path: 'sub/' -/-> '/home/carlipa/.mpv/sub/'
[global] config path: 'sub/' -/-> '/etc/mpv/sub/'
[global] config path: 'audio/' -/-> '/home/carlipa/.config/mpv/audio/'
[global] config path: 'audio/' -/-> '/home/carlipa/.mpv/audio/'
[global] config path: 'audio/' -/-> '/etc/mpv/audio/'
[cplayer]  (+) Video --vid=1 (hevc)
[cplayer]  (+) Audio --aid=1 --alang=und (aac)
[vo/opengl] Initializing OpenGL backend 'x11probe'
[vo/opengl/x11] X11 opening display: :0
[vo/opengl/x11] X11 running at 4096x2160 (":0" => local display)
[vo/opengl/x11] Detected wm supports NetWM.
[vo/opengl/x11] Detected wm supports FULLSCREEN state.
[vo/opengl/x11] Detected wm supports ABOVE state.
[vo/opengl/x11] Detected wm supports BELOW state.
[vo/opengl/x11] Display 0 (HDMI1): [0, 0, 4096, 2160] @ 24.000000 FPS
[vo/opengl/x11] Current display FPS: 24.000000
[vo/opengl] GLX chose FB config with ID 0xe836f210
[vo/opengl] GLX chose visual with ID 0x91
[vo/opengl] GL_VERSION='3.0 Mesa 11.0.2'
[vo/opengl] Detected desktop OpenGL 3.0.
[vo/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/opengl] GL_RENDERER='Mesa DRI Intel(R) Skylake ULT GT3 '
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='1.30'
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 300/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 110/GL_EXT_unpack_subimage.
[vo/opengl] Loaded functions for 300/GL_ARB_framebuffer_object.
[vo/opengl] Loaded functions for 300/GL_ARB_vertex_array_object.
[vo/opengl] Loaded functions for 300/GL_ARB_texture_rg.
[vo/opengl] Loaded functions for 320/GL_ARB_sync.
[vo/opengl] Loaded functions for 0/GLX_SGI_swap_control.
[vo/opengl] Loaded functions for 0/GLX_SGI_video_sync.
[vo/opengl] Loaded functions for 430/GL_ARB_debug_output.
[vo/opengl] Loaded functions for 310/GL_ARB_uniform_buffer_object.
[vo/opengl] Filterable half-float textures supported.
[vo/opengl] No vdpau support found - probing more things.
[vo/opengl/x11] uninit ...
[vo/opengl] Initializing OpenGL backend 'x11'
[vo/opengl/x11] X11 opening display: :0
[vo/opengl/x11] X11 running at 4096x2160 (":0" => local display)
[vo/opengl/x11] Detected wm supports NetWM.
[vo/opengl/x11] Detected wm supports FULLSCREEN state.
[vo/opengl/x11] Detected wm supports ABOVE state.
[vo/opengl/x11] Detected wm supports BELOW state.
[vo/opengl/x11] Display 0 (HDMI1): [0, 0, 4096, 2160] @ 24.000000 FPS
[vo/opengl/x11] Current display FPS: 24.000000
[vo/opengl] GLX chose FB config with ID 0xe836ee80
[vo/opengl] GLX chose visual with ID 0x91
[vo/opengl] GL_VERSION='3.0 Mesa 11.0.2'
[vo/opengl] Detected desktop OpenGL 3.0.
[vo/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/opengl] GL_RENDERER='Mesa DRI Intel(R) Skylake ULT GT3 '
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='1.30'
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 300/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 110/GL_EXT_unpack_subimage.
[vo/opengl] Loaded functions for 300/GL_ARB_framebuffer_object.
[vo/opengl] Loaded functions for 300/GL_ARB_vertex_array_object.
[vo/opengl] Loaded functions for 300/GL_ARB_texture_rg.
[vo/opengl] Loaded functions for 320/GL_ARB_sync.
[vo/opengl] Loaded functions for 0/GLX_SGI_swap_control.
[vo/opengl] Loaded functions for 0/GLX_SGI_video_sync.
[vo/opengl] Loaded functions for 430/GL_ARB_debug_output.
[vo/opengl] Loaded functions for 310/GL_ARB_uniform_buffer_object.
[vo/opengl] Filterable half-float textures supported.
[vo/opengl] Reported display depth: R=8, G=8, B=8
[vo/opengl] 16 bit texture depth: 16.
[vo/opengl] Testing user-set FBO format (0x805b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] No advanced processing required. Enabling dumb mode.
[vo/opengl] Loading hwdec driver 'vaapi-glx'
[vo/opengl/vaapi-glx] Not using this by default.
[vo/opengl] Loading failed.
[vo/opengl] Loading hwdec driver 'vdpau-glx'
[vo/opengl] Loading failed.
[vo/opengl] Assuming 24.000000 FPS for display sync.
[vd] Container reported FPS: 29.970030
[vd] Codec list:
[vd]     lavc:hevc - HEVC (High Efficiency Video Coding)
[vd] Opening video decoder lavc:hevc
[vd] Probing 'vdpau'...
[vo/opengl] Loading hwdec driver 'vdpau-glx'
[vo/opengl] Loading failed.
[vd] Probing 'vaapi'...
[vo/opengl] Loading hwdec driver 'vaapi-glx'
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0
[vo/opengl/vaapi-glx/vaapi] VA API version 0.37
[vo/opengl/vaapi-glx/vaapi] 8 image formats available:
[vo/opengl/vaapi-glx/vaapi]   YV12
[vo/opengl/vaapi-glx/vaapi]   I420
[vo/opengl/vaapi-glx/vaapi]   NV12
[vo/opengl/vaapi-glx/vaapi]   YUY2
[vo/opengl/vaapi-glx/vaapi]   UYVY
[vo/opengl/vaapi-glx/vaapi]   422H
[vo/opengl/vaapi-glx/vaapi]   RGBX
[vo/opengl/vaapi-glx/vaapi]   BGRX
[vd] Hardware decoder 'hevc' not found in libavcodec.
[vd] Probing 'vaapi-copy'...
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0
[vd] Hardware decoder 'hevc' not found in libavcodec.
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected video codec: HEVC (High Efficiency Video Coding) [lavc:hevc]
[vo/opengl/x11] Disabling screensaver.
[ad] Codec list:
[ad]     lavc:aac - AAC (Advanced Audio Coding)
[ad]     lavc:aac_fixed (aac) - AAC (Advanced Audio Coding)
[ad]     lavc:libfdk_aac (aac) - Fraunhofer FDK AAC
[ad] Opening audio decoder lavc:aac
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac]
[cplayer] Starting playback...
[af] Audio filter chain:
[af]   [in] 48000Hz stereo 2ch floatp
[af]   [out] 48000Hz stereo 2ch floatp
[af]   [ao] 48000Hz stereo 2ch floatp
[ao] Trying audio driver 'pulse'
[ao/pulse] requested format: 48000 Hz, stereo channels, floatp
[ao/pulse] Library version: 4.0.0
[ao/pulse] Proto: 28
[ao/pulse] Server proto: 4294967295
[ao] Trying audio driver 'alsa'
[ao/alsa] requested format: 48000 Hz, stereo channels, floatp
[ao/alsa] using ALSA version: 1.0.27.2
[ao/alsa] opening device 'default'
[ao/alsa] trying format float
[ao/alsa] Channel layouts:
[ao/alsa]  - stereo
[ao/alsa] result: stereo
[ao/alsa] trying to set ALSA channel map: FL FR
[ao/alsa] channel map reported by ALSA: FL FR
[ao/alsa] which we understand as: stereo
[ao/alsa] using the ALSA channel map.
[ao/alsa] which is what we requested.
[ao/alsa] hw pausing supported: no
[ao/alsa] buffersize: 8192 samples
[ao/alsa] period size: 1024 samples
[ao/alsa] device buffer: 8192 samples.
[ao/alsa] using soft-buffer of 9600 samples.
[cplayer] AO: [alsa] 48000Hz stereo 2ch float
[cplayer] AO: Description: ALSA audio output
[af] Adding filter lavrresample 
[af] Audio filter chain:
[af]   [in] 48000Hz stereo 2ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float
[vd] Using software decoding.
[vd] Decoder format: 3840x2160 yuv420p auto/limited CL=unknown
[vf] Video filter chain:
[vf]   [in] 3840x2160 yuv420p bt.709/limited CL=unknown
[vf]   [out] 3840x2160 yuv420p bt.709/limited CL=unknown
[cplayer] VO: [opengl] 3840x2160 yuv420p
[cplayer] VO: Description: Extended OpenGL Renderer
[vo/opengl] Resize: 3840x2160
[vo/opengl] Window size: 3840x2160
[vo/opengl] Video source: 3840x2160 (1:1)
[vo/opengl] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/opengl] Video scale: 1.000000/1.000000
[vo/opengl] OSD borders: l=0 t=0 r=0 b=0
[vo/opengl] Video borders: l=0 t=0 r=0 b=0
[vo/opengl] Testing user-set FBO format (0x805b)
[vo/opengl] Create FBO: 16x16
[vo/opengl] No advanced processing required. Enabling dumb mode.
[vo/opengl] Texture for plane 0: 3840x2160
[vo/opengl] Texture for plane 1: 1920x1080
[vo/opengl] Texture for plane 2: 1920x1080
[vo/opengl] Reinit rendering.
[cplayer] set video colors output-levels=0 
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] color = texture(texture0, texcoord0);
[vo/opengl] [  2] color.g = texture(texture1, texcoord1).r;
[vo/opengl] [  3] color.b = texture(texture2, texcoord2).r;
[vo/opengl] [  4] // color conversion
[vo/opengl] [  5] color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;
[vo/opengl] [  6] color.a = 1.0;
[vo/opengl] [  7] // color management
[global] config path: 'fonts' -/-> '/home/carlipa/.config/mpv/fonts'
[global] config path: 'fonts' -/-> '/home/carlipa/.mpv/fonts'
[global] config path: 'fonts' -/-> '/etc/mpv/fonts'
[osd/libass] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.27 (COMPLEX)
[global] config path: 'subfont.ttf' -/-> '/home/carlipa/.config/mpv/subfont.ttf'
[global] config path: 'subfont.ttf' -/-> '/home/carlipa/.mpv/subfont.ttf'
[global] config path: 'subfont.ttf' -/-> '/etc/mpv/subfont.ttf'
[global] config path: 'fonts.conf' -/-> '/home/carlipa/.config/mpv/fonts.conf'
[global] config path: 'fonts.conf' -/-> '/home/carlipa/.mpv/fonts.conf'
[global] config path: 'fonts.conf' -/-> '/etc/mpv/fonts.conf'
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf, 0, DejaVuSans
[cplayer] first video frame after restart shown
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding2]
[cplayer] playback restart complete
[statusline] AV: 00:00:01 / 00:01:56 (1%) A-V:  0.268 Dropped: 19
[vd] No video PTS! Making something up.
[statusline] AV: 00:00:02 / 00:01:56 (2%) A-V:  0.466 Dropped: 40
[cplayer] Invalid video timestamp: 2.135467 -> 2.102100
[cplayer] 
[cplayer] Audio/Video desynchronisation detected! Possible reasons include too slow
[cplayer] hardware, temporary CPU spikes, broken drivers, and broken files. Audio
[cplayer] position will not match to the video (see A-V status field).
[cplayer] 
[statusline] AV: 00:00:02 / 00:01:56 (3%) A-V:  0.699 Dropped: 58
[cplayer] Invalid video timestamp: 2.969633 -> 2.902900
[statusline] AV: 00:00:03 / 00:01:56 (4%) A-V:  1.070 ct:  0.081 Dropped: 67
[cplayer] Run command: quit, flags=9, args=[4]
[cplayer] EOF code: 6  
[ad] Uninit audio decoder.
[af] Removing filter lavrresample 
[vd] Uninit video.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[osc] Exiting...
[ao/alsa] draining...
[vo/opengl/x11] Enabling screensaver.
[vo/opengl/x11] uninit ...
mgcrea commented 8 years ago

@wm4 I've cleaned up the original issue and update mpv to latest. Will gladly provide more info if the is something I can do.

ghost commented 8 years ago

I guess you haven't compiled ffmpeg with vaapi. Also, mpv isn't compiled with EGL, so it'd have to use readback to CPU memory (if decoding itself worked).

mc4man commented 8 years ago

That build specifically has EGL not enabled. The reasons are a couple of months old so possibly worth revisiting, if just for curiosities sake.. If an EGL enabled build can work without issue when the user has mesa10.x then would return support. Otherwise obviously would not, then I would suggest you build mpv yourself, should only take a few min. or so. Or just use 16.04 where EGL is enabled, blah, blah.

As far as that build "haven't compiled ffmpeg with vaapi." of course it has vaapi support, eg. mpv -vo=vaapi '/home/doug/Videos/bbb_sunflower_2160p_60fps_normal.mp4' Auto-loading profile 'extension.mp4' libva info: VA-API version 0.38.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_38 libva info: va_openDriver() returns 0 Playing: /home/doug/Videos/bbb_sunflower_2160p_60fpsnormal.mp4 (+) Video --vid=1 () (h264) (+) Audio --aid=1 --alang=und (_) (mp3) Audio --aid=2 --alang=und (*) (ac3) File tags: Artist: Blender Foundation 2008, Janus Bager Kristensen 2013 Comment: Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net Composer: Sacha Goedegebure Genre: Animation Title: Big Buck Bunny, Sunflower version AO: [pulse] 48000Hz stereo 2ch s16 Using hardware decoding (vaapi). VO: [vaapi] 3840x2160 vaapi AV: 00:00:23 / 00:10:34 (3%) A-V: 0.000

ghost commented 8 years ago

I'm talking about vaapi support in ffmpeg, not mpv.

Not having EGL will choose a slower code path when using vaapi decoding.

mgcrea commented 8 years ago

@mc4man, would be great to revisit, good to know that it will be fixed for xenial. Thank you both for your insights.

mc4man commented 8 years ago

@mgcrea Yeah, works fine in 16.04 on skylake/hevc - libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_38 libva info: vaopenDriver() returns 0 Playing: /home/doug/Videos/OUT8.mp4 (+) Video --vid=1 () (hevc) (+) Audio --aid=1 --alang=eng (_) (aac) AO: [pulse] 44100Hz stereo 2ch s16 Using hardware decoding (vaapi). VO: [opengl] 1920x816 vaapi AV: 00:00:17 / 00:01:00 (29%) A-V: 0.000

Will let you know if EGL/mesa10 is benign now

@wm4 - I'm not sure what you mean, from LP log - Enabled hwaccels: h263_vaapi mpeg2_vaapi vc1_vdpau h264_vaapi mpeg2_vdpau vp9_vaapi h264_vdpau mpeg4_vaapi wmv3_vaapi hevc_vaapi mpeg4_vdpau wmv3_vdpau mpeg1_vdpau vc1_vaapi

mc4man commented 8 years ago

Hmm, based on what you orig. posted (14.04.4 & mpv -version I assumed you were using the ppa mpv. Guess not? Happen to at my skylake machine & while no need for 14.04 booted to a live session of 14.04.4 & installed the no EGL ppa mpv package. mpv -version mpv git-a19307d (C) 2000-2016 mpv/MPlayer/mplayer2 projects built on Thu Mar 3 18:41:37 UTC 2016 ffmpeg library versions: libavutil 55.19.100 libavcodec 57.27.101 libavformat 57.27.102 libswscale 4.0.100 libavfilter 6.39.100 libswresample 2.0.101 ffmpeg version: N-78877-gba687ae

While at first glance it seemed the exact same I see a different timestamp And the ppa version has no issue using vaapi to hwdec hevc including that file you mentioned so sorry about interjecting..

mgcrea commented 8 years ago

@mc4man Indeed I'm using your ppa:mc3man/trusty-media. Should it correctly work? Should I switch to mpv-tests? I also use ppa:xorg-edgers/ppa to get latest mesa.

I'm adding these packages for hw acceleration:

    - beignet
    - beignet-dev
    - libva-intel-vaapi-driver
    - intel-gpu-tools
    - libvdpau-va-gl1

Also I'm using TearFree option set to true in xorg.conf.

mc4man commented 8 years ago

I'm not sure what effect using xorg-edgers presents but your best bet is to build mpv yourself using the libs you have. Otherwise for 14.04.4 (the lts image w/ mesa 11) you could try this mpv build, it works fine here on a skylake laptop for everything including hevc Intel gpu decoding https://launchpad.net/~mc3man/+archive/ubuntu/mpv-tests

What this has exposed is that 14.04.4 image installs (mesa11) will need higher i965-va-driver & or libva* libs than are currently in 14.04 (1.3.x) or in the media ppa (1.4.x). Those users will need 1.6.x which is in the above mentioned ppa (mpv-tests) Unfortunately the lts only provides newer kernel & mesa libs but not the driver or libva*. While i've seen no issue with 14.04.1/2/3 using the 1.6.x packages I'm inclined to drop mpv from the media ppa & only provide git master's from the test ppa.

(ot - If EGL is enabled & then that mpv used on a mesa10.x install there still are issues so will continue to not enable for 14.04

mgcrea commented 8 years ago

Switching to mpv-tests enabled hw decoding for h265 8bit.

However I do have a lot of errors while testing this file LG 4K - View the Feeling like:

[statusline] AV: 00:00:05 / 00:01:56 (5%) A-V:  0.272 ct:  0.262 Dropped: 1
[cplayer] Invalid video timestamp: 5.205200 -> 5.005000

And even:

[cplayer] Audio/Video desynchronisation detected! Possible reasons include too slow
[cplayer] hardware, temporary CPU spikes, broken drivers, and broken files. Audio
[cplayer] position will not match to the video (see A-V status field).

The CPU is not working too much. Any ideas?

Full log:

[cplayer] Command line options: '--hwdec=auto' '/srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/LG_4K_View-the-Feeling.mp4' '-v'
[cplayer] mpv git-2db1b9e (C) 2000-2016 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Tue Mar  8 17:11:39 UTC 2016
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.19.100
[cplayer]    libavcodec      57.28.100
[cplayer]    libavformat     57.28.100
[cplayer]    libswscale      4.0.100
[cplayer]    libavfilter     6.39.102
[cplayer]    libswresample   2.0.101
[cplayer] ffmpeg version: N-78961-gda904fa
[cplayer] 
[cplayer] Configuration: ./waf configure --enable-pdf-build --prefix=/usr --confdir=/etc/mpv
[cplayer] List of enabled features: alsa any-gl asm atomic-builtins atomics audio-input av-avpacket-int64-duration av-new-pixdesc av-pix-fmt-mmal av-subtitle-nopict av-version-info avcodec-chroma-pos-api avcodec-profile-name avframe-metadata avframe-skip-samples build-date cdda cplayer debug-build desktop-gl dlopen drm dvbin dvdnav dvdread encoding fchmod gl gl-x11 glibc-thread-name glob iconv jack jpeg lcms2 libass libass-osd libav libavdevice libavfilter libbluray libdl libguess libm librt libsmbclient libswresample libv4l2 linux-fstatfs lua nanosleep optimize oss-audio oss-audio-native posix posix-or-mingw posix-spawn pthreads pulse resampler rubberband shm sse4-intrinsics subprocess termios tv tv-v4l2 uchardet vaapi vaapi-glx vaapi-hwaccel vaapi-x11 vdpau vdpau-gl-x11 vdpau-hwaccel videodev vt.h x11 xext xinerama xrandr xss xv zlib
[global] config path: '' -> '/home/carlipa/.config/mpv'
[global] config path: 'mpv.conf' -/-> '/home/carlipa/.config/mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/carlipa/.config/mpv/config'
[global] config path: 'mpv.conf' -/-> '/home/carlipa/.mpv/mpv.conf'
[global] config path: 'config' -/-> '/home/carlipa/.mpv/config'
[global] config path: 'mpv.conf' -/-> '/etc/mpv/mpv.conf'
[global] config path: 'config' -/-> '/etc/mpv/config'
[cplayer] Setting option 'hwdec' = 'auto' (flags = 8)
[cplayer] Setting option 'v' = '' (flags = 8)
[global] config path: 'input.conf' -/-> '/home/carlipa/.config/mpv/input.conf'
[global] config path: 'input.conf' -/-> '/home/carlipa/.mpv/input.conf'
[global] config path: 'input.conf' -/-> '/etc/mpv/input.conf'
[input] Falling back on default (hardcoded) input config
[osc] Loading script @osc.lua...
[global] config path: 'scripts' -/-> '/home/carlipa/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/carlipa/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[osc] loading mp.defaults
[osc] loading @osc.lua
[global] config path: 'lua-settings/osc.conf' -/-> '/home/carlipa/.config/mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> '/home/carlipa/.mpv/lua-settings/osc.conf'
[global] config path: 'lua-settings/osc.conf' -/-> '/etc/mpv/lua-settings/osc.conf'
[osc] lua-settings/osc.conf not found. 
[cplayer] Run command: define-section, flags=0, args=[showhide, mouse_move script-binding osc/__keybinding1
[cplayer] mouse_leave script-binding osc/__keybinding2
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[showhide, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input, mouse_btn0 script-binding osc/__keybinding3
[cplayer] shift+mouse_btn0 script-binding osc/__keybinding4
[cplayer] mouse_btn2 script-binding osc/__keybinding5
[cplayer] mouse_btn0_dbl ignore
[cplayer] shift+mouse_btn0_dbl ignore
[cplayer] mouse_btn2_dbl ignore
[cplayer] , force]
[cplayer] Run command: enable-section, flags=0, args=[input, ]
[cplayer] Run command: define-section, flags=0, args=[input_osc, del script-binding osc/__keybinding6
[cplayer] , default]
[cplayer] Run command: enable-section, flags=0, args=[input_osc, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: define-section, flags=0, args=[input_forced_osc, , force]
[cplayer] Run command: enable-section, flags=0, args=[input_forced_osc, allow-hide-cursor+allow-vo-dragging]
[cplayer] Run command: disable-section, flags=0, args=[input]
[cplayer] Done loading @osc.lua.
[ytdl_hook] Loading script @ytdl_hook.lua...
[global] config path: 'scripts' -/-> '/home/carlipa/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/carlipa/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[ytdl_hook] loading mp.defaults
[ytdl_hook] loading @ytdl_hook.lua
[cplayer] Run command: hook-add, flags=0, args=[on_load, 1, 10]
[cplayer] Done loading @ytdl_hook.lua.
[global] config path: 'scripts' -/-> '/home/carlipa/.config/mpv/scripts'
[global] config path: 'scripts' -/-> '/home/carlipa/.mpv/scripts'
[global] config path: 'scripts' -/-> '/etc/mpv/scripts'
[global] config path: 'watch_later' -> '/home/carlipa/.config/mpv/watch_later'
[cplayer] Playing: /srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/LG_4K_View-the-Feeling.mp4
[cplayer] Running hook: ytdl_hook/on_load
[cplayer] Run command: hook-ack, flags=0, args=[on_load]
[ifo] Opening /srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/LG_4K_View-the-Feeling.mp4
[ifo/dvdnav] Opening /srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/LG_4K_View-the-Feeling.mp4
[bdmv/bluray] Opening /srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/LG_4K_View-the-Feeling.mp4
[file] Opening /srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/LG_4K_View-the-Feeling.mp4
[file] Stream opened successfully.
[demux] Trying demuxers for level=normal.
[lavf] Found 'mpegts' at score=100 size=2048.
[lavf] avformat_find_stream_info() finished after 0 bytes.
[demux] Detected file format: mpegts (libavformat)
[find_files] Loading external files in /srv/player/data/media/56e071f2-0bec-4c9c-8c1e-05c7ac110002/media/
[global] config path: 'sub/' -/-> '/home/carlipa/.config/mpv/sub/'
[global] config path: 'sub/' -/-> '/home/carlipa/.mpv/sub/'
[global] config path: 'sub/' -/-> '/etc/mpv/sub/'
[global] config path: 'audio/' -/-> '/home/carlipa/.config/mpv/audio/'
[global] config path: 'audio/' -/-> '/home/carlipa/.mpv/audio/'
[global] config path: 'audio/' -/-> '/etc/mpv/audio/'
[cplayer]  (+) Video --vid=1 (hevc)
[cplayer]  (+) Audio --aid=1 --alang=und (aac)
[vo/opengl] Initializing OpenGL backend 'x11probe'
[vo/opengl/x11] X11 opening display: :0
[vo/opengl/x11] X11 running at 3840x2160 (":0" => local display)
[vo/opengl/x11] Detected wm supports NetWM.
[vo/opengl/x11] Detected wm supports FULLSCREEN state.
[vo/opengl/x11] Detected wm supports ABOVE state.
[vo/opengl/x11] Detected wm supports BELOW state.
[vo/opengl/x11] Display 0 (HDMI1): [0, 0, 3840, 2160] @ 30.000000 FPS
[vo/opengl/x11] Current display FPS: 30.000000
[vo/opengl] GLX chose FB config with ID 0xdc36f1c0
[vo/opengl] GLX chose visual with ID 0x91
[vo/opengl] GL_VERSION='3.0 Mesa 11.0.2'
[vo/opengl] Detected desktop OpenGL 3.0.
[vo/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/opengl] GL_RENDERER='Mesa DRI Intel(R) Skylake ULT GT3 '
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='1.30'
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 300/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 110/GL_EXT_unpack_subimage.
[vo/opengl] Loaded functions for 300/GL_ARB_framebuffer_object.
[vo/opengl] Loaded functions for 300/GL_ARB_vertex_array_object.
[vo/opengl] Loaded functions for 300/GL_ARB_texture_rg.
[vo/opengl] Loaded functions for 320/GL_ARB_sync.
[vo/opengl] Loaded functions for 0/GLX_SGI_swap_control.
[vo/opengl] Loaded functions for 0/GLX_SGI_video_sync.
[vo/opengl] Loaded functions for 430/GL_ARB_debug_output.
[vo/opengl] Loaded functions for 310/GL_ARB_uniform_buffer_object.
[vo/opengl] Filterable half-float textures supported.
[vo/opengl] No vdpau support found - probing more things.
[vo/opengl/x11] uninit ...
[vo/opengl] Initializing OpenGL backend 'x11'
[vo/opengl/x11] X11 opening display: :0
[vo/opengl/x11] X11 running at 3840x2160 (":0" => local display)
[vo/opengl/x11] Detected wm supports NetWM.
[vo/opengl/x11] Detected wm supports FULLSCREEN state.
[vo/opengl/x11] Detected wm supports ABOVE state.
[vo/opengl/x11] Detected wm supports BELOW state.
[vo/opengl/x11] Display 0 (HDMI1): [0, 0, 3840, 2160] @ 30.000000 FPS
[vo/opengl/x11] Current display FPS: 30.000000
[vo/opengl] GLX chose FB config with ID 0xdc36ef80
[vo/opengl] GLX chose visual with ID 0x91
[vo/opengl] GL_VERSION='3.0 Mesa 11.0.2'
[vo/opengl] Detected desktop OpenGL 3.0.
[vo/opengl] GL_VENDOR='Intel Open Source Technology Center'
[vo/opengl] GL_RENDERER='Mesa DRI Intel(R) Skylake ULT GT3 '
[vo/opengl] GL_SHADING_LANGUAGE_VERSION='1.30'
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 300/builtin.
[vo/opengl] Loaded functions for 210/builtin.
[vo/opengl] Loaded functions for 110/GL_EXT_unpack_subimage.
[vo/opengl] Loaded functions for 300/GL_ARB_framebuffer_object.
[vo/opengl] Loaded functions for 300/GL_ARB_vertex_array_object.
[vo/opengl] Loaded functions for 300/GL_ARB_texture_rg.
[vo/opengl] Loaded functions for 320/GL_ARB_sync.
[vo/opengl] Loaded functions for 0/GLX_SGI_swap_control.
[vo/opengl] Loaded functions for 0/GLX_SGI_video_sync.
[vo/opengl] Loaded functions for 430/GL_ARB_debug_output.
[vo/opengl] Loaded functions for 310/GL_ARB_uniform_buffer_object.
[vo/opengl] Filterable half-float textures supported.
[vo/opengl] Reported display depth: R=8, G=8, B=8
[vo/opengl] 16 bit texture depth: 16.
[vo/opengl] Testing user-set FBO format (0x805b)
[vo/opengl] Create FBO: 16x16 -> 16x16
[vo/opengl] No advanced processing required. Enabling dumb mode.
[vo/opengl] Loading hwdec driver 'vaapi-glx'
[vo/opengl/vaapi-glx] Not using this by default.
[vo/opengl] Loading failed.
[vo/opengl] Loading hwdec driver 'vdpau-glx'
[vo/opengl] Loading failed.
[vo/opengl] Assuming 30.000000 FPS for display sync.
[vd] Container reported FPS: 29.970030
[vd] Codec list:
[vd]     lavc:hevc - HEVC (High Efficiency Video Coding)
[vd] Opening video decoder lavc:hevc
[vd] Probing 'vdpau'...
[vo/opengl] Loading hwdec driver 'vdpau-glx'
[vo/opengl] Loading failed.
[vd] Probing 'vaapi'...
[vo/opengl] Loading hwdec driver 'vaapi-glx'
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
[vo/opengl/vaapi-glx/vaapi] VA API version 0.38
[vo/opengl/vaapi-glx/vaapi] 8 image formats available:
[vo/opengl/vaapi-glx/vaapi]   YV12
[vo/opengl/vaapi-glx/vaapi]   I420
[vo/opengl/vaapi-glx/vaapi]   NV12
[vo/opengl/vaapi-glx/vaapi]   YUY2
[vo/opengl/vaapi-glx/vaapi]   UYVY
[vo/opengl/vaapi-glx/vaapi]   422H
[vo/opengl/vaapi-glx/vaapi]   RGBX
[vo/opengl/vaapi-glx/vaapi]   BGRX
[vd] Trying hardware decoding.
[vd] Selected video codec: HEVC (High Efficiency Video Coding) [lavc:hevc]
[vo/opengl/x11] Disabling screensaver.
[ad] Codec list:
[ad]     lavc:aac - AAC (Advanced Audio Coding)
[ad]     lavc:aac_fixed (aac) - AAC (Advanced Audio Coding)
[ad]     lavc:libfdk_aac (aac) - Fraunhofer FDK AAC
[ad] Opening audio decoder lavc:aac
[ad] Requesting 1 threads for decoding.
[ad] Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac]
[cplayer] Starting playback...
[af] Audio filter chain:
[af]   [in] 48000Hz stereo 2ch floatp
[af]   [out] 48000Hz stereo 2ch floatp
[af]   [ao] 48000Hz stereo 2ch floatp
[ao] Trying audio driver 'pulse'
[ao/pulse] requested format: 48000 Hz, stereo channels, floatp
[ao/pulse] Library version: 4.0.0
[ao/pulse] Proto: 28
[ao/pulse] Server proto: 4294967295
[ao] Trying audio driver 'alsa'
[ao/alsa] requested format: 48000 Hz, stereo channels, floatp
[ao/alsa] using ALSA version: 1.0.27.2
[ao/alsa] opening device 'default'
[ao/alsa] trying format float
[ao/alsa] Channel layouts:
[ao/alsa]  - stereo
[ao/alsa] result: stereo
[ao/alsa] trying to set ALSA channel map: FL FR
[ao/alsa] channel map reported by ALSA: FL FR
[ao/alsa] which we understand as: stereo
[ao/alsa] using the ALSA channel map.
[ao/alsa] which is what we requested.
[ao/alsa] hw pausing supported: no
[ao/alsa] buffersize: 8192 samples
[ao/alsa] period size: 1024 samples
[ao/alsa] device buffer: 8192 samples.
[ao/alsa] using soft-buffer of 9600 samples.
[cplayer] AO: [alsa] 48000Hz stereo 2ch float
[cplayer] AO: Description: ALSA audio output
[af] Adding filter lavrresample 
[af] Audio filter chain:
[af]   [in] 48000Hz stereo 2ch floatp
[af]   [lavrresample] 48000Hz stereo 2ch float
[af]   [out] 48000Hz stereo 2ch float
[af]   [ao] 48000Hz stereo 2ch float
[vd] Pixel formats supported by decoder: vaapi_vld yuv420p
[vd] Codec profile: Main (0x1)
[vaapi] Using profile 'VAProfileHEVCMain'.
[vd] Using hardware decoding (vaapi).
[vd] Decoder format: 3840x2160 vaapi auto/limited CL=unknown
[vf] Video filter chain:
[vf]   [in] 3840x2160 vaapi bt.709/limited CL=unknown
[vf]   [out] 3840x2160 vaapi bt.709/limited CL=unknown
[cplayer] VO: [opengl] 3840x2160 vaapi
[cplayer] VO: Description: Extended OpenGL Renderer
[vo/opengl] Resize: 3840x2160
[vo/opengl] Window size: 3840x2160
[vo/opengl] Video source: 3840x2160 (1:1)
[vo/opengl] Video display: (0, 0) 3840x2160 -> (0, 0) 3840x2160
[vo/opengl] Video scale: 1.000000/1.000000
[vo/opengl] OSD borders: l=0 t=0 r=0 b=0
[vo/opengl] Video borders: l=0 t=0 r=0 b=0
[vo/opengl] Testing user-set FBO format (0x805b)
[vo/opengl] Create FBO: 16x16 -> 16x16
[vo/opengl] No advanced processing required. Enabling dumb mode.
[vo/opengl] Texture for plane 0: 3840x2160
[vo/opengl] Reinit rendering.
[cplayer] set video colors output-levels=0 
[vo/opengl] recompiling a shader program:
[vo/opengl] [  1] color.zyx = 1.000000 * vec4(texture(texture0, texcoord0)).zyx;
[vo/opengl] [  2] // color conversion
[vo/opengl] [  3] color = color.rgbr;
[vo/opengl] [  4] color.rgb = mat3(colormatrix) * color.rgb + colormatrix_c;
[vo/opengl] [  5] color.a = 1.0;
[vo/opengl] [  6] // color management
[global] config path: 'fonts' -/-> '/home/carlipa/.config/mpv/fonts'
[global] config path: 'fonts' -/-> '/home/carlipa/.mpv/fonts'
[global] config path: 'fonts' -/-> '/etc/mpv/fonts'
[osd/libass] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 0.9.27 (COMPLEX)
[global] config path: 'subfont.ttf' -/-> '/home/carlipa/.config/mpv/subfont.ttf'
[global] config path: 'subfont.ttf' -/-> '/home/carlipa/.mpv/subfont.ttf'
[global] config path: 'subfont.ttf' -/-> '/etc/mpv/subfont.ttf'
[global] config path: 'fonts.conf' -/-> '/home/carlipa/.config/mpv/fonts.conf'
[global] config path: 'fonts.conf' -/-> '/home/carlipa/.mpv/fonts.conf'
[global] config path: 'fonts.conf' -/-> '/etc/mpv/fonts.conf'
[osd/libass] Setting up fonts...
[osd/libass] Using font provider fontconfig
[osd/libass] Done.
[osd/libass] fontselect: (sans-serif, 400, 0) -> /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf, 0, DejaVuSans
[cplayer] first video frame after restart shown
[cplayer] Run command: script-binding, flags=9, args=[osc/__keybinding2]
[cplayer] playback restart complete
[statusline] AV: 00:00:01 / 00:01:56 (1%) A-V:  0.000 Dropped: 1
[vd] No video PTS! Making something up.
[statusline] AV: 00:00:02 / 00:01:56 (1%) A-V: -0.000 Dropped: 1
[cplayer] Invalid video timestamp: 2.135467 -> 2.102100
[statusline] AV: 00:00:02 / 00:01:56 (2%) A-V:  0.003 Dropped: 1
[cplayer] Invalid video timestamp: 2.969633 -> 2.902900
[statusline] AV: 00:00:03 / 00:01:56 (3%) A-V:  0.006 ct:  0.095 Dropped: 1
[cplayer] Invalid video timestamp: 3.903900 -> 3.803800
[statusline] AV: 00:00:04 / 00:01:56 (3%) A-V:  0.075 ct:  0.125 Dropped: 1
[cplayer] Invalid video timestamp: 4.170833 -> 4.037367
[statusline] AV: 00:00:05 / 00:01:56 (4%) A-V:  0.105 ct:  0.229 Dropped: 1
[cplayer] Invalid video timestamp: 5.071733 -> 4.871533
[statusline] AV: 00:00:05 / 00:01:56 (5%) A-V:  0.272 ct:  0.262 Dropped: 1
[cplayer] Invalid video timestamp: 5.205200 -> 5.005000
[statusline] AV: 00:00:07 / 00:01:56 (6%) A-V:  0.272 ct:  0.462 Dropped: 3
[cplayer] Invalid video timestamp: 7.007000 -> 6.773433
[cplayer] 
[cplayer] Audio/Video desynchronisation detected! Possible reasons include too slow
[cplayer] hardware, temporary CPU spikes, broken drivers, and broken files. Audio
[cplayer] position will not match to the video (see A-V status field).
[cplayer] 
[statusline] AV: 00:00:07 / 00:01:56 (7%) A-V:  0.426 ct:  0.542 Dropped: 3
[cplayer] Run command: quit, flags=9, args=[4]
[cplayer] EOF code: 6  
[ad] Uninit audio decoder.
[af] Removing filter lavrresample 
[vd] Uninit video.
[cplayer] finished playback, success (reason 3)
[cplayer] 
[cplayer] 
[cplayer] Exiting... (Quit)
[ytdl_hook] Exiting...
[osc] Exiting...
[ao/alsa] draining...
[vo/opengl/x11] Enabling screensaver.
[vo/opengl/x11] uninit ...
ghost commented 8 years ago

@mgcrea: compiled without EGL -> it takes the potentially slow GLX interop path.

Kagami commented 8 years ago

I guess this video is broken. I have issues playing it too (in software mode), while I'm able to decode HEVC 4K 60fps 8bit perfectly fine. I suggest you to try these videos (they have twice more fps though):

https://mega.nz/#!bVVHlSZC!TE8FNnkqpirhxX6X64ObbvgXBVEvjijABHZJQCr33YY /Root/[LG.4K.演示片] AOA_Miniskirt_HEVC_60fps.mp4 https://mega.nz/#!nZNA0ZyZ!D3RtrJxM89ep7tXOaIMjYCP_0poYvFBb6Ez2KlTI5BY /Root/[LG.4K.演示片] Apink_MrChu_HEVC_60fps.mp4 https://mega.nz/#!mINzyDob!Wsv4_ouoZfsqWFWDczIdzlc97HQb49csszA5wC3DnAo /Root/[LG.4K.演示片] Hyomin_Nicebody_HEVC_60fps.mp4 https://mega.nz/#!WddwzTCB!2G9sXPL8XJSFAtsCJUJw6EVK4jpsIqHG5hRguTagYig /Root/[LG.4K.演示片] Tara_No.9_HEVC_60fps.mp4

Or some other HEVC test videos.

mgcrea commented 8 years ago

@Kagami thought that too but a Samsung 4K SoC TV does decode it without issues so maybe there is another issue? Also it's listed at http://kodi.wiki/view/Samples

mc4man commented 8 years ago

Those demo world vids don't play back smoothly here, with or without vaapi, with or without EGL. Something about invalid or no timestamps. If I run one thru ffmpeg (v copy ; a re-encode) then they play back ok, only 1invalid video timestamp warning in mpv. As far as vaapi-egl in ubuntu 14.04.x, don't see it as possible, at least here. While it's trivial to add the feature, the driver always fails to load. If wanting to use ubuntu & get EGL then I'd suggest using 16.04 where it works just fine.

ghost commented 8 years ago

Those demo world vids

Which one?

mc4man commented 8 years ago

Sorry, remembered name wrong, it's http://demo-uhd3d.com one ex. - http://demo-uhd3d.com/fiche.php?cat=uhd&id=101 On 03/22/2016 08:40 AM, V. Lang wrote:

Those demo world vids

Which one?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/mpv-player/mpv/issues/2912#issuecomment-199791709

ghost commented 8 years ago

That file most likely just has broken timestamps. It's also mpeg-ts, despite the mp4 file extension. --no-correct-pts fixes playback, but will have other problems.

ghost commented 8 years ago

So, no bugs I can see here.