Vuvuzela-freier Ton zur WM als MP3-Stream

EDIT: Ich habe das ganze deaktiviert, war mir rechtlich doch etwas zu heiß ;)

Ton am Fernseher aus, Internetradio, PC oder Smartphone angeschaltet — und schon sind die Vuvus leiser :)

EDIT: Viel einfacher: Stream im Browser

Kurzanleitung: 1. Beliebigen Streaming-fähigen MP3-Player installieren. Gut sind z.B. VLC oder mplayer. 2. Diese Datei im Player öffnen: Playlist

Ich habe auf der Grundlage von Blogpost 1 und Blogpost 2 einen Livestream vom jeweiligen Fernsehsender gemacht, der heute die Spiele überträgt. RTL ist nicht mit dabei, da ich mir nicht sicher bin, ob die mir nicht direkt einen Anwalt schicken ;)

Problem bei der ganzen Sache ist natürlich, dass da eine Latenz entsteht. Der icecast-Server puffert nur sehr wenig, die MP3-Player meist recht viel. Mplayer lässt sich mit mplayer -nocache http://radio.kevin-read.com:8000/vuvustop.mp3 dazu überreden, das Buffering sein zu lassen. Bei VLC kann unter Einstellungen/Input & Codecs/Standard-Cachelevel auf “Niedrige Latenz” gestellt werden. So hat man etwa eine halbe Sekunde Verzögerung, was denke ich in Ordnung geht. iTunes z.B. eignet sich nicht so gut meiner Erfahrung nach.

Remove vuvuzela from live TV with sox

Annoyed by vuvuzela horns? Here is a short recipe for removing it on Linux with mplayer and sox, could easily be adapted for other tools and maybe other platforms:

  1. Install sox and mplayer: sudo apt-get install sox mplayer
  2. Make sure your DVB-C/T/S card works under Linux: Big fun, sorry, see elsewhere.
  3. Run these commands: mknod audiodump p In another shell / terminal tab: sox audiodump.wav -t wav — bandreject 233 10| sox -t wav — -t wav — bandreject 466 30h|sox -t wav — -t wav — bandreject 932 40h | sox -t wav — -d bandreject 1864 50h Then run mplayer to play video and feed audio to the pipe: mplayer -ao pcm dvb://ARD

Inspired from this blog post

Blocky, pixelized images from URL

If you load an image from an URL on older Android devices, you might find that they are chunky, blocky, as if pixelized. I did this with the following code snippet:

protected Bitmap downloadImage (String fileUrl) throws IOException {
    URL myFileUrl =null;          
    try {
         myFileUrl= new URL(fileUrl);
    } catch (MalformedURLException e) {
         Log.e(TAG, "Cannot load image", e);
    }
     HttpURLConnection conn= (HttpURLConnection)myFileUrl.openConnection();
     conn.setDoInput(true);
     conn.connect();
     InputStream is = conn.getInputStream();

     return (BitmapFactory.decodeStream(is));
}

In my case the problem was that the images I downloaded where progressive PNGs. As soon as I saved them as non-progressive (i.e. standard) PNG files, everything worked fine. Android 2.1 didn’t show this behaviour, but 1.5 certainly did.

Fans to fanboys: A marketing instrument

How companies make fans into dervish fanboys to immunize them against competitors arguments and make them spread their marketing messages. Composed by an Apple and Android dev.

There are factions among modern tech-oriented crowds as surely as there ever where. Apple users have become used to being laughed at from the windows camp (“They don’t know anything about computers.”) and more recently iPhone users have faced snide comments concerning Apples censorship of the App Store. Android users have had nearly two years to become immune to smug comments about their “ugly” and “copycat” smartphone system. I could go on listing factions and abuse patterns, but the rules are always the same.

