First make sure you have a /tmp or other location that writes to memory instead of thje SD card:
/etc/default/tmpfs:
- Code: Select all
# mount /tmp as a tmpfs. Defaults to no; set to yes to enable (/tmp
# will be part of the root filesystem if disabled). /tmp may also be
# configured to be a separate mount in /etc/fstab.
RAMTMP=yes
Reboot.
Then run raspistill in timelapse mode with the desired parameters:
- Code: Select all
raspistill -tl 500 -t 999999 -vf -w 960 -h 720 -o /tmp/mjpg/test.jpg -n -q 50&
This outputs a JPG picture to /tmp/mjpg/test.jpg every half second. Experiment with the -tl parameter to see how fast you can make it go.
And mjpg_streamer with the desired parameters:
- Code: Select all
mjpg_streamer -i 'input_file.so -f /tmp/mjpg -r'
This reads the current image in /tmp/mjpg, outputs it to the mjpg-stream, then deletes it (-r). As soon as raspistill writes a new image, it reads that, outputs it, and deletes it. Etc, etc.
Access the stream by putting
- Code: Select all
http://<raspberrypi>:8080/?action=stream
This produces as high quality a MJPG-stream you want, but due to the writing and deleting of images, even on ramdisk, it's not giving much of a FPS. Hopefully someone has a better idea.

