Hot answers tagged

24

When we use fswebcam to grab an image, it appears that the camera is initialized, grabs an image and then disconnected. Some webcams have function to automatically balance their brightness. For example, in a dark room they sense that the brightness needs increased while in a bright area, the brightness may need to be decreased. The camera does this by ...


13

The Pi camera is 'run' by the GPU and can dump full frames into RAM at 15 frames a second .. this is 7.5MB/frame, 15fps = 112.5 Mega BYTES per second .. or you can have full HD resolution 30fps H264 encoded (by the GPU) along with some simultaneous still photos (Google MMAL) all at virtually zero CPU loading .. On the other hand, the Pi USB is 'run' byte at ...


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


9

A cronjob will be more accurate for this sort of work. You can just remove all the time calculations and the loop. Then run crontab -e to edit the crontab file and add this line to the bottom. */1 * * * * /path/to/you/script This will run your executable script once per minute.


9

No one is mentioning that the Maximum total USB peripheral current draw on a rpi 3b+ is 1.2A (power requirements) Having said that your current psu is enough. If the cameras are indeed drawing more than 600mA each (which I really find it hard to believe, unless they are dodgy) you should start exploring the option of a powered usb hub.


7

Finally! I found it after almost two months after trying out every minor change in configuration and peripherals/accessories every day. It turned out to be a USB extension cable issue. I was using a 3 meter USB extension cable, which was not having noise filter. When I replaced the same with 5 meter cable with Noise Filter on both sides, everything works ...


7

Most probably, bottle neck in this case is CPU speed to process the feed. I use Rpi for some basic image processing based automation work and here is what I've noticed. Rpi 1 hardly gives 5 fps at max @ 640x480. Blame single core @ 700 Mhz Rpi 2 gives about 14 - 16 fps at 640x480. (Quad core @ 900 Mhz) I've used Odriod-C1 (SBC mostly similar to Rpi 2 - ...


7

The problem is that the C922 does not advertise its H264 stream over UVC whereas the C920 does. This is because Logitech did not want to enable general use of the H264 for the C922, but instead wanted you to buy the camera with something like Skype which knows internally how to get hold of the data. The reason for this peculiar setup was to enable the camera ...


6

I had the same problem, found this thread when searching for a hardware encoder, not for c920 issues. Nevertheless, execute a firmware update for the raspberry pi and the garbage should be gone $> sudo rpi-update I myself found the solution here: http://wiki.matthiasbock.net/index.php/Logitech_C920,_streaming_H.264#Raspberry_Pi


6

This answer is no longer valid! It was related to original Raspberry Pi model A/B, with USB 2.0 and 100 mbit LAN. Raspberry Pi model 4B has USB 3.0 controller and 1 gbit LAN, so previous limitations no longer apply. Original answer from 2013: Let's do the math. Uncompressed 1080p RGB frame is about ~6MB big. USB 2.0 can transfer up to 60 MB/s but it ...


6

I'm afraid this is most likely impractical. My (crude and thoroughly incomplete) understanding is that the Pi's camera module (which uses an OmniVision OV5647 sensor) is very closely tied to the camera firmware on the GPU. The camera's own ISP is largely ignored and the GPU itself performs the majority of post-processing (de-mosaic, AWB, AGC, etc). In this ...


6

Iphone camera modules use MIPI CSI-2 interface. MIPI CSI-2 cameras could be interfaced using USB camera controller chip. Such chips are widely used in webcameras, notebook cameras, IP cameras and some mobile devices. Internal firmware of USB camera controller must support control registers of particular CMOS module (ov5647 for example, or ov5640 autofocus ...


6

You need a second USB camera (believe it or not) IF you're using motion, you need a different config setup: If you have more than one camera you should not try and invoke Motion more times. Motion is made to work with more than one camera in a very elegant way and the way to do it is to create a number of thread config files. Motion will then create an ...


6

Theoretically, yes. It's possible to connect as many webcams as you can as long as they're powered up as per their requirements. How do you address them ? Each usb web cam that you connect gets listed under /dev/video<n> where n = 0,1,2 .. as number of video devices increase. Ie, if I connect two webcams to my system, I would be able to see two ...


6

Problem Solved!! What I did was: 1) Removed Motion from Raspberry Pi using sudo apt-get --purge remove motion 2) Disabled Raspberry Pi Camera in raspi-config and rebooted the Pi 3) Installed fswebcam using sudo apt-get install fswebcam 4) Tried capturing a photo with it using fswebcam -r 640x480 --no-banner image3.jpg 5) It worked!! Then Installed ...


