Firstly, you need to know where the video is that you want to play. I have mine on a memory stick in the USB port. When the memory stick is plugged in, it will usually open in the file manager. In the bar at the top it will show the file path, mine is shown below as an example.
Also, note the name of the file you want to play, and the way it is encoded. So it might be a .mp4 or a .avi or anything similar. If you want to play an uncommonly encoded video, look at the omxplayer documentation to check it supports it./media/pi/memstick/
The next part is easy, open up the terminal, and type in:
Note the last bit is the file path, and will be different depending on where your file is stored; the above is an example. Just to explain what is going on here, omxplayer is the command we are using, and uses the already installed application associated with it. -o opens the port, and hdmi tells the pi where the stream needs to be output to (remember the pi has a few video outs). This command also allows the audio to play through the hdmi.omxplayer -o hdmi /media/pi/memstick/hk3.avi
All going well, a video will play. Note you cant use the mouse to control the video, it is all done run through the terminal, so pressing keys controls what you want to do. A short list of commands is shown below.
1 decrease speed2 increase speed< rewind> fast forwardz show infoj previous audio streamk next audio streami previous chaptero next chaptern previous subtitle streamm next subtitle streams toggle subtitlesw show subtitlesx hide subtitlesd decrease subtitle delay (- 250 ms)f increase subtitle delay (+ 250 ms)q exit omxplayerp / space pause/resume- decrease volume+ / = increase volumeleft arrow seek -30 secondsright arrow seek +30 secondsdown arrow seek -600 secondsup arrow seek +600 seconds
No comments:
Post a Comment