Totem does not use the va-api gstreamer backend

Bug #997370 reported by noname2
192
This bug affects 37 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Undecided
Unassigned
Trusty
Won't Fix
High
Unassigned
Totem
Fix Released
Undecided
Unassigned
totem (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

installing gstreamer -vaapi from ubuntu repos breaks thumbnail generation in nautilus
furthermore acceleration does not work in totem - cpu usage is as high as with software rendering.

mplayer-vaapi works perfectly on the same system.

gst-launch-0.10 -v filesrc location=~/test.mkv ! matroskademux ! vaapidecode ! vaapisink
makes it possible to use vaapi via commandline

i did not find a way to use vaapi for mpeg4 part 2 video streams.

and i wasnt able to find proper values for gstreamer-properties that fix thumbnails and acceleration in totem.

id like to share debug information. just tell me what you need.

Tags: raring
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gstreamer-vaapi (Ubuntu):
status: New → Confirmed
Revision history for this message
Timur I. Davletshin (timur-davletshin) wrote :

gst-launch-0.10 -v filesrc location='some.mkv' ! matroskademux ! vaapidecode ! vaapisink
Setting pipeline to PAUSED ...
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva: va_openDriver() returns 0
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps = video/x-surface, width=(int)1280, height=(int)720, framerate=(fraction)500000000/20854199, pixel-aspect-ratio=(fraction)1/1, type=(string)vaapi, opengl=(boolean)true
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps = video/x-h264, level=(string)5.1, profile=(string)high, codec_data=(buffer)01640033ffe1001867640033ac34e2805005ba10001974f004c4b408f18318a801008468eebce5531cc305d2628d13080214868783a1c0d04e12142c0ac0da02fe10042ad35e9e850b748c778a1410088b172105449ca3050e204448b20a4d8a081827090809848541dc4290a43164215a201900cae8340f81e86f03300b6017002ac05981d61a07802a8400a902087404700bc010506e036404b811805902e07203e0087ff85b, stream-format=(string)avc, alignment=(string)au, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)500000000/20854199
gst-launch-0.10: vdpau_decode.c:1264: vdpau_EndPicture: Assertion `obj_buffer' failed.

Revision history for this message
markusj (markusj) wrote :

Messages logged into .xsession-errors while trying to generate thumbnails:
> libva: VA-API version 0.32.0
> libva: va_getDriverName() returns 0
> libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
> libva: va_openDriver() returns 0

> ** (totem-video-thumbnailer:24249): CRITICAL **: gst_vaapi_context_get_surface: assertion `GST_VAAPI_IS_CONTEXT(context)' failed

GPU: Intel HD3000 (Sandy Bridge)

With VLC, VAAPI works, but provides only a poor performance (which might be cause by the not very powerful GPU ...)

Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

dont use vlc with vaapi . you should rather use mplayer .

summary: - high cpu usage
+ Totem does not use the va-api gstreamer backend
Revision history for this message
Mastermind (ibrahammastermind) wrote :

I tried to change the default video think in gconf2 to vaapisink but the result is:
"could not link ffmpegcsp0 to vaapisink0"

vaapi works perfectly with mplayer

It seems an error in compiling gst-vaapi without linking some libraries

mastermind@mydesk:~$ gst-inspect-0.10 |grep vaapi
vaapi: vaapidownload: VA-API colorspace converter
vaapi: vaapiupload: VA-API colorspace converter
vaapi: vaapidecode: VA-API decoder
vaapi: vaapipostproc: VA-API video postprocessing
vaapi: vaapisink: VA-API sink

Revision history for this message
Alin Andrei (nilarimogard) wrote :

Well, it seems at least Totem doesn't support this, so with totem it's not a gstreamer issue:

"The problem is that Totem is using the videobalance element, which is a
pure software element. Using software element prevent using hardware
acceleration like libva or VDPAU."

From here: http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-VAAPI-and-Totem-td4655188.html

Revision history for this message
Coman Mihai (z0id) wrote :

I removed gstreamer-vaapi, removed ~/.thumbnails, but thumbnails display as loading all the time. Does anyone know how to fix the thumbnails generation?

Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

still there in 13.04

Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

on 13.04 gst-launch-0.10 playbin2 uri=file:///path/to/file.whatever video-sink=vaapisink works again for mkvs and h.264

but the same line does not work for avi mpeg4 part2 (xvid)
and i dont know what to put as videosink in gstreamer-properties to use it as default for totem

papukaija (papukaija)
tags: added: raring
Revision history for this message
papukaija (papukaija) wrote :

I opened the tomtem task because of comment 6.

Changed in totem (Ubuntu):
status: New → Confirmed
Changed in totem:
status: New → Confirmed
Revision history for this message
madbiologist (me-again) wrote :

According to http://lists.freedesktop.org/archives/gstreamer-devel/2013-November/044555.html "Depending on the underlying hardware, the following video decoders are supported: JPEG, MPEG-2, MPEG-4:2, H.264 and VC-1."

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

@madbiologist (s-j-turner) it's a Totem problem not using the right gstreamer element. not a gstreamer BUG, we can decode any of those files using gst-launch.

