Playing HD videos in Debian on the Raspberry Pi

Playing HD videos in Debian on the Raspberry Pi

UPDATED NOTE: There is a new default operating system for the Raspberry Pi that includes omxplayer. The following post, assumes that you are using the original Debian image for the SD card image of your operating system. To learn more, please see my post Raspbian Optimizes Raspberry Pi.

Update: I have now posted how to build omxplayer directly on the Raspberry Pi in Building Omxplayer for Debian on the Raspberry Pi. So, if you are having trouble getting the following to work, or want to see how software is compiled, check it out!

Browsing through the forums at RaspberryPi.org, I came across a way to get video to play back using the power of the Raspberry Pi's GPU. Using omxplayer it is possible to take advantage of hardware acceleration under Debian. This method will work for either Squeeze or Wheezy, however, you may have to recreate the symbolic link under Wheezy or Sid.

Here's the steps that I followed to make it work:
  • You download the package:
  • Install the package:
    • sudo dpkg  -i  omxplayer_0.0.1-arm.deb
  • Install the package dependencies:
    • apt-get -f install
  • Create a symbolic link (if you are running wheezy/sid):
    • sudo ln -s /usr/lib/arm-linux-gnueabi/libpcre.so /usr/lib/omxplayer/libpcre.so.1
  • Start the GUI (if not already running X Windows):
    • startx
  • Open a terminal and check out omxplayer options:
    • omxplayer --help
Usage: omxplayer [OPTIONS] [FILE]
Options :
         -h / --help                    print this help
         -a / --alang language          audio language        : e.g. ger
         -n / --aidx  index             audio stream index    : e.g. 1
         -o / --adev  device            audio out device      : e.g. hdmi/local
         -i / --info                    dump stream format and exit
         -s / --stats                   pts and buffer stats
         -p / --passthrough             audio passthrough
         -d / --deinterlace             deinterlacing
         -w / --hw                      hw audio decoding
         -3 / --3d                      switch tv into 3d mode
         -y / --hdmiclocksync           adjust display refresh rate to match video
         -t / --sid index               show subtitle with index
         -r / --refresh                 adjust framerate/resolution to video

Omxplayer key bindings (dependent on build)

1Increase Speed
2Decrease Speed
jPrevious Audio stream
kNext Audio stream
iPrevious Chapter
oNext Chapter
nPrevious Subtitle stream
mNext Subtitle stream
sToggle subtitles
qExit OMXPlayer
Space or pPause/Resume
-Decrease Volume
+Increase Volume
LeftSeek -30
RightSeek +30
DownSeek -600
UpSeek +600

Play a full screen 1080p video on the Raspberry Pi in Debian:

  • omxplayer -o hdmi /path/to/FeelGoodPeterLondonAndCrew.mp4

No comments:

About Me - WrightRocket

My Photo

I've worked with computers for over 30 years, programming, administering, using and building them from scratch.

I'm an instructor for technical computer courses, an editor and developer of training manuals, and an Android developer.