Audio channels mixed up on XBMC on Apple TV 2

The XBMC Team has made the Apple TV so much better just a couple of days ago by releasing XBMC for iOS. Unfortunately I ran into some issues when I wanted to play back MKV files with AC3 surround sound. The audio channels were all mixed up. Center speaker came from back right, front right was left, etc. To fix this issue I had to enable AC3 playback “by hand”, as described in this forum thread: http://forum.xbmc.org/showthread.php?t=91729

Also make sure that you have selected “7.1″ or “5.1″ in the System Settings of XBMC. It’s default setting seems to be 2.0.

Starting 1Password with LaunchBar

Launchbar and 1Password are two of these nifty tools, that make working on OSX both even more easy and fun. Unfortunately starting 1Password with LaunchBar does not work, because as soon as you type in the “1″, LaunchBar goes into calculator mode. You could of course disable the calculator, but I personally need this function a couple of times every day.

Here’s how to start 1Password with Launchbar without going into Calculator mode.

Choose “Show Index” from the LaunchBar menu. You need to hit your LaunchBar keyboard combo to show the menu.

Choose “Applications” and edit the “1Password” field by slowly clicking twice (no double click).

Change “1Password” to “OnePassword” or whatever you want to call it. Close and save the Index window.

You can now start 1Password by starting to type “OnePassword”. This doesn’t change the name of the application file, you have just changed the name you have to type to start the application. Actually you could customize all references in LaunchBar like this.

Hope this helped!

Renting US TV shows on Apple TV outside the US

If you have a US-based iTunes Store account, but access the store with the new Apple TV from outside the US, you shouldn’t be able to rent TV shows. The store only shows the “Preview” button, then actual “Rent for 0,99$” button is missing. Apple obviously does a IP location lookup due to TV licensing restrictions, just like hulu.com.

But there is a way around this issue. What you need to do is sign in once to the store with a US based IP adress from the new Apple TV. This can be done by using a US based VPN service. I use blackvpn which will currently give you 2 month free if you use the referral code ZDMXVQU when signing up.

Currently you will only need the VPN connect one time so you wont have to sign and pay a long running contract.

  1. What you do is set up the VPN on your Mac computer according to the VPNB providers guidelines (it’s easy!) using your built in Wi-Fi.
  2. Connect the Apple TV to your Mac with a network cable.
  3. On your Mac enable “Internet sharing” in the Sharing preference pane and select to share “Ethernet” (from the “To computers using” box) to your VPN connection from the “Share your connection from” drop down.
  4. Test if the Apple TV can still access the Internet by trying to load a Youtube video. If it doesn’t, make sure your VPN connection and Internet sharing is set up correctly.
  5. Unplug the power of your Apple TV, wait a couple of seconds and plug it in again. Unplug the network cable from your Apple TV.

After the Apple TV restarted, test the internet connection. Your store location should now be set to “US” and renting TV shows should be enabled. You can even unplug the Apple TV and it will still think it’s in the US. Neat!

Let me know if this did or didn’t work for you.

Webseiten beschleunigen

Was schon seit Monaten die Runde macht, wurde jetzt von Google bestätigt. Die Ladegeschwindigkeit einer Webseite kann ihr Ranking beeinflussen.

In den Google Webmaster Tools gibt es schon seit längerem unter dem Punkt “Labs”->”Site Performance” Details zu der Pagespeed, wie Google (oder besser: der Googlebot) sie sieht. Interessant ist dabei besonders der Graph, der die durchschnittliche Geschwindigkeit der jeweiligen Seite im Vergleich mit anderen Webseiten anzeigt. Der Grüne Streifen zeigt die 20% der schnellsten Webseiten an. Generell sollte man versuchen den Graph der eigenen Webseite möglichst weit in Richtung dieses Bereichs zu bekommen.
google-webmaster-sitespeed

Auf dieser Seite in den Webmastertools gibt Google zum Glück gleich auch Tipps, wie man die Ladegeschwindigkeit seiner Seiten beschleunigen kann. Zu ausgewählten Seiten lassen sich Details dazu anzeigen, was Google an ihnen nicht schmeckt.

Prio 1: Apache konfigurieren

Die Zugriffszeit auf eine Webseite lässt sich vor allem durch das aktivieren der Gzip-Kompression und das Setzen eines Expiration-Dates auf Server-Ebene drastisch beschleunigen. Sind diese beiden Techniken auf Eurem Server nicht aktiviert, machen die Google Webmaster Tools darauf aufmerksam.
Für den Apache 2 Webserver, der wahrscheinlich recht flächendeckend im Einsatz ist, solltet Ihr das mod_expires und mod_deflate aktivieren.