The origin of these grubmlings are, in my opinion, two factors. For one, a gadget is an expensive purchase that typically not only solves a technical problem (surfing on the go, calling people, …) but also serves as a status display, saying “Behold, crowd, I have enough ressources to buy this new shiny smartphone.” We don’t say this straight out though, so as to not appear smug and supperior, we have to rationalize the purchase decision especially against cheaper alternatives. This could come in the form of technical specification citation (“Ha! 1Ghz Snapdragon easily kills the 600MHz iPhone CPU…”, “The GUI of the iPhone is way more fluid…”) for technical guys or in more emotional terms (“This is just better”, “It’s way cooler”). Only human, and not what I want to get into.

The second source is a subtly (well mostly subtly) crafted input from manufacturers that feeds on the need for rationalization, turning it into something stronger. The goal is to imbue the sense that this product is more than the sum of its parts, it has a moral (Google) or metaphysical (Apple) component that you will only get from this manufacturer. It is superior in so many ways, and by extension, so are you, the buyer. So why don’t you go out there and spread the word, convert the heathen users of mediocre products (“they don’t know any better”) to the Good Side (tm). Apple has always understood this and used this technique bluntly but efficiently (“I am a Mac”), and the competition has caught on and is now using the same dirty tricks against Apple.

I am sick unto death of being used in some marketing mindgame. I value the technical merits of both iPhone OS and Android and see that there are different design philosophies and technical needs involved. I really don’t want to waste my days away explaining to some poor deluded fanboy why I value both platforms. And please, please, everybody, stop helping corporate marketing games spread. The shows have become really gritty, with CEO 1 spouting nonsense at company 2 and vice versa. Go do that in the tabloid please, but not on a trade show.

If you feel the need to convert your fellow man to “the right way”, at least have to courtesy to marketing companies to post a bill to your idol company for doing their marketing grunt work for them.

Help spread the word and make it stop! Reddit

BOOTMGR is missing after deleting Vista partition

I replaced the broken Vista installation on my first partition with Ubuntu. The Win7 installation on the second partition refused to boot afterwards with the fabled BOOTMGT is missing message. Apparently it just added itself to the Vistas BCD, not unreasonable I guess. So I wanted to do an automated repair from the Win7 DVD, but it didn’t list my Win7 partition as OS. Great…

The solution is to mark the second partition as active. This relic from the 80s is apparently still used :( So just boot into Linux, run sudo fdisk /dev/sda, type p and double check that you are seeing the correct hard drive (if not, quit with q and then re-run with /dev/sdb or /dev/sdc), check if there is an asterisk next to your windows partition. If not, press a followed by the partition number. Now the Automated System Repair will find the OS

Detect Windows version from Linux command line

I have a disk with a broken Win Vista x64 installation and a working Win7 on it. I wanted to replace the Vista with Ubuntu. The trick question was: which partition was Win7 residing on, and on which Vista?

I ended but grepping for Vista in the System folder and found it in WindowsUpdate.log, but on one partition only. So if you find traces of “Vista” in System/WindowsUpdate.log its a pretty safe bet that this is not Win7 or XP :)

Apples App Store as major step forwards and backwards

I like the concept of a central software repository. Android and iPhone benefit hugely from it, as Linux distributions have for centuries (side note: I’m getting old ;). Whats not to like? No more googling for “wordpress application upload”, then sifting through the results, checking reviews on 10+ differents websites, virus checking and so on. Its basically Amazon Marketplace for software.

Although politically difficult to implement, this is what MacOS and Windows sorely need. Security would be much improved with centralized updates, and especially not so tech-savvy users would have a easier time finding software. C’mon Microsoft, start your lawyers working on the necessary legal bindings and dark rites that vendors and (gasp!) open source guys need to sign to get in the Live Marketplace (anyone reminded of a slaughterhouse? :).

But, what I see as a big problem is the introduction of one new concept to the game: Exclusion of software. If users become used to this now, they won’t balk if it is implemented on desktop operating systems in five years. If Apple would forbid you from using Firefox now, you’d laugh in their face. In five years time you might not think twice about it…

