Introduction: View RTMP Stream on Raspberry Pi
Here's a simple and straightforward technique to view RTMP streams on the Raspberry Pi.
For this, you will need the following installed on your R-Pi
- omxplayer (installed by default)
- mkfifo (installed by default)
- rtmpdump (not installed by default)
You can install rtmpdump by issuing the command 'sudo apt-get install rtmpdump' from any terminal window on the R-Pi.
First, create a named pipe. A named pipe is essentially a FIFO buffer memory which is referenced by a name. This named pipe will be used for dumping and viewing your stream. You can create a named pipe using the command ' mkfifo name_of_pipe '
Now, use rtmpdump to read the live stream and dump it on to the named pipe you created earlier. Simultaneously, use omxplayer to play the content dumped on to the named pipe. This can be done with the following command:
rtmpdump -r rtmp://url_of_rtmp_stream --live -o name_of_pipe | omxplayer name_of_pipe
At a Glance:
- Install rtmpdump
sudo apt-get install rtmpdump
- Create Named Pipe
-Play RTMP stream
rtmpdump -r rtmp://url_of_stream/ --live -o /tmp/livevideo | omxplayer /tmp/livevideo
Watch a video demonstration of this on the YouTube video linked here. http://www.youtube.com/watch?v=HXA_w8Hkjeo
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Participated in the
Raspberry Pi Contest