Hot answers tagged

55

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.


7

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


5

The standard motion dosn't work with the RPI camera. There is a variant called motion-mmal in development which works with the RPI camera http://www.raspberrypi.org/phpBB3/viewtopic.php?t=44966&p=379561#p374790 is a forum chat on setting it up http://www.codeproject.com/Articles/665518/Raspberry-Pi-as-low-cost-HD-surveillance-camera this is a guide on ...


4

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.


4

By stream I assume you mean over the network. I recently researched the same question (specifically, streaming over RTSP) and these are the best options out there: https://github.com/mpromonet/v4l2rtspserver https://www.linux-projects.org/uv4l/ RPi-Cam-Web-Interface on elinux.org I tried v4l2rtspserver first since it seemed the simplest. I'm happy with the ...


3

The source for the bcm2835-v4l2 kernel module is in the linux staging tree at linux/drivers/staging/vc04_services/bcm2835-camera/ You can find it e.g. in the RPF Linux repository at https://github.com/raspberrypi/linux For the current RPF Linux kernel (4.14.y) it's at https://github.com/raspberrypi/linux/tree/rpi-4.14.y/drivers/staging/vc04_services/...


3

You need to select the input and output format. The v4l2 driver and the Pi Camera can stream video directly compressed with h264, which is convenient. By not specifying any format, you get some raw video format which then gets encoded by ffmpeg in h264 (this usually takes a lot of CPU and time). The command would be ffmpeg -f v4l2 -input_format h264 -i /...


2

Manually running modprobe bcm2835-v4l2 is good for temporarily loading a kernel module. To load a module at every boot, add it to /etc/modules: bcm2835-v4l2


2

(from https://raspberrypi.stackexchange.com/a/18214/12486) You will be able to access to the raspi camera like other V4L2 device using : the official kernel V4L2 driver bcm2835-v4l2 sudo modprobe bcm2835-v4l2 the unofficial userspace V4L2 driver for the Raspberry Pi Camera Module uv4l --driver raspicam --auto-video_nr


2

to get motion to work(out of the box) you can install the Userspace Video4Linux2 It will create the /dev/video0 device node correctly on the Raspberry Pi. I have just followed the install instructions and not only does motion just work, the example(optional) motion.conf sets up the Pi as a streaming server so that you can access it remotely in a browser. ...


2

The source lines that are printing the error are here in libav Digging further, you can see that -12 corresponds to ENOMEM, returned here in lavfilters-ffmpeg i.e. it practically does if (!buffer) return AVERROR(ENOMEM) Given this happens after 30 to 60 minutes and you're executing this on a Pi, is it possible you are actually running out of memory? What ...


2

Update: You can also search for the headers here. Raspberry Pi 2's kernel header will have "-v7" in it. Download the appropriate version and run sudo dpkg -i [package] You could pull the kernel source code for 4.1.17-v7, cd into it, then run make_headers You could: # Get rpi-source sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-...


2

No. The newer kernel is needed to support the armv7 processor and extra memory on the PI2.


2

I managed to get it to work on YouTube Live with the following command: ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero \ -f v4l2 -input_format h264 -i /dev/video0 -codec:v copy \ -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/REMOVED I can set the resolution by doing: v4l2-ctl ...


2

Here is how I pipe my HIK IP camera to youtube. This does NOT include audio, and is NOT a USB camera, but perhaps it helps [NOTE: Youtube requires an audio stream, even with a video only stream]. (this is an old script, I have better BASH coding standards today). #! /bin/bash YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # Server URL KEY="USERNAME.xxxx-...


2

We have a case of a program that runs without error on some cameras (such as mine), but gives an error specifically with Raspberry Pi Camera Module V2. We can track this down starting with the dmesg error: Jan 06 01:40:20 raspberrypi kernel: bcm2835-v4l2: Failed to enable capture port - error -28. Disabling camera port again Error 28 (ENOSPC) is "No ...


2

The correct commands to start an RTSP server on the Raspberry Pi are, for example: uv4l --driver raspicam --auto-video_nr --framerate 30 --extension-presence=0 cvlc v4l2c:///dev/video0:width=640:height=480:chroma=H264 --sout '#rtp{sdp=rtsp://:8554/}' --demux h264 Do not forget to pass --extension-presence=0 to uv4l. On the client side you can then play ...


2

As you are using v4l2 loopback, you can search for general streaming of camera video. ffmpeg and cvlc are keywords you might want to search here. But unless you use HLS (HTTP Live Stream) which is not that easy to set up (at least I did it once and was not convinced from the results regarding quality and delay), you will be stuck with VLC as one of the few ...


1

Build: to build the kernel module run: $ make this should give you a file named "v4l2loopback.ko", which is the kernel module Install: to install the module run "make install" (you might have to be 'root' to have all necessary permissions to install the module). if your system has "sudo", do: $ make && sudo make install if your system ...


1

I managed to get LED control back. I suspect some USB interfaces interferences. I have a Rii wireless keyboard attached to my Pi. I did the following: execute: uvcdynctrl -c. LED control is not in command output Unplug the Rii USB dongle execute: uvcdynctrl -c. LED control is not in command output Replug the Rii USB dongle execute: uvcdynctrl -c. LED ...


1

This appears to be code for "you haven't assigned enough memory to the GPU". Using the raspivid command in this situation resulted in: mmal: mmal_vc_component_enable: failed to enable component: ENOSPC mmal: camera component couldn't be enabled mmal: main: Failed to create camera component mmal: Only 64M of gpu_mem is configured. Try running "sudo raspi-...


1

On my setup (stretch, pi zero, and pi camera via csi) I needed to say --device=/dev/video1 to get v4l2-ctl to work


1

Adding to Pedro Lobito's response: While I was testing at the command line using v4l2-ctl to perform test captures a lot of the supported pixelformats failed with "Operation not permitted" when trying for the full resolution supported by the chip 3280x2464 or just hang indefinitely with no error message and restarting the terminal and running any v4l2-ctl ...


1

I was getting VIDIOC_STREAMON: Operation not permitted while using cv2.VideoCapture(0). Setting the GPU memory to a higher value, solved the problem.


1

The raspicam driver is optional. That said, you are missing --auto-video_nr in your command line to create the /dev/video0 node expected by your program: sudo killall uv4l (in case some other instances are running, e.g. raspicam - however, this is optional, as multiple instances can run simultaneously) uv4l --driver raspidisp --display 0 --framerate 5 --...


1

Awesome. Realizing the Pi supports v4l2loopback, I think various tutorials should be updated to use that rather than vivid (disabled in Raspbian by default). I'd to use the ethernet port to connect my RPI and my Windows PC and stream either the video stream directly (/dev/video0) For streaming V4L2 over ethernet, I recommend webrtc-streamer. VLC doesn't ...


1

It was a DV webcam: apt-get install dvgrab dvgrab - | mplayer -j They may be modules to install or load too (e.g modprobe raw1394)


1

If you are using OpenCV to show the video feed then you are probably following their suggested tutorial in doing so. In which case, usually there is some sort of waitkey() command that gives the system time to show each individual frame. Try making this number something smaller, say: waitkey(1). Also, you should keep in mind that running analysis on live ...


1

I am unfamiliar with cvlc, but on Linux there are a few checks you can do from the command line on both/either the RPi with the camera, and a client to see if the daemon is running, listening and if connection to the daemon's port can be made. The following all assume that the cvlc daemin is listening on port 12345 as in your question above. On the RPi ...


1

SOLVED: with the command lsmod, you can see which drivers are installed. I had v4l2_common installed. I successfully loaded this driver with sudo modprobe v4l2_common (insert correct driver). And yes, the pi can handle a live video feed!


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