For simple testing you can even use python as the webserver running the CGI-script. Create a directory called cgi-bin and put your CGI-scripts there. Then you can run python from the command line in the directory containing the subdirectory cgi-bin like thismikerr wrote:Motion is actually quite flexible on input, as well as using the normal V4L and UVC camera input
it can also use IP cameras by putting netcam_url in motion.conf:
So, we can workaround the lack of V4L driver by making a "local" ip camera out of the raspi camera.
motion.conf:- get the Raspi camera to dump jpegs into a local webserver running on the pi:Code: Select all
netcam_url http://127.0.0.1/cgi-bin/raspicam
/usr/lib/cgi-bin/raspicamCode: Select all
raspistill -o -
Code: Select all
python -m CGIHTTPServer 8080
Code: Select all
http://rpicam:8080/cgi-bin/webcam