25 Jan 2006 15:28

VLC

At P. of D.'s prodding, I gave VLC a try. Despite the horrendous website, I am happy to report that VLC is a beautiful and effective media player on OS X Tiger. It handles Ogg and FLAC out of the box, it's compact and OS X native, it has a convenient .dmg installer, and it has a really neat icon.

I only have three wishes for VLC. First, I'd like to be able to drag links to songs and playlists onto the playlist. You can drag onto the dock icon, which is almost good enough, but for a truly usable interface it should work to drag onto the playlist too. Second, I'd like it to handle podcasts. I think this is in the works and hopefully we see it in the next version, or in 1.0. Last but not least, I really wish it would remember the playlist from session to session.

I think all of the above is minor compared to the consideration that this is a beautiful, simple, native player that does Ogg and FLAC and Speex out of the box, and is free software. Oh, and it does the right thing with the following playlist:

#EXTM3U
#EXTINF:0,lam.m3u
http://lam.fugal.net/songs/lam.m3u

Think about that for a minute. Now if I could get that LAM guy to clean up a few bogus URLs in lam.m3u...

24 Jan 2006 22:03

XiphQT

The wait is over! XiphQT is here. It's got a little room for improvement, but it's a proper QuickTime codec for QT7 (e.g. Tiger) that plays Ogg. In particular, iTunes' ugliest corners show through. Streaming is a bit broken, and there's some metadata problems. But this is primarily iTunes' fault, and as it's closed-source there's not much one can do about it.

