In another post (Live Stream Server Raspberry Pi), I showed how to make a live stream from a Raspberry Pi. This was good for a security system, but not good for if you want to watch this video and show it to others. The video on the other post was 720p and only 2 frames per second. This video will be still MJPEG (Motion JPEG) for better streaming but will be 1920 by 1080 and be up to 30fps.
Make sure you have one of these USB webcams or the stream might not work:
List of compatible webcams
Run these two commands to make sure OS is up to date
Run this command to start the stream:
Here are instructions to retrieve an image from the stream:
Install ffmpeg (If this doesn't work you will have to build ffmpeg locally):
Download an image (Put in the IP):
Make sure you have one of these USB webcams or the stream might not work:
List of compatible webcams
Run these two commands to make sure OS is up to date
sudo apt-get update
sudo apt-get upgrade
Install VLC media player:
sudo apt-get install vlc
Run this command to start the stream:
cvlc --no-audio v4l2:///dev/video0 --v4l2-width 1920 --v4l2-height 1080 --v4l2-chroma h264
--v4l2-fps 30 --v4l2-hflip 1 --v4l2-vflip 1 --sout '#standard{access=http,mux=ts,dst=:8080}'
-I dummy
Here are instructions to retrieve an image from the stream:
Install ffmpeg (If this doesn't work you will have to build ffmpeg locally):
sudo apt-get install ffmpeg
Download an image (Put in the IP):
ffmpeg -y -i http://Raspberry'sIP:8554/ -r 1 -vframes 1 now.jpg