Raspberry Pi 3 and H.256

Some time ago I got annoyed by some movies encoded in h.256 are not running smoothly on the Kodi of my Raspberry Pi 3.

h.256 is a block-oriented quite new video compression algorithm, that is unfortunately not supported natively by the hardware decoder on the Raspberry Pi 3. So it has to be done in Software, and apparently the computational power of the Pi is too weak.

Surfing through some fora, I found some people claiming, that overclocking the Raspberry Pi should be the solution. So I decided to give it a try.

Overclocking goal

The goal was to bring the h.265 codec smoothly on the screen, using 1080p@30fps. Some people said, that overclocking the pi to 1300MHz should be enough. So that's where I have to go.

Only do overclocking, with an adequate cooling system! Since the Raspberry ships without any heat sink, I needed to buy one.

Cooling system

I've decided to go with a plain Aluminium heat sink, but monitor the temperature very closely with cputemp and gputemp, two tools that ship by default on the Raspbian and OpenELEC:

Works. During the whole overclocking procedure I was connected to the Raspberry via ssh to monitor the temperatures very closely. At least one readout every second, ready to intervene if something goes nasty.

The goal was to keep the temperature below 85 degrees (soft-limit) and immediately cancel the procedure after 90 degree (hard-limit). During the overclocking procedure I reached the hard-limit.


And here we go. Backup /flash/config.txt before editing, so that you can set it back to default, once you have finished.

There are plenty of examples on this page. You may need to figure out, witch one works for you.

There's also this amazing wiki page about overclocking, the risks and the pitfalls. I think that's the resource you should read before getting started.

The default clocking settings for a Raspberry Pi are commented out, thus if you are unsure about your current configuration, just comment it out, reboot and you'll have the stable plain configuration again.

In the end, I tries to get the system working with the following configuration

System was stable, but heating up a lot, up to more than 85 degrees. That's an important threshold, because at 85 degrees the Raspberry starts to protect itself from the heat death by throttling down the CPU. So in overall you'll have no benefit from overclocking, except a small boost in performance before it throttles you down to worse throughput, than with plain vanilla settings.


The poor Raspberry Pi got really hot during this procedure! 1300 MHz would be too much for a long-period. Also because it throttles itself down, I did not get any benefit from the overclocking procedure.

And although I pushed it to the limit with the available cooling system, I couldn't reach a smooth experience.

So I consider h.265 as not suitable for my Raspberry Pi. Well, seems that I have to encode it to something more Raspberry friendly 🙂

Still, it was a nice project!



Mit dem Raspberry Pi Internet Radio horchen

Ein weiterer Einsatzzweck für euren Raspberry: Empfangsstation für Internet-Radio!

Wir realisieren das ganze mit dem Music Player Daemon und einem schicken kleinen Webinterface

Web Interface um die Radiostation zu steuern
Web Interface um die Radiostation zu steuern

Los gehts!

Wir brauchen für den Betrieb drei Pakete: alsa-utils, mpd und mpc

Bei der Installation vom Music Player Daemon (mpd) taucht folgende Fehlermeldung auf, die wir getrost ignorieren können

Starting Music Player Daemon: mpdlisten: bind to ‘[::1]:6600′ failed: Failed to create socket: Address family not supported by protocol (continuing anyway, because binding to ’′ succeeded)
Failed to load database: Failed to open database file “/var/lib/mpd/tag_cache”: No such file or directory

 Der Dienst läuft nun. Wir müssen ihn nur noch konfigurieren. Dazu editieren wir die Datei /etc/mpd.conf wie folgt:

  • bind_to_address "localhost" mit bind_to_address "" erstetzen
  • Auskommentieren von audio_buffer_size  und buffer_before_play

Die Änderungen werden erst nach einem Neustart vom mpd wirksam.

Als nächstes müssen wir noch die Radiosender einstellen. Dies geschieht über eine Playlist. Dazu legen wir die Datei /var/lib/mpd/playlists/radio.m3u an. Die Datei beinhaltet lediglich Links zu den Radiosender und kann ganz einfach geschrieben werden:

Eine passable Auswahl an Radiosender findet sich unter http://www.surfmusik.de/

Um die Musik zu starten, muss noch die Playlist geladen werden und der (erste?) Eintrag abgespielt werden. Dazu gebt ihr einfach in die Konsole ein

Beachte: mpc load Lädt m3u-Playlists (ohne Erweiterung eingeben!) vom Ordner /var(lib/mpd/playlist. Die Eingabe von mpc load radio ist damit absolut ausreichend!

Schickes Webinterface

Ich verwende das MPD-Webinterface von sn0opy (GitHub). Die Lösung benötigt einen Webserver mit PHP.

Wir müssen das ganze Downloaden und ins /var/www-Verzeichnis packen. Ich benenne den Ordner noch um, damit ich das ganze unter raspberry/radio finden kann

Fertig 🙂