Skip to content

edhull/RPiRemoteControlCam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Remote Control X/Y Camera

Installation

(These instructions are most likely incomplete! Personalise/modify them to your setup)

$ sudo apt-get install python-dev python-rpi.gpio python-pip motion
$ sudo pip install flask
$ git clone https://github.com/jacksonliam/mjpg-streamer
$ ./mjpg-streamer.sh &
$ python picam.py &

mjpg-stream.sh will run the Flask web server and will receive button presses, whilst picam.py will control streaming the camera data. Both scripts must be running simultaneously. A cleaner solution is to run each script inside a Screen window on boot via /etc/rc.local:

echo "Starting python webserver..."
screen -S python -dm bash -c 'python /home/user/picam.py;exec bash'
echo "Starting webcam stream..."
screen -S webcamstream -dm bash -c '/home/user/mjpg-stream.sh;exec bash'
exit 0

If you want to record footage from the camera, you can use Motion.

$ sudo apt-get install motion

... and modify the /etc/motion/motion.conf file to use the camera stream as an input rather than a USB webcam (as well as a bunch of other settings!)

# URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// or file:///)
# Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
netcam_url http://127.0.0.1:1111/?action=stream 

Hardware

Dependencies

Further reading:

Version

v1.0 Ed Hull (11/2015)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published