Call for testing: Video playback in 18.04

Thanks all.

Yes, I meant Intel CPUs but if some AMD work then that’s a bonus.

Please note that I am only asking for testing in Totem and MPV. Not Gnome-MPV, Kodi or VLC. To the best of my knowledge the latter ones either don’t use acceleration (properly) or have other performance problems. So I’m only declaring Totem and MPV as supported right now. Remember; if it’s using high CPU at all then acceleration isn’t working.

If you can reproduce any problems with ‘mpv’ then please also paste the terminal output that command produces when playing a video.

If you can reproduce a problem that’s specific to just one player then please also help by logging a bug against that player. Only totem or mpv for now.

1 Like

Wayland
Gnome-mpv
grep “CPU” /proc/cpuinfo
model name : Intel® Celeron® CPU N3060 @ 1.60GHz
model name : Intel® Celeron® CPU N3060 @ 1.60GHz
lshw |grep -i video
capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
description: Video
configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
vainfo
No protocol specified
error: can’t connect to X server!
libva info: VA-API version 1.0.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_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® CherryView - 2.0.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
VAProfileHEVCMain : VAEntrypointVLD

Getting garbled video in totem.

gst-play-1.0 and mpv plays with hardware acceleration (~5% cpu) without slowdowns.

model name : Intel® Core™ i7-3520M CPU @ 2.90GHz
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
libva info: VA-API version 1.0.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_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.0 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® Ivybridge Mobile - 2.0.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
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD

