You are not logged in.

#1 2010-04-10 16:43:56

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

libwebkit and HTML5 audio [SOLVED]

All of the sudden libwebkit and HTML5 have started to work together again, but I'm not getting audio at all for either vorbis or aac. Is it working for any of you?

--EDIT--

I'm starting to see what's happening and it's very strange:

The only videos that I'm seeing are H264 or theora if they are started through gstreamer0.10-ffmpeg; Purely theora/vorbis videos do not start*. I'm not hearing any sound because gstreamer's designers are forcing people to use certain codecs. For whatever reason faad2 isn't working with gstreamer for this purpose and it won't fall back on FFmpeg's aac decoder. It makes no difference whether faad is compiled into FFmpeg or not.

The upside is that gstreamer0.10-ffmpeg compiled against the internal FFmpeg that I have on my system is vastly superior in video quality than Flash or Chromium's internal junk.


* What I mean by this is that if I have only gstreamer0.10-ffmpeg installed, theora based videos will take up 100% of one core and basically lock the browser up. If I have libtheora/libvorbis installed, the video will play fine.

Offline

#2 2010-04-17 03:30:18

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Hmmm?

So does this mean that audio doesn't work for anyone for HTML5 in libwebkit?

Offline

#3 2010-04-17 07:46:40

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: libwebkit and HTML5 audio [SOLVED]

Well I did some tests here http://www.happyworm.com/jquery/jplayer … o.Support/ and no it didn't work with libwebkit and uzbl. It worked with chromium..

Offline

#4 2010-04-17 13:19:55

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Army wrote:

Well I did some tests here http://www.happyworm.com/jquery/jplayer … o.Support/ and no it didn't work with libwebkit and uzbl. It worked with chromium..

Thanks Army. I had a feeling that that may be the case. I'd really like to get it working with libwebkit and not use Chromium for anything.

Offline

#5 2010-05-08 04:18:19

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Hidy Ho Everybody!

Still? No one has sound in HTML5 with libwebkit outside of Chromium? This site claims that I should at least be able to get vorbis sound, but I don't:

http://html5test.com/

Offline

#6 2010-05-13 02:15:54

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Well, ain't that special?

It turns out that it does work with some bizarre combination of things. What the trick ended up being was to use some other gstreamer app (rhythmbox in this case) to get the plug-ins to initalize properly. It seems like libwebkit assumes a working gstreamer stack.

As I mentioned before, with my own copy of gstreamer0.10-ffmpeg the video quality is vastly superior to Flash or Chromium. The only thing left for me to do is to try to figure out how much of gstreamer's assumed codecs it will take to wittle this down to almost nothing but a FFmpeg based player.

--EDIT--

~ > pacman -Qs gstreamer
local/gstreamer0.10 0.10.29-1
    GStreamer Multimedia Framework
local/gstreamer0.10-bad 0.10.18-4 (gstreamer0.10-plugins)
    GStreamer Multimedia Framework Bad Plugin libraries (gst-plugins-bad)
local/gstreamer0.10-bad-plugins 0.10.18-4 (gstreamer0.10-plugins)
    GStreamer Multimedia Framework Bad Plugins (gst-plugins-bad)
local/gstreamer0.10-base 0.10.29-1
    GStreamer Multimedia Framework Base plugin libraries
local/gstreamer0.10-base-plugins 0.10.29-1 (gstreamer0.10-plugins)
    GStreamer Multimedia Framework Base Plugins (gst-plugins-base)
local/gstreamer0.10-ffmpeg 0.10.10-1 (gstreamer0.10-plugins)
    Gstreamer FFMpeg Plugin
local/gstreamer0.10-good 0.10.22-1
    GStreamer Multimedia Framework Good plugin libraries

This without all of the 'bad' plug-ins except FAAD2 (I installed the 'plugins' packages with the -d switch). I have libvorbis, libtheora, faad2, and my own copy of gstreamer0.10-ffmpeg. There's nothing else. No gconf or 10,000 unnecessary codecs. I'll refine this as the days go on and either post the beginnings of AUR packages or provide them myself.

-- EDIT 2 --

And before someone asks: Yes, uzbl does work.

Offline

#7 2010-05-13 11:35:09

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: libwebkit and HTML5 audio [SOLVED]

Thanks! I'll try it out asap. Does Youtube-html5 now work with uzbl as well?

Offline

#8 2010-05-13 13:25:46

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Army wrote:

Thanks! I'll try it out asap. Does Youtube-html5 now work with uzbl as well?

Every video except one that I tried at youtube works. The Big Buck Bunny video at the Opera test site works. And, everything I tried at vimeo works with the exception of the progress slider. I believe that that's a know bug with their set up though.

Offline

#9 2010-05-14 18:42:29

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: libwebkit and HTML5 audio [SOLVED]

