Streaming a webcam over narrow bandwidth

Just some random lego that I whipped up this week. Wanted to stream a webcam into the internet using a minimum of upstream bandwidth (that’s the reason I stream it to a server with a fast connection, where it is provided to clients). I probably could have used a higher fps oder quality, but I wanted to find a solution that didn’t require any additional software to be installed clientside (and this solution works over proxies).

Client side: grab video output from /dev/video0, put a timestamp in the picture, and shove it to the IP 10.11.12.13 (not really).

vlc v4l:/dev/video0:size=320×240 –sub-fps 3.0000 –v4l-fps 3.0000 –sout-transcode-fps 3.0000 \
–sout “#transcode{vcodec=WMV1,vb=60,scale=1,sfilter=time,fps=3}:\
duplicate{dst=display,dst=std{access=rtp,mux=ts,dst=10.11.12.13:1234}}” \
–noaudio –no-sout-audio –time-format %Y-%m-%d,%H:%M:%S \
–time-position 10 –time-color 16777215 –time-size 12 &

Server side : grab the stream from the cam (no options needed since we sent it to the default port 1234) and provide it as mms:// on port 8080 (I choose mms:// since all windows computers have the windows media player)

vlc udp: –sout ‘#standard{access=mmsh,mux=asfh,dst=10.11.12.13:8080}’