Extract audio from AV container

A while back, I posted a link to a program for splitting off the audio of an FLV file.

The linux equivalent would be to use mplayer, your video swiss army tool ๐Ÿ˜‰

I’ve put it into a convenient KDE (3) service menu entry (copy paste in a file in $HOME/.kde/share/apps/konqueror/servicemenus):

[Desktop Entry]
Encoding=UTF-8
ServiceTypes=video/*
Actions=extractaudio

[Desktop Action extractaudio]
Name=ExtractAudio
Name[en]=Extract audio
Exec=mplayer -dumpaudio %u -dumpfile %u.dump
Icon=sound

Now you should have an action “Extract audio” when you right click on a video file. It should work on all mplayer supported video files.

Boot process explained

It’s always nice to be reminded of the more important things in life, like how computers boot, *ahem* ๐Ÿ™‚
Seriously, as a computer enthousiast, it’s like I _have_ to know about it, yet I don’t seem to be able to remember all the details ๐Ÿ™‚
So guys like duarte chop it into nicely digestable pieces, ideally suited as bed time story material, so it can enter your subconscience when you go to sleep =)

Indie game spotlight: cave story

I accidentally came to know about this great freeware game because it’s getting rereleased as WiiWare by these guys and here is how it happened.
When the game got released back in 2004, TIG was the first to take an English interview with its Japanese author Daisuke รขโ‚ฌล“Pixelรขโ‚ฌย Amaya.

Doukutsu Monotagari aka Cave Story is a 2D non-linear platformer in its most true sense. ๐Ÿ™‚ It makes you feel back in the nineties, the graphics are pixelish and the music and sound effects are so cheesy, but that is all just part of all the fun! I am certainly no hard core platformer but when I started playing this game, I just couldn’t stop until I got defeated by some boss. ๐Ÿ™‚ So I’ve warned you, it’s quite addictive. ๐Ÿ˜‰

cave story

The gameplay is extremely well balanced and there is quite some variation. I don’t know how big the game is, but at the current pace, I’ve seen quite some environment variation and weapon upgrades. It’s quite fun to clear the screen with a rocket launcher at level 3. ๐Ÿ˜€
All in all, it’s quite a polished game, you just gotta love it. ๐Ÿ™‚

Try it yourself:
First, download the binary (hint: he only made 1 game in 2004 ;))
Then patch it with English translation

Btw, it runs fine on wine/linux!

more wii plots

So after all today’s hard work, still some time for a bit wiimote fiddling ๐Ÿ˜‰
I extended my test app to show the raw accelerometer data.


wiimote accelerometer data

A few words about what is which graph and the color coding:
The left graph shows the same as 2 days ago, except, I switched the colors to remember the meaning more easily. ๐Ÿ˜‰ Red is for Roll =) and blue is the pitch. These data are calculated by the wiiuse library.
The right graph shows the raw accelerometer data. It is simply showing the x (red), y (green) and z (blue) component of the acceleration vector.

The experiment here shows 2 rolls to the left (and return), followed by 2 translations to the left. One could argue that a translation to the left, from the accelerometer’s viewpoint, is just the same as a roll, since both are changing the gravitation vector temporarily in a similar way. I’d say there still seems to be a difference.. ๐Ÿ™‚

Paul, I’m open for discussion ๐Ÿ˜‰

Wiimote experiment

Okay, so I finally got to it. A few months ago I bought a wiimote to play a bit with the api’s floating on the net. It was until yesterday that I actually tried a driver, and since that seemed to work okay, I decided to give it a try myself. My simple goal, being an app plotting the raw inputs. However, it took me a 2 hours more than expected (1 =)) and also a lot more blood, sweat and tears. ๐Ÿ˜‰ particularly because I made a lot of mistakes due to me being too tired ๐Ÿ˜‰ So I will keep it short for now as I want to go to sleep.

I choose the wiiuse library as it seemed adequate for the job and still active (and even cross platform!). I started from the included example and tried to wrap it into a Qt app (hence I named it example-qt ;)). The obvious choice for drawing is using QGraphicsView. However, for once ;), I took the effort to see if there are no existing Qt graph plotting libraries. And this just happens to be the case. ๐Ÿ™‚ Meet the excellent QWT lib. It couldn’t be more fit for the job. The site is (almost) nothing but the api docs, but that seemed sufficient. One second I thought this lib would not be qt4 ready, but it has been ported!

Quite a few seconds and segfaults later ๐Ÿ˜‰ I got this:
wii experiment

Nothing fancy, but it does show the roll and pitch!! =)

Note: the wiimote survived the experiment ๐Ÿ˜‰

Portal on linux

Portal: Prelude triggered me to finally try out Portal under linux / wine. Actually the only games I played since I’m on linux are Urban Terror and … Peggle Extreme. ๐Ÿ™‚ Don’t laugh, it was a Steam test. ๐Ÿ˜‰ And I didn’t have any space to install anything bigger. Until I bought that 0.5TB drive a while ago, still didn’t fill that one up, so today I decided to try it out under opensuse 11.0 with KDE 4.1 and wine 1.1.6. I somehow messed up my steam install under 10.3 and since I got 15GB free on my suse 11 partition and up to date video drivers (since it is also a kde 4 tryout install), this seemed like an ideal environment. Indeed, it actually went very smoothly.

  • install latest wine from build service
  • install iexplore gecko replacement by surfing to an url: wine iexplore http://winehq.org
  • download steam msi (exe no longer needed!) and run: wine start steaminstall.msi
  • see the update fail and resume it manually: nice -n 19 wine Steam.exe or wine steamTmp.exe SelfUpdate “Steam.exe” 14
  • create a desktopshortcut from steam. you have to use kde 4.1 folderview if you actually want to see it ๐Ÿ˜‰
  • run!

Some screenshots to prove ๐Ÿ˜‰


Portal on linux / wine Portal on linux / wine

While framerate seems okay and my savegames and profile seem intact, I did experience some graphical glitch: when looking through portals, sometimes white flicker occurs. I didn’t investigate any further as it’s late enough.

Portal: prelude

As a huge portal fan, I’m delighted to read we can already taste some prequel goodness through this great mod.

Apparently, the author worked on it very secretly for some time so obviously he was very disappointed when Valve announced it would also make a prequel. ๐Ÿ˜‰ However this motivated him to finish it as soon as possible. Also, Valve didn’t see any problem or violation in this project and even offered its help.

Thanks to Klaas for the tip.

Optimizing the linux boot process

How fast your linux boots, really depends on your distro and of course it’s their job to have it boot as fast as possible. They try as much as possible scenarios and make sane decisions on where to optimize. But they can’t test every possible configuration, so what if you just end up with a suboptimal situation (possibly without realizing? :)). Even if you know your boot takes too much time, how would you locate the culprit(s)?

This is where Bootchart jumps in. Bootchart is a tool which makes it possible assess resource consumption throughout boot time. It is really simple to set up, just add a kernel param! Data is collected in memory using tmpfs and dumped to disk at the end of the boot process. This data then gets processed by a java app which outputs an SVG/PNG.

It seems the opensuse guys, actually coolo, used this tool to optimize boot performance for opensuse 10.3. I must say I am quite satisfied with my opensuse boot times although I do have the impression that 11.0 seems to be a tad slower than 10.3. So I’m definitely going to try out this tool and compare the results ๐Ÿ™‚

Thanks to my brother for the tip.

Part 2

Accidentally, a few hours after writing this post, I ran into this very interesting article about boot speedups presented at the Linux Plumbers Conference last month. (Watch a modified fedora boot in 5 secs on an eeePC)

KTvTune 0.2

This version fixes an important crash bug when trying to make multiple recordings in the same session. I never do that, that’s why it was still in there for the 0.1 release ๐Ÿ˜‰

New addition is the ability for timed recordings which you can specify either by duration or by end time (see screenshot). Next logical step is to be able to schedule a timed recording.

KTvTune 0.2

Download at kde-apps.org