http://videos.cctvcamerapros.com/raspberry-pi/ip-camera-raspberry-pi-youtube-live-video-streaming-server.html
Spoiler Alert, Basically they use the Raspberry Pi to connect to the CCTV IP camera over RTSP and then send a live stream up to youtube. Up, out though your firewall and NAT to youtube or any service that will accept RTMP.
Most of this is a good NOVICE GUIDE to setting up and configuring the Pi and buying a IP camera from them.
#!/bin/bash
SERVICE="ffmpeg"
RTSP_URL="rtsp://192.168.0.119:554/video.pro1"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
YOUTUBE_KEY="dn7v-5g6p-1d3w-c3da"
COMMAND="sudo ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i ${RTSP_URL} -tune zerolatency -vcodec libx264 -t 12:00:00 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv ${YOUTUBE_URL}/${YOUTUBE_KEY}"
if sudo /usr/bin/pgrep $SERVICE > /dev/null
then
echo "${SERVICE} is already running."
else
echo "${SERVICE} is NOT running! Starting now..."
$COMMAND
fi
They have a bunch of neat Pi Video projects on their web site.
http://videos.cctvcamerapros.com/raspberry-pi
No comments:
Post a Comment