Hardware Reference
In-Depth Information
$ cd ~/omxplayer
$ make
$ make dist
To install
omxplayer
system-wide, go into the
omxplayer-dist
directory and copy the
file tree into the top-level
usr/
directory as root:
$ cd omxplayer-dist
$ sudo cp -a usr/* /usr/
There is one last thing you will need to do to use
omxplayer
. Because
omxplayer
ac-
cesses the videocore directly on the Raspberry Pi, it uses
/dev/vchiq
. This device node
is not normally accessible by non-root users, so if you want to be able to run
omxplayer
as another user, you'll need to set up a
udev
rule to allow users in the
video
group to
access
/dev/vchiq
:
$ sudo su -
$ echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/
10-vchiq-permissions.rules
$ usermod -aGvideo <USERNAME>
Substitute your username (the default user for Raspbian is
pi
) for
<USERNAME>
in the
usermod
command. Then reboot the Raspberry Pi one last time.
You are ready to watch videos with
omxplayer
now. To watch a video, simply run:
$ omxplayer -o hdmi myvideo.mp4
The
-o
flag allows you to select the output device. You are probably connected to the
HDMI cable for audio and video. If so, you need to specify
hdmi
as the output device.
There's no man page for omxplayer, but the options are somewhat documented in the
output of
omxplayer --help
.
To control the video during playback, use control keys.
Table 5-1
shows the more com-
mon control keys for
omxplayer
.
Table 5-1. Common omxplayer control keys
KEY
FUNCTION
<
Rewind
>
Fast Forward
s
Toggle Subtitles
p / space
Pause
q
Quit
-
Volume Down