Difference between revisions of "Omxplayer"
(→Troubleshooting) |
|||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:RaspberryPi]] | [[Category:RaspberryPi]] | ||
− | [https://github.com/huceke/omxplayer Omxplayer] is a video player specifically made for the Raspberry | + | [https://github.com/huceke/omxplayer Omxplayer] is a video player specifically made for the Raspberry Pi's GPU made by Edgar (gimli) Hucek from the XBMC/Kodi project. It relies on the [https://en.wikipedia.org/wiki/OpenMAX OpenMAX] hardware acceleration API, which is the [https://en.wikipedia.org/wiki/VideoCore Broadcom's VideoCore] officially supported API for GPU video/audio processing. |
− | + | Raspberry Pi forum user ''spenning'' made precompiled binaries available on the forum. See [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=2&t=5543 here]. | |
== Hotkeys == | == Hotkeys == | ||
Line 28: | Line 28: | ||
Up Arrow Seek +600 | Up Arrow Seek +600 | ||
</pre> | </pre> | ||
+ | |||
+ | == Streaming == | ||
+ | |||
+ | ===RTMP=== | ||
+ | |||
+ | You do not need to download an MP4 file to watch it with Omxplayer. If you have the URL of a (H.264) rtmp:// stream, just stream it with: | ||
+ | <pre> | ||
+ | omxplayer rtmp://... | ||
+ | </pre> | ||
+ | |||
+ | To stream a (H.264) rtmpt://... URL with Omxplayer, just change the head rtmp:// to rtmpt://. | ||
+ | |||
+ | ===RTSP=== | ||
+ | |||
+ | Support for [http://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol RTSP] was added in 2012<ref name="RTSP">[https://github.com/huceke/omxplayer/issues/67 Added RTSP support #67, 2012-10-20. GitHub]</ref> (for instance, allowing the use of [http://en.wikipedia.org/wiki/VLC_media_player VLC media player] as the streaming server). | ||
+ | |||
+ | Example: | ||
+ | |||
+ | <pre> | ||
+ | omxplayer -o local rtsp://192.168.3.100:8554/stream1 | ||
+ | </pre> | ||
+ | |||
+ | ==Audio== | ||
+ | |||
+ | It is possible to select the audio output by specifying -o or --adev on the command line between: | ||
+ | * local: analog output | ||
+ | * hdmi: hdmi output (hdmi_drive=2 is then required in config.txt) | ||
+ | * both: both outputs | ||
+ | |||
+ | Example: | ||
+ | <pre> | ||
+ | omxplayer -o hdmi file.qt | ||
+ | </pre> | ||
+ | |||
== Troubleshooting == | == Troubleshooting == | ||
=== Black screen after playback === | === Black screen after playback === | ||
− | If you get a black screen on your X11 | + | If you get a black screen on your X11 desktop after Omxplayer is finished, you can use this command to restore your view: |
<pre> | <pre> | ||
xrefresh -display :0 | xrefresh -display :0 | ||
</pre> | </pre> | ||
− | Or you can use a small | + | Or you can use a small Bash script for video playback to do this every time: |
<pre> | <pre> | ||
#/bin/bash | #/bin/bash | ||
Line 40: | Line 74: | ||
xrefresh -display :0 | xrefresh -display :0 | ||
</pre> | </pre> | ||
− | On | + | On Raspbian, xrefresh is part of the x11-xserver-utils package |
− | (apt-get install x11-xserver-utils) | + | (apt-get install x11-xserver-utils). |
=== No rights to VCHIQ === | === No rights to VCHIQ === | ||
− | On bare installations of the default distributions Omxplayer often has insufficient permissions to access /dev/vchiq. One solution would be to run | + | On bare installations of the default distributions, Omxplayer often has insufficient permissions to access /dev/vchiq. One solution would be to run Omxplayer as root, but a nicer solution is to add a udev rule so that /dev/vchiq is also accessible from other users. To accomplish this, do the following under root: |
<pre> | <pre> | ||
# echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules | # echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules | ||
Line 52: | Line 86: | ||
# usermod -aGvideo USERNAME | # usermod -aGvideo USERNAME | ||
</pre> | </pre> | ||
− | Reboot the Raspberry and you should be able to run | + | Reboot the Raspberry Pi, and you should be able to run Omxplayer without the vchiq-error showing up. |
=== HDMI === | === HDMI === | ||
− | When using HDMI make sure to pass '-o hdmi' to | + | When using HDMI make sure to pass '-o hdmi' to Omxplayer if you want the audio to play through the HDMI cable: |
<pre> | <pre> | ||
omxplayer -o hdmi videofile.mp4 | omxplayer -o hdmi videofile.mp4 | ||
</pre> | </pre> | ||
− | |||
===Helpful Links=== | ===Helpful Links=== | ||
* [http://www.brianhensley.net/2012/07/how-to-get-1080p-videos-running-on-my.html?spref=fb Successful Raspberry Pi 1080p blog, Start->Finish] | * [http://www.brianhensley.net/2012/07/how-to-get-1080p-videos-running-on-my.html?spref=fb Successful Raspberry Pi 1080p blog, Start->Finish] | ||
* [http://www.brianhensley.net/2012/07/how-to-get-debian-working-on-my.html How to install Debian Raspberry Pi] | * [http://www.brianhensley.net/2012/07/how-to-get-debian-working-on-my.html How to install Debian Raspberry Pi] | ||
− | * [http://omxplayer.sconde.net/ Omxplayer Build Bot] | + | * [http://omxplayer.sconde.net/ Omxplayer Build Bot] (up to date binary packages available here) |
− | + | ||
− | < | + | ==References== |
+ | <references/> |
Revision as of 06:07, 5 October 2015
Omxplayer is a video player specifically made for the Raspberry Pi's GPU made by Edgar (gimli) Hucek from the XBMC/Kodi project. It relies on the OpenMAX hardware acceleration API, which is the Broadcom's VideoCore officially supported API for GPU video/audio processing.
Raspberry Pi forum user spenning made precompiled binaries available on the forum. See here.
Contents
Hotkeys
z Show Info 1 Increase Speed 2 Decrease Speed j Previous Audio stream k Next Audio stream i Previous Chapter o Next Chapter n Previous Subtitle stream m Next Subtitle stream s Toggle subtitles d Subtitle delay -250 ms f Subtitle delay +250 ms q Exit OMXPlayer Space or p Pause/Resume - Decrease Volume + Increase Volume Left Arrow Seek -30 Right Arrow Seek +30 Down Arrow Seek -600 Up Arrow Seek +600
Streaming
RTMP
You do not need to download an MP4 file to watch it with Omxplayer. If you have the URL of a (H.264) rtmp:// stream, just stream it with:
omxplayer rtmp://...
To stream a (H.264) rtmpt://... URL with Omxplayer, just change the head rtmp:// to rtmpt://.
RTSP
Support for RTSP was added in 2012[1] (for instance, allowing the use of VLC media player as the streaming server).
Example:
omxplayer -o local rtsp://192.168.3.100:8554/stream1
Audio
It is possible to select the audio output by specifying -o or --adev on the command line between:
- local: analog output
- hdmi: hdmi output (hdmi_drive=2 is then required in config.txt)
- both: both outputs
Example:
omxplayer -o hdmi file.qt
Troubleshooting
Black screen after playback
If you get a black screen on your X11 desktop after Omxplayer is finished, you can use this command to restore your view:
xrefresh -display :0
Or you can use a small Bash script for video playback to do this every time:
#/bin/bash omxplayer "$@" xrefresh -display :0
On Raspbian, xrefresh is part of the x11-xserver-utils package (apt-get install x11-xserver-utils).
No rights to VCHIQ
On bare installations of the default distributions, Omxplayer often has insufficient permissions to access /dev/vchiq. One solution would be to run Omxplayer as root, but a nicer solution is to add a udev rule so that /dev/vchiq is also accessible from other users. To accomplish this, do the following under root:
# echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules
Now add yourself to the group named 'video':
# usermod -aGvideo USERNAME
Reboot the Raspberry Pi, and you should be able to run Omxplayer without the vchiq-error showing up.
HDMI
When using HDMI make sure to pass '-o hdmi' to Omxplayer if you want the audio to play through the HDMI cable:
omxplayer -o hdmi videofile.mp4
Helpful Links
- Successful Raspberry Pi 1080p blog, Start->Finish
- How to install Debian Raspberry Pi
- Omxplayer Build Bot (up to date binary packages available here)