Older blog entries for rbultje (starting at number 48)

2 Nov 2004 (updated 2 Nov 2004 at 08:11 UTC) »

Today will be TV day. I'll be one of those morons just watching TV to see which of the two creeps is gonna rule the world for the next four years. Yes, creeps, because if it were for the looks, both would be straight from hell.

However, I can only hope that the US voters will look beyond looks and populism. As much as they are the same in most areas, that effectively means getting rid of Bush. Anything's better than a lunatic that wants to cut neuropharmacological research funding because it's unchristian. Just to mention something else from what all the others will say (wars, international treaties & contacts, ...).

Polls in the Netherlands amongst students show that +/- 85% of the people (ok, so students) wants Kerry. I'll share the majority opinion, just for once.

Volume Applet:
So the volume applet was almost perfect, until people started filing bug reports against it! Eek! Bad people. Screw you guys! I fixed most of 'em, except for the remaining two where I really don't have the slightest clue what they are talking about or what it has to do with the volume applet. I guess I should close those as well. Yay for an empty bugzilla. Oh, that deserves a screenshot!

GStreamer Recorder:
So it had to happen some day, that I would release 0.0.1. It'll be soon. It's basically ready, but requires a new gst-plugins and gst-ffmpeg release because fixes in those are essential for the physical well-being of gst-rec. I can't wait to release. Hopefully, people will use it. It can record to a variety of formats, including MS-MPEG4v3 (in ASF), MPEG-4 (using either of XviD, DivX or FFMpeg's wonderful encoders) in AVI and, of course, Ogg/Theora+Vorbis. I was initially planning to just support Ogg/Theora in this first version, but given the rather poor encoding speed combined with the fact that the others "just work", I didn't really care to remove it. The preferences screen could probably use some UI love, though.

So it's perfect? Nah...

  • Doesn't use videorate/audiorate yet
  • Some more (a/v sync related) options need to be hidden from the user since they can possibly screw up synchronization
  • Overlay refreshes aren't perfect yet, although they're pretty good now
  • No image when recording from a webcam (or any non-overlay-capable video source)
  • So many more things that are listed in the TODO
  • It needs a release

So those of you paying close attention to my blog (don't you all? :) ) would've noticed that my last screenshot of gst-rec actually contained a test image rather than a screenshot of some popular TV series or a good movie. You know why? Because my cables weren't long enough to fit between the TV (one side of the room) and computer (other side of the room)! Of all things that could possibly go wrong, this is the worst. Because you can't fix it apart from going to a shop to buy new cables.

So what's next?
DVD ripping, video transcoding, video editing, it's all there in my magical vision! We've got the widgets and the engine in gst-rec (ok, ok, so editing is a bit more difficult - but who cares). I just need more time. Oh, and Totem will rock your world. More soon! :).

Back from the death:
I looked at GStreamer Recorder again tonight, for the first time in something like a year or so. I was annoyed by pretty much everything, but I won't rewrite it. Instead, I'll fix all the issues that I'm so annoyed by that I'm scared to release it because everyone will laugh at me, and then release it. Just to make Thomas stop nagging me. Isn't it pretty?

I just rewrote the overlaying code in the GStreamer video4linux element (need to copypast that to the video4linux2 element), because the old code caused a hellofalot of flickering (and took 10x as many lines of code). The next issue to fix is format selection. We used to use filtered caps for that, but nowadays, fixation is the way to go. Lastly, I'll remove all dynamic codec/muxer selection code for now and just default to ogg/theora, and that should be enough for version 0.0.1. Like anyone would want to record a divx movie. -EDONTCARE. :).

And for my own pleasure, I decided that GStreamer Recorder is a stupid name, so I will rename it before the release.

Totem in Fedora
Yes, we're in! I was happy to see Totem (based on a GStreamer backend) becoming a part of Fedora Core 3. I was even happier to see that people generally seem to like it. That, of course, doesn't mean that we're done now. Quite the contrary: now the play only *starts* to shift to second gear. I hope I'll be able to keep up with it.

That brings us to the next gear-shifter. Yeah, say after me: I want Totem in the standard GNOME desktop! We're ready for it. Now, surely this isn't up to me since A) I'm biased and B) I'm not the Totem maintainer. But I can always lead the Totem-in-GNOME PR campaign. Let's bring it on! Bastien said he'd look at the whole thing after Fedora Core 3 is released. What do other people think?

I've been fixing a lot of Ogg-related issues in playback for the past few days, and current CVS seems to be quite forgiving for most of the movies and music files out there. It's not there yet, but I have a pretty good clue of the missing bits'n'pieces, also for other (annoying) bugs. Good feeling. It's just a huge todo list, basically:

  • playbin (our playback backend) needs to support subsequent (chained) tracks in files, e.g. for chained ogg. It will currently just play the first. Related: do you show length per track? Total length of all tracks together? How? this is important for both Ogg and DVD.
  • playbin currently doesn't forward all init errors, e.g. "soundcard is busy" or "soundcard does not exist". Instead, it just says "could not open" which isn't really helpful.
  • inside GStreamer and playbin, we should make errors more userfriendly. "Don't know how to handle $mimetype" isn't really useful if it really just means "the file you loaded has media type $media_type, but you don't have plugins for that. Please install them." because you're loading a mp3 and fedora doesn't support that by default.
But we'll get there... :).
Release time:
I released a new version of the the GStreamer FFmpeg plugin today. Try it today!

Disc content detection:
Wrote some code (similar to the code in gnome-volume-control, in hindsight) to detect the type of disc that the user is opening in his favourite movie player. Didn't commit, mainly because the audio CD input plugin in GStreamer is giving me headaches, as in: it eats my memory, it fails to play and if it doesn't do that, it just crashes.

GStreamer:
Talking about a heavy day... All of us worked hard on a release of GStreamer Plugins, when Wim suddenly found a stupid streaming media bug in the typefind element of our just-released source. So we decided to go for a quickfix there, too. To add up to the fun, Bastien released a new Totem right after, which is the first Totem release to include the newly rewritten GStreamer backend. The combination of all this (possibly accompanied by the latest pre-release of gst-ffmpeg) makes a very powerful media player. Try it out today, and don't forget to report bugs, non-working media et all on Bugzilla!

C#/Mono:
So I'm enjoying some C# in the evenings right now. Not bad, not bad at all. I still don't know a lot of things, but I'm getting somewhere. I'm currently messing around with window embedding, which requires me to know the XWindowID of a Gdk.Window (as an ulong; in GDK, you use GDK_WINDOW_XWINDOW ()), and I haven't found a way of getting that yet. Also, I'm wondering how to handle GErrors in Glib#. Still lots to learn!

Totem/GStreamer:
Finally got an annoying race in the GStreamer backend disappear. Also found a general performance issue (as in: the Xine backend suffered from it as well). In its current state, I'm actually enjoying Totem/GStreamer a lot. Note that this still requires current CVS of all, we're working on releasing all this for your general pleasure. :).
5 Oct 2004 (updated 5 Oct 2004 at 14:06 UTC) »
C#/Mono:
Since I like Java so much, I thought Mono deserved a fair chance, so I decided to write my own hello world in Mono, and didn't get too far. I was actually able to write my own Gnome.App and Gnome.Program subclasses and get myself a first window shown. Long live MonoDevelop, awesome tool. So then, I decided that the empty window was somewhat, well, empty, and that it needed menus.

Now, one hour later, I still don't know how to add menus. Muine, where I'm trying to learn from, appears to use glade, I would like to just use Gnome.UIInfo for this. So my first try:

    private void
    AddMenus ()
    {
      UIInfo[] file = {
        { null, null, "Quit", "Quit", null, UIInfoType.Item },
        { null, null, null, null, null, UIInfoType.Endofinfo }
      };
      UIInfo[] menus = {
        { null, null, "File", "File", null, UIInfoType.Subtree, file},
        { null, null, null, null, null, UIInfoType.Endofinfo }
      };
      
      CreateMenus (menus);
    }

Which gives me:

Constant value `null' cannot be converted to Gnome.UIInfo(CS0031)
Constant value `null' cannot be converted to Gnome.UIInfo(CS0031)
Use of unassigned local variable `menus'(CS0165)

Right. I would actually expect predefined members for Quit and File, but that's probably just me. Can anyone tell me how to add menus to a Gnome.App?

Update:
So I just copied the stuff from the GnomeHelloWorld.cs in mono CVS. Next problem: the anonymous CVS server of Mono.

[rbultje@tux GStreamer]$ cvs -d:pserver:anonymous@anoncvs-spain-1.go-mono.com:/mono co gst-sharp
can't create temporary directory /tmp/cvs-serv21785
No space left on device
[rbultje@tux GStreamer]$ cvs -d:pserver:anonymous@anoncvs-spain-2.go-mono.com:/mono login
Logging in to :pserver:anonymous@anoncvs-spain-2.go-mono.com:2401/mono
CVS password:
Unknown host anoncvs-spain-2.go-mono.com.
[rbultje@tux GStreamer]$ cvs -d:pserver:anonymous@us-anoncvs.go-mono.com:/mono login
Logging in to :pserver:anonymous@us-anoncvs.go-mono.com:2401/mono
CVS password:
Unknown host us-anoncvs.go-mono.com.
[rbultje@tux GStreamer]$ cvs -d:pserver:anonymous@anoncvs.go-mono.com:/mono co gst-sharp
can't create temporary directory /tmp/cvs-serv19708
No space left on device

Now what do I do?

GStreamer & Totem:
Fixed a few "hangs" (actually those aren't hangs; they're rather just operations that take many minutes) in the AVI demuxer and worked on the Realmedia demuxer together with Stephane. Actually succeeded in playing back a certain realmedia clip on the commandline, but it didn't work in Totem quite yet. We're making small steps in the right direction, though.

Life:
Went off to a fair in Leiden with two friends. There was a rollercoaster, a vertical shot (where you sit in a giant sphere attached to elastic wires and are launched into the air) and some other cool attractions that we enjoyed. Had a really good time there.

So there it came today. As I was watching an episode of Sex and the City (yes, I really love that now that I've lived in Manhattan), I suddenly noticed how much this episode touched upon things that I did there. Auch. Had to make some "home"sick phonecalls to friends from New York after that. I miss Manhattan.

Java & GCJ:
For the first time in a few years, I decided to pick up my Java programming, ahem, talent and do a course at the computing science faculty of my university. I'm actually a biomedical student, so those outside trips to other faculties are usually considered somewhat odd. I like them, though.

This time, I had to write some random software in Java. Well, so I did yesterday night and the night before. Half of my time was actually spent getting java to run. This is awkward! The worst thing of all is that I just don't know how to get GCJ to run. If it was up to me, I'd happily use GCJ, but... I just can't. It took me a few hours to get GCJ to compile my first binary. I have a bunch of ten .java files and want a binary. So I do:

gcj -o myapp *.java -I. --main=Application

That didn't quite work, I got warnings about the main func not being defined, even though it clearly exists. In the end, I had several case comparison issues, where my package was called "application" and my class "Application" (in Application.java). The Sun Java SDK, which I instealled because I was getting desperate, had the same issue, by the way (it gets worse if the class is "Application" in application.java; no way you'll get that to work -without obvious pointers to what's wrong, of course). I removed the package definition and things now worked fine in the Sun Java SDK. Even GCJ finished compiling. However, it didn't run. It couldn't find the Gtk AWT libraries. At this point, I didn't know what to do and gave up. Back to Sun Java SDK...

I guess my main point is: why is this so hard? It just works(tm) under Windows. Why doesn't GCJ just work out-of-the-box? Why is Sun Java SDK case-sensitive under Linux and not under Windows?

Totem, GStreamer, DVD, etc.:
Totem's CVS now uses playbin instead of libgstplay. Playbin is GStreamer's latest attempts at getting proper playback, and I'm fairly happy with it. Current CVS of gst-plugins, gstreamer core, gst-ffmpeg and Totem play quite some media already, while I'm continuously on a fixing rampage to get more media to work fine. I guess my main frustration right now is matroska playback, which I'm working on right now. DVD playback (and vob) is also being worked on at the moment.

Interestingly, I was able (yesterday) to rip my first DVD ever using GStreamer. This requires current CVS, obviously. The following commandline:

gst-launch oggmux name=mux ! filesink location=/tmp/file.ogg { dvdreadsrc location=/dev/cdrom ! dvddemux name=demux .audio_00 ! { queue ! a52dec ! audioconvert ! rawvorbisenc ! queue ! mux. } { demux.video_00 ! queue ! mpeg2dec ! ffcolorspace ! videoscale ! video/x-raw-yuv,width=384,height=288 ! tee name=t ! { queue ! theoraenc ! queue ! mux. } } } { t. ! queue ! ffcolorspace ! ximagesink }

will rip your DVD to an ogg/theora+vorbis file of size 384x288; it takes about 6 hours for a one-and-a-half-hour DVD on my laptop. It will also show an image while ripping. Who's gonna write video-juicer? Note that it's not perfect yet. Sound is a bit crackling (similar to Fluendo's webstream) and it hangs on EOS. I didn't debug any further yet. The resulting file is playable, though.

39 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!