Navigate back to the homepage

Raspberry Pi Live Streaming Over Wi-fi

Mandar Gogate
May 16th, 2015 · 2 min read

Components Required

  • Raspberry Pi 2
  • Wi-Fi module
  • Camera module

Software Required

VLC media player or Quicktime media player

Steps

  1. Connect Camera to Raspberry Pi.
  2. Enable Camera in Raspberry Pi Configuration file.
  3. Establish a local wireless network and connect the Raspberry Pi to it.
  4. Install VLC program on Raspberry Pi
  5. Executing Streaming command specifying communication protocol (RTSP) and port.
  6. Now you can see the streaming on any Client connected to the same network.

Real Time Streaming Protocol (RTSP)

The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between end points. Clients of media servers issue VCR-style commands, such as play and pause, to facilitate real-time control of playback of media files from the server.

The transmission of streaming data itself is not a task of the RTSP protocol. Most RTSP servers use the Real-time Transport Protocol (RTP) in conjunction with Real-time Control Protocol (RTCP) for media stream delivery, however some vendors implement proprietary transport protocols. The RTSP server software from Real Networks, for example, also used Real Networks’ proprietary Real Data Transport (RDT).

The RTSP (Real Time Streaming Protocol) protocol is a client-server multimedia presentation control protocol, designed to address the needs for efficient delivery of streamed multimedia over IP networks. It leverages existing web infrastructure (for example, inheriting authentication and PICS from HTTP) and works well both for large audiences as well as single-viewer media-on-demand.

Real Networks, Netscape Communications and Columbia University jointly developed RTSP within the MMUSIC working group of the Internet Engineering Task Force (IETF). In April 1998, it was published as a Proposed Standard by the IETF.

Streaming The Camera Video Using RTSP

Enter the following command to start the streaming:

1raspivid -o - -t 0 -n | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
  • raspivid is used to capture the video
  • “-o -” causes the output to be written to stdout
  • “-t 0” sets the timeout to disabled
  • “-n” stops the video being previewed (remove if you want to see the video on the HDMI output)
  • cvlc is the console vlc player
  • “-vvv” and its argument specifies where to get the stream from
  • “-sout” and its argument specifies where to output it to

Options available

Specifying the camera resolution

1raspivid -o - -t 0 -n -w 600 -h 400 -fps 12 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
  • -w Width available range: 64 to 1920
  • -h Height available range: 64 to 1080
  • -fps Frames per second: 2 to 30

Viewing the RTSP Stream over the Network

You need a player which supports RTSP, for instance VLC, QuickTime, etc. Open a network stream using

1rtsp://<Raspberry Pi IP Address>:8554/

More articles from Mandar Gogate

Structural Health Monitoring Using Wireless Sensor Networks

Structural Health Monitoring (SHM) using wireless sensor networks involves deployment of various sensors like accelerometers in the area to be monitored.

May 4th, 2014 · 8 min read

Association Rule Mining in Hadoop using Python

Association rule mining is the method for discovering association rules between various parameters in the dataset.

June 16th, 2016 · 4 min read
© 2014–2016 Mandar Gogate
Link to $https://twitter.com/mandar_gogateLink to $https://github.com/mandargogateLink to $https://instagram.com/mandargogateLink to $https://www.linkedin.com/in/mandargogate/