User Guide
52
MJPG-streamer (Operation on Raspberry Pi)
A. MJPG-streamer Installation
Introduction
The acquisition and transmission of video data by the SunFounder Smart Video Car is fulfilled
based on MJPG-streamer.
MJPG-streamer is a command line application that copies JPG-frame from a single input
plugin to multiple output plugins. It can be used to stream JPEG files over an IP-based network
from the webcam to a viewer like Firefox, Cambozola and Videolanclient or even to a
Windows mobile device running the TCPMP-Player.
It was written for embedded devices with very limited resources in terms of RAM and CPU. Its
origin, the "uvc_streamer" was written, because Linux-UVC compatible cameras directly
produce JPEG-data, allowing fast and performant M-JPEG streams even from an embedded
device running OpenWRT. The input module "input_uvc.so" captures such JPG frames from a
connected webcam.
Installation
Plug the USB camera into Raspberry Pi, and run the command lsusb. The GEMBIRD represents
the USB camera; since it is printed on the screen, it indicates the system has recognized the
camera.
lsusb
You'll see:
pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 1908:2310 GEMBIRD
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast
Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Check whether the driver for the camera works normally:
ls /dev/vid*
You'll see:
pi@raspberrypi:~ $ ls /dev/vid*
/dev/video0
If /dev/video0 is printed, the driver is in the normal state.
Then, install the following software needed:
sudo apt-get install subversion
sudo apt-get install libv4l-dev
SunFounder