Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

30

Streaming with HLS Apple's proprietary method of streaming live video. It is called HTTP Live Streaming (HLS) and is only supported by Apple's technology. Google (Chromium / YouTube) uses its own implementation called dash mpeg and everybody else is either confused or using H.264 encapsulated in MP4. PROS Can stream HD 1080p on LAN to any device that ...


20

UV4L MMAL Thanks to comment from @mpromonet for the update on the Linux-Projects V4L2 driver that now implements MMAL very efficiently - but it is still a work in progress. Follow these instructions to install the linux-project repository and install the UV4L driver with extras. Then install the server and mjpeg. If you want, you can experiment with the ...


16

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


10

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


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.


8

There is a list of verified peripherals (and those with issues) available here. You don't mention the distribution you are using nor the webcam brand/model but since the RPi is so new your particular combination may not have been tried yet. You may want to do a Google search to see if anyone has gotten your cam to work with the x86 build of Debian or Arch,...


8

Streaming with MJPEG U4VL A kernel interface with a build in HTTP(S) server. http://www.linux-projects.org/uv4l/tutorials/streaming-server/ Raspberry Pi Cam Web interface A nice project by silvanmelchior that deploys a web server, dvr like, multi target streaming server. Needs more information https://github.com/silvanmelchior/RPi_Cam_Web_Interface ...


8

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


7

Good question and good idea. Shuckle suggests some code that resets the USB bus for the device, which may clear up some problems. See official forum: http://www.raspberrypi.org/phpBB3/viewtopic.php?p=219980#p219980 I quote his c code, which I have not tested yet: #include <stdlib.h> #include <stdio.h> #include <fcntl.h> #include <...


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


6

If you have not already done so, you should try updating your firmware and kernel, in case you are using the officially supported Debian distribution (aka Raspbian). Just follow the instruction you can find here. They just fixed many USB issues (the usb host driver still has a lot of issues left), so you would want to try that. Also, you should check if the ...


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

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


5

To stream to services like UStream you can use ffmpeg: ffmpeg -f video4linux2 -i /dev/video0 -qscale 1 -r 25 -vcodec libx264 -b 636k -aspect 4:3 -s 640x480 -ar 44100 -ab 64k -async 1 -g 6 -threads 2 -f flv "${RTMP_URL}/${KEY} flashver=FME/2.5\20(compatible;\20FMSc\201.0)" Where: /dev/video0: where your webcam is connected on Linux RTMP_URL: Ustream ...


5

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


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

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


5

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


4

Have you tried: lsmod rmmod uvcvideo modprobe uvcvideo nodrop=1 timeout=5000 quirks=0x80 Also try to remove all "auto" settings through guvcview It worked perfectly for me. It has been running för 24 hours straight with a steady 15fps @ 320x240. Please check this for details. Cheers


4

About "works with external power": This generally means that it has been tested with a USB hub that uses an external power supply. So the power needed for the devices connected to this USB hub is not extracted from the Raspberry Pi but from this external power supply. The Raspberry Pi can only provide around 140mA per USB port, while the USB specifications ...


4

The limit on resolution went away when I switched from motion to MJPG-streamer. MJPG-streamer streams 1280x720 at 5FPS. With 3 computers connected to the stream, the CPU usage is only around 10%. The disadvantage with MJPG-streamer is that it does not have motion detection. However, this solution is not completely stable. I have to reboot the RPi every few ...


4

Have you tried connecting the webcam to a powered USB hub? Some devices require more current than the Raspberry Pi can provide, and can behave erratically when connected to the built-in USB ports.


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

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 works in half duplex so one-way data stream won't exceed 30 MB/s. It means typical single USB 1080p webcam can provide you 5fps. There are webcams with hardware H.264 or MJPEG encoders which could provide ~10x more frames, but a) 60fps would be ...


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

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

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.


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


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