Mit dem Expires Modul lassen sich Server-Header senden, die dem Browser sagen, wie lange er bestimmte Seiten cachen soll. Hier muss man natürlich ein bisschen vorsichtig vorgehen, schliesslich will normaler Weise nicht, dass dynamische Seiten gecached werden. Meist bietet es sich an, die Anweisung zum cachen in .htaccess Dateien zu schreiben, die in den Verzeichnissen mit den statischen Inhalten sitzen:

ExpiresActive On
ExpiresDefault "access plus 1 month"

Diese Anweisung teilt dem Browser mit, dass alle Dateien in diesem Verzeichnis und seinen Unterverzeichnissen 1 Monat lang gecached werden sollen. Sind statische und dynamische Dateien gemischt, lassen sich auch nur einzelne Dateitypen cachen:


ExpiresActive On
ExpiresByType image/gif "access plus 1 month"

Wichtig kann dabei die ExpiresActive On Direktive sein. Ich selbst setze die Anweisungen in .htaccess Dateien. Das ganze ist natürlich auch übergeordnet serverweit möglich.

Alleine durch die Kompression des HTML-Codes durch mod_deflate lässt sich die Ladegeschwindigkeit drastisch erhöhen. Bei dieser Seite wurde das Modul Ende Januar aktiviert.
google ladegeschwindigkeit

Was geht noch?

Diese beiden Maßnahmen sollten schon mal einen deutlichen Geschwindigkeitsschub geben. Ansonsten lassen sich noch mehrere CSS oder JS Dateien zusammenfassen, um die Anzahl der Zugriffe pro Seite niedrig zu halten oder statische Grafiken auf eigene Hosteinträge (z.B. img.onlinenerd24.de) auslagern, da die Browser diese Grafiken dann parallel laden können.
Spezialisten könnten ausserdem anfangen die Anzahl ihrer Apache-Threads zu optimieren. Bei Seiten mit größeren Datenbanken solltet Ihr ausserdem prüfen, ob diese vernünftig indexiert sind, oder ob evtl. ein Bottleneck bei den Datenbankzugriffen vorliegt. Auch das kann die Auslieferung einer Webseite drastisch verlangsamen. Un zwar richtig drastisch :)

Sehr hilfreich bei der Analyse der Seitengeschwindigkeit sind diverse Browserplugins. Hier sei vor allem Googles eigene Page Speed Plugin für Firefox und Yslow von (richtig geraten!) Yahoo! genannt. Auch diese Tools geben ganz konkrete Tipps, um individuelle Seiten zu beschleunigen.

Wer eigene Server betreibt, dem kann ich schwerstens das Programm “Munin” ans Herz legen, um die Vital-Statistiken seiner Maschine im Überblick zu behalten.

Was bringts?

Ich denke von dem Geschwindigkeitsgewinn sollte man sich in der Regel keinen wahnsinnigen Ranking-Boost versprechen, vermutlich ist es eher so, dass besonders langsame Seiten abgewertet werden. Aber mit der Beschleunigung eurer Seite tut ihr zumindest etwas für eure Besucher. Denn wer wartet schon klänger als ein paar Sekunden, bis sich eine Seite vollständig aufgebaut hat…

Update

Dies ist der Verlauf des Graphen für die Downloadzeit einer recht Bilder-intensiven Webseite, nachdem ich lediglich mod_expires eingeschaltet habe. Sie ist drastisch gefallen. mod_deflate lief schon länger, hat bei bereits komprimierten Bildern aber eh keien Auswirkung.

Google ist sich also sehr wohl der Unterstützung des Browser-Cachings bewusst. Ich glaube nicht so wirklich daran, dass Seiten mit großen Bildern lediglich aufgrund des naturgemäss längeren ersten Downloads schlechter bewertet werden.

site-speed-apache-expire-images

Mir fällt gerade ein: Eine thematisch gleich gelagerte Seite, ebenfalls Image heavy rankt in der Bildersuche deutlich schnlechter als die aus dem obigen Beispiel. IMHO ein weiterer Hinweis, dass der Bilderdownload das Ranking nicht stark beeinflusst.

Adding Plugins to Ibator

Ibator (formerly knows as ‘Abator’) is an invaluable code generator to create all necessary code to access database tables with the (also pretty invaluable) Java OR framework Ibatis.
Ibator creates a variety of SQL code to easily build here-clauses to acces your tables. The one thing that is missing is support for the SQl “limit” clause which is offered by Mysql and other popular databases.

A guy called harawata has created a plugin for Ibator, which creates code to easily add “limit” clauses to your db-calls. Thank a lot for this (once again invaluable) tool! You might also want to check out his other plugins.

Ok, so now how to add these Plugins to the code generator? You need to compile the classes with ibator.jar in the classpath.

Then enable the Plugin in your ibatorConfig.xml file within the <ibatorContext>:

<ibatorPlugin type=”AddLimitClausePlugin”></ibatorPlugin>

Finally add the resulting Plugin-file to the classpath when calling Ibator:

java -cp ibator.jar:limit.jar org.apache.ibatis.ibator.api.IbatorRunner -configfile ibatorConfig.xml -overwrite

