Archive for category webcam

VLC streaming webcam server

I recently had occasion to create a streaming server to serve a video and audio feed, for use as a baby monitor. So, I decided to re-purpose my aging Eee 701 that’s become next to useless because the LCD is failing. However, it makes a perfect compact low-power headless Linux server. I bought a cheap-ass webcam.

Getting the webcam to recognize under Intrepid was a little bit of a pain, but the gspca drivers will compile under the 2.6.27-11 kernel if you apply this patch.

So, after making sure you have both vlc and v4l-config installed, here’s the VLC command you’ll need:

cvlc v4l:// :v4l-vdev="/dev/video0" :v4l2-adev="/dev/audio" :v4l-norm=1 :v4l-chroma=UYVY :v4l-height=640 :v4l-width=480  --sout "#transcode{vcodec=h264,vb=800,scale=1,acodec=mp3,ab=64,channels=1,audio-sync,vfilter=deinterlace}:duplicate{dst=std{access=mmsh,mux=mp4,dst=192.168.0.24:1755}}"

Replace 192.168.0.24:1755 with your server’s IP and preferred port. This is serving MMS, you can replace mmsh with http or whatever your preferred protocol is. You can also change vcodec and vb, the video codec and bitrate respectively. h.264 is very efficient, but somewhat processor-intensive, but remarkably, my Eee 701 with a 600mhz Celeron handles it just fine.

No Comments