Call for testing: Video playback in 18.04

Hi,

Vlc and mpv have hardware acceleration on Xorg and playback of graphics is smooth. Totem seems to have micro pauses every so often.

Output from vainfo for my Inspiron-5558 i3-4005 CPU @ 1.7GHz x4 Intel Haswell Mobile laptop

libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel® Haswell Mobile - 2.1.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

Tried using wayland and totem output seemed smooth on the same system.

Remember the key indicator of hardware acceleration is low CPU usage (20% or less).

“Micro pauses” should probably be discussed in https://launchpad.net/bugs/1698270 instead. But it’s worth noting I am working on additional clutter fixes (which need to be duplicated in both mutter and clutter) that might help smoothness in future.

I too find that Wayland sessions are smoother. And I’m glad because Wayland support was one of my main contributions last year :slight_smile:

1 Like

Is Wayland going to be the default session in 18.10?

I don’t know. But the answer really doesn’t matter because once you choose your preferred session the system will remember it and you never need to change it again.

Sure it does, what’s official, means support and constant gardening. :wink:

Have you check essential Libraries(codecs) require to play videos try VLC !!!

Hi! I’ve just tried this on my XPS 9360 (i7-7500U with HD Graphics 620) laptop running:

  • Ubuntu 18.04
  • Wayland (updated version from the Ubuntu-x-swat PPA)
  • Gnome 3.28.2
  • MPV (0.29 from the mc3man mpv-tests PPA)

and I would say that it’s working fairly well.

Here goes more info:
MPV exact version

mpv git-2018-07-22-45beb70 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
 built on Thu Jul 26 15:04:40 UTC 2018
ffmpeg library versions:
   libavutil       56.18.102
   libavcodec      58.21.106
   libavformat     58.17.101
   libswscale      5.2.100
   libavfilter     7.26.100
   libswresample   3.2.100
ffmpeg version: git-2018-07-26-a8ce6fb

vainfo

libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.1.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointEncSlice
      VAProfileVP9Profile2            : VAEntrypointVLD

MPV config

gpu-context=wayland 
hwdec=auto
vo=gpu                                                                                                                                                                           autofit-larger=90%x90%                                                                                                                                                           

[protocol.https]
force-window=immediate                                                                                                                                                            

ytdl-format="bestvideo[ext=webm]+bestaudio[ext=webm]"

I’ve tried with Youtube videos and the bbb_sunflower_2160p_60fps_normal.mp4 file.

By the way, using this MPV configuration the CPU used by the player stays at 15-18% but if I don’t use the gpu-context=wayland option (and then failing back to XWayland I guess) then the usage goes up to 70-80%. I also see this in the MPV output:

Using hardware decoding (vaapi-copy).

Instead of:

Using hardware decoding (vaapi).

Anyway, thanks a lot for this!!

The difference between vaapi and vaapi-copy I think is just that the latter is rendered indirectly so has extra buffer copies. So yes vaapi-copy will be noticeably slower.

Despite being slower, some people still recommend vaapi-copy because it solves some compatibility problems, sometimes. But in Ubuntu we aspire to stay on the fast path (vaapi) by default.

1 Like

If you were to either pin mpv to launcher or while it’s running a right click on the icon > Vaapi in Wayland will open a file showing all the possible options & results

Symptom: stutter, pixelation/colour degradation
Wayland or Xorg: both (MATE works perfectly)
Player: Totem, VLC (Kodi works perfectly)
Model of CPU: Intel Core i7 CPU 870 @ 2.93GHz x 8
Output from the ‘vainfo’ command:
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: mesa gallium vaapi
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

1 Like

For the moment we only support and recommend hardware accelerated playback in mpv and totem on newer Intel GPUs . We do not recommend VLC at the moment. And we do not recommend radeon GPUs for video decoding either.

Some stuttering issues in totem are known to still exist