Revision history for this message
madbiologist (me-again) wrote :

Thanks Ekimia. It is certainly frustrating not being able to use Totem with VA-API or VDPAU. According to Julius in comment #9, MPEG4 part2 (xvid) files will not decode with gst-launch and VA-API. This may be due to the support not landing until after his comment, or because it is not supported by his hardware.

Julius - what hardware do you have and does it work now?

Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

I switched to Fedora 20 and play all files with vlc. 5% cpu utilisation on 1 core intel i5 4000m which means hd4600 with 1080p

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Yes We know VLC can call VAAPI directly, the subject here is Totem, let's stick to it.

Revision history for this message
madbiologist (me-again) wrote :

julius - Isn't that a Haswell processor? Ubuntu 13.04 was released with version 1.0.17-1 of the va-api driver. According to http://lists.freedesktop.org/archives/libva/2012-November/001420.html Haswell support was not added until version 1.0.19 of the va-api driver.

According to http://lists.freedesktop.org/archives/gstreamer-devel/2013-April/040527.html MPEG-4:2 support was present in gstreamer-va-api 0.5.3 (earlier than I mentioned in comment #11). MPEG4 support seems to have been present since the original gstreamer-va-api release, but I'm unsure of which part of MPEG4.

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Will this be Fixed in 14.04 ? it's a shame that Linux is almost the only OS where accelerated video decoding is a mess !

Revision history for this message
madbiologist (me-again) wrote :

It doesn't look like it will be fixed in Ubuntu 14.04 - see https://launchpad.net/ubuntu/+source/totem and https://download.gnome.org/sources/totem/

Timo Aaltonen (tjaalton)
no longer affects: gstreamer-vaapi (Ubuntu)
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Does anybody can advise a gstreamer-based default player for Ubuntu that would support gstreamer-vaapi ?

Revision history for this message
Jochen Fahrner (jofa) wrote :

I don't know about gstreamer, but mplayer-vaapi works fine:
https://launchpad.net/~sander-vangrieken/+archive/vaapi

As GUI you can use Gnome Mplayer or SMplayer.

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Nobody is working on this ? Shall we set VLC as the default player on Ubuntu 14.04 ?

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Good news it seems ( and I'm surprise nobody told it here ) , the needed Fix for Totem was introduced by gnome team in April 2012 :

https://bugzilla.gnome.org/show_bug.cgi?id=674083

But I don't see if it's still working for Totem 3.10.1 which I guess uses gstream 1.0

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

If I've gstreamer1.0-vaapi installed in Ubuntu 14.04 Totem thinks it doesn't have anything to play h.264 with :(
But when I remove gstreamer1.0-vaapi package this video file plays fine in Totem:
https://bugs.launchpad.net/ubuntu/+source/gst-libav1.0/+bug/1290368/+attachment/4095344/+files/00004.MTS
This issue was noticed also by Ubuntu developer Mirv (Timo Jyrinki AFAIK), see
http://irclogs.ubuntu.com/2014/04/24/%23ubuntu-desktop.txt

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'm tempted to close this one as fixed, since totem in vivid at least does attempt to use vaapi.. just that it fails completely as shown in bug 1416005

Timo Aaltonen (tjaalton)
Changed in totem (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Agreed, the new bug more accurately reflects the current situation.

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Really happy that this is becoming an 'oem-priority' . I see that a fix was released , where ?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

this bug is/was about "totem not using va-api gstreamer backend", that's fixed now in totem

thing is that bug 1416005 is a result of enabling va-api (and a reason why gstreamer-vaapi can't be in the default install), so further progress should be tracked there

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

You are totally right for Vivid, I though it was fixed for trusty but not yet.

Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

Will we see a fix for trusty?

Revision history for this message
Davide Capodaglio (davidecapod) wrote :

Still not working for me on 14.04, I have a NVidia card with binary drivers, VDPAU and VAAPI working ok.
mplayer and gst-play-1.0 using hw acceleration, but nope for totem.
So this is supposed to work on 16.04, that also has gstreamer1.0-vaapi 0.7.0 ?

Ara Pulido (ara)
Changed in oem-priority:
status: New → Fix Released
Timo Aaltonen (tjaalton)
Changed in totem:
status: Confirmed → Fix Released
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

I can confirm this is fixed in 16.04 , congrats to everyone , that was though.

Revision history for this message
Davide Capodaglio (davidecapod) wrote :

For me does not work on 16.04.
If I install gstreamer1.0-vaapi (on NVidia card with binary drivers and vdpau working perfectly with mplayer), totem prints this and does not play anything

libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0

(totem:9596): Cogl-WARNING **: driver/gl/cogl-framebuffer-gl.c:157: GL error (1280): Invalid enumeration value

However, gst-launch-1.0 playbin uri=... works perfectly with hw acceleration (checked "video engine utilization" in nvidia-settings)

Revision history for this message
petit-prince (petit-prince) wrote :

I can confirm Davide's comment. This is still not working with Nvidia binary drivers using vaapi and vdpau, while mplayer works flawlessly using vdpau hardware acceleration.
gst-launch-1.0 does work indeed.
How do we proceed? What further information is required to debug this issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.