5

I found the solution to my problem, and I almost don't want to post it because I feel like such an idiot. But for the better of the community I think it is important that this thread is answered just incase another idiot has the same problem I did. So, my WPUT script looked like this: on_picture_save wput −−binary −−remove−source−files ftp://USERNAMEHERE@...


5

You will most likely need the video4linux support libraries. Check if you have them already. locate v4l1compat.so In my case, the output is /usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so, yours might be different if you're on 32bit. If it't not there, just install it: sudo apt-get install libv4l-0 and try to locate it again. Try to launch cheese with ...


5

Found the solution myself. For future reference, here is the solution: The page http://RPI.IP:CONFIGPORT/0/action/snapshot already executes the necessary code to make a snapshot. Calling this page (e.g. cURL) then enables you to take a snapshot when desired.


5

I spent a number of hours recently with my C920 and a Raspberry Pi 3 recently to make a babyCam that I could stream within my home network. I may be able to shed some light but also provide documentation and experience to other users. OK, to use the Video4Linux2 driver to find the camera's video device do this: v4l2-ctl --list-devices My experience: I ...


5

In the absence of any quantitative observations, the community can only guess. What is the current rating for the power supply? Perhaps a power supply with more current can solve the problem if the cameras need more current than what is available. If only one attached camera does not cause a reset, then, the current (amperage) is in all likeliness the ...


4

In the spirit of sharing, I modified the usbreset code provided, in Tai's answer above, to accept parameters like you get from lsusb (in addition). That way it can be invoked conveniently by DEVNUMS=`lsusb | grep -i webcam | tr -d : | awk '{print $2, $4;}'` /home/xyz/cam/usbreset $DEVNUMS which turns, for example, into /home/xyz/cam/usbreset 001 018 The ...


4

I managed to stream from my Raspberry Pi to a web server with the compiled-in module nginx-rtmp. To save hassles with ffmpeg, I recommend a rolling distribution like Arch Linux Arm. raspivid -vf -t 0 -fps 25 -b 2000000 -o - | ffmpeg -i - -vcodec copy -an -r 25 -f flv rtmp://x220/myapp/mystream Some notes: The hardware-encoded H.264 video stream takes ...


4

Remove the FORM element completely (as the markup from exmaple doesn't even conform to HTML specifications). So it looks something like this, in its simplest form. <head> //Import jquery here </head> <html> <img src= "http://192.168.15.22:8081/?action=stream" width="800" height="460"/> <input id="left_button" type="button"...


4

It's unlikely that you'd be able to use a cellphone camera on the RPi. They're very tightly integrated into their motherboards, which makes getting them off the board difficult. If you manage to do that, getting drivers for it and connecting it to the RPi will be a nightmare all its own. The RPi camera module was considered big deal for a number of factors. ...


4

Well, I found a pretty decent solution. I basically use both together. I think the reason why ffmpeg was so slow, is that it already starts encoding before the recording even finishes. So let's say, a couple of frames were captured from the webcam so far, and ffmpeg already starts encoding those. On a regular computer, this would mean that it finishes more ...


4

Do not use the package ffmpeg from the Raspbian repository apt-get - It's, as it says, obsolete. Who knows why its still there. The only solution to stream to another VLC is to compile ffmpeg on your own, but on a Pi takes about 2 hours! cd /usr/src sudo git clone git://source.ffmpeg.org/ffmpeg.git cd ffmpeg On a Raspberry Pi 2 you run this to speed it a ...


4

Could it be something as simple as the camera being recognized as something other than /dev/video0? Does ls /dev/video* yield anything else? It's been many months since I used a C920 on my Raspberry Pi, but at the time, everything "just worked" so long as I used the right device.


4

If you want the Pi to be able to tell you (via email notification or whatever) that it was not shut down properly the last time it was active, a simple solution is to arrange for a simple script that (a) runs at startup and creates a flag file and (b) runs at shutdown and deletes the flag file. At startup, you check if the flag file exists before you create ...


3

Piotr Kula's answer seems to be on the right track but is outdated for Raspberry stretch. There are updated instructions for uv4l on Raspberry stretch at https://www.linux-projects.org/uv4l/installation/ # switch to superuser mode sudo -s # add the repository key for uv4l curl http://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add # ...


3

I was having a similar issue as well. To get rid of those malformed images try: sudo fswebcam -r 640x480 test.jpg -S 2 . The -S instructs it to skip a number of frames,in this case two. Hope it helps!


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