Webcams here indicates USB Camera here,which can be driven directly by USB port on the Orange Pi.This page mainly instruct reader to use USB camera in two aspects:local usage & Web Camera Sever.
- Image: Raspbian for BP.
- USB Camera: Bluelover S11 (20RMB).
1. First check the usb camera has been identified by your Orange Pi
pi@Orangepi ~ $ lsusb Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub [color=Red]Bus 001 Device 003: ID 0ac8:3420 Z-Star Microelectronics Corp. Venus USB2.0 Camera[/color] Bus 001 Device 004: ID 062a:4101 Creative Labs pi@Orangepi ~ $ ls /dev/video* [color=Red]/dev/video0[/color]
2. Install mplayer
sudo apt-get install mplayer
3. Start the program to use USB camera to capture video
sudo mplayer tv://
4. The below is the result
Web Camera Sever
According to the above,the USB camera works well on BP, we can watch the video on monitor connected to BP. But sometimes we want use BP to play a role as IP camera so that it has much fun. It can be used to monitor your house frome anywhere so that nobody dare to break into your lovely house.
1. Reference to the above ,use command "lsusb" to check the usb camera has been identified by our BP. Now we need to install the software, we are going to be using a great little application called Motion, this will do a few things for us including accessing the USB cam, getting the images, and streaming them via a built in web server. As the name suggests it will also track and trigger events on motion been detected in the video frames #:(more on that later).
sudo apt-get install motion
2. Make sure that your BP has access to internet and check the IP address of your BP:
3. Configure the software
sudo nano /etc/motion/motion.conf
In here there are a few basic changes that you need to perform:
Daemon = OFF to ON webcam_localhost = ON to OFF
You can change other settings but it’s recommend you don’t take more than 2 frames, and you been the default frame pixel size, for stability.
4. Start the software To ensure that the motion service will actually start as a daemon we need to change another configuration setting, so enter the following:
sudo nano /etc/default/motion
Then change the value "start_motion_daemon=no" to "yes"
Finally you can start the motion service to stream the web cam images
sudo service motion start
Then after about 30 seconds using your PC browse to the new web interface, which should be at the below URL (where 192.168.1.125 is your Orange PI's IP address)
Note:1.Use Firefox browser.Because I test it in other browsers,such as IE , Google Chrome, Cheetah Browser(in China,liebao), 360 etc.Maybe they lack necessary plugin about web usb sever,or other reasons.2.You can modify the image width and image height(default 352,288) to suitable srceen .If you cannot get the result,you also are recommended to try to modify the image width and image height.
If all goes well, you can watch the frames captured by the USB camera.
Motion Home Page: http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome