video player on Raspberry Pi

RPi sunning OpenELEC plugged in an old Sony Trinitron monitor
RPi running OpenELEC plugged in an old SONY Trinitron monitor

I made few tests with chnry on how to play movies with Raspberry Pi

we did the tests with a fresh Raspbian install and up-to-date
Raspbian comes with an integrated player dedicated to RPi : omxplayer
This uses hardware video decoding so it can play full HD h264 encoded film without lag.
The same is not possible with VLC (which only uses CPU decoding) we can’t find any codec which VLC can play smoothly but maybe it’s possible with a non CPU-expensive and small bandwidth codec.

Also we can heard some clicks on the analog output of the RPi when openning and closing omxplayer.
We guess this is due to the powering of the hardware but I think it could be handle on the software side.
For example, when Pd is sending some sound, and if we start playing a film with omxplayer we do hear clicks unless the sound card is powered.
Omxplayer seems to reset the sound card without regarding its state, so i think this is a bug.

So VLC is out on RPi, let’s try to control omxplayer over a network.
The simple way we find is using the udpreceive utility (which comes with puredata) and forwarding its output to bash.
On the RPi :
pdreceive 3434 udp | bash
and on the client :
echo omxplayer video.mp4 \& | pdsend 3434 192.168.11.11 udp

3434 is the port number
192.168.11.11 is the RPi’s IP
video.mp4 is the video we want to play (located in the RPi’s home)
\& go back to prompt just after starting omxplayer thus we can send other commands like killall omxplayer.bin to stop the player.

When no video is playing you will see either the command line or the LXDE interface.
With LXDE, you can set a black desktop, hide the menu bar and make the mouse disappear (with unclutter tool).

Next I will test how longer severals RPi can stay in sync and also I’ll take a look at XBMC with OpenELEC.