Hardware-accelerated video playback on the Raspberry Pi

Aus Wiki
Wechseln zu: Navigation, Suche



The Raspberry Pi features a Broadcom BCM2835 SoC. The SoC is not Open Hardware.

An open-source graphics driver is available though.

The Video Core still requires a proprietary firmware, however Broadcom released specifications, so a FOSS firmware could still be made.


OMXPlayer is a small and simple video player for the Raspberry Pi. It does support and use Broadcom's OpenMAX libraries out-of-the-box.

Read more:

Install omxplayer

as root:

apt-get install omxplayer

if needed:

ln -s /usr/lib/arm-linux-gnueabi/libpcre.so /usr/lib/omxplayer/libpcre.so.1

test it:

wget http://ftp.akl.lt/Video/Big_Buck_Bunny/big_buck_bunny_480p_h264.mov
omxplayer big_buck_bunny_480p_h264.mov
  • worked for me, plays the video very nicely on top of the console (to framebuffer?)
  • last time I tried, I wouldn't play a http video stream, apparently this does work in the recent version

Compile from source

As the player is quite small and simple, you might feel an urge to add features. You may do so by compiling a personalized version:

apt-get install git fbset libpcre3-dev libboost-dev
  • get the source code
git clone git@github.com:huceke/omxplayer.git
  • after two fixes, compiles on Raspberry Pi


gstreamer-1.0 features gst-omx, a module which can do hardware-accelerated video decoding on the Raspberry Pi.

An experimental version of gst-omx for gstreamer-0.10 is available too, but last time I tried, I didn't get it to work.

gst-omx is not included in the main Raspbian package repository (neither is gstreamer-1.0). So, you either need to compile it from source or download vontaene.de's precompiled version.

Compile from source

  • gstreamer-1.0 ...
  • gst-omx
apt-get install autoconf automake libtool gtk-doc-tools libglib2.0-dev
git clone git://anongit.freedesktop.org/gstreamer/gst-omx
cd gst-omx

I attempted to compile gstreamer-1.0 with gst-omx (sources on GitHub), however the resulting gstreamer is not decoding H.264 properly, resulting in lags and poor video quality. Please comment on GitHub, if you experience or don't experience this problem anymore.

Download precompiled version

deb http://vontaene.de/raspbian-updates/ . main
  • install:
apt-get update
apt-get install libgstreamer1.0-0-dbg gstreamer1.0-tools libgstreamer-plugins-base1.0-0 \
  gstreamer1.0-plugins-good gstreamer1.0-plugins-bad-dbg gstreamer1.0-omx gstreamer1.0-alsa

Play a local file

gst-launch-1.0 playbin uri=big_buck_bunny.avi

Hardware-accelerated video-stream playback

  • seed video using:
cvlc v4l2:///dev/video1:chroma=h264:width=800 --sout '#rtp{sdp=rtsp://:8080/stream.sdp}' -vv
gst-launch-1.0 rtspsrc location=rtsp:// ! rtph264depay ! h264parse ! omxh264dec ! autovideosink

UVC H.264

Meine Werkzeuge