Showing posts with label streaming. Show all posts
Showing posts with label streaming. Show all posts

Saturday, 14 June 2014

Streaming Video From Your Raspberry Pi Camera Module with VLC

If you want to build a surveillance cam you might want to have a look at motion, but for simple video streaming I 'd go for vlc.

Enable Camera Module

sudo raspi-config

Install VLC Media Player

sudo apt-get install vlc

Stream (RTSP)

 raspivid -o - -t 0 -n -w 800 -h 600 -fps 20 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

- w: width
- h: heigt
- fps: frames per second

Viewing The RTSP Stream 

You need a video player capable of RTSP (e.g. VLC). Open a network stream:

rtsp://###.###.###.###:8554/

###.###.###.### is the IP address of your raspberry pi. Also, do not forget the '/'  at the end, otherwise it won't work.

Streaming Over HTTP

 raspivid -o - -t 0 -n -w 800 -h 600 -fps 20 | cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8554}' :demux=h264


Streaming Video From Your Rasperry Pi Camera Module with VLC
Camera Module