WMV works, too

Fixing the WMV issues that I talked about earlier turned out to be remarkably simple.

  • The early-EOS turned out to be a small data-feeding bug in Totem’s plugin itself, where we would sometimes write on a full buffer, which returns -EAGAIN. Mozilla has some convenience functions to make sure this works OK.
  • The lag-on-start was, as expected, a lagging audio stream. Using some quick math in the audiosink, I was able to workaround it. Not perfect, but it works.
  • Time slider works.

Seeking still doesn’t work, but I don’t think that’s possible if we operate on direct stdin. I haven’t found mozilla “input seeking” or “page reloading with offset” functions in their API…

The end-user effect of all this is that with some of my latest patches (see Bugzilla), you can now play WMV and Quicktime movies in your browser. Although untested, MPEG should be similar to WMV and thus work as well. Note that A/V sync is not perfect in WMV9 webstreams, I’ll need to have a better look at that. Next, I may work on something like (WAVE/MP3) audio files, which are sometimes used as background music on websites, or otherwise as audio newsstreams (on-demand).

Quicktime finished

Previously, I wrote about trying to implement support for fancy quicktime-containing websites in the Totem-Mozilla plugin. Today, I finished it. It looks like this:

What’s so special about this static website? Well, the three “$number P” images in the red circle are actually all Quicktime “movies” (containing one JPEG frame). Clicking them will open a new Totem window which will play the actual video.

Next, I’ll be working on improving ASF support, so that the plugin will work properly when acting on an ASF stream embedded in a website.

Totem Mozilla Plugin practical tests

now that the Totem Mozilla plugin is relatively stable, it was time to test and make sure that various often-used media formats play back fine. Playing fine means that all UI components behave consistently (seekbar, video window / seek slider composition, etc.) and do the correct thing when pressed. The result for now is in #326033 (fixes performance issues in Quicktime plugin when used for streams), #326299 (fixes crash in ASF demuxer when used for streams) and #326301 (adds seeking and fixes time slider updating in Mozilla plugin).

Quicktime (and derivatives)
Mostly tested on Apple’s trailers site. With current CVS and patches:

  • + Slider updates correctly.
  • + Seeking works (!).
  • - Recent h264 samples do not appear to work. :-(. Other media formats work fine. In short, don’t click the “HD” videos for now. Needs a quick fix. Update: fixed in #326318
  • - Some pages contain multiple video sources, and only one of them plays, since the others give an annoying error dialog that the video Xv port is already in use (possibly depending on your video card). This should obviously not happen.
  • - I’ve encountered one crash (of the whole desktop) when I quickly click some links while Firefox pops up an error dialog while I click on, appears mostly stable otherwise. Possibly a bug in X or firefox itself.

ASF (WMV, WMA)
Tested using some videos from GeenStijl. With current CVS and patches:

  • + It plays, with audio/video (including WMV3 if you use PitfDLL)
  • - If audio lags in the stream (i.e. starts >3s after video), the first 3 seconds of video will take up to a minute to play, i.e. it looks like it takes very long to get started.
  • - Since we operate on stdin here (from Firefox), it is not (yet?) possible to seek in those streams. Unsure if this is fixeable in an easy way.
  • - Time slider does not appear to work yet, although this may be related to the next item.
  • - Somehow, it stops playing after a few seconds when embedded in a webpage. I can not reproduce that on the commandline yet. May be some odd javascript acting up or something like that. Alternatively, some odd EOS signal is bugging us in the unseekable source after we do type detection. Will need to look closer.

MPEG
I tested MPEG a few months ago and didn’t look back since then. From what I remember:

  • + basics work, …
  • - … but stuff like seeking is not possible, similar to the story above, and time slider updating doesn’t work yet since we cannot retrieve the length of the sample (file-length). I’ll need to work on a fix here.

I hope to get some of this stuff fixed before GNOME 2.14 is released. If other people are interested in taking up some of those tasks, please go for it, but remember that this takes some basic knowledge of Totem and GStreamer internals. Also, wider testing and new bug reports are always appreciated.