February 25, 2015

Raspberry Pi 2 Model B as a media centre


For a few years now I have been streaming my media to my television one way or the other. My first serious setup1 involved a jailbroken Apple TV 2 running the unofficial Plex client which received its content from my 27″ iMac running the Plex Media Server and SickBeard. With every update of iOS for aTV it became harder for the developer of the client to support the new firmware, so I decided on a stabler scenario by using the device without jailbreaking and with iTunes as a media server. This was a rather convoluted setup where every downloaded video had to be reencoded or remuxed by software called iFlicks in order for iTunes to be able to stream it to the aTV. iFlicks is very nice, as it automatically fetches metadata and artwork for you and allows for easy automation of the whole workflow.
Eventually, the iMac had to go because of lack of space and I settled on a custom built PC running XBMC (now Kodi) and Steam Big Picture on Windows 8 for my media and gaming needs. In addition to XBMC, I also ran SABnzbd, Transmission and NZBDrone (now Sonarr). This setup performed very well, but despite having chosen relatively silent components, a low drone is always noticeable when the machine is powered on. So I had a look at options without as much moving parts as a full-blown desktop PC. Enter the Raspberry Pi.

Raspberry Pi 2 Model B

The Raspberry Pi Model B spawned an impressive array of Linux distributions running XBMC (now Kodi) as a frontend for media consumption. The specifications of the latest model, the Raspberry Pi 2, are quite impressive; a quadcore ARM processor and 1 GB RAM all fitted on the same board with the dimensions of a creditcard. I ordered mine at The Pi Hut as part of their Media Centre Kit. The kit contains the following:

– Raspberry Pi 2 Model B
– 8GB MicroSD
– 5V 2A Power Supply
– Black Case
– HDMI cable
– Ethernet Cable

The Pi Hut processed my order on Monday and I received my package after only four days. Quite fast considering packages generally take some time getting from the United Kingdom to the Netherlands. I was quite shocked by the size of the package, even though I knew of the small form factor of the Pi itself. Assembling the device was relatively easy, though the black case could do with some instructions on how to fit the board of the Pi and when to insert the SD card (before assembling the case). If you’re careful however, everything is quite straightforward, as is the installation of an operating system.


The provided MicroSD card comes with the NOOBS package containing installation options for a broad range of operating systems. You can choose a regular desktop operating system – Debian (Raspbian) of Fedora (Pidora) – or a media centre OS like OpenElec or Raspbmc (now OSBMC). I choose Xbian however, because I read about the fast boot times, low footprint and rolling release structure. The fact that it runs on Raspbian allows you to install other software as well, something which isn’t possible using OpenElec, I believe. Xbian is not listed in the NOOBS installer, but offers its own automated installer. All you need is a computer with an MicroSD cardreader.

Xbian’s installer can be downloaded from the website, but currently has a permissions issue on Mac OS X Yosemite which can be fixed by running the following command in a terminal. Make sure you’re in the same directory as the installer application.

