您的位置:首页 > 编程语言 > ASP

Raspberry Pi Camera Streaming to VLC Player

2015-07-31 00:05 1046 查看


Raspberry Pi Camera Streaming to VLC Player

Recently I discovered the pi’s in my quest for making a device with recognition software to locate items on the ground while being attached to a multi-rotor helicopter.
The Raspberry Pi is perfect. only needing 5v to run means its great for running off batteries etc.

anyway to the streaming part.
To stream to VLC from your Raspberry Pi Camera to your computer over a network you need to install VLC Player on both the Raspberry Pi & PC/ Mac what ever.

for the PC/ MAC its simple just go to the VLC downloads page – http://www.videolan.org/
as for the Pi its more complicated.

login to your pi via ssh or use the terminal directly on the Pi
Updating is important run the below commands

sudo apt-get update

sudo apt-get upgrade

Once they are finished lets install VLC
sudo apt-get install vlc

once you have VLC on both the Pi & the machine you want to stream to you want to run this command to start the stream
raspivid -o - -t 9999999 |cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

if you encounter issues streaming like frezzes etc use this script
raspivid -o - -w 920 -h 540 -t 9999999 |cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

once the script is running open VLC Player on your computer.

go to File, Open Network or Open Network Stream (it’s a little different between mac & pc versions)

type this in the field – rtsp://IPofRaspberryPi:8554/ (example: rtsp://192.168.1.105:8554/)
click OK & you’re done!
enjoy the stream
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: