jabss
Posts: 69
Joined: Thu May 09, 2013 11:47 am

[SOLVED] Logitech C270 and MJPG-Streamer

Mon May 04, 2015 12:06 am

Hi,

I have a Logitech C270 webcam connected to my RPI via a powered USB hub.

This camera has two operation modes (or capabilities): YUYV and MJPEG.
As far as I could understand, the difference between both is that with MJPEG capability, the image is compressed in the camera itself before being sent to the host (in this case the RPI), while in YUYV, there is no image processing and the raw image is sent to the host. In practice this means that streaming in MJPEG mode uses less than 5% of RPI CPU while in YUYV the CPU goes to the top because the RPI needs to process the raw image and convert it to MJPEG before sending it out.

I guess this kind of explains the difference between ~3€ webcams and 50€ branded webcams.

Having this in mind, I'd like to get my Logitech C270 to stream as MJPEG, so I can consider to have several cameras streaming in my RPI. I'm Using MJPEG-Streamer for that because I want to see the stream in my android phone with an IPCam view app (yes, it works as any other IP cam :D ).

I've seen some other posts here in the forum that suggest the use of the -y flag when running mpeg-streamer, but what this actually does is to "enable YUYV format and disable MJPEG mode", so not a real solution and not taking advantage of the capabilities of the camera.

