Kubuntu 10.10 is likely to come with a QtWebKit using browser (currently Rekonq is default) and QtWebKit allegedly does some HTML 5 magic. Most importantly from my POV audio and video playback without flash or anything.
So the other day I was annoyed over YouTube making Rekonq crash because of dearest Adobe Flash, which made me look into the experimental HTML 5 support YouTube provides. The shocking news: it does not work (what a surprise). Fortunately QtWebKit is using Phonon, the magic multimedia system of Qt and KDE, so I tried with the VLC backend for Phonon and it worked even less than the default xine backend did… HTML 5 support, yeah, sure😛
Jonathan Riddell however suggested that both audio and video work somewhat well in the GStreamer backend, which made me realize that there is hope after all. I moved out to fix the VLC backend. A task that sounds a lot easier than it really was, because QtWebKit is a very large beast and without having any clue about “web engine/rendering stuff things” it is very difficult to find one’s way. But after running QtWebKit for a day or two through gdb and breaking at all sorts of functions I knew the follwing:
a) The VLC backend is at an early point in a wrong playback state which makes QtWebKit fall on its face (which affects both audio and video).
b) Something horrible is going on that makes videos not work.
After some poking and whining in the VLC backend I finally got audio working by ensuring that a call to Phonon’s pause() function would actually switch to a pause state and allow resume at next call to pause (which is archived by a somewhat nasty hack that needs to be fixed by some additional foo in libVLC). Awesome! At this point video also had sound, but no moving pictures. After some more research it turned out that QtWebKit explicitly deactivates the way the VLC backend would usually show a video and instead requires the backend to manually paint the images in a given area (so ultimately control about playback timing is done by QtWebKit and not the backend). Luck was in my favor, as only recently libVLC grew easy to use support for hooking into playback and getting frame by frame.
Having implemented this magical way of making the pictures move, we now have video and audio support \o/
Feel free to test the Git version from gitorious (requires VLC >= 1.1.1).
PS: A testing page for OGA, OGV and WEBM is available here.
PPS: YouTube is still not working, most likely because it is passing some weird URL which makes VLC run into HTTP 403 errors. Dear YouTube, do you not like us?😦