Monday, June 30, 2008

OpenTTD - All work and no play makes CJ a dull boy

As life has been really busy recently, I'm working from home and it's both a bit uncomfortable and choatic, yesterday I just had to break out the old OpenTTD (which may or may not be an acronym of "Open Transport Tycoon Deluxe"). I have mentioned it before, but it always brings me a smile as I'm reminded that my classmate Ludvig Strigeus largely built or was was involved in both OpenTTD, ScummVM, µTorrent and now is working on Spotify. Impressive guy!

As I played not on the easiest setting and had forgotten how to signal trains, I wasn't particularly successful and restarted one game and slowly went bancrupt on the second, but still, it was lovely.

Transport Tycoon remains a very addictive game, it's not very good for any sort of realistic simulation and you always tend to end up in a mess or just filthy rich, but still it is a nice way to tickle that brain and your sense of dealing with what's urgent. :-)

Which reminds me I've got both work and other play I want to get done, ta'ta!

PS. You can download the game from the homepage, and necessary data files can be found here

(Update: It's really too nerdy, but because I'm playing around a bit with screencasting and I wanted to show someone my Transport Tycoon transport network, here we go: , recorded and uploaded with Jing which I really recommend for those simple screenshots or explanative screencasts)

Wednesday, June 25, 2008

My public keys

It's a bit silly with all the FRA-debate, but I figured I should anyway publish my public keys / certificate properly. Do note that the corresponding private keys are just kept encrypted with passphrases on my disks, thus not as reliable as if kept in some security tokens (I will however get some soon).

My X.509 / S/MIME certificate:

$ openssl x509 -in mail.der -fingerprint
SHA1 Fingerprint=D1:50:3A:C3:76:FD:37:95:58:4D:A4:F1:A9:1E:D4:F9:49:0C:8C:95

My PGP / GnuPG public key:
Key fingerprint = 0349 0021 407D 9955 A3B5 FC18 1294 5939 1766 8EFA
Version: GnuPG v1.4.8 (Darwin)


Since I got OneSwarm, my friends may go ahead and add me:
(Update: I had some issues with that the GnuPG key was expired, so I had to update that and get it onto a keyserver. The fingerprint is unchanged, and I will probably get myself Aladdin eToken PRO or an AET CrypToken any day now)

(Update 2: Now I have managed to securely generate and store on an Aladdin eToken PRO my X.509 / S/MIME certificate, so that's a new one now)

(Update 3: I got OneSwarm, so I added my public keys here as well)

(Update 4: I changed laptop and the server is offline currently, so changed one OneSwarm keys)

Wednesday, June 18, 2008

How to download webradio and webtv, RealMedia (RTSP) or Windows Media (MMS) streams easily - a comprehensive ripping tutorial

Now that it's once again time for P1 Sommar (check out my talker schedule!) for me it also means it's time to freshen up the streaming media dumping skills. I happen to enjoy my webradio with music left in rather than the crippled music-less media files Swedish Radio / SVT provide. Below I in three (an optional fourth) steps show that there is little practical difference between providing something through a streaming media protocol or providing it for download - it is pretty easy to download and save it for later anyway.

The case is pretty simple - when you listen to webradio or webtv, the browser window commonly embeds a player which is given the URL of a "playlist" provided over regular HTTP. The playlist however contains the URL of the actual media stream, commonly "hidden" to only be accessible using a streaming media protocol like RTSP or MMS. Media providers think (or hope, or assume, it doesn't really matter) that players able to receive these protocols will not allow the user to save the media stream to be replayed later and thus are more relaxed about letting licensed content be broadcasted through streaming media protocols. Fortunately using an open-source player like MPlayer or a download manager like FlashGet, also media streams can be saved like a charm.

The gray areas of radio ripping is discussed over at (in Swedish) and also don't miss out my list of great SR and SVT shows with all URLs conveniently in one place. Curiously this is not a simple case of piracy - the DMCA would surely be quick to decide, but there are plenty of arguable fair use purposes for stream ripping such as saving the content for replay later, bringing it with you on a portable player or converting it into a suitable format. The case is especially strong for content which is anyway broadcasted over analog radio or TV and as such are anyway freely available. However, IANAL, do this on your own risk and don't break any applicable laws.

  1. Open the source code of the page or frame the regular player is embedded in. Get the playlist SRC by looking for the player object parameter "PARAM NAME="SRC" VALUE="...". However, what comes after "VALUE=" commonly does not start with "http://" and thus is a relative URL, see the next point for where to find the base location to be able to download the playlist. Update: You can also try right-clicking on the Real Player embedded in the page and selecting "Copy clip URL" instead of even touching the source code

    If the playlist SRC above was a relative URL, get the base location from the location displayed in the frame or page info:

  2. Add the location and the playlist name together to download the playlist from that URL. The playlist then contains the stream URL at a line saying "src=":
    $ wget -O "030702 Mustafa Can.ram" ""
    $ grep src "030702 Mustafa Can.ram"
    <audio src="rtsp://"/>

  3. Download the stream with a program capable of receiving the protocol at hand (see wikipedia lists for rtsp:// and mms://, though I know for a fact some download programs like FlashGet for Windows or CocoaJT for Mac (in French ?!) and others listed here are also very capable of that). Below I use MPlayer, which works the same both for Linux, Windows and Mac OS X (except under Windows the binary is mplayer.exe, and under Mac OS X you should use /Applications/MPlayer OS X ):

    $ mplayer -dumpfile "030702 Mustafa Can.rm" -dumpstream "rtsp://"

  4. If you want to, edit the audio with Audacity, convert it to mp3 with lame or even iTunes. Video you can edit with JayCut and convert with FFmpeg or any from the jungle of mediocre video conversion tools there are out there, like Handbrake for Mac OS X or Videora iPod Converter for Windows.

    A note about file types, with RealMedia the playlist is a .ram file and the audio or video contained in .ra, .rv, .rm or .rmvb streams. With Windows Media, the playlist file is commonly an .asx or .asf file containing a .wmv or .wma stream. Also, in an .asx file, the stream address is found by the href parameter. I have not looked currently looked into ripping other formats such as Quicktime or Flash video.

And friends, remember sharing is caring!

(Update: I found out that my MPlayer OS X is both a bit outdated and while it has RTSP-streaming support, it doesn't seem to have the RealMedia codec. So to be able to decode the .rm to .wav on my mac before I clean it up in Audacity and export to wav, I found out the monster package of codes FFmpeg (it's Mac gui sister program is the somewhat less reliable FFmpegX) of course does it excellently like this:
$ ffmpeg -i foo.rm foo.wav
I also checked out the blogger exertia who seems to like Videolan/VLC, but while it's better maintained than MPlayer OS X, it didn't help me this time)

Sunday, June 15, 2008

No, this is the world's coolest bike! (City Bike "Conference Bike")

When it comes to crazy ideas, Fredrik Härén has mentioned mashing up the concepts of karaoke and a taxi ride ( = "karaoke taxi", it's a great success in some southasian country) and I wrote before how cool I think the Uno segway-turned-motorbike is... but this is absolutely adorably crazy! This I actually ran into something while biking around in old town - the "7-person party tandem bike"!

The company City Bike calls it a "conference bike". What it is is simply seven seats on a frame, with tandem pedals connected by a circle of universal joints. Everyone pedals, the guy in the back steers with a solid-looking steering wheel and the passengers can put their glasses in the cup holders in the middle. I can't wait to try it out for a night on town! Also, I envy the advertisement potential of this monstrosity...

There are so many reasons for not doing this kind of venture, I can imagine the conversation - "What about the legality of a seven-person bike vehicle, or the insurance issue? Has anyone else tried this before? Nevermind, let's do it!" Christian Rudolf has written about (in Swedish) about the entrepreneurship spirit of my home village Gnosjö as summed up by "generosity and helpfulness as a strategy", which I think is maybe at least one side of a multifaceted truth... but if I would similarly sum up Estonia, it would be (at least today) "audacity and disregard for experience as a strategy". Several times have I met Estonians who want to do or achieve something, where the Swede would argue for how it would not work, but the Estonian does not care. "Estonians are great, we have wifi and the most high-tech country in the world!" boasts the Estonian, and like a bumble-bee... sometimes they of course succeed and manage to soar. There are several traits shared between the Estonian and the Gnosjö spirit, though they are still very much not the same. Read more about how I feel about moving from Sweden to Estonia in the Emigrant Blog.

Finally, remember that there are no shortcuts to the perfect sound (notice Amazon customer tags such as "snakeoil" and "waste of money" - product page here and the Swedish hificlub selling praising the same cable)!

Friday, June 13, 2008

Dead poets rising against surveillance (brilliant video)

As I've been writing before, finally the Swedish media are being awakened (largely by the "blogosphere" or whatever you wish to call the social internet) about the abyss of surveillance society suddenly appearing right in front of us. It's not every day I am touched to tears by a youtube video, unfortunately it's only understandable in Swedish. Again from Erik at Framtidstanken:

Another notable participant in the debate is Patrik Fältström, our own IETF guru sharing his expert opinion and linking further to other good articles on the topic.

By the way, I am convinced that we're focusing too much on how Big Brother may watch us, and are forgetting about... our other siblings. I've got to write something about sousveillance and the clowd soon.

Wednesday, June 11, 2008

Amazing inventions of art - the Telectroscope tunnel between New York and London

As I read recently in Framtidsbloggen (in Swedish), someone has dug a tunnel between New York and London! Or well, that's only how it seems - someone had the idea of the Telectroscope:

Very simple - the tunnel is of course too long to walk through, but it should be possible to point telescopes towards each other in the US and England, and have people see each other, right?

Well, through the wonders of telepresence and Internet, it's been made possible in a real-life installation! Go to London (well, that's far enough for me, but that's beside the point...) and wave to your family in New York! Or maybe we'll see meeting places which exist in several places, connected with telepresence walls? Fiction so far, but telepresence is still my hobbyhorse...

(Update: Even before I published this piece, Sven Paulus managed to send me this touching piece about telepresence between Israel and Palestine... cool!

Also, an acquaintance of mine has visited the Telectroscope in London, and says the simple things were fascinating, like that it was day in New York... and that the news telling of the scope didn't mention it as fake or a piece of art, just that it was a relative of the creator who came up with the idea for the secret optics to accomplish the thing)

(Update 2: Erik Starck sent me the strange Greyworld World Bench which enables school kids in different parts of the world to share a park bench and a chat with each other. Without 3d-screen though, this doesn't become as charmingly accurate as the Telectroscope)

(Update 3: There would be no island in the middle, as the sketches claim :-)


Stoppa FRA-lagen - Jag har skrivit till en riksdagsledamot, har du?

Subject: Angående FRA-lagen
Date: 11 June 2008 10:48:30 GMT+03:00

Hejsan Alf,

Jag heter Carl-Johan Sveningsson och skriver angående den föresteående voteringen om den nya FRA-lagen. Du känner nog inte till mig, men jag är son till Lisbeth som du delade hus med i Gränna och byggde även en gång i tiden hemsidan åt Maria Larsson medans hon fortfarande var riksdagsledamot från Gnosjö. Vidare är jag civilingenjör i datateknik från Chalmers med inriktning på datasäkerhet, varför jag tycker mig ha god insikt i problematiken i fråga.

Vad jag har hört om förslaget till FRA-reglering som ligger framme så verkar det så skrattretande svindlande att jag nästan förutsätter att det inte godkänns, men för säkerhets skull vill jag skriva till dig ändå.

I dagsläget jobbar jag i Estland med att hjälpa ester att skydda sig mot liknande illegal övervakning. Vad det har lärt mig är den oerhört viktiga principen att "om man förbjuder integritetsskydd kommer bara brottslingar ha tillgång till det". Jag vill försäkra dig att för någon med den minsta möjlighet att köpa sig kompetens som min så är den mesta FRA-aktivitet i princip tandlös, bara oskyldiga drabbas och avlyssnings- och övervakningsskydd blir dessutom allt mer tillgängligt. Vill du verkligen vara med om att genomföra ett lagförslag som innebär det största bakslaget för individens frihet i svensk historia, utan några vederlagda positiva effekter?

Alf, vi behöver din NEJ-röst, och vädjar till dig att rösta rätt den 17:e juni.

Med vänliga hälsningar
Carl-Johan Sveningsson, Tallinn

(Update: So, what this is about in Swedish is that there is a suggestion for new regulations for the Swedish national Defence Radio Establishment which essentially would mean an orwellian wet dream.

On June 17th the MPs are voting on the suggestion and the "party whip" is swinging to make MPs from the majority government parties vote according to the government line - approving the suggestion, while we want them to vote NO.

4 MPs deviating from the party line is enough, which is why I wrote a letter to the one I have at least a remote personal connection with, the former leader of the Christian Democrat Party, Alf Svensson. The girlfriend suggested I'd write a local MP I had voted for, but that didn't seem as interesting. Besides, I wouldn't even know who would be considered "my MP".

Estonians who couldn't care less about Swedish civil liberties and surveillance may instead mourn that Estonia today signed the Treaty of Lisbon)

(Update 2: Yep, again with info from Erik Starck, this is starting to take off. News publishers, journalists and party youth organizations are pleading for the parliament to reject the law suggestion. What will Alf Svensson vote?)

Tuesday, June 10, 2008

Now I would buy an iPhone! If only it had buttons...

Yesterday the lesser of two annual events in the Apple world took place - the Apple WWDC - World Wide Developers Conference keynote (the more significant one being the January Macworld Expo).

Apple are really amazing about being able to create a buzz about every little thing they are doing. They used to broadcast the conference keynote live, but nowadays (apparently not for technical reasons) they keep them for a while but bloggers provide both live text and commentary. The day afterward, the event is available over QuickTime.

Of course, yesterday's event was focused on the iPhone (and is of course in both and NyTeknik). Some have complained that the keynote provided little juicy news for developers in terms of hardware or development tools, but the biggest thing for me is the new 3G iPhone, with GPS capability and roughly half the price of the old iPhone. The deal is: 8GB 3G iPhone with GPS at $199 * ≈ 1990 EEK ≈ 1190 SEK ≈ 127 € ≈ "Twice as fast, half the price" (with significant coolness added). I am very very tempted at getting one now.

Still, the major hurdle I've learnt of the iPhone remains - it has no buttons... It was the most revolutionary thing with the iPhone, to use as much as possible of the device surface for adaptable buttons and display, great. Though, it also requires way too much attention to input, it gives no feedback to touch so it may be the worst example but - how can you SMS while drivingwalking for example?! I have inherited a Sony Ericsson Walkman phone, and it may be subtle, but it has a lot of features you require of your phone! Finding contacts, forwarding SMSs or texting, it is really fast when you don't have to pay attention to what you're doing and can just let your fingers type away. So Apple, it's great that you have been trying to cater to enterprise users, now please figure out a way to work with the iPhone even with minimal attention, and it will really start selling.

The second most interesting bang from the WWDC is the wealth and variety of applications which seem to be coming for the iPhone. Sure, games are fun, but I am really keeping a keen eye on location aware and social mobile applications like Loopt or for that matter, my friend Peter's social picture messaging application MoYuMe (I recently found him in a video by some Latvian blogger). If you think the GSM phone, IM and SMS have changed the way people live and what they do, the scale of the mobile social revolution is breathtaking. Reactionaries object that who cares about all that social and mobile silliness, but remember they said the same about mobile phones and SMS. You heard it here first (well, unless you heard it somewhere else before), and for a head start of understanding the revolution, head over to our friends CommonCraft explaining Twitter in plain English:

(Update: In Sweden Telia and in Estonia EMT will be selling the iPhone 3G, and at least in Estonia you can pre-sign up already. I think EMT's ad is much cooler than Telia's press release at least)

(Update 2: Teliasonera has released it's price plans for the iPhone 3G:

price plantraffic includedmonthly feeiPhone 3G 8 GB,
tied 24 months
iPhone 3G 16 GB,
tied 18 months
iMini100 minutes,
100 SMS, 100 MB
299 SEK1695+24·299 =
8871 SEK
3295+18·299 =
8677 SEK
iMidi250 minutes,
250 SMS, 250 MB
489 SEK995+24·489 =
12731 SEK
2695+18·489 =
11497 SEK
iMaxi1000 minutes,
1000 SMS, 1000 MB
859 SEK1+24·859 =
20617 SEK
2195+18·859 =
17657 SEK

No surprise really, after the initial pretty useless buzz Apple released, $199* has the asterisk so to say - the subscriptions you this time probably will be tied to in the store are pretty horrendous. I think a "3G-soap" as they are called in Stockholm, a 3G USB modem for the laptop costs roughly 500 SEK per month, and that's still less limited and a lot more versatile than what you can do with an iPhone and 250 MB.

Swedish wireless access prices are generally ridiculous compared to Estonian and I hope to see that EMT will be less scotch. Also, count on me writing a piece on how to forever get rid of the despited "high speed extreme use"-clauses in broadband contracts, also discussed in Swedish here)

(Update 3: Estonian EMT has released the iPhone 3G too now. If I understand the newsletter correctly the contracts are all 24 months, so it's not comparable to the 18 months column above. I was saying that I think traffic should be cheaper in Estonia, but instead it seems they simply do not provide any "maxi" plan, and charge a bit more than Telia does in Sweden.)

price plantraffic includedmonthly feeiPhone 3G 8 GB,
tied 24 months
iPhone 3G 16 GB,
tied 24 months
i550100 minutes,
100 SMS, 100 MB
550 EEK
(= 329 SEK)
2670+24·550 =
15870 EEK
(= 9486 SEK)
3960+24·550 =
17160 EEK
(= 10257 SEK)
i890250 minutes,
250 SMS, 250 MB
890 EEK
(= 532 SEK)
1490+24·890 =
22850 EEK
(= 13658 SEK)
2780+24·890 =
(= 14429 SEK)

Tuesday, June 3, 2008

My event + flickr mashup bargain and revolutionizing your Internet citizenship

When I was in Gothenburg I attended a concert with my friend Jolta's band Tongångarne and made a sweet bargain out of it. Since I was anyway lugging my camera around I elected myself the event photographer and sold the pictures for a signed copy of the album being released (and a good release party it was, for a charming album!). This is all nice and good, but I also put the nicest of the pictures (which are pretty red-tinted, I know and am sorry...) on my flickr account, registered an event on the band's page and tagged the pictures with the proper event tag, and voila, the event has photos attached!

Now this sounds very complicated, but the thing is that it goes along the lines of everything else related to web2.0 and the social web - it's really easy to actually do, the complex thing to understand is what you can do and how it benefits other. Creating the event was just a matter of clicking a button on the band page, typing in the name of the event, the venue and the date. Someone had already registered info for the venue "Musikens hus", so I just selected that and clicked confirm. However, the accumulated effect of having people registering events on, connecting them to cities, venues and dates, discussing them and photographing them, it becomes an amazing crowd thing!

The one to recently really succeed in explaining all this is definitely CommonCraft's Lee and Sachi LeFever with their cute animated videos on youtube, check it out below. In plain English. Also on the Young Scientists' new forum, Gustav Johansson recently wrote a post (in plain Swedish) about TED - ideas worth spreading, that's worth checking out too.