chmod +x /XBian-installer.app/Content/MacOS/*

The installer takes care of erasing the SD card, downloading Xbian and installing it on the card. In my case the installation process reached 100% but never prompted that it was actually completed. I had to cancel the process after a while, but after inserting my Raspberry Pi booted Xbian without a hitch, so the installation actually did complete, so it seems.


Remote administration of a device comes in very handy and you generally don’t have to leave the couch. You may want to give the Pi a static IP address in you router configuration, as it simplifies interfacing with your device. To login to Xbian via SSH you have to use:

Username: xbian
Password: raspberry

ssh xbian@your.raspberry.ip.address

Xbian Config

Xbian Config

There’s also a root user present, but it’s generally not advisable to use this account. The SSH passwords of both root and xbian can be changed in xbian-config which starts as soon as your login to the device is successful. Changing it to something more random is probably quite a good idea. You can manage packages using apt-get as well as perform other system administration tasks the Xbian GUI doesn’t provide.

I made the mistake of messing up my network configuration by trying to add a USB WiFi dongle to my setup. After rebooting I couldn’t make a connection to my Raspberry Pi via SSH at all… Luckily the device supports both wired and a range of wireless keyboards. Using my wireless Logitech MK520 keyboard I was able to restore the ethernet connection. The dongle has since been permanently retired.


I’ve used Kodi on my HTPC to great satisfaction. Using it on a Raspberry Pi is no different. Xbian boots very fast and it also immediately mounted my NTFS-formatted external harddrive containing all my media. Xbian has included read and write support for NTFS volumes by default.

There are a few add-ons for Kodi which I consider to be essential:


A skin by Hitcher which manages to be very stylish and simplistic at the same time. Please note that using another skin than Confluence (the default) might render the Xbian settings menu inaccessible. This menu can be reached from the command line as well or by switching back to Confluence.


This add-on updates your library automatically when media is added or removed.

Kodi File Cleaner

Periodically deletes older movies and TV series based on certain criteria. I set it to delete all my watched episodes after two weeks in order to keep my hard drive clean. Sadly the add-on doesn’t officially support Kodi as of yet, but an update is in the works. In the meantime you can bypass the add-on version checks by doing the following, the script still works regardless of an incompatible version of Kodi:

ssh xbian@your.raspberry.ip.address
sudo stop xbmc
wget https://github.com/Anthirian/script.filecleaner/archive/v4.0.1.zip
unzip v4.0.1.zip -d /home/xbian/.kodi/
rm v4.0.1.zip
sudo start xbmc

NZBGet & Transmission

transmissionThe Pi 2 is an impressive piece of hardware, but despite its 1GB of RAM, performance can still be an issue. NZBGet is often characterised as more lightweight than SABnzbd, so this makes it an ideal choice on low-end hardware like the Pi. Transmission is my torrent client on the Mac and luckily its cross-platform. Xbian offers packages for both programs, which makes installing them very easy. When they’re setup they can be reached through a webbrowser:

NZBGet: http://your.raspberry.ip.address:9092
Transmission: http://your.raspberry.ip.address:9091

Default username and password are again xbian and raspberry.

There’s one caveat though. By default all the download paths for both Transmission and NZBGet will point to your MicroSD. As it’s only 8GB, this is not ideal, it will clog up really fast. NZBGet allows for easy relocation of its download paths and Transmission as well, to an extent. Transmission uses two additional paths which cannot be altered in its web interface. Using SSH:

sudo /etc/init.d/transmission stop

sudo nano /etc/transmission/settings.json
Look for the entries incomplete-dir and watch-dir and change them to the desired path (an external drive mounted at /media, for example). It might be a good idea to change the username and password for logging into Transmission as well, change the values of rpc-username and rpc-password. When Transmission is started again the password value will be hashed automatically.

sudo /etc/init.d/transmission start

Remote Control

Kodi and Raspberry Pi support CEC, which is an industry standard allowing users to control devices via HDMI. At first I thought this didn’t work on my television, a Philips 32PFL8404H/12, despite having enabled EasyLink (Philips’ name for CEC) in Setup > Installation > Preferences. Turns out CEC only works reliably using high quality HDMI cables, because after switching the cable from The Pi Hut with a better one I had lying around everything started working. I can now control Kodi with the remote control of my television.

An alternative are the various mobile applications for iOS and Android. For iOS there’s the Official Kodi Remote, which is free and supports a lot Kodi’s functions. There’s also Yatse, for Android.

Alternatively you can use the web interface of Kodi, accessible through any browser:

Kodi Web Interface: http://your.raspberry.ip.address:8080

You need to enable control via HTTP (in Settings > Services > Webserver) in order for this to work and probably set a username and password.


sonarrSickBeard was the first PVR of its kind I used. Xbian offers two prebuilt packages of SickBeard: the plain version and SickBeard TPB – which is now called SickRage, I think. The latter version of SickBeard offers torrent downloads and more features than vanilla SickBeard. I’ve come to rely on Sonarr though, which has a nicer interface and a great feature set, including torrent downloads (using Transmission, for example). Sonarr is written in C#, as opposed to Python for SickBeard/SickRage, so you have to jump through some hoops to get the client installed on Linux. Nothing major though, I followed this excellent guide and was up and running in no time.

Sonarr: http://your.raspberry.ip.address:8989


The Raspberry Pi sends a sound signal over HDMI and to an analogue outlet and it can do so simultaneously. My intention was to connect the device to an amplifier and use it to play my music collection as well. This is where I hit my only major roadblock; the analogue sound signal is sadly too weak. My music played, but on such a low volume I had to crank up the volume of my amplifier to uncomfortable heights. The forums of various Raspberry Pi OS distributions are replete with issues regarding low analogue volume, but in the end it all seems to boil down to the fact that the Pi originally wasn’t intended to be a set-top box media player. I tried some workarounds, which didn’t work and decided to go another route, by buying a Sonos PLAY:1 instead. A drastic measure it may be, but it renders several other bulky devices (amplifier, speakers) obsolete. Sonos also plays nice with networked drives, so it’s a nice audio counterpart to the Raspberry Pi.

Adding media is as easy as adding the volume mounted by the Pi in Sonos’ settings:


In theory you could use Kodi’s UPnP capabilities allowing Sonos to see the drive as a media server, but this works just as well.


Overall I’m very happy with my new setup. It’s fast, has a low power footprint and is accessible and easy to maintain. Above all it’s nearly silent, you can sometimes hear the external drive spin up and down, but that’s nothing compared to the fans of an idle HTPC.

  1. I also owned an ACRyan Playon HD for a while, a terrible, terrible device.

May 1, 2013

Some music documentaries

I’ve been watching some documentaries on classical music lately.

Pianomania (2009)

pianomania This film about virtuoso piano tuner Stefan Knüpfer from Steinway & Sons was broadcast on Dutch television a couple of weeks ago. “Pianomania” follows the exploits of Knüpfer during his work with pianists like Pierre-Laurent Aimard, Alfred Brendel and Lang Lang. It’s really nice to see Knüpfer and his craftsmanship on display, the significance of which is all too easily forgotten. An important part of the documentary is the interaction between Knüpfer and Aimard, who is to record “Die Kunst der Fuge” by J.S. Bach a year from the beginning of the documentary. Their collaboration seems a fruitful one, despite the breadth of musical problems they have to solve, often punctuated by Aimard uttering the phrase: “Everything is perfect, but I have one petite question”…


Rostropovich: The Genius of the Cello

Mstislav Rostropovich c Suzie Maeder This BBC documentary offers a nice celebration of Mstislav Rostropovich, the most important cellist of the 20th century in terms of musicianship and influence. Without Rostropovich hounding all the contemporary composers he met to write cello pieces for him, we wouldn’t be able to listen to Dutilleux’s “Tout un monde lointain”, Shostakovich’s Cello Concertos nor Britten’s works for cello.

A minor gripe is that John Bridcut’s documentary can be a bit too celebratory at times. For example, I wonder about Rostropovich and the women Tully Potter mentions at one point, but quickly dismisses as not appropriate in the context of the film. But that might just be my gossipy nature…

The whole documentary is available in HD on Vimeo.


Richter: The Enigma

1420530 In a previous blogpost from a good while back I wasn’t very kind with regards to Sviatoslav Richter and Franz Liszt. I’ve reversed almost completely regarding the latter, but Richter – despite being a brilliant pianist – is still not my first choice when it comes to recordings. He is, however, a very intriguing personality, something which is also evident in Bruno Monsaingeon’s film on Richter.
It’s astounding how critical Richter is about himself and his playing, many acclaimed performances are discarded as mediocre or plain bad by him. Equally amazing is his dismissal of choosing a piano before a concert (one should just be able to play with what’s at hand) and his preference for playing in the dark. For Richter it’s all about the music, not about the grimaces and hand movements of the pianist.

The film contains a wealth of archive footage of Richter, along with several key performances. The archive footage often show a boyish, often mischievous Richter, the more recent interview sections showcase a more melancholy old man. Near the end of the documentary he makes a painful confession: “I don’t like myself.” A statement which seems at odds with the burly younger Richter, but as he found himself unable to perform in public in his later years (he mentions his loss of absolute pitch) his bitterness towards life might not be such a surprise.

The whole documentary is available on YouTube: Part 1 and part 2.


Note By Note: The Making Of Steinway L1037 (2007)

tumblr_lvu7y4cbxA1r3fjx7 “Note By Note” focusses on the one year production of a Steinway grand piano (number L1037, model D-274) and features interviews with employees of the New York Steinway factory and several well-known pianists.

It’s amazing to see how much craftsmanship is involved in the process – several stages of tuning, laborious woodworking to fit the harp and sound board – and how much of it is still done by hand – Steinway’s competition has increasingly automatised parts of the production line (including tuning) according to the documentary.

September 18, 2012

Luischtert VII: Dmitri Shostakovich — Pianokwintet in g klein, Op. 57: Intermezzo

Mijn lijst met muziek die je ooit op je eigen begrafenis zou willen laten klinken is inmiddels gegroeid tot een avondvullend programma met minstens twee pauzemomenten.
Een werk van Shostakovich moet in ieder geval zeker te horen zijn en dan specifiek een deel uit het Pianokwintet in g klein, Op. 57, alhoewel het achtste strijkkwartet ook een bijzondere kanshebber is gezien de totale radeloosheid hoorbaar in die compositie.

Shostakovich schreef het werk in 1940, in een periode waarin zijn werk steeds meer kritiek begon te oogsten bij Stalin en de diverse communistische partijbonzen. Zo moest hij in 1939 zijn vierde symfonie terugtrekken na luide protesten en verslechterde de situatie eigenlijk alleen maar na de Tweede Oorlog, al bracht de dood van Stalin in 1953 bracht enige verlichting en relatief meer creatieve vrijheid.
De kamermuziek die Shostakovich schreef gedurende het communistische bewind zit bijna altijd tegen de grenzen van wat door de communisten als betamelijk werd gezien, misschien nog wel meer dan zijn symfonische werk. Het is ontegenzeggelijk moderne, twintigste eeuwse muziek, maar Shostakovich gaat nooit over de rand qua dissonantie en melodische thema’s zijn altijd ergens aanwezig. In vergelijking met radicalen uit het kapitalistische deel van de wereld als Olivier Messiaen, Pierre Boulez of Karlheinz Stockhausen is Shostakovich op veel vlakken een behoudend componist – deels natuurlijk gedwongen door de creatieve repressie binnen de Sovjet-Unie. Dat neemt niet weg dat zijn muziek van bijzondere waarde is, zijn compositorisch vernuft is bijzonder en lange tijd – deels om politieke redenen – niet erkend.

Terug naar het kwintet. Het Intermezzo begint sober met alleen de strijkers die een simpele baslijn en het overkoepelende thema van het hele stuk spelen. Naarmate het stuk vordert zwelt de intensiteit van het spel steeds verder aan, waarbij de piano voornamelijk accenten legt of de lopende baspartij voor zijn rekening neemt, als de pizzicato gespeelde strijkers dit niet doen.

Bovenstaand is een betrekkelijk droge impressie van het stuk, de gehele compositie ademt echter, zoals zoveel werk van Shostakovich, een verstilde wanhoop uit. Dankzij de lopende baslijn schrijd de muziek onverbiddelijk naar de emotionele climax om vervolgens over te lopen in de ietwat lichtvoetigere finale van het kwartet.

Martha Argerich samen met Renaud Capuçon, Alissa Margulis, Lyda Chen en Mischa Maisky in 2006:

September 3, 2012


Afgelopen zaterdag was ongetwijfeld de allermooiste dag uit het leven van Melanie Schultz van Haegen, Minister van Asfalt, want Nederland mag nu overal 130 rijden!

Blijkbaar is het ergens voorbij de Afsluitdijk in het gure noorden een waar snelheidswalhalla, maar na het doorkruisen van Nederland per auto afgelopen weekend kan ik concluderen dat er vooral een wildgroei aan allerlei nieuwe verkeersborden met conditionele geboden heeft plaatsgevonden. In plaats van 100 of 120 km/u is het nu vaak: “120, Indien spitsstrook gesloten” of “130, 6u – 19u”, etc.

Gelukkig komen er geen toeristen in Nederland, want die begrijpen natuurlijk de ballen van deze gebodentombola. De meeste Nederlandse automobilisten overigens ook niet, getuige al het twijfelende verkeer dat er pas na kilometers achter begon te komen dat men inderdaad na 7 uur ‘s avonds op de weg zat of dat de spitsstrook ook daadwerkelijk dicht was en dus als een malle het gaspedaal kon beroeren.1

Maar het Korps Landelijke Politiediensten spreekt van een triomf, want er is niemand doodgegaan dit weekend.

Dank Melanie! Laten we na de verkiezingen gezwind doorpakken2 en de Veluwe asfalteren! Of de Waddenzee!

  1. Meestal was het de rem.
  2. Jeukwoord.

August 29, 2012

Space Jazz

Scientology-bedenker L. Ron Hubbard is verantwoordelijk voor een breed scala aan ronduit fantastische concepten, zoals de E-meter (ook geschikt voor het meten van de emoties van fruit), een gigantische boot waar allerlei rare dingen gebeuren en natuurlijk Tom Cruise die de liefde bedrijft met een bank.
Ook was hij een zeer verdienstelijk auteur, vond hij zelf althans. Zijn magnum opus “Battlefield Earth” werd in 2000 verfilmd met John Travolta (die van die homo-erotische massages en die vervelende dansfilm) in de hoofdrol. De Church of Scientology vond het een puike film, maar het publiek dacht er wat anders over en bleef massaal weg. Mocht u ooit eens op een kwade nacht afstemmen op een commerciële televisiezender en er is op dat moment een bizar uitgelichte, scheef gefilmde rolprent aan de gang waarin gigantische aliens met rasta-haar rondlopen, dan is de kans groot dat u “Battlefield Earth” aanschouwt. Blijf kijken, zou ik dan zeggen.

Groot was dan ook mijn vreugde toen ik bij het nalezen van het Wikipedia-artikel aangaande het boek “Battlefield Earth” van Hubbard mocht vernemen dat het alom geprezen genie een heuse soundtrack bij zijn epistel heeft geproduceerd. Het juweel draagt de naam: “Space Jazz”.

De Church of Scientology zegt zelf het volgende over deze absolute mijlpaal in de muziekgeschiedenis:

To best convey the sweep of the saga, the album utilized elements from several genres – from honky-tonk and free-swinging jazz to cutting-edge electronic rock. The result is a wholly new dimension in space opera sound, and what critics declared was a most “auspicious recording debut.”

Natuurlijk is het bovenstaande allemaal waar. Daarom vermoed ik dat het nu volgende YouTube-kunststukje ook daadwerkelijk van het “Space Jazz”-album afkomt…