FS#36997 - [firefox] gstreamer support fails

Attached to Project: Arch Linux
Opened by sin3t (sin3t) - Thursday, 19 September 2013, 22:24 GMT
Last edited by Jan Alexander Steffens (heftig) - Monday, 23 September 2013, 17:28 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Ionut Biru (wonder)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description: Since 24 version of firefox build there must be activated a flag of gstreamer support, but HTML5 h.264 video consumes 120% of CPU (youtube in HTML5 mode, some other sites).If you try to play video via gstreamer directly from console - CPU load is ~15%

Additional info:
* package version(s)
* config and/or log files etc.

I've installed
=>catalyst-total-hd234k, the proprietary ATI driver, which provides XvBA hardware-acceleration
=>libva-xvba-driver, the package that enables VA-API (by passing it to XvBA)
=>libvdpau-va-gl, which enables VDPAU (by passing it to VA-API)
=>gstreamer0.10-{base,good,ugly}, the video playback backend that Firefox uses in Linux
=>gstreamer0.10-vaapi
Also I toogle media.gstreamer.enabled in about:config, and in http://html5test.com the "Option H.264" support has value "Yes ✔"

In about:buildconfig there isn't enabled flag --enable-gstreamer
--enable-application=browser --prefix=/usr --libdir=/usr/lib --enable-official-branding --with-google-api-keyfile=/build/firefox/src/mozilla-release/google-api-key --with-system-nspr --with-system-nss --with-system-jpeg --with-system-zlib --with-system-bz2 --with-system-png --with-system-libevent --with-system-libvpx --enable-system-hunspell --enable-system-sqlite --enable-system-ffi --enable-system-pixman --enable-startup-notification --enable-pulseaudio --disable-crashreporter --disable-updater --disable-installer

Also one guy has the same problem http://support.mozilla.org/en-US/questions/971722
Steps to reproduce:
Play some video in Youtube(with HTML5 version) or here (http://www.quirksmode.org/html5/tests/video.html)
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Monday, 23 September 2013, 17:28 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Firefox uses a whitelist of GStreamer plugins, which vaapi is not part of. Not our problem.
Comment by Jan de Groot (JGC) - Friday, 20 September 2013, 06:13 GMT
Gstreamer support in firefox should get killed until they port it to 1.0. I want to drop this unmaintained crap, but adding more dependencies on 0.10 will not make that task easier.
Comment by Adam Hirst (aphirst) - Friday, 20 September 2013, 13:27 GMT
I'm the guy who submitted http://support.mozilla.org/en-US/questions/971722 . sin3t seems to have restated a lot of what I did, but that just confirms my suspicions, really. I hadn't noticed myself that gstreamer wasn't listed in about:buildoptions, but does it not being there necessarily mean that Firefox then doesn't use gstreamer0.10 if it's installed?

I'll enumerate the couple of differences in my situation.
>I'm using catalyst 13.8 on a Radeon 7340
>I'm able to get CPU usage to dip a little by pausing and unpausing the video, though it's still higher than playing in VLC/mplayer (I can't fathom how to manually play files with gstreamer...)

I really do hope Mozilla port all this over to 1.0, but in the meantime I of course would quite like if the repo package was compiled with 0.10 support enabled.
Comment by sin3t (sin3t) - Friday, 20 September 2013, 13:36 GMT
>> how to manually play files with gstreamer...
To aphirst, you can test gstreamer performance with : $ gst-launch0.10 playbin2 uri=file:///path/to/videoFile.mp4 (.mp4 file must be coded with h.264 codec)
Comment by Adam Hirst (aphirst) - Friday, 20 September 2013, 14:03 GMT
Hmm, I downloaded the low-definition MP4 version of the youtube video I linked in my Mozilla Support page, and tried playing that with your command, but I get errors (see attached logs). VLC's 'codecs' page does claim that this file is h.264, so I can't say I understand what the problem here is. Needless to say, I can't currently compare Firefox to raw gstreamer playback.

I've put a copy of the MP4 file here: https://dl.dropboxusercontent.com/u/3219541/dd.mp4
Comment by sin3t (sin3t) - Friday, 20 September 2013, 14:37 GMT
Aphirst, I'm sorry for such strange mistake -> The mp4 files are usualy coded with MPEG v4, not h.264(but why video is in .mp4 on HTML5 video sites?).And I've the same error as you on the dd.mp4 file.

Also
>>> file dd.mp4
dd.mp4: ISO Media, MPEG v4 system, version 2

Probaly, the problem is in the unsupported codec format. because vainfo says
>>>$vainfo
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'xvba'
libva info: Trying to open /usr/lib/dri//xvba_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.34 (libva 1.2.1)
vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
vainfo: Supported profile and entrypoints
VAProfileH264High : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD

So there is no harware MPEGv4 support.
To test performance, try to play some .mkv file with the same gst-launch command, mkvinfo must say something like that " + CodecPrivate, length 41 (h.264 profile: High @L5.1)".
But, lets return to the main topic theme -> I suppose, unsupported MPEGv4 is not the main trouble, because video HTML5 usualy is coded with h.264, i'm right?
Comment by Adam Hirst (aphirst) - Friday, 20 September 2013, 14:58 GMT
Hmm. When I try to play a valid (@L5.1) h.264 file (see mkvinfo.log) gstreamer hates that too (see gst.log). Obviously other stuff plays this file no problem. Weird that gstreamer won't. I even tried forcing vaapi in the gstreamer config file (by using gstreamer-properties from gnome-media).

>let's return to the main topic
Agreed. Firefox, HTML5, and not using gstreamer.
I don't really know what underlying codecs are common for HTML5, I'm only really familiar with YouTube having WebM, MP4, and the occasional h.264-only video.

Loading...