Playing Videos

From SingletonMillerWiki
Revision as of 14:19, 8 June 2012 by Martin (Talk | contribs)

Jump to: navigation, search


The GPU of the RPi is capable of many things, a quick google search will show many people playing videos of bunnys.

The best way to get video playing on the RPi is to use the specially compiled player OMXplayer.

installing omxplayer

see [1] [2] for the full background.

Code the following steps.

Download the installation package

wget http://seyrsnys.myzen.co.uk/rpi/omxplayer_0.0.1-arm.deb

It should return something like:

--2012-06-05 11:14:04--  http://seyrsnys.myzen.co.uk/rpi/omxplayer_0.0.1-arm.deb
Resolving seyrsnys.myzen.co.uk... 212.23.8.80
Connecting to seyrsnys.myzen.co.uk|212.23.8.80|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4568660 (4.4M) [application/x-debian-package]
Saving to: `omxplayer_0.0.1-arm.deb'

100%[======================================>] 4,568,660   1.40M/s   in 3.1s    

2012-06-05 11:14:07 (1.40 MB/s) - `omxplayer_0.0.1-arm.deb' saved [4568660/4568660]

To install the .deb package:

sudo dpkg -i omxplayer_0.0.1-arm.deb

Tell the RPi to try to fix an broken dependencies, this shouldn't return any errors.

sudo apt-get -f install

If the installation fails and your RPi returns information regarding other missing dependencies, make a note of them and install them using sudo apt-get <MissingDependencyName> .

The missing packages will vary depending on what other packages you've installed on you RPi, for me I needed to add:

sudo apt-get install libpcre3-dev libpcrecpp0 libva-dev libva-x11-1 libva1

audio

if your video has sound and you want to hear it, you need to enable it, see Enable_Sound.

playing video

If you don't have a video to play, get the well used example from http://www.bigbuckbunny.org, select the correct resolution for you RPi setup.

omxplayer is a command line interface (CLI) programme only, use the following to play videos.

omxplayer -o <audiochannel> <videofilename>

You need to tell omxplayer which audio channel to use, the options are analogue/hdmi/passthrough.

analogue sound will come out the analogue audio jack, omitting the audiochannel option will also use this channel.

hdmi sound via the HDMI digital

passthrough>/code> untested, I've no idea what this will do.!!

omxplayer -o hdmi big_buck_bunny_1080p_h264.mov

I've played <code>xvid and h.264 encoded videos sucessfully at ~30fps.

known Limitations

mpeg2 encoded files don't play. This is because in an effort to reduce costs the Raspberry Pi Foundation opted to limit the number of licensable technologies deployed in the RPi. This means that the processor doesn't have support for all video codecs.

If you want to play MPEG2 data on the RPi, the best bet is to use another programme to convert it. Transcoding mpeg2 to h.264 is unlikely to be sucessfull on the RPi itself.! [it might be worth testing it and recording the results at some point].

other video players

I'm unaware of any other video players that directly support the codecs in the RPi GPU.