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!



Benchmarking tool - Flops

Flops is a nice tool for benchmarking floating point operations of a CPU.

Under Arch Linux i had some problems compiling it, because the static linking towards openmp was not working properly. I've made a fork, fixed the issue by removing the -static flag (and replaces -std=c++0x to -std=c++11) and a pull request in the hope, it will be included in the mainline soon.

The tool itself is quite nice to compare the throughput of FLOPS on a CPU. It measures it under perfect conditions so be aware that the everyday performance will be lower.

Still: Nice tool 🙂

OCaml interpreter - Adding history support

I need to learn OCaml for one of my computer science courses. Although I am more the procedural programmer type, I like some of the concepts of functional languages and am also using them on a daily basis.

Some of the concepts are quite handy and nice - list comprehension, filter and lambda functions. They can help you keep your code clean and state-less.

Although I like Haskell a lot, i dislike OCaml for several reasons. One of them is that the interpreter doesn't support curses-like history. Unless you use the very nice rlwrap tool (in Linux)

And finally you can scroll back up to your mistyped command.

Sentinel-2 is on the way

The new Sentinel-2B satellite by ESA has started tonight at 2:49 MECT from the ESA Spaceport in French Guiana.

Sentinel is a multi-billion-euro (8-9 billion euros up to 2020) project in order to provide images of land, oceans and waterways. The data is open access and can be used by anyone.

That's a short update, I will write more about the Sentinel satellites soon

[UPDATE 28.03.2017]
Picture credit: ESA/ATG medialab