I have followed several tutorials on line that show how to configure MJPG-streamer and after everything configured, I can only stream with YUYV (taking the RPI's CPU to the top).

Code: Select all

 root@coelheira:~# mjpg_streamer -i '/usr/local/lib/input_uvc.so -d /dev/video0 -r 1280x960 -f 15 -n' -o '/usr/local/lib/output_http.so -w /usr/local/www -p 8080'
MJPG Streamer Version: svn rev: 3:172
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1280 x 960
 i: Frames Per Second.: 15
 i: Format............: MJPEG
 o: www-folder-path...: /usr/local/www/
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled 
I go to the MJPEG-Streamer address (http://[RPI-IP-ADDRESS]:8080) and I can't see any stream or any snapshot. I also tried in my IPCam app in my android phone and I can't get anything...
However, if I run MPEG-Streamer with the camera in the YUYV mode (with the -y flag), it works perfectly from anywhere (except the CPU is going to the 100%):

Code: Select all

root@coelheira:~# mjpg_streamer -i '/usr/local/lib/input_uvc.so -d /dev/video0 -r 1280x960 -f 15 -n -y' -o '/usr/local/lib/output_http.so -w /usr/local/www -p 8080'
MJPG Streamer Version: svn rev: 3:172
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 1280 x 960
 i: Frames Per Second.: 15
 i: Format............: YUV
 i: JPEG Quality......: 80
 o: www-folder-path...: /usr/local/www/
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled
I'm sure the Logitech C270 camera supports MJPEG, and that is confirmed in the following prinouts:
Logitech C270 supported formats:

Code: Select all

root@coelheira:~# v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUV 4:2:2 (YUYV)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 160x120
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 176x144
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 320x176
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 352x288
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 432x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 544x288
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 640x360
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 752x416
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 800x448
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 864x480
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 960x544
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 960x720
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1024x576
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1184x656
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x960
                        Interval: Discrete 0.133s (7.500 fps)
                        Interval: Discrete 0.200s (5.000 fps)

        Index       : 1
        Type        : Video Capture
        Pixel Format: 'MJPG' (compressed)
        Name        : MJPEG
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 160x120
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 176x144
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 320x176
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 352x288
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 432x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 544x288
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 640x360
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 752x416
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 800x448
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 864x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 960x544
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 960x720
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1024x576
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1184x656
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x960
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)

Code: Select all

root@coelheira:~# v4l2-ctl --all
Driver Info (not using libv4l2):
        Driver name   : uvcvideo
        Card type     : UVC Camera (046d:0825)
        Bus info      : usb-bcm2708_usb-1.2.3.4
        Driver version: 3.18.12
        Capabilities  : 0x84000001
                Video Capture
                Streaming
                Device Capabilities
        Device Caps   : 0x04000001
                Video Capture
                Streaming
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
        Width/Height  : 1280/960
        Pixel Format  : 'MJPG'
        Field         : None
        Bytes per Line: 0
        Size Image    : 1632000
        Colorspace    : SRGB
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 1280, Height 960
        Default     : Left 0, Top 0, Width 1280, Height 960
        Pixel Aspect: 1/1
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 15.000 (15/1)
        Read buffers     : 0
                     brightness (int)    : min=0 max=255 step=1 default=-8193 value=128
                       contrast (int)    : min=0 max=255 step=1 default=57343 value=32
                     saturation (int)    : min=0 max=255 step=1 default=57343 value=32
 white_balance_temperature_auto (bool)   : default=1 value=1
                           gain (int)    : min=0 max=255 step=1 default=57343 value=32
           power_line_frequency (menu)   : min=0 max=2 default=2 value=2
      white_balance_temperature (int)    : min=0 max=10000 step=10 default=61432 value=2010 flags=inactive
                      sharpness (int)    : min=0 max=255 step=1 default=57343 value=24
         backlight_compensation (int)    : min=0 max=1 step=1 default=57343 value=1
                  exposure_auto (menu)   : min=0 max=3 default=0 value=3
              exposure_absolute (int)    : min=1 max=10000 step=1 default=166 value=588 flags=inactive
         exposure_auto_priority (bool)   : default=0 value=1
So, any suggestion to get this working in MJPEG?

Thanks,
Jabss
Last edited by jabss on Mon May 04, 2015 8:08 pm, edited 1 time in total.

jabss
Posts: 69
Joined: Thu May 09, 2013 11:47 am

Re: Logitech C270 and MJPG-Streamer

Mon May 04, 2015 10:45 am

Hello,

Some more info that I found from http://wolfpaulus.com/jounal/embedded/r ... pi_webcam/
Asif1924 on April 19, 2015 at 12:43 am
It seems that with the latest raspbian image, and after doing a sudo apt-get update and sudo apt-get upgrade, the mjpeg streamer no longer works. You now have to use the -y when you launch in order to get it to work. It will work with the -y flag but the problem is that the fps will be a LOT slower. I’ve done a comparison with an old raspbian image using the normal mjpeg command as per wolf’s instructions, and with a totally new image based on 2015-02-16’s image and the fps is about 1 to 6 fps. The old image produces fps in the range of 8 – 31 fps, with dual-digit numbers typically more frequent.
And I confirm, it works with the -y flag but the CPU usege increases dramatically.

So, there is somekind of incompatibility brougt by the latest updates of raspbian that somehow break mjpg-streamer.

Any hint?

Thanks,
Jabss

danjperron
Posts: 4383
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: Logitech C270 and MJPG-Streamer

Mon May 04, 2015 10:58 am

With the new kernel mjpeg_streamer need a patch.

Code: Select all

sudo apt-get install subversion libjpeg8-dev \
imagemagick libv4l-0 libv4l-dev
cd ~
svn co https://svn.code.sf.net/p/mjpg-streamer/code mjpg-streamer
cd mjpg-streamer/mjpg-streamer
** Feb 2015 update for 3.18.5+ kernel! Besoin d’un patch

nano input_uvc_patch

Code: Select all

--- plugins/input_uvc/input_uvc.c       (revision 174)
+++ plugins/input_uvc/input_uvc.c       (working copy)
@@ -405,9 +405,13 @@
         if(pcontext->videoIn->formatIn == V4L2_PIX_FMT_YUYV) {
             DBG("compressing frame from input: %d\n", (int)pcontext->id);
             pglobal->in[pcontext->id].size = compress_yuyv_to_jpeg(pcontext->videoIn, pglobal->in[pcontext->id].buf, pcontext->videoIn->framesizeIn, gquality);
+            /* copy this frame's timestamp to user space */
+            pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp;
         } else {
             DBG("copying frame from input: %d\n", (int)pcontext->id);
-            pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->buf.bytesused);
+            pglobal->in[pcontext->id].size = memcpy_picture(pglobal->in[pcontext->id].buf, pcontext->videoIn->tmpbuffer, pcontext->videoIn->tmpbytesused);
+            /* copy this frame's timestamp to user space */
+            pglobal->in[pcontext->id].timestamp = pcontext->videoIn->tmptimestamp;
         }
 
 #if 0
@@ -418,8 +422,6 @@
         prev_size = global->size;
 #endif
 
-        /* copy this frame's timestamp to user space */
-        pglobal->in[pcontext->id].timestamp = pcontext->videoIn->buf.timestamp;
 
         /* signal fresh_frame */
         pthread_cond_broadcast(&pglobal->in[pcontext->id].db_update);
Index: plugins/input_uvc/v4l2uvc.c
===================================================================
--- plugins/input_uvc/v4l2uvc.c (revision 174)
+++ plugins/input_uvc/v4l2uvc.c (working copy)
@@ -450,6 +450,8 @@
         */
 
         memcpy(vd->tmpbuffer, vd->mem[vd->buf.index], vd->buf.bytesused);
