The solution suggested by Diego is good except that it's pretty slow and has a huge video delay since the vlc there re-streams a stream of the raspvid. Since 12/2013 there is an official v4l2 driver available: http://www.ics.com/blog/raspberry-pi-camera-module#.VJFhbyvF-b8
This renders the mentioned re-streaming obsolete. Simply load the module and use it:
You can access the camera board on /dev/video0 by running the command:
sudo modprobe bcm2835-v4l2
This will have to be run on every boot of the device. Or you can put modprobe bcm2835-v4l2 in /etc/rc.local to make it run on every boot automatically.
There are several options you can choose between. At my work we are using VLC to stream video captured by Raspberry Pi Camera from our server-rooms to the office. One downside of this is that there are about 5 seconds delay and I haven't found a solution to this. The following is our setup:
Have raspbian installed and updated and make sure your camera is ...
The easiest way I have found, to get a live videofeed from an headless raspberry pi, with a raspberry pi camera.
This solution works right out of the box, without installing additional software on the PI.
On the PI:
raspivid -t 0 -l -o tcp://0.0.0.0:3333
On the Computer, one can stream with VLC:
Netcat (nc) seems to be the one with the smallest delay.
In my experience, VLC has the biggest delay. On the other hand, there is a VLC client for Android, which is convenient.
<IP-OF-THE-CLIENT> is the IP of the computer that should receive the video stream.
<IP-OF-THE-RPI> is the IP of the Raspberry Pi.
On the client
(Run the ...
To enable motion to run as a daemon on startup do the following:
and change start_motion_daemon=no to start_motion_daemon=yes
Next enable motion by entering the following at the command line:
sudo systemctl enable motion
You can confirm motion is running by checking the output from the following command:
I must admit I wasn't aware of the 2Gb limitation in the stock build of raspivid (mentioned in Linus' answer). An alternative (if you don't fancy recompiling userland) would be to use picamera (Python supports 64-bit file pointers out of the box). For example, the following should record a wide-screen 360p video in H.264 happily for 24 hours:
I just had this same problem. Here is what eventually worked after reading this (From the comments it looks like you had the same issue as I did):
vcgencmd get_camera (Returned supported=1 detected=0)
Check to make sure ribbon was facing the right way (it was)
Check to make sure ribbon is all the way in the connector slot (it was)
Check to make sure ribbon ...
To take pictures in 0.025s with picamera you'll need a frame-rate greater than or equal to 80fps. The reason for requiring 80 rather 40fps (given that 1/0.025=40) is that currently there's some issue which causes every other frame to get skipped in the multi-image encoder so the effective capture rate winds up as half the camera's framerate.
The Pi's camera ...
Let's start by looking at the camera modules themselves. The v1 camera module is capable of 2x2 and 4x4 binning (see the camera modes table); I've heard there's an 8x8 binning mode as well but the firmware devs weren't able to get it working. This is why the v1 module can achieve full field of view (FoV) in most modes.
The v2 camera module by comparison, ...
The accepted answer is out of date.
The official camera is available from most channels that sell the Raspberry Pi.
I don't believe that there are any other cameras working with that interface though (yet!)
However some people have used additional lenses or removed the IR filter for their special purposes/needs.
This error was resolved when I disconnected and reconnected my camera module.
Somehow my camera module must have been wiggled loose when I was working with it and the Pi was not able to detect the camera. I ran the command:
vcgencmd get_camera and got Returned supported=1 detected=0
Once the camera was reconnected, I was able to run
raspistill -o image....
I seem to be the only person in the entire world who wants to use a regular Linux distro on the RPi, since I could find very little documentation on how to setup the camera from scratch, but in case someone else wants to use the Raspberry Pi camera on Ubuntu or any other distro besides Raspbian, here's how you do it.
Enable kernel/firmware settings required ...
As of 2017 (or perhaps earlier) raspivid is no longer the preferred method, with the Pi devs recommending people use V4L2 instead.
So this method allows you to stream H264 via RTP using V4L2 instead of raspivid. I noticed this method results in fewer dropouts and allows a higher bitrate:
# Use V4L2 (preferred) instead of raspivid
I've been working on a bit of Python code to do exactly this. You can find it here:
And there's an example timelapse here:
You should note that both shutter speed (SS) and ISO are directly controllable with recent firmware. (Run sudo rpi-update to get the latest firmware ...
With Ubuntu 14.10 and Gstreamer I reach 100 to 116 ms latency with 1280 x 720 @ 60Hz.
Tanks to @Antonvh who puts me on the right way.
I reproduce here the solution for latter reference.
To stream from the Pi :
raspivid -t 0 -b 2000000 -fps 60 -w 1280 -h 720 -o - \
| gst-launch-1.0 -e -vvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 \
There are a few things in addition to the pi itself that are required, and if you do not already have them, you would want a kit that includes them. Generally these are appropriately priced, but depending on what is available to you it may also be easier to buy them separately:
Micro SD card. You can get these with an operating system pre-burned, but do ...
standard raspbian image has motion program installed or you may easily install it with:
$ sudo apt-get install motion
that is surveillance software to capture, analyse images from the camera, detect a lot of different things, and do a log of other things (like sending mail, recording a video or saving pictures) when or even before the motion is detected. ...
There's a simple way to do it with VLC, this post explains step by step how to do it, in few words this is the way you do it:
After having the camera fully set and ready to be used(connected and enabled), now you need to download the package that will perform the live streaming functionality, getting it is as simple as just executing this command in your ...
I recently used Tesseract which is an OCR software that's open source and it gives highly accurate results.
To install it on pi, type in the command line:
sudo apt-get install tesseract-ocr
Then set a camera to periodically take pictures preferably using Cron (which schedules tasks) and fswebcam (takes pictures using USB cams)
Save the pictures in a ...
None of the above.
Take advantage of the v4l driver (modprobe bcm2835-v4l2), and either use the v4l2-ctl command from the CLI, or, if you want to get fancy, use the v4l2 libraries from python or C:
# v4l2-ctl --list-formats
Index : 0
Type : Video Capture
Pixel Format: 'YU12'
Name : ...
Inspecting the source code to Raspivid reveals that there are two ways to interrupt the capture.
The first method is to send any SIGNAL to the capture process. The signal is processed by the following code in Raspivid:
* Handler for sigint signals
* @param signal_number ID of incoming signal.
static void ...
The problem is the RaspiCam. The camera does not have auto-focus! I had the same issue at another topic...
Your options are:
Try another device e.g. any webcam with auto-focus
Scan your barcodes with a cheap usb scanner
For the first option I think zbar is a good way to go. I don´t know your exact use case but you can automate this process with nearly any ...