Yeah, this really works!!! Great, youtube without flash :-) Now I only have to find out which minimal configuration is possible. I'd like to only have gstreamer0.10-ffmpeg installed.

Btw, you say you have your own version of gstreamer0.10-ffmpeg? Would you mind providing it? I always liked your minimal configurations

edit: Ok, removing gstreamer packages makes problems with youtube, so I'll leave them all on the system. But having them all a bit more lightweight would be awesome :-)

Last edited by Army (2010-05-14 20:00:15)

Offline

#10 2010-05-15 01:20:51

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Army wrote:

Yeah, this really works!!! Great, youtube without flash :-) Now I only have to find out which minimal configuration is possible. I'd like to only have gstreamer0.10-ffmpeg installed.

Btw, you say you have your own version of gstreamer0.10-ffmpeg? Would you mind providing it? I always liked your minimal configurations

edit: Ok, removing gstreamer packages makes problems with youtube, so I'll leave them all on the system. But having them all a bit more lightweight would be awesome :-)

There's nothing to my gstreamer0.10-ffmpeg other than the --with-system-ffmpeg switch. I use the Arch PKGBUILD with only that modification to the configure line:

# $Id: PKGBUILD 72240 2010-03-13 20:27:01Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gstreamer0.10-ffmpeg
pkgver=0.10.10
pkgrel=1
pkgdesc="Gstreamer FFMpeg Plugin"
arch=('i686' 'x86_64')
license=('GPL')
depends=('gstreamer0.10-base>=0.10.28' 'bzip2')
makedepends=('pkgconfig')
url="http://www.gstreamer.net"
groups=('gstreamer0.10-plugins')
source=(http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-${pkgver}.tar.bz2)
sha256sums=('697114483444a0a469028857a1d58145c99e6f5d2cd7edd8cb04cdc3fc72ad94')

