A Mac

Recently, I decided to buy a new laptop. After some thinking, I figured: why not a Mac? Makes the OS (commonly referred to as MS tax) that they shove in your ass with new laptops actually useful. And still allows me to run MS Office, crucial for university/research work (and OO.o is useless).

The first interesting thing is to go to a Mac store. The sales people there will quickly and happily talk to you, they’re actually nice guys, until you get to the actual act of buying. “Do you want a dot-Mac account?” and “You’re a student? If you just want to use MS Office and send some email, a regular MacBook may be just as good a choice, and it’s much cheaper”. I bought the 15″ MacBook pro.

Getting Linux to run
OS X is beautiful, with some rough edges. Obviously, I’d eventually want to run a dualboot. After seeing many people be enthousiastic about Ubuntu and getting sick of Fedora (die, yum, die!) small oddities, I followed this howto to get it all to work, and it mostly just worked out-of-the-box. I also like how universe can be added in a single click (somehow, I wish synaptic would always start in advanced mode; how do I do that?). Other distros should learn from this. Yum may theoretically be correct (?), but I don’t give a damn. Ubuntu’s package management really is a bliss.

Not all is fine:

  • Ubuntu’s live-CD installer gives me the nerves. The worst part was where I manually partitioned the hard-disk (to make sure it wouldn’t destroy my HFS+ partition, but just use the partition set aside for “WinXP” using bootcamp). After endless trying, the thing was convinced to either use my swap partition as ext3 and my ext3 partition as swap, or both as swap, that choice apparently depending on airwaves instead of the selection I made two dialogs back. It crashed on me three times, once while pressing forward/back in the partitioning tool, once between formatting/installation and once after the installation after it fails to install grub. Reminds me of old horrible Fedora times. Fortunately, restarting the installer from the live-CD is a lot faster than having to restart the whole Fedora installer process. Also, even though I selected the HFS+ partition to be mounted as /mnt/mac, I had to manually add it to /etc/fstab, and my normal Ubuntu user cannot access documents in /mnt/mac/Users/[my apple user ID]/ (permission denied). Lazyweb, how do I fix that? (Edit: one helpful reader told me to use the same UID for my Apple/Ubuntu user.)
  • sound doesn’t work with Ubuntu’s 2.6.15-23 kernel. With 2.6.15-25 (which contains an upstream alsa-patch for hda-intel merged in), I can only get sound through the Microphone jack (?). Speakers and line-in/out are silent, as also reporter here. Sound appears to be fine on the 17″, so I guess I’ll need to look through some PCI / gpio dumps to get this to work properly.
  • I decided to see how multimedia on the desktop was going. Banshee (which everybody loves, and which should have great iPod support) just crashes when loading /tmp. Rhytmbox actually works after that, but even after installing gst-ugly, -bad, -disgusting, -awful and other such modules, I still couldn’t get my iTunes-ripped m4a files to play. The totem-mozilla plugin didn’t play anything and gave cryptic warnings about “fd://0” that reminded me of ancient history. It probably doesn’t support asf playlists, which is what all big sites serve (no, nobody uses Theora). What a waste. Installing totem-xine lead me into this bug. With the workaround, totem-xine sometimes works, but the mozilla plugin still crashes (only with flgrx, not with vesa). No wonder people use mplayer. Geez. (Note that the Windows Media Player Flip4mac additions for OS X – to get support for WMV/WMA in Quicktime – also don’t work yet on MacIntels, but that’s barely a valid excuse). (Edit: As one reader pointed out, this should read flip4mac, not WMP, of course. Apparently, those are in beta and will come out “soon”.)
  • People tell me suspend/resume on this thing should work. How? There’s only a hibernate button in the session-quit dialog, and IIRC, that is software suspend. Lazyweb, anyone?

All in all, not so bad. Next step: buy a (cheap!) huge USB disk (as recommended by the MacStore sales people), find some decent IDE (Anjuta looks promising) and go do something again.

Posted in General | Comments Off on A Mac

Old bugs stay around for long

I was recently notified of this bug, which apparently means that DVD playback on Fedora Core 4 (or any other version of Fedora Core) does not work at all (crashes inside our ALSA plug-in). This has been around for several months, and must be happening for tons of people using livna or freshrpms add-on packages!

In the end, it’s not a bug, it’s caused by the fact that Fedora Core 4 ships almost-a-year-old packages (0.8.8 was released on March 7th, ’05). Ubuntu 5.10 (Breezy; ships 0.8.11) and SuSE Linux 10 (shipping 0.8.11) appear to be way more up-to-date. Previous attempts at pushing patches didn’t really work out. Bad score for FC here. (Relevant patch is available in the mailinglist thread linked above.)

