#!/bin/sh echo -ne "HTTP/1.0 200 OK\r\n" echo -ne "Content-Type: multipart/x-mixed-replace;boundary=--mjpg-boundary\r\n" echo -ne "Pragma: no-cache\r\nCache-control: no-cache\r\n" echo -ne "\r\n" fps=30 delay=$((1000000/$fps)) while [ 1 ]; do for file in *.jpg; do echo -ne "--mjpg-boundary\r\n" echo -ne "Content-Type: image/jpeg\r\n" echo -ne "Content-Length: $(stat -c %s $file)\r\n" echo -ne "\r\n" cat $file echo -ne "\r\n" usleep $delay done done