I'm trying to get a pi happening as an IP camera, using a CSI camera module. I'd like to minimise CPU usage. I don't need motion detection, just to dump an image from the camera onto the network where another server will do things with it. Any pointers on how to achieve this? Most guides use the 'motion' software but that's designed for motion detection - can the motion detection there be disabled? Is it possible to have the software on the pi only capture images when a network client is connected?

1 Answer 1


I use a simple PHP script to call a bash script to grab a picture and serve it back in PHP. I can call this bash script to grab an image any time I want one or auto refresh, send to mysql, convert to video, ect.

install a web server

sudo apt-get install apache2

Dont forget to set some permissions, also chmod +x everything and set permissions of you html dir

sudo usermod -a -G video $(whoami)
sudo chmod 777 /dev/vchiq


$result = exec("/bin/bash /var/www/html/take_image.sh");
echo $result;

$file = './webcam.jpg';
$type = 'image/jpeg';
header('Content-Length: ' . filesize($file));


raspistill -q 90 -w 640 -h 480 -t 60 -o /var/www/html/webcam.jpg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.