Hot answers tagged

87

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: ...


57

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.


42

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 ...


37

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: vlc tcp/h264://192.168.66.154:3333 (assuming 192.168.66....


36

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. Using Netcat: On the client (Run the ...


30

I tried some options. However, I found the best result using that project: RPi-Cam-Web-Interface from eLinux community the stream has almost zero delay. good luck :)


29

better: on the rpi: raspivid -t 0 -w 1280 -h 720 -hf -ih -fps 20 -o - | nc -k -l 2222 on your computer: mplayer -fps 200 -demuxer h264es ffmpeg://tcp://10.0.1.3:2222 supports reconnecting


26

To enable motion to run as a daemon on startup do the following: Edit /etc/default/motion 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 Finally reboot. You can confirm motion is running by checking the output from the following command: sudo ...


23

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: import ...


22

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 ...


21

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 ...


18

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, ...


17

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.


17

The option to enable the camera is in the "Interfacing Options" submenu. It will be clearly labelled ("Enable/disable connection to the Raspberry Pi Camera").


12

rmmod bcm2835-v4l2 modprobe bcm2835-v4l2 Destroys and re-creates /dev/video0 Just ran into the same problem and that fixed it for me.


12

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....


11

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 ...


10

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: #!/bin/sh # Use V4L2 (preferred) instead of raspivid # ...


10

to load the model after each reboot, use this setting sudo nano /etc/modules enter bcm2835-v4l2 exist and save the fle sudo reboot


10

The options: raspivid -t 0 -o - | nc -k -l 1234 raspivid -t 0 -o - | cvlc stream:///dev/stdin --sout "#rtp{sdp=rtsp://:1234/}" :demux=h264 cvlc v4l2:///dev/video0 --v4l2-chroma h264 --sout '#rtp{sdp=rtsp://:1234/}' raspivid -t 0 -o - | gst-launch-1.0 fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=SERVER_IP ...


9

I've been working on a bit of Python code to do exactly this. You can find it here: https://github.com/sdenton4/pipic And there's an example timelapse here: http://inventingsituations.net/2014/01/01/pilapse3/ 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 ...


9

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 \ ! ...


9

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 ...


8

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. ...


8

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 ...


8

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 ...


8

I missed the all-important sudo rpi-update, which provided the firmware upgrade that I needed to run the camera. Everything's now up and running.


8

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 ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'YU12' Name : ...


7

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 ...


7

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible