2016年11月8日 星期二

web cam server


Whole project come from
https://pimylifeup.com/raspberry-pi-webcam-server/


1. install "ffmpeg"
http://www.deb-multimedia.org/
http://ffmpeg.org/

2. install  "libjpeg-turbo" for JPEG support
http://www.libjpeg-turbo.org/
http://www.linuxfromscratch.org/blfs/view/svn/general/libjpeg.html

3. install "motion"
https://github.com/Motion-Project/motion

4. enable /dev/video0
http://raspberrypi.stackexchange.com/questions/10480/raspi-camera-board-and-motion
$sudo modprobe bcm2835-v4l2

5. allow stream to other computer
$vim motion-dist.conf
replace "stream_localhost off" by "stream_localhost on"

5. execute motion camera server
$cd ~/mmal/motion-master
$sudo ./motion -n -c motion-dist.conf

6. link to web server by broswer
ex. IP:8081 (default port)
192.168.x.x:8081

7. you could also set up authentication for user to log in server
In motion-dist.conf

set  "stream_auth_method 2"
set  "stream_authentication username:password"




some open source

http://www.jvcref.com/files/PI/documentation/html/
https://www.ffmpeg.org/

camera available function from official web
https://www.raspberrypi.org/blog/camera-board-available-for-sale/

!!! RPi-cam-web-interface
http://elinux.org/RPi-Cam-Web-Interface

!!! pi car
https://github.com/shaunuk/picar

Find my raspberry on nerwork



https://www.raspberrypi.org/documentation/remote-access/ip-address.md



ex.
nmap -sn 192.168.1.0/24

1. Install namp in my Mac air

install brew first
http://brew.sh/index_zh-tw.html

install by brew
$brew install nmap