But we need the review processm right? It’s good for us, right? There is one upside of Apples review process of new applications: They make sure their style guide is observed, which makes it easier for users to use the apps, since they all behave in a similar fashion. Now lets compare that to the downsides or “supposed upsides” of this idea.

  1. Vendors have competitors and rivals. They will shut them out from their market, and cite other reasons for doing so. This is bad for so obvious reasons, and todays anti-trade law will probably be insufficient to deal with this.
  2. It will not prevent security incidents. Even source code access could not guarantee that the publisher excludes malicious apps like Homebanking apps that steal your credentials. It is very expensive and time-consuming to audit code, and nearly impossible to audit software without source access.
  3. Third parties have agendas and will use this single point of failure to realize them. Cell phone companies dislike VoIP and will squash it. Soon media corps might dislike you streaming music via Pandora.
  4. As soon as an app store starts filtering, it assumes a guardian role over apps and is thereby liable for their quality. Certain categories of apps bring higher legal risks, like user-generated content or media sharing. Add into this mix the diversity of laws and morality world-wide, and you get bizarre bans like newsreaders, that could, after much work, display partial nudity, but in 99% of cases are completely harmless.
  5. Arbitrary Censorship: Some vendors dislike even indirect criticism of their own apps and will kick out apps that could replace them. This might not seem like a big thing to hardcore fans, but think on what innovation the platform is missing by this filtering!
  6. Cracking incentive: As soon as people can’t run all the apps they want on the system, it will attract hackers with time on their hands that are looking for a challenge. With time, they will be successful, no security is absolute. After they can run their app, everybody else can run pirated apps. Apples App Store is the best example of this. I’m not saying people won’t investigate pirating with a completely open platform, just that it will take much longer (See PS3).

So even for a closed ecosystem like iPhone OS this process is highly hurtful. And malicious apps have to be removed from the App Catalog by law anyway, so users still get the same level of protection without the process.

I’d rather have a plain rating system to guide me into choosing an app that is right for my task at hand and well-integrated into the system.

Thoughts on the iPad

Apple unveiled the iPad yesterday, and I’ve been mulling over the said and unsaid details of the launch, and what I perceive as consequences for the industry.

First, there is the device itself. Its basically Apples spin of the Tablet MID / Touch Book / other brand name idea — a low-specced netbookish touchscreen device. It has some things in common with the “hot cake” of mobile computing, but also differs in several key aspects:

  1. No Intel. Interesting. A mysterious 1GHz ARM processor. Should pack enough punch for browsing, reading emails or ebooks, and (naturally) for iPhone apps. Pros: Very light weight and really long battery life. Also, I would have loved to sit in on the discussion when Intel first learned that Apple chose the arch-nemesis for the next Gadget :)
  2. Obviously, no keyboard. I take it this means that Apple sees the netbook segment of devices being used mainly in areas that require little to no typing, i.e. casual browsing or YouTube fun instead of writing dissertations. This actually fits the usage pattern of my Samsung NC10 quite nicely.
  3. Touchscreen. You wouldn’t want to use this for designing web pages or images. Good for gaming, browsing and phone-like apps. Again, for non-business uses.

So it seems that Apple has taken to the hardware level what Microsoft and Intel tried to enforce with business deals: Netbooks are for play, expensive notebooks are for work. So far, so good. While it has less computing power, a smart web browser and frugal operating system will feel quite at home here. Also, by being non-x86, you avoid the whole XP / Win7 mess where consumers want to run the applications they know from their “real” PCs on their netbooks and then grumble when the performance sucks. Here, former iPhone users will be delighted when they see their iPhone apps run even faster, and finally on an up-to-date resolution screen too. Brilliant move.

This might have interesting and far-reaching effects on the whole MID area of gadgets. For years there have been announcements of ARM tablets that haven’t materialized as yet, mainly because there is no right OS and software. Windows is a no-go. Even if there was an ARM port, it would be way too top-heavy and bulky for the machines. There was no right Linux distribution for the task. And, more importantly, up to now consumers wanted the familiar windows “experience”.

This has changed now. ARM tablets will probably be the next big thing. Windows is for your work laptop, there is no mental connection between the tablet (=gadget) and a work-computer anymore. Incidentially, Apple will probably have paved the path for Chrome OS or Moblin, clearing the path for this new family of gadgets. I seriously hope that both go forward but will expect more impact on the industry from Chrome OS, as I don’t see Intel really creating an ARM contestant, and Moblin is quite tightly tied to Intel.

Apart from the hardware, there is the price. Boy, that is one seriously cheap piece of hardware for Apple. I will not comment on Steve Jobs famous “We don’t know how to create a computer for less than 1000$ that doesn’t suck” — time will tell if the iPad sucks. A more serious route is thinking on construction costs. Touchscreens are expensive, and the bigger, the costlier. An iPad seems to be an iPhone on steroids: More RAM, more horsepower, bigger screen, (probably) bigger battery. All that costs more. Why then does the iPad retail for about the same price as an unbound (=not simlocked and subsidized) iPhone? Especially considering that Apple also gets some grapes from the mobile phone company that sells the iPhone? It now becomes clear why the iPhone contributed more to Apples revenue than desktop and mobile computers combined. It also shows that Apple will continue to increase their mobile gadget efforts, which might result in less power expended in their computing section.

The third interesting notion is the eBook reader idea. I can’t really comment on eBooks since I prefer dead trees as basis for my reading. But as the iPad has about the same screen size and resolution as a 10” netbook, I cannot see reading documents on this device. Reading a US Letter or DIN A4 page on this screen will be at least harming your eyes. This means scrolling a lot or reformatting text, which sounds annoying. But I’ll reserve judgment until I have read a few pages on this device.

Interesting times, interesting times…

PC-like key bindings on a Mac

I use a PC keyboard with a standard german layout on my mac, because I like ergonomically shaped keyboards. I also like to only have to memorize one keyboard layout. Since I already know (and often use) my PC keyboard layout, here a few pointers on how to use this.

In the Library folder in your home, create the KeyBindings folder if it doesn’t exit. In this folder, create a plain text file called DefaultKeyBinding.dict which contains:

{
/* home */
"\UF729"  = "moveToBeginningOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";

/* Cmd-Left */
"@\UF702"  = "moveToBeginningOfLine:";
"$@\UF702" = "moveToBeginningOfLineAndModifySelection:";

/* Cmd-Right */
"@\UF703"  = "moveToEndOfLine:";
"$@\UF703" = "moveToEndOfLineAndModifySelection:";

/* end */
"\UF72B"  = "moveToEndOfLine:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";

/* page up/down */
"\UF72C"  = "pageUp:";
"\UF72D"  = "pageDown:";
}

Now most applications based on carbon will use PC-like defaults: page-up/down scroll a page up or down, home and end move the cursor to the beginning or the end of the line. A notable exemption is Firefox. Mozilla, please get this fixed!

Next, to get the standard PC layout for a german keyboard (with Alt-Gr, backslash and all the other layout nastiness), download the layout definition. Place the file in “Library/Keyboard Layouts” in your home. Log off and on again. Go to preferences and open the “International” preference pane. Select “PC-Keyboard, Deutsch”. Everything should be fine.

Now for the last bugger, Terminal.app. For me, the defaults are weird. Page-Up shouldn’t scroll the buffer up by a page, but send page-up to the application running in the terminal! The same for Page-down, Home and End. I used the instructions on this blog post successfully, I might later change ctrl-a to the home key code. If you haven’t changed anything in your terminal preferences (or don’t mind overwriting them), download my plist and place it in Library/Preferences in your home. I have changed the bindings for the “Basic” settings. You should probably quit Terminal.app before you overwrite the settings file.

Block ads and save traffic on phones with a proxy

I’ve been using my brand new Motorola Milestone (the GSM version of the Droid) for a few weeks now and am very satisfied with the device. It’s performant, reliable, fun to use and highly extensible. The browser is sheer joy and miles ahead of the aging Symbian E65 browser I was used before. Having bought an unlocked device (but with Motorola “branding”), I use it with my O2 O UMTS flat with 200MB traffic included, paying less than ten bucks a month for unlimited surfing (you just have to love 3G).

One thing that was annoying me is the high amount of traffic that surfing consumes. I installed a combination of a compressing http proxy and an ad- and annoyance filtering proxy and have been a happy camper since. The compressing proxy will gzip HTML, CSS and Javascript documents and scale down images. The reduced quality of these images doesn’t bother me on the tiny smartphone screen, although the tradeoff between quality and traffic can be customized. The whole idea was inspired by http://pornel.net/iphone/privoxy.

Here a small step-by-step how-to. I installed both apps on a smallish Debian Linux virtual server, other unixish systems should work too.

First, install ziproxy and privoxy: apt-get install ziproxy privoxy (you might want to get privoxy from Debian unstable, as newer versions come with advancements in the ad-blocking rules).

Next, configure ziproxy by editing /etc/ziproxy/ziproxy.conf. First tell it to listen on the public IP instead of localhost by changing Address = “127.0.0.1” to Address = “0.0.0.0” and commenting out the OnlyFrom statement. I would also set the port to a port of your choosing, the default is 8080. Then, tell it to forward all requests to privoxy by setting NextProxy=”127.0.0.1” and NextPort=”8118”. I would also seriously recommend uncommenting the setting PasswdFile and adding your favorite username/password combination to /etc/ziproxy/http.passwd. Open proxies can mean a lot of legal hassles for you and even more spam for the rest of us. The rest of the config file deals with which files to compress and how, I wouldn’ change much here for first tests.

Now lets edit the privoxy config file /etc/privoxy/config. Make sure that there is a line permit-access 127.0.0.1. Now restart both services by /etc/init.d/privoxy restart /etc/init.d/ziproxy restart. Test both proxies by using them with a desktop browser first. You will be asked for the username and password. Check the logfiles in /var/log/privoxy and /var/log/ziproxy if things don’t work.

On my Android phone, I had to go to Settings, “Wireless & network settings”, “Mobile networks”, “Access Point names”, select my access point and then set the proxy to the hostname of my server and the port to the value chosen above. With Wi-Fi turned off, start the browser and enjoy faster loading times. As soon as you join a Wi-Fi network, the proxy won’t be used, which I find fair enough. Loading times are probably as big a problem as rendering times then, and the advertising companies should get their due (as long as I don’t have to pay the traffic bills). Other apps like Google Maps or in-app ads are not affected by the proxy setting.

If you want to see how much bandwidth you have saved, run this awk snippet: awk '{uncomp+=$5;comp+=$6} END {print "Uncompressed is " uncomp;print "Compressed is " comp;print "Compression ratio is " (comp/uncomp*100)}' /var/log/access.log. I’ve saved about 50% up to now.

I’m playing with port knocking at the moment and might write something up about that, for those who are not happy with sending their password over the air.

As an aside, ziproxy doesn’t write the username into the logfile for each request, so sharing a proxy with trusted people doesn’t log per-person - nice.

Last posts

Vuvuzela-freier Ton zur WM als MP3-Stream

EDIT: Ich habe das ganze deaktiviert, war mir rechtlich doch etwas zu heiß ;)

Ton am Fernseher aus, Internetradio, PC oder Smartphone angeschaltet — und schon sind die Vuvus leiser :)

EDIT: Viel einfacher: Stream ...

Remove vuvuzela from live TV with sox

Annoyed by vuvuzela horns? Here is a short recipe for removing it on Linux with mplayer and sox, could easily be adapted for other tools and maybe other platforms:

  1. Install sox and ...

Blocky, pixelized images from URL

If you load an image from an URL on older Android devices, you might find that they are chunky, blocky, as if pixelized. I did this with the following code snippet:

protected ...

Fans to fanboys: A marketing instrument

How companies make fans into dervish fanboys to immunize them against competitors arguments and make them spread their marketing messages. Composed by an Apple and Android dev.

There are factions among modern ...

BOOTMGR is missing after deleting Vista partition

I replaced the broken Vista installation on my first partition with Ubuntu. The Win7 installation on the second partition refused to boot afterwards with the fabled BOOTMGT is missing message. Apparently it ...