Re; mpv in wayland & screen blanking
screen blanking is not inhibited in mpv while using wayland . Likely there is no solution for 0.27 in mpv itself.
The current mpv-0.28 does implement but thru zwp_idle_inhibit_manager_v1 protocol (wayland protocols) though it’s not implemented in mutter (- https://gitlab.gnome.org/GNOME/mutter/issues/20

Users can start mpv with gnome-session-inhibit mpv /path/to/file & blanking will be inhibited while mpv is open. It can be added to the front of mpv’s .desktop Exec= line with no apparent ill effects if using X11 instead of wayland.

Totem vaapi issue in X11 seems be from 1 of 3 mesa packages, see bug report for list

All, please avoid discussing too much detail in this topic (bug reports should contain those). And remember gnome-mpv is not recommended, so results from that one are unwanted (see https://community.ubuntu.com/t/hardware-accelerated-video-playback/304/4).

The bugs identified thus far (thanks for being on top of it mc3man), are:

3 Likes

i5-2410M
gnome-shell
XDG_SESSION_TYPE=wayland

mpv works fine, low CPU and shows this in output log “Using hardware decoding (vaapi).”
totem does not work, shows black screen, also shows “Using hardware decoding (vaapi).”
Uninstalling the gstreamer1.0-vaapi fixes totem blackscreen.

@vanvugt Let me know if you need any other info.

Thanks. The black screen which is probably also a little or a lot corrupt, is https://launchpad.net/bugs/1747744 … We have a fix for that coming soon, probably as a patch on top of the migration to Mesa 18.0.

Yes I forgot to mention that removing gstreamer1.0-vaapi is also a workaround. But not if you’re playing high-end 4K/HDR/HEVC type video, because playing that smoothly is really impossible without hardware acceleration.

Screenshot illustrates the issue; “weathered” colours (for lack of a better term) during video playback and graphics viewing (I know that it’s a poor photo - I had to take it with my phone).

  • Xorg
  • MPV (but the issue is system-wide, really)
  • Intel i5-4210u with Intel HD Graphics 4400
  • vainfo output:

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

I can’t yet see what you mean by weathered colours. Can you please try taking more photos? Particularly of a video for which I would be familiar with already, like:
http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4
or any of http://bbb3d.renderfarming.net/download.html

Are the weathered colours limited to MPV, or do they also occur in other apps (like web browsers and photo viewers)? I’m thinking maybe you’re hitting https://launchpad.net/bugs/1727232 which I think probably needs more priority. It’s such an invisible issue though many people would not yet realise it’s a bug.

Screenshots might be better actually (just press PrtScn and then look in your Pictures or home directory). It would be interesting to see if taking screenshots averts the issue.

I can’t yet see what you mean by weathered colours.

“Weathered” is possibly the wrong word; English is my second language. I’ll just call the issue ‘colour artefacts’.

Can you please try taking more photos? Particularly of a video for which I would be familiar with already

The forum only allows me to upload one photo, but here you go (my phone camera is awful, but the colour artefacts aren’t visible on screenshots):

Photo

Look at the sky’s light colours. They display with smooth gradients on Ubuntu 16.04, but as the photo illustrates 18.04 seems to display the video with a smaller range of white colours. This is the most apparent with either very dark or very light colours.

Are the weathered colours limited to MPV, or do they also occur in other apps (like web browsers and photo viewers)?

The issue is definitely system-wide; the artefacts are visible on the desktop, in Firefox (mostly when viewing photos) and other apps I use. Even on window titlebars the artefacts are visible (displayed as lines with different shades of grey/black). It honestly looks like the colour range is improperly configured.

I’m thinking maybe you’re hitting https://launchpad.net/bugs/17272321 which I think probably needs more priority. It’s such an invisible issue though many people would not yet realise it’s a bug.

It’s possible that the issue is related to that bug. But, as I mentioned, my issue is system-wide. And I tried the fix that the bug reported suggested - turn Settings > Devices > Color > (my monitor) = OFF - but it didn’t improve the issue.

Screenshots might be better actually (just press PrtScn and then look in your Pictures or home directory). It would be interesting to see if taking screenshots averts the issue.

As I mentioned, the artefacts are not present on PrtSc shots that are taken on Ubuntu 18.04 but viewed on a different system (16.04 and Windows).

What is most interesting: installing a previous kernel version fixes the issue completely! I used UKUU Update Utility to install kernel 4.4 (the same that I use in Ubuntu 16.04 without issues) and upon a reboot with 4.4 running on 18.04 everything displayed smoothly. So this indicates that there is a regression somewhere in the kernel?

That is indeed very interesting and sounds like your system is using a sub-optimal colour depth with the newer kernel. That will cause banding and artefacts.

Can you please log it as a kernel bug? Use this command in a terminal to open the bug:

ubuntu-bug linux

And let us/me know by subscribing user ‘vanvugt’ to the bug.

I don’t think it should be discussed any more here since it’s not a problem confined to video playback.

Update for those playing at home: https://launchpad.net/bugs/1749420

1 Like

MPV is jacked up on i7-3770 & xorg. I didn’t even realize until just now testing, always use VLC and haven’t had an issue with 18.04 LTS. It looks the same as @shemgp seems to be taking pieces off my desktop and shuffling in chunks.

Please log a bug for that using this command:

ubuntu-bug mpv

And attach screenshots/photos to it.

Hello

x11

Default Video Player runs smoothly, VlC runs smoothly

Processor is Intel Core i3-3120m ivybridge-mobile , lenovo e530,

vainfo:

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_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.0.0)
vainfo: Driver version: Intel i965 driver for Intel® Ivybridge Mobile - 2.0.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
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD

xorg and totem issue

brent@XPS-13-9360:~$ 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_0
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel® Kaby Lake - 2.0.0

Thanks @thebman . That is https://launchpad.net/bugs/1747744

  • X11, totem, CPU Intel i7 4600M, HD4600 graphics card
  • Totem takes up a lot of CPU resources. However mpv works well.
  • And in many apps the GPU acceleration is diabled.

output of 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_0
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) Haswell Mobile - 2.0.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

We only support hardware accelerated video decoding in totem and mpv right now. And we are aware that totem is still less efficient than mpv. However, I would like to check that you’re not encountering a new totem bug we’re not already aware of. So please run this command to log a new bug:

ubuntu-bug totem

and include details of how much “a lot of CPU resources” is, as well as specific types of video files you are trying to play.

Intel Atom N255 @ 1.5GHz

Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller (rev 02) using i915 driver.

$ 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/i915_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit