Play video

By default, a video player called omxplayer is installed in Raspbian. It is a simple command-line application designed to take advantage of the Raspberry Pi’s GPU (Graphics Processor Unit). To start watching a video, you just need to specify the path to the video file at the command line and the video will start in full screen.

A sample from the animated film Big Buck Bunny is included in Raspbian by default. This video is located at /opt/vc/src/hello_pi/hello_video/test.h264. To start watching it, you can use the omxplayer /opt/vc/src/hello_pi/hello_video/test.h264 command:

start omxplayer rapsbian

The video should start in full screen. To enable the sound output on the HDMI port, use the -o hdmi option:

start_omxplayer_hdmi_sound_rapsbian

You can issue various command while a video is playing by using the following keys:

omxplayer shortcuts

With omxplayer, you don’t even need to enter the GUI to play videos; you can watch videos even if Raspbian boots into the command line.

Subscribe to our Newsletter

Like us on Facebook

top
Geek University 2019