Posted in General | Comments Off on Old bugs stay around for long

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).

Posted in General | Comments Off on WMV works, too

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.

Posted in General | Comments Off on Quicktime finished

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.

Posted in General | Comments Off on Totem Mozilla Plugin practical tests

Bugs, facts and figures

A long while ago, I contributed to the mozilla plugin in Totem. It worked somewhat, but I kept seeing weird crashes here and there. Unreproduceable crashes, with no clear indication of what’s wrong. Rather than to assume this is related to non-existing issues that I cannot fix and will thus not look at, I decided to have a closer look at the issue, collect facts about the crashes and fix it.

After some research, it appears that mozilla (firefox) unmaps plugins after use and remaps the shared libraries when they’re needed again. That is normal, right? Well, not for me, since this is generally not possible with GObject or glib. The issue is related to type registering and mainloop integration: the Totem mozilla plugin uses dbus-glib for interaction with a separate executable; dbus-glib registers some GTypes, and after a unmap/remap, it will re-register them (because the plugin links to dbus, and dbus is thus reloaded every time the plugin is recreated). However, they already exist in mozilla’s main type register (don’t forget mozilla uses gtk+!), and thus the whole thing collapses. Similarly, it appears dbus-glib does some glib mainloop integration tidbits, and after an unmap of the plugin, the glib-mainloop of mozilla will still call the no-longer existing memory areas in the plugin and this will cause pain and torture.

As a solution, I rewrote the dbus-glib pieces in the plugin to use raw DBus. Nice exercise as for how dbus works, also. The practical consequence of the above is that the mozilla plugin should be a lot more stable in the GNOME 2.14 series. So if you were experiencing odd crashes, regardless of the backend used (Xine or GStreamer), this may well be a good sign for you.

It’s not finished yet. The user experience can be improved a lot, still. I’m currently seeing popups on some sites using multiple media objects embedded in the webpage, telling me that the Xv device is already in use (by the first media object on the page). There’s probably similar issues with the sound device for some people. This needs fixing. Also, performance can definitely be improved, although that may also be related to my crappy download speed…

Contribution facts

It appears Andy misunderstood my comment. I’m not claiming that GStreamer was written by Fluendo. Rather, I’m noticing that most maintainance on GStreamer, nowadays, is done by Fluendo-employed persons. This claim requires data. GStreamer 0.9 core had 86% contributions of Fluendo-employed persons, GStreamer plugins base had 89% contributions from Fluendo-employed persons. The numbers are fairly similar across the other plugin modules. Interestingly, if we count the number of people affiliated with the Nokia 770 project (so this includes the Brazilian Nokia office, Movial, Fluendo and Nokia itself), it gets close to 100% for all modules. As a comparison, the numbers for the 0.8.x GStreamer series are somewhere along the 40%-60%.

What does this mean? It means Fluendo-employed people have been doing pretty much all the work for the currently stable GStreamer series, and they will probably be doing all the maintainance work on it in the near future. Cheers on that, keep up the good work. I hope you guys can fix the issues that I’m seeing, so that I’ll be able to enjoy the recent 0.10 series as much as you guys appear to do.

Script used for those figures is available here, you run it in the directory containing the trimmed ChangeLog of all contributions you want to analyze.

Wishes for 2006

I’ll take my girlfriend to go ice-skating in central park and buy her hot chocolate.

Or, in other words, she saw my homepage (with picture from central park) recently. ;-).

Posted in General | Comments Off on Bugs, facts and figures

Almost there

So it seems I’ve successfully finished quarter 1 in gradschool (chemical biology), and quarter 2 (cell signalling) is well underway, and appears to be going well; that is, better than quarter 1. This back-to-school experience has been hitting me a bit, but I think I’m back into it now. Think about it: readings, assignments. Not that much different from having a good job, but a lot more stressful at times where you don’t want to care.

However, if you do care, it gets interesting. Being able to understand the research you’re doing and talk to your peers is important, but sometimes takes an awful lot of time and effort, depending on the subject. And admittedly, neuronal axon growth may seem like an irrelevant detail in the big picture of life, but for me, it’s currently my whole study subject. And a very interesting one, I must say.

My PI (“head of lab”) is a peculiar person, with interesting ways of motivating people. At times, he will tell me that someone else (a “senior” colleague) made a mistake and that it’s my fault since I didn’t correct him/her. At other times, he will suggest new readings to get to know new techniques, and require me to prepare presentations for a next meeting about that subject. His ways appear to work, though, I’m quickly getting into all this. It just eats a lot of time. At my birthday, I regretfully told him I could not finish one of his requested presentations for the next day because I wanted to go out to a bar that night. He looked at me, understanding though disappointed, and we agreed that I would do it in a less formal way, though still that same day…

Some people… :-).

Around
During thanksgiving, I travelled to Boston with my girlfriend, where we stayed in a hotel and had dinner with some friends of hers from Harvard. People keep telling me how Boston is supposed to be “New York, but smaller and cleaner”. Well, it is cleaner, but that’s not surprise if there’s only ten houses there! I still don’t understand how people can compare the two, Boston is at least a zillion times smaller in all possible aspects. They have good restaurants, though, and the waiters are a lot nicer.

During christmas, I hope to visit DC, for the cultural part of my stay here.

Hacking
So, with all this school- and travel-work, I have had little time to do cool stuff in GNOME. I’ve fixed some small but annoying usability-related bugs in both Totem and the Volume Applet, but nothing big yet.

Related, I noticed that Fluendo released GStreamer 0.10. Interesting release, excited to see the new core. I hope it’s as stable as promised. It’s unfortunate to see that several interesting plugins have not been ported, leading to a huge decrease in media support w.r.t. previous versions. Let’s hope Fluendo will be able to fix that. You don’t want GStreamer to be the “finally stable framework that can still not play my divx” (figure of speech, of course, since I myself ported divx playback almost a year ago).

Posted in General | Comments Off on Almost there

Chemistry tools for the GNOME desktop

I had to make a presentation for one of my chemistry classes here, and they told us to use the excellent (but Win32/Mac-only) ChemDraw application for making our own chemical structures. Since I don’t own a Mac, that didn’t work out, so I went looking for alternatives.

While searching, I found that it is not that they don’t exist. Quite the contrary. It’s just nearly impossible to find what you’re looking for! My first step was to look on the Bioinformatics-for-Linux homepage and see if anything exists over there (I found this page after Googling for ‘linux molecule structures’ or so). The best I could find on that page was RasMol, which is some 60s hippie-style half-console application with its own scripting interface (i.e. you don’t draw atoms; you give it a command to draw an atom or a bond). Eh, whazeggie? Right. After reading the documentation for half an hour, I still didn’t know how to draw the first C atom on the drawingboard and decided to give up and look elsewhere; so I googled for ‘chemdraw linux’, and found an excellent review comparing several of the alternatives. After spending nearly half an hour first trying to compile XDrawChem (which appeared to require Qt, so I stopped), I found a winner: GChemPaint! Lovely integrated in my desktop (but why the toolbar/statusbar?), took me 10 minutes to make RPMs for some dependencies, compiled and simply just works.

Although it doesn’t do everything I need, it does most of it, and the missing bits can be added by hand using some general-purpose drawing application like the GIMP later on.

Posted in General | Comments Off on Chemistry tools for the GNOME desktop

New release of gst-ffmpeg

Yesterday, I released version 0.8.7 of gst-ffmpeg (GStreamer plugin based on ffmpeg, which provides support for encoding/decoding most popular codecs and container formats, such as MPEG-4 and h.264/AVC), and which now includes a free software decoder implementation for the QDesign Music 2 format, a format that is used by a lot of (Quicktime) trailers that you will find on apple.com.
It’s interesting to see how fast ffmpeg is progressing, the momentum in that project is simply amazing. I hope they will soon be able to complete their WMV9/VC1 decoder, which would probably lead to a new gst-ffmpeg release, also. Apart from that, I’m not planning on doing too much more work (though there’s one bug that tickles me…) on or releases for gst-ffmpeg (in the 0.8.x series).

Posted in General | Comments Off on New release of gst-ffmpeg

Life

Went to the cinema today with a friend (J.) and my girlfriend (D.), to watch the overly celebrated (or at least in geekspace) movie Serenity. Not biased by any knowledge of this Firefly-thing or whatever else I’ve seen mention of on slashdot, I considered the movie to be pretty good, although this “small girl beats crap out of army” thing really just doesn’t cut it. Fun nevertheless. Has some Matrix-like and Resident Evil-like elements. Good theme!

Next week, Jeroen (who’s coming over from the Netherlands) and I will be visiting the Gnome Summit in Boston. Not sure yet what I’ll hack on, but I’ll find something. There’d better be hacking, I haven’t touched any code in more than a month now.

Posted in General | Comments Off on Life