KevinEJohn

Semi-Streaming Webcam Video on BeagleBoard-xM

Found my old Creative Labs Notebook webcam and plugged it into the beagleboard. Surprisingly the distribution of Ubuntu already had drivers for it. All I had to do to stream the video to my laptop was “sudo apt-get install vlc” and run the command:

cvlc v4l2:///dev/video0 --sout \ '#standard{access=http,mux=ts,dst=192.168.2.108:8080}'

I used “cvlc” instead of “vlc” because vlc expects an X server to be running and quits if it isn’t. cvlc is command line only compatible. The v4l2 is “Video4Linux” version 2 video capture API. /dev/video0 is the video device linux assigned the webcam. It outputs a stream on the http protocol packaged in mpeg format (mux=ts) and bound to the beagleboard’s own ip address which was 192.168.2.108 on port 8080.

Back on my laptop I fired up VLC, selected “Open network…”, typed in the address http://192.168.2.108:8080 and I was viewing the feed.

The video was its usual poor quality webcam video but what did bother me was the ~2 second delay in the video stream. I ran “top” back on the beagleboard and the video stream used less than 1% of the CPU and there was plenty of memory free so it wasn’t like it was limited by the beagleboard hardware.

I tried a few other streaming options with VLC like RTP instead of HTTP but I couldn’t get them to work on first try. Maybe I’ll put more time into it later.

Comments