So now that I have more RAM (didn't I tell you?) and Ogg support, I actually sometimes listen to music on my laptop now. But mostly I listen on the desktop with my nifty XMMS xml-rpc remote I hacked up in no time flat thanks to ruby. As a bonus I get IMMS there too, although it's contaminated with my wife's preferences too.

I hear tell that VLC supports Ogg and isn't half bad. I'll have to give it a try tomorrow. If I like it you'll hear about it. If I hate it you'll hear about it. Otherwise you'll know I'm still listening to Sugar Tax on the desktop speakers...

20 Jan 2006 12:03

Using iptables to set ToS

X-Lite and Twinkle don't have a way to set ToS. So let's get iptables to do it:

iptables -A POSTROUTING -t mangle -p udp -m udp --sport 8000:8009 \
    -j DSCP --set-dscp 0x2e

That sets the DSCP for UDP packets with a source port of 8000-8009 to 0x2e, which is the Expedited Forwarding PHB. You'll need to pick a range that works for you. Both X-Lite and Twinkle use 8000 as a default, so that's what this rule says.

20 Jan 2006 08:31

0xb8

So I learned this morning that ToS is old-school. According to RFC 2474 we now have the Differentiated Services Field. I came to this realization as I was looking for the ToS bits in Ethereal, which decodes that octet as the Differentiated Services Code Point (DSCP). I found this great article on Precedence and DSCP which explains both ToS and the newer DS Field very well. Go ahead, we'll wait for you to read it.

RFC 2598 defines the Expedited Forwarding PHB, which is what "most" VOIP implementations use, supposedly. The DSCP for Expedited Forwarding is 0x2e. However, the whole octet includes the two unused bits, so left shift twice and you get 0xb8. This is the magic number to use in Asterisk:

; sip.conf and/or iax.conf
[general]
tos=0xb8 ; Expedited Forwarding DSCP

You'll need to restart Asterisk in order for this to take effect; reload is not sufficient.

The Expedited Forwarding DSCP is backwards-compatible with the old ToS field. It breaks down to precedence 5 and the low delay and throughput fields set.

I was rather surprised and disappointed to learn neither that X-Lite, which I use on my iBook, nor Twinkle, which I use in Linux, seem to have any way to set the ToS field, and just use 0x0. If you know how to set ToS on either of those programs I'd sure like to hear it.

15 Jan 2006 18:23

Aluminum

I don't remember where I first came across "aluminium", but it was not more than a year ago. Thankfully I've never had to endure someone pronouncing it, and it's rather easy to ignore the extra I. Today I somehow got on the subject again as I was aimlessly surfing, and decided to find out just what the real story is. You see, the Brits will swear up and down that aluminium is correct, and most North Americans are oblivious to the fact the the rest of the English-speaking world prefers aluminium over aluminum.

As I see it, they're both correct, but aluminum is preferrable. They're both correct because standards bodies say they are. Some group of important people in chemistry in the US declared aluminum correct, and likewise in England aluminium was declared correct. International groups prefer aluminium but recognize aluminum as a variant.

So shouldn't I do the cosmopolitan thing and accept aluminium in spite of my American blood? No, because the Brits named it aluminum in the first place. Ok, the one Brit who discovered it and had the privilege of naming it: Humphry Davy. He first named it alumium, but then changed his mind to aluminum, to match the Latin root. Then the equivalent of a high-brow Anonymous Coward Slashdot comment in the Quarterly Review (a British political-literary journal) strong-armed the usage of aluminium because it sounded "more classical". I kid you not:

Aluminium, for so we shall take the liberty of writing the word, in preference to aluminum, which has a less classical sound. (Q. Review VIII. 72, 1812. Cited in OED.)

Davy didn't stick up for his original spelling, and apparently used both interchangeably. So did the rest of the world for 30 years. Then aluminium became commonplace everywhere, including America. I've heard conflicting reports as to why we went back to aluminum, but go back we did and I say it's at least as correct as the other spelling. You can tell any Brit that won't concede that point that he's a 19th century couch taxonomist. That ought to be fun.

But the real reason I prefer aluminum is simply that it's so much easier to pronounce, and my tongue is lazy. Forget what you grew up with for a moment, wouldn't you rather have four syllables over five? Aluminium is also a bit tongue-twisting, but of course the British love a good tongue-twisting word so that's not a good argument.

Well anyway, there you have it: more than you ever cared to know about aluminum. A nice good authoritative-looking reference without all the opinion and babbling you find here can be found at transporteon.com.

13 Jan 2006 07:46

Hardware Keys on iBook 10.4.3

Update: The same thing just happened on the upgrade to 10.4.4. Again, shutting down the laptop and cutting all power did the trick. I didn't have to hold down the power button.

The 10.4.3 "trick or treat" update of OS X Tiger caused my hardware keys (volume, brightness, power button, and even, oddly, the About This Mac menu option) to stop working. I tried a few reboots, heard a rumor on /. about the airport update so updated that, and searched and searched for a solution. Apparently people with TiBooks have had this trouble since Tiger first came out and were told, more or less, to wait for 10.4.3. Well maybe whatever they fixed "broke" things for us iBook G4 users. Or maybe it was something entirely unrelated. In any case, one of those sites gave a recommendation that I tried as a second-to-last ditch effort (the last would have been to boot into linux and see if I could jump-start things from there). Shutdown (you may need to do this from the command prompt: sudo halt), take out the battery and disconnect the power, and (for good measure) hold down the power button for one minute. That last bit may not be necessary but the TiBook people talked about a reset button that I don't seem to have so I figured it couldn't hurt. When I booted up, things worked as they should. Phew!

12 Jan 2006 19:29

MPlayer vs. XScreensaver

Are you sick of the screensaver kicking in at all the wrong times while watching a video with mplayer in full screen? The mouse doesn't work. The now-not-fullscreen window is all distorted. Sometimes the keyboard is unresponsive until you type the magic incantation (hint: alt-tab). Well I'd had enough.

Just to show how lazy I was, the answer is right in the manpage. You just need to specify the -stop-xscreensaver option. But that's a pain, so what you really want to do is this:

mkdir -p ~/.mplayer
echo "stop-xscreensaver=yes" >> ~/.mplayer/config