Of course this will also work when starting Ibator from an ant file.

Are ABC and Apple screwing over LOST fans?

Update:
The Standard Definition version of episode 2 has now been uploaded. Still nothing in HD though. But I think this is pointing to a technical problem at Apple. Way to screw up on the premiere day of one the best shows on TV, Apple!

Last night the final season of LOST started. Apple offers season passes for this season in it’s iTunes store. Previously with these passes you could download episodes as soon as they aired.

It’s has now been 15 hours since the first two episodes of LOST Season 6 aired and they are still not on iTunes. Allegedly the episodes of the new series “Caprica” are delayed 5 days on iTunes! Could it be that ABC made Apple delay LOST before putting it on iTunes?
Also, Apple should be forward in this case and clearly tell when episodes are available, before I actually shell out $50 for the seasons pass.

Of course there is no communication from Apple’s side and I can just hope that a shitstorm breaks loose on blogs and Twitter which warns people of buying TV shows from Apple’s iTunes store.

There is already a mild uproar on Twitter going on among LOST fans.

But probably it’s just a technical issue of some sort. Stay tuned as this story develops…

Update:
I am an iPhone Application developer and had to accept new term of service for putting my Apps on iTunes just today. Probably this also required some maintenance in the store which delays the episodes?

Google Image Search as a search engine in Google Analytics

Google Analytics displays Image Search as “Refering Sites”, not “Search Engine”. Since I have quite some traffic coming from Image Search I really wanted to know what keywords people were using. Internet Marketing Insight has a great solution that will do exactly that. (I never got other solutions that did the URL rewriting in Javascript to work…)

But you can make this script even more useful by adding country-specific referers (like “images.google.com”, “images.google.de”, etc.). Just add the individual hosts with the specific TLD to the Analytics script:

pageTracker._addOrganic("images.google.com", "prev");
pageTracker._addOrganic("images.google.de", "prev");
pageTracker._addOrganic("images.google", "prev");

This will display the specific TLDs individually in Analytics and catch all the rest under “images.google”.

How to set a arbitrary background color for OS X desktop

Apple only “allows” certain (rather ugly) colors to be set as a solid background color on OS X. I don’t even want to go into how utterly stupid I think this is…

Ok, here’s how you can easily set an arbitrary color on OS X.

  1. Save this 1×1 transparent PNG to your “Pictures” directory.
  2. Open the “Desktop & Screensavers” preferences pane in the “System Preferences”.
  3. Select “Folders / Pictures”
  4. Select the trans.png (might not be visible, but the image square is in the directory listing to the right)
  5. You might have to select “Center”
  6. Now you should see a color selector which lets you set your color.

Here’s how the preference pane should look like:
os x change desktop color

Using Admob to monetize your iPhone Application

Couple of weeks ago I signed up with Admob to try out their iPhone In-App advertising system. Since then Admob has been bought by Google, btw…

I implemented the Admob API into one of my most downloaded free apps, which was really easy. Just add a few libs and classes, place a view and you are ready to go.

The interesting part, of course, was how much money can be made through Admob. Admob uses a CPC-based system, much like Google Adsense. Advertisers book ads on the network, they are shown in your app, as soon as somecone touches the add, he is taken to the advertisers website or to his app in the Appstore. And of course you earn some money.

The App I tried it on has been on the Appstore for about 9 month and has constantly been downloaded roughly 600 times a day. This sums up to about 150.000 downloads.
I have never used any tracking techniques to see how often the app was actually started each day. So I was in for a little surprise when I saw the actual ad impressions for the first day.
I have set the App to display a new ad every 30 seconds. This ads up to about 10.000 ad impressions per day, which was quite a bit higher than I expected.
Click-Through-Rate was also at a rather high 4-5%.

All In all this adds up to a revenue of $20 per day for this app.

So here’s the revenue over the past few days. In the last 3 days revenue went up due to higher CPC and more impressions.
admob-revenue

Here’s the sales stats for the past few months (courtesy of AppViz)
app-sales-appviz

So, suffices to say I am quiet pleased with this return. Not getting rich on this, but it’s still quite some money. With this steady income I estimate the app to pay off after about a month, considering the time I spent developing and after that it’s nice passive income for the time being.

Of course 150.000 downloads is pretty good for an app which has never gotten any widespread exposure. But still it stays in the Top-50 of it’s Appstore category in the major markets and gets a decent amount of downloads.

So probably you are wondering if it’s really that easy to replicate this (although small) success. Well, frankly I think it’s luck that my App seems to be used that much. You need to come up with an idea for an app that is used by a very broad range of users and on a regular basis.

Overall I am pleased with the income from my little app and think that Admob can very well be an alternative for monetizing an iPhone app. With now over 100.000 apps in the store the space on the sales charts gets very tight for paid apps and making even $20 per day from a $-,99 App can be quite difficult.