raspberryPi_webCam

Web_Server_Linux+RaspberryPi


I got many different method to make it successful:

Method 1:

open terminal and paste in server side: 

avconv -f video4linux2 -i /dev/video0 -vcodec mpeg2video -r 25 -pix_fmt yuv420p -me_method epzs -b 2600k -bt 256k -f rtp rtp://192.168.1.94:8089

Clint side terminal:
avplay -i rtp://
192.168.1.94:8089
You can put this inside php make it as your own webside.
Method 2:
This method good for robots. Faster and 100% successful:
Open terminal:
ffplay -f video4linux2 -framerate 15 -video_size 320x240 /dev/video0
Method 3:


1. Get the software ready
Ok so I am going to assume that you have a working PI on some kind of LAN with internet access, the next step as always is to update your PI ensuring you have the latest software and drivers installed.
?
1
2
sudo apt-get update
sudo apt-get upgrade
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).
?
1
sudo apt-get install motion
2. Plug in your web cam
So now the software is on there it’s time to plug in the web cam and ensure that everything is working, ensuring that you plug it into the powered hub, and then into the PI. Otherwise the webcam will not get enough power to turn on.
When plugged in type the “lsusb” command, you should see a line there with your web cam manufacture, that proves that you have the basic connectivity working.
?
1
2
3
4
lsusb
....
Bus 001 Device 002: ID 04ea:1142 Microsoft Corp.
....
3. Configure the software
?
1
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
?
1
sudo service motion start
Quick Example Image
Quick Example Image
Then after about 30 seconds browse to the new web interface, which should be at the below URL (where 192.168.0.100 is your Raspberry PI’s IP address)
http://192.168.0.100:8081
5. Final Tweeks
Web Port
You could change the web interface port to 80 (from the default 8081), so that you can just browse to the IP address without having to put :8081 at the end, it’s really simple to do, just:
?
1
sudo nano /etc/motion/motion.conf
And then change “webcam_port 8081″ to “webcam_port 80″, save the file, and restart the motion service.
?
1
sudo service motion restart

If it's not installing, follow this:
sudo apt-get purge motion, then rebooted the Pi then reinstalled.
sudo apt-get install motion

*rf:http://pingbin.com/2012/12/raspberry-pi-web-cam-server-motion/

Configuring the Ubuntu Desktop Menu System

Customizing an Ubuntu Desktop Menu

To customize a menu, right click over the menu name in the panel and select Edit menu. The Main Menu dialog will subsequently appear as follows:

Editing GNOME Desktop Menus