build() {
  cd "${srcdir}/gst-ffmpeg-${pkgver}"
  unset CFLAGS
  unset CXXFLAGS
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-system-ffmpeg || return 1
  make || return 1
  make DESTDIR="${pkgdir}" install || return 1
  rm -f ${pkgdir}/usr/lib/gstreamer-0.10/*.{l,}a
}

This is the problem with using gstreamer0.10-ffmpeg only:

The gstreamer devs have hardcoded what program can decode what codec. It makes no difference if the user has these or full replacements compiled into FFmpeg. It seems to make no difference to them if software has been declared as non-free even by its own developers (FAAC and FAAD2).

Offline

#11 2010-05-15 11:51:37

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: libwebkit and HTML5 audio [SOLVED]

skottish wrote:

This is the problem with using gstreamer0.10-ffmpeg only:

The gstreamer devs have hardcoded what program can decode what codec. It makes no difference if the user has these or full replacements compiled into FFmpeg. It seems to make no difference to them if software has been declared as non-free even by its own developers (FAAC and FAAD2).

Damn! Would be really nice to have ffmpeg do all the stuff.

Offline

#12 2010-05-15 13:37:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

What I'm thinking about is creating a set of gstreamer0.10-html5 packages that only brings in the necessary packages. This will require a few things that will differ from the Arch packages. For instance, I believe that gconf isn't necessary and the install scripts are trying to register with gconf. I also need to find a way to register the packages correctly so that there isn't the extra step of installing and removing something like rhythmbox.

When all of this is successful, I'd like to find a way to rid the packages of FAAD2 and use only FFmpeg's internal AAC decoder. This will require patching gstreamer, so figuring that one out will be a bit tricky. I'd file a feature request with the gstreamer people, but they don't want to hear from me because I use my own copy of FFmpeg. That's too bad, but I can't do anything about it.

I don't see any compelling reason to drop theora or vorbis in favor of FFmpeg internal. Enough FFmpeg developers have made it abundantly clear that they don't care about these codecs, so their internal versions always lag behind in terms of performance. I don't care about this because it doesn't interfere with the way that I do things like FAAD2 does (that's another story for another thread).

Offline

#13 2010-05-15 20:56:40

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: libwebkit and HTML5 audio [SOLVED]

skottish wrote:

Enough FFmpeg developers have made it abundantly clear that they don't care about these codecs, so their internal versions always lag behind in terms of performance

Not true. ffvorbis is faster than libvorbis and the ffmpeg didn't like the fact that fftheora is so much slower than libtheora, so they made sure it's not the case anymore. Also, ffaac is waaay faster than faad2.

Offline

#14 2010-05-16 01:33:04

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Gusar wrote:
skottish wrote:

Enough FFmpeg developers have made it abundantly clear that they don't care about these codecs, so their internal versions always lag behind in terms of performance

Not true. ffvorbis is faster than libvorbis and the ffmpeg didn't like the fact that fftheora is so much slower than libtheora, so they made sure it's not the case anymore. Also, ffaac is waaay faster than faad2.

Faster on all accounts yes, but I've run into modern theora files the fftheora has choked on pretty badly. It's possible that I got in between updates though; My copy of FFmpeg is rarely more than a day or two old.

Offline

#15 2010-05-23 18:01:21

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

This is my final post in this thread unless someone has any questions.

After all of this was said and done, the gstreamer libraries that are necessary for HTML5 video and audio are:

gstreamer0.10
gstreamer0.10-bad
gstreamer0.10-base
gstreamer0.10-base-plugins
gstreamer0.10-ffmpeg

The user has a choice now on whether to use all of gstreamer0.10-bad-plugins or to use a separate PKGBUILD. I did sucessfully convert the official PKGBUILD to remove unwanted codecs, but I don't feel like writing in the many --disable lines needed to stop autodetection. As well, the autodetection will be helpful for different people in different ways, so a generic AUR package is pointless.

For this curious, this is what I used and is nothing more than a modification of JGC's office PKGBUILD. It picked up on a number of other things that I have installed in the process. While fully functional, calling it gstreamer0.10-faad2 is not accurate because I didn't kill any autodetection:

 pkgname=gstreamer0.10-faad2
pkgver=0.10.18
pkgrel=1
arch=('i686' 'x86_64')
license=('LGPL' 'GPL')
url="http://gstreamer.freedesktop.org/"
pkgdesc="GStreamer Multimedia Framework Bad Plugins "
depends=("gstreamer0.10-bad=${pkgver}" 'faad2>=2.7')
options=(!libtool !emptydirs)
source=(${url}/src/gst-plugins-bad/gst-plugins-bad-${pkgver}.tar.bz2)
sha256sums=('2f800127e00da0f157358f87b06563b3de23cbc630fbf6295b43405e52e02070')

build() {
  cd "${srcdir}/gst-plugins-bad-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --disable-static --enable-experimental \
    --with-package-name="GStreamer Bad Plugins (Archlinux)" \
    --with-package-origin="http://www.archlinux.org/" || return 1

  make || return 1
  sed -e 's/gst sys ext/gst/' -i Makefile || return 1

  cd "${srcdir}/gst-plugins-bad-${pkgver}"
  make -C gst-libs DESTDIR="${pkgdir}" install || return 1
  make -C ext DESTDIR="${pkgdir}" install || return 1
  make -C sys DESTDIR="${pkgdir}" install || return 1
  make -C gst-libs DESTDIR="${pkgdir}" uninstall || return 1
}

In reality, the simplest way to handle the situation in regards to not having a ton of "dependencies" that aren't dependencies at all is to build gstreamer0.10-bad on the local machine with whatever codecs the end user wants to keep. Just remove what you don't want out of the depends array so that pacman doesn't want to pull in what's undesirable.

Offline

#16 2010-05-23 19:35:44

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: libwebkit and HTML5 audio [SOLVED]

What I wanted to add here is, I'm a bit disappointed in html5 video. Maybe it's just on Youtube, but really, html5 needs more cpu power here for videos than flash! On youtube watching a 360p video take 100% of my cpu (intel pentium-m with 1,7GHz), flash "only" needs about 70%. This is really not what I expected! I mean, when I play the exact same video with mplayer, it only takes about ... worst case 10% of the cpu.

What is going on?!

Offline

#17 2010-05-23 19:55:58

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

Army wrote:

What I wanted to add here is, I'm a bit disappointed in html5 video. Maybe it's just on Youtube, but really, html5 needs more cpu power here for videos than flash! On youtube watching a 360p video take 100% of my cpu (intel pentium-m with 1,7GHz), flash "only" needs about 70%. This is really not what I expected! I mean, when I play the exact same video with mplayer, it only takes about ... worst case 10% of the cpu.

What is going on?!

I'm also seeing a significant difference between the two on my machine. Flash takes around ~26% CPU (of one core) spread evenly over four cores. HTML5 takes around ~46% (of one core) with the spread being heavy on two cores. Flash does have some degree of GPU decoding now though, doesn't it? FFmpeg doesn't have any GPU abilities for playback. I'm a little unclear about gstreamers abilities. It compiled in vdpau support, but I'm not seeing it.

Offline

#18 2010-06-20 02:11:53

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: libwebkit and HTML5 audio [SOLVED]

@skottish: your work here has been invaluable to me. The documentation is greatly appreciated. However, I wasn't able to get youtube videos working without having gstreamer0.10-good installed in addition to your list.

Last edited by falconindy (2010-06-20 02:12:05)

Offline

#19 2010-06-20 02:23:57

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

falconindy wrote:

@skottish: your work here has been invaluable to me. The documentation is greatly appreciated. However, I wasn't able to get youtube videos working without having gstreamer0.10-good installed in addition to your list.

Gads! I have it installed now too because sometime after this post stuff started to fail. There's some weird shit going on with gstreamer, what users have installed, and how it updates it's library. gstreamer is one of the most overcomplicated pieces of software that I've ever seen.

Offline

#20 2010-06-28 20:51:20

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: libwebkit and HTML5 audio [SOLVED]

So, it seems that Youtube has foiled us by switching from h.264 to WebM. I'm still getting video support, but I have no audio. I've been able to glean from WebM's homepage that they're using Vorbis for audio playback. It seems that I've already got libvorbis installed and gstreamer0.10-base-plugins compiled with support for vorbis, so I'm a little lost for ideas at this point.

Anyone have an idea as to what I might be missing?

Offline

#21 2010-06-28 21:21:41

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

falconindy wrote:

So, it seems that Youtube has foiled us by switching from h.264 to WebM. I'm still getting video support, but I have no audio. I've been able to glean from WebM's homepage that they're using Vorbis for audio playback. It seems that I've already got libvorbis installed and gstreamer0.10-base-plugins compiled with support for vorbis, so I'm a little lost for ideas at this point.

Anyone have an idea as to what I might be missing?

Google is switching back and forth between H.264 and WebM at the moment. They're quietly dropping H.264 support for HTML5.

I understand that gstreamer supports WebM in their git branch. I haven't bothered to get around to trying it since H.264 works most of the time. I did notice that WebM through Chrome is inferior to H.264 when using the system FFmpeg, but no surprises there; WebM is inferior to H.264.

--- EDIT ---

Install libvpx, reinstall something that will rebuild the database like rhythmbox, and enjoy WebM.

Offline

#22 2010-06-28 21:59:28

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: libwebkit and HTML5 audio [SOLVED]

I actually don't use youtube in the browser anymore. When someone sends me a link, I use youtube-viewer (in AUR) to watch it. When I want to search for a video I use minitube or again youtube-viewer, as soon as this feature is being improved a bit. But really, youtube with flash sucks because it's flash and we generally don't like it, but with html5 the cpu usage is even worse! So I'm very happy with these solutions :-)

Offline

#23 2010-06-28 23:09:01

Cdh
Member
Registered: 2009-02-03
Posts: 1,098

Re: libwebkit and HTML5 audio [SOLVED]

skottish wrote:

I did notice that WebM through Chrome is inferior to H.264 when using the system FFmpeg, but no surprises there; WebM is inferior to H.264.

Have you some data to back that claim up (other than a single blogpost from a x264 dev that just claims the current implementation and specification sucks)?

Just wait until people who know what they are doing get to improve it. Beginning here:
http://blogs.gnome.org/rbultje/2010/06/ … deo-codec/

edit: What I noticed is that h264 sucks in chromium. A 360p video easily takes 100% CPU on the netbook

Last edited by Cdh (2010-06-28 23:19:23)


฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz

Offline

#24 2010-06-29 00:18:16

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: libwebkit and HTML5 audio [SOLVED]

skottish wrote:
falconindy wrote:

So, it seems that Youtube has foiled us by switching from h.264 to WebM. I'm still getting video support, but I have no audio. I've been able to glean from WebM's homepage that they're using Vorbis for audio playback. It seems that I've already got libvorbis installed and gstreamer0.10-base-plugins compiled with support for vorbis, so I'm a little lost for ideas at this point.

Anyone have an idea as to what I might be missing?

Google is switching back and forth between H.264 and WebM at the moment. They're quietly dropping H.264 support for HTML5.

I understand that gstreamer supports WebM in their git branch. I haven't bothered to get around to trying it since H.264 works most of the time. I did notice that WebM through Chrome is inferior to H.264 when using the system FFmpeg, but no surprises there; WebM is inferior to H.264.

--- EDIT ---

Install libvpx, reinstall something that will rebuild the database like rhythmbox, and enjoy WebM.

Hrmm. libvpx-git is already installed as well. Not sure what you mean by 'rebuild the database'. Are you referring to some sort of internal database that gstreamer keeps? Is there a way to rebuild it without installing some random app on a lightweight setup (dwm)?

Offline

#25 2010-06-29 00:25:09

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: libwebkit and HTML5 audio [SOLVED]

falconindy wrote:

Hrmm. libvpx-git is already installed as well. Not sure what you mean by 'rebuild the database'. Are you referring to some sort of internal database that gstreamer keeps? Is there a way to rebuild it without installing some random app on a lightweight setup (dwm)?

As I mentioned way back in this thread, I never discovered a way to do it. gstreamer seemed to be able to see things, but without some sort of registration process, they codecs weren't available. I don't use gstreamer outside of libwebkit, so this solution bugs me too.

Offline

Board footer

Powered by FluxBB