babadoctor
Posts: 1
Joined: Mon Mar 09, 2015 1:18 am

Raspberry Pi Security Camera

Mon Mar 09, 2015 1:22 am

Hello

I have a raspberry pi B+ that i want to use to monitor my house when im away. For whatever i try i keep failing/ something goes wrong. The only thing i want to do is make my pi stream video over the Local Area Network (I can take care of port forwarding if possible) and be able to watch it somehow.


Thanks!
babadoctor

amadeus84
Posts: 18
Joined: Sun Jun 22, 2014 5:55 pm

Re: Raspberry Pi Security Camera

Thu Mar 12, 2015 2:42 am

What exactly have you tried, and what doesn't work?


On your PC:

suppose it's IP = 192.168.1.20 and that you want to receive the video stream on port 56789.

1) Open port 56789 in the firewall.
2) listen with nc on port 56789 and pipe to mplayer

nc -k -l 56789 | mplayer -fps 31 -cache 4096 - # note the dash at the end: it tells mplayer to read from stdin.



On the RPi:

1) Enable camera like this:

http://www.raspberrypi.org/documentatio ... /README.md

2) stream with raspivid:

raspivid -t 0 -o - -w 320 -h 240 | nc 192.168.1.20 56789



I get some 10-20 seconds latency this way, which is unacceptable. This post claims to obtain <1 second latency:

http://www.raspberrypi.org/forums/viewt ... 57&p=92461



I wonder if RPi 2 has the same latency. Does anyone know?

Return to “Troubleshooting”