+        vd->tmpbytesused = vd->buf.bytesused;
+        vd->tmptimestamp = vd->buf.timestamp;
 
         if(debug)
             fprintf(stderr, "bytes in used %d \n", vd->buf.bytesused);
Index: plugins/input_uvc/v4l2uvc.h
===================================================================
--- plugins/input_uvc/v4l2uvc.h (revision 174)
+++ plugins/input_uvc/v4l2uvc.h (working copy)
@@ -28,6 +28,7 @@
 
 
 #include <stdio.h>
+#include <stdint.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -105,6 +106,8 @@
     int framecount;
     int recordstart;
     int recordtime;
+    uint32_t tmpbytesused;
+    struct timeval tmptimestamp;
 };
 

Code: Select all

patch -p0 < input_uvc_patch
make USE_LIBV4L2=true clean all
sudo make install

sudo nano /usr/local/bin/streamer.sh

Code: Select all

#!/bin/bash
/usr/local/bin/mjpg_streamer -i "/usr/local/lib/input_uvc.so -n -f 10 -r 1024x576" -o "/usr/local/lib/output_http.so -p 10088 -w /usr/local/www" &

Code: Select all

chmod +x /usr/local/bin/streamer.sh
Just run "streamer.sh"


I use 1024x576 which is the best for me on my small robot. Fast enough! to control my robot with a tablet on the net.
Image
This is my robot with a C-270 logitech camera running the latest OS.

You could change the resolution with the parameters after "-r" but use "uvcdynctrl -f" to see which one is build-in.

Daniel
Last edited by danjperron on Fri Jan 19, 2018 4:18 pm, edited 1 time in total.

jabss
Posts: 69
Joined: Thu May 09, 2013 11:47 am

Re: Logitech C270 and MJPG-Streamer

Mon May 04, 2015 12:30 pm

Hello,

Thank you for your reply.
Your instructions were very clear and easy to follow and above all, it solved the problem!

I'll buy more C270 in order to add it to my RPI. :D

Thank you very much!
Jabss

RpiName
Posts: 745
Joined: Sat Jul 06, 2013 3:14 am

Re: [SOLVED] Logitech C270 and MJPG-Streamer

Tue May 12, 2015 1:40 pm

Another solution (mainly for RPi2):

UV4L with the UVC driver and Streaming Server plug-in:

http://www.linux-projects.org/modules/news/
http://www.linux-projects.org/modules/s ... e&artid=14

victorjung
Posts: 3
Joined: Thu Jun 30, 2016 4:08 pm

Re: [SOLVED] Logitech C270 and MJPG-Streamer

Sat Jul 02, 2016 11:52 am

THANK YOU SO SO MUCH!
I was desperate seing tons of old subject showing how to stream video, but as they were old, I had no ideas mjpg-stremer had an issue with the new version of debian.
it now works well on my side!

explicit
Posts: 1
Joined: Mon Aug 01, 2016 8:18 am

Re: [SOLVED] Logitech C270 and MJPG-Streamer

Mon Aug 01, 2016 8:27 am

I'm using the latest Raspbian Jessie (2016-05-27) and Raspberry Pi 1 Model B (512 Mb). I've applied the patch, but it does not work. After that the server was up and the LED on camera blinked for a few seconds. Then I've got errors in the attachment. Full trace:

Code: Select all

Ignoring empty buffer ...
Ignoring empty buffer ...
Ignoring empty buffer ...
Ignoring empty buffer ...

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.624402] Internal error: Oops: 5 [#1] ARM

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.758195] Process systemd-udevd (pid: 116, stack limit = 0xda5ae188)

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.766538] Stack: (0xda5afd58 to 0xda5b0000)

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.772716] fd40:                                                       00000142 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.784357] fd60: da539000 da5afd8c da5afd84 da5afd78 d6956800 da539000 da5afdb4 da5afd88

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.795970] fd80: c04c5000 c04ab53c 00000008 7fffffff da539000 da5aff4c da539000 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.807600] fda0: 00000142 dbb5c6a4 da5afe14 da5afdb8 c04c5598 c04c4f84 da5afe50 da5afdc4

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.819330] fdc0: 0000000c da5afe50 da5aff4c 00000008 00000000 da480d00 00000000 00000074

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.831231] fde0: 00000000 00000000 c047b83c da5aff4c 00000000 00000000 daa11000 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.843342] fe00: da5afe30 00000000 da5afe24 da5afe18 c047b3b8 c04c5288 da5aff34 da5afe28

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.855608] fe20: c047ba70 c047b3a0 c01057dc 00000000 da5f6020 da47b934 192253cf 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.868069] fe40: da5afe6c da5afe50 c006634c 00000000 beeeaed4 00000028 80840fb8 0000011a

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.880651] fe60: da5afe8c 00000000 daa11840 c0107e24 80841fc0 da5b3680 da5afea4 da5affb0

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.893334] fe80: da5b3680 0000081f 80841fc0 da47b900 00000010 dbb5c6a4 00000000 da5afea8

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.906203] fea0: c0573cdc c0053218 00000000 fffffff5 00000000 beeeaef4 00000008 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.919120] fec0: 00000000 00000000 00000800 00000008 da5afeb4 c0823ae4 0000081f c0573b44

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.932037] fee0: 80841fc0 da5affb0 00001000 00003038 da5affac da5aff00 c0009204 c0146dfc

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.944971] ff00: da5aff1c da5aff10 c0146dfc c0146d68 daa11000 00000000 beeeaeb8 00000128

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.957905] ff20: c000f9e8 da5ae000 da5aff94 da5aff38 c047c7cc c047b8a0 00000000 00000001

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.970831] ff40: 7f6428c4 00000000 fffffff7 da5afe90 0000000c 00000001 00000000 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.983741] ff60: da5afe60 00000000 00000000 00000000 00000000 00000000 beeeaeb8 beeeaeb8

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  150.996677] ff80: b6fddf10 00000000 da5affa4 da5aff98 c047c814 c047c78c 00000000 da5affa8

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  151.009618] ffa0: c000f820 c047c808 beeeaeb8 b6fddf10 00000004 beeeaeb8 00000000 0000000c

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  151.022541] ffc0: beeeaeb8 b6fddf10 00000000 00000128 8083cb34 0000011a 808330c0 80840fb8

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  151.035446] ffe0: 00000000 beeeae94 7f61a388 b6f6d37c 60000010 00000004 00000000 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:24 ...
 kernel:[  151.136256] Code: 1a000025 e59030b0 e3530000 0a00001b (e593400c)

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.810011] Internal error: Oops: 1 [#2] ARM

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.948402] Process systemd-udevd (pid: 748, stack limit = 0xd894a188)

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.956749] Stack: (0xd894be78 to 0xd894c000)

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.962924] be60:                                                       00000000 d69568d4

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.974593] be80: c0876ce8 d6956800 d894beac d894be98 c04827e4 c0481bb0 00000000 fffffffe

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.986212] bea0: d894bef4 d894beb0 c04c49f8 c04827c8 c0107dd0 d782d160 d88a2a80 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  151.997855] bec0: 00000000 da619f20 da619f20 d782d160 00000000 d782d180 dad11010 d7871b28

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.009585] bee0: d782d180 00000008 d894bf0c d894bef8 c047a6ec c04c47e4 d6966f00 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.021489] bf00: d894bf1c d894bf10 c047a790 c047a6c8 d894bf5c d894bf20 c012dcdc c047a780

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.033629] bf20: 00000000 00000000 c0109c64 d6966f08 d6966f00 d8869f48 d8869b40 c0889f90

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.045938] bf40: 00000000 c000f9e8 d894a000 00000000 d894bf6c d894bf60 c012de88 c012dc50

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.058412] bf60: d894bf8c d894bf70 c003b2b0 c012de7c 00000004 d894a000 c000f9e8 d894bfb0

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.070976] bf80: d894bfac d894bf90 c0013524 c003b244 8083cb28 00000000 7f660004 00000006

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.083616] bfa0: 00000000 d894bfb0 c000f848 c0013450 00000000 00000000 00000000 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.096453] bfc0: 8083cb28 00000000 7f660004 00000006 beeeaaf8 7f66000c 8083cb28 80833008

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.109361] bfe0: 00000000 beeea93c 7f62de58 b6f6cd3c 60000010 0000000c 00000000 00000000

Message from syslogd@raspberrypi at Jul 29 19:16:25 ...
 kernel:[  152.225862] Code: e5963008 e3a01000 e2433001 e5863008 (e894000c)
Can anybody explain me what I'm doing wrong? Thank you.
Attachments
jdvDY.png
jdvDY.png (19.15 KiB) Viewed 40384 times

henrikmj
Posts: 1
Joined: Sun Dec 31, 2017 9:16 am

Re: [SOLVED] Logitech C270 and MJPG-Streamer

Sun Dec 31, 2017 10:50 am

Thanks for this post. I had similar problems with a c270 on a RPI 2 with Stretch from november 2017.

Raspivid still gives me mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
But after following the above I get MJPG-streamer to work with the camera i MPEG mode.

BR

Henrik

Return to “Troubleshooting”