Close

Raspberry camera streaming video

I will explain here how to stream video on your network through wifi or ethernet cable.We will stream it  with rstp protocol. You can see it out of your local network but be sure to secure it will password.

We will use vlc player to stream video . Note here the delay around 5 second, if  delay is critical for you, you have to find another way to stream your video

First make any new update running those commands

sudo apt-get update
sudo apt-get upgrade

You can do all those through ssh or from your raspberry.

Instal vlc player

sudo apt-get install vlc

Create a script for streaming video. It is like power on your camera. Running this script camera led should power on.Sent the following to create the file

sudo nano stream.sh

It will be created at /home/pi

Copy /paste this line

raspivid -o - -t 0 -hf -w 1024 -h 768 -fps 25 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554}' :demux=h264

Note the resolution is only 1024×768. You can go up to 1920×1080 but delay will be around 12 seconds.With this resolution it is around 3-4 seconds.

Make the script executable running this

sudo chmod +x stream.sh
 

Almost finished.All you have to do  to stream your video just follow the next
From ssh or raspberry run

./stream.sh

It is the file we create at /home/pi

Camera led will enable .Open your vlc on your computer, windows or linux (you can use any other player that is capable rstp protocol

go to open networkstream and add

rtsp://192.168.1.2:8554/

192.168.1.2  : it is YOUR network ip for YOUR raspberry.

IMG_3427 (Custom)

IMG_3426 (Custom)

 

 

 

 

 

 

 

IMG_3420 (Custom)IMG_3422 (Custom)

 

 

 

 

 

 

IMG_3841

1 thought on “Raspberry camera streaming video

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Electronics | WordPress Theme: Annina Free by CrestaProject.
%d bloggers like this: