/usr/local/etc/ffserver.conf:
Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
NoDaemon
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
</Feed>
<Stream test.swf>
Feed feed1.ffm
Format swf
VideoCodec flv
VideoFrameRate 2
VideoBufferSize 80000
VideoBitRate 100
VideoQMin 1
VideoQMax 5
VideoSize 352x288
PreRoll 0
Noaudio
</Stream>
<Stream status.html>
Format status
# Only allow local people to get the status
ACL allow localhost
#My Local network – change this to yours
ACL allow 192.168.1.1 192.168.1.255
</Stream>
script to start streaming:
#!/bin/sh
ffserver -f /usr/local/etc/ffserver.conf &
sleep 2
LD_PRELOAD=/usr/local/lib/libv4l/v4l1compat.so ffmpeg -r 4 -s 352x288 -f video4linux -i /dev/video0 http://localhost:8090/feed1.ffm >/dev/null &