Modify

Opened 3 years ago

Last modified 20 months ago

#18953 new defect

mjpg-streamer won't work with many webcam.

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

I tried with at least 4 webcam, only one work with gspca driver, 3 webcam with uvc supported won't work.
Here are example one don't work:

root@OpenWrt:~# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 1871:0101 Aveo Technology Corp. UVC camera (Bresser microscope)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
dmesg | egrep -i usb
[    6.710000] usbcore: registered new interface driver usbfs
[    6.720000] usbcore: registered new interface driver hub
[    6.720000] usbcore: registered new device driver usb
[    6.730000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.750000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.780000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.780000] hub 1-0:1.0: USB hub found
[    6.790000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.810000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[    6.890000] hub 2-0:1.0: USB hub found
[    7.110000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   14.830000] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1871:0101)
[   14.850000] input: USB2.0 Camera as /devices/platform/ehci-platform/usb1/1-1/1-1:1.0/input/input0
[   14.850000] usbcore: registered new interface driver uvcvideo
[   14.860000] USB Video Class driver (1.1.1)
ls /dev/video*
/dev/video0
v4l2-ctl --all -d /dev/video0
Driver Info (not using libv4l2):
	Driver name   : uvcvideo
	Card type     : USB2.0 Camera
	Bus info      : usb-ehci-platform-1
	Driver version: 3.14.32
	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  : 320/240
	Pixel Format  : 'YUYV'
	Field         : None
	Bytes per Line: 640
	Size Image    : 153600
	Colorspace    : SRGB
Crop Capability Video Capture:
	Bounds      : Left 0, Top 0, Width 320, Height 240
	Default     : Left 0, Top 0, Width 320, Height 240
	Pixel Aspect: 1/1
Streaming Parameters Video Capture:
	Capabilities     : timeperframe
	Frames per second: 30.000 (30/1)
	Read buffers     : 0
                     brightness (int)    : min=0 max=100 step=1 default=30 value=30
                       contrast (int)    : min=0 max=100 step=1 default=57 value=57
                     saturation (int)    : min=0 max=4 step=1 default=2 value=2
                          gamma (int)    : min=1 max=8 step=1 default=3 value=3
           power_line_frequency (menu)   : min=0 max=2 default=1 value=1
                      sharpness (int)    : min=0 max=100 step=1 default=10 value=10
         backlight_compensation (int)    : min=0 max=1 step=1 default=1 value=1
uvcdynctrl -f -d /dev/video0
Listing available frame formats for device /dev/video0:
Pixel format: YUYV (YUV 4:2:2 (YUYV); MIME type: video/x-raw-yuv)
  Frame size: 640x480
    Frame rates: 30
  Frame size: 160x120
    Frame rates: 30
  Frame size: 320x240
    Frame rates: 30
  Frame size: 176x144
    Frame rates: 30
  Frame size: 352x288
    Frame rates: 30
mjpg_streamer --input "input_uvc.so --device /dev/video0 -r 640x480 -f 1 -
y" --output "output_http.so --port 8080 --www /www/webcam"
MJPG Streamer Version: svn rev: exported
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 1
 i: Format............: YUYV
 i: JPEG Quality......: 80
 i: TV-Norm...........: DEFAULT
 i: FPS coerced ......: from 1 to 30
 i: Frame period time ......: 1000 ms
 o: www-folder-path...: /www/webcam/
 o: HTTP TCP port.....: 8080
 o: username:password.: disabled
 o: commands..........: enabled
Segmentation fault

My router is wzr-hp-ag300h. CC trunk r44330.

Attachments (0)

Change History (8)

comment:1 Changed 3 years ago by zhangjingye03

Well i have the same problem as yours.
My video camera only supports YUV, but if i forces -y argument, it may say Segmentation Fault like the one above.
Sometimes i can find Call Traces like Kernel panic and the reload of usb devices in kernel log, or some Couldn't load V4L2 driver in the stdout.
Without -y, it runs under MJPG mode(not support) and the webcam is full of white images.

My openwrt version is r44223 and kernel version is 3.14.30.

comment:2 Changed 3 years ago by Wingspinner

I'm encountering the same problem. I previously had mjpg-streamer working on all the same hardware on an earlier snapshot revision about 6 months ago. Now this. Something has changed. I'll need to find the exact revision but it was not n sept 2014 timeframe.

comment:3 Changed 3 years ago by anonymous

I suspect I may be having the same problem. I am able to capture images from my webcam with fswebcam, but I can not get anything out of mjpg_streamer. I am on a freshly made r45704 build, GL-iNet 6416A v1, and lsusb says my super-cheap/junk $4 webcam is a "ID 1908:2311 GEMBIRD".

I have not been able to find any errors in logread/dmesg. The symptoms in this case are that the network sream over http:8080 simply doesn't send any data. The network is working, but there isn't any data being sent to display.

comment:4 Changed 3 years ago by anonymous

Please disregard anonymous post above regarding the GEMBIRD webcam. I got it working with the following mjpg-streamer config file:

config mjpg-streamer 'core'

option enabled '1'
option input 'uvc'
option output 'http'
option device '/dev/video0'
option resolution '640x480'
option yuv '1'
option quality '95'
option fps '30'
option led 'auto'
# option www '/www/webcam'
option port '8080'
# option username 'openwrt'
# option password 'openwrt'

comment:5 Changed 3 years ago by xwx

same problem for me receive Segmentation fault

comment:6 Changed 2 years ago by anonymous

i have a same problem on zyxel omni + openwrt.
My openwrt is not official release (http://4pda.ru/forum/index.php?showtopic=551476)

comment:7 Changed 2 years ago by hcl@…

Hi,

I'm trying with UVC webcam which works on PC with mjpg-streamer, but i have no success on Openwrt. I tried the config above, but does not produce any picture. No error messages.

comment:8 Changed 20 months ago by anonymous

 uvcdynctrl -f -d /dev/video0
Listing available frame formats for device /dev/video0:
Pixel format: YUYV (YUV 4:2:2 (YUYV); MIME type: video/x-raw-yuv)
  Frame size: 640x480
    Frame rates: 30
  Frame size: 160x120
    Frame rates: 30
  Frame size: 176x144
    Frame rates: 30
  Frame size: 320x240
    Frame rates: 30
  Frame size: 352x288
    Frame rates: 30
  Frame size: 1280x1024
    Frame rates: 15
[19515.884000] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 3: -32 (exp. 2).
[19515.896000] uvcvideo: Failed to query (GET_DEF) UVC control 2 on unit 3: -32 (exp. 2).
[19515.904000] uvcvideo: Failed to query (GET_DEF) UVC control 3 on unit 3: -32 (exp. 2).
[19515.916000] uvcvideo: Failed to query (GET_DEF) UVC control 7 on unit 3: -32 (exp. 2).
[19515.924000] uvcvideo: Failed to query (GET_DEF) UVC control 6 on unit 3: -32 (exp. 2).
[19515.932000] uvcvideo: Failed to query (GET_DEF) UVC control 9 on unit 3: -32 (exp. 2).
[19515.940000] uvcvideo: Failed to query (GET_DEF) UVC control 4 on unit 3: -32 (exp. 2).
[19515.952000] uvcvideo: Failed to query (GET_DEF) UVC control 5 on unit 3: -32 (exp. 1).
[19515.960000] uvcvideo: Failed to query (GET_DEF) UVC control 10 on unit 3: -32 (exp. 2).
[19515.968000] uvcvideo: Failed to query (GET_DEF) UVC control 8 on unit 3: -32 (exp. 2).
[19515.980000] uvcvideo: Failed to query (GET_DEF) UVC control 1 on unit 3: -32 (exp. 2).
[19516.008000] IFXUSB: ISOC transfer not supported!!!
[19516.012000] uvcvideo: Failed to submit URB 0 (-19).
[19516.920000] ------------[ cut here ]------------
[19516.924000] WARNING: CPU: 0 PID: 1895 at drivers/media/v4l2-core/videobuf2-core.c:2135 vb2_queue_init+0x548/0xe34 [videobuf2_core]()
[19516.936000] Modules linked in: ath9k ath9k_common iptable_nat ath9k_hw ath pppoe nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 mac80211 ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT uvcvideo pppox ppp_async nf_reject_ipv4 nf_nat_masquerade_ipv4 nf_nat_ftp nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack_ftp nf_conntrack ltq_deu_ar9 ltq_atm_ar9 iptable_raw iptable_mangle iptable_filter ip_tables crc_ccitt compat videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common videodev drv_dsl_cpe_api i2c_dev i2c_core ltq_mei_ar9 ledtrig_usbdev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables ehci_platform ehci_hcd pppoatm ppp_generic slhc br2684 atm ipv6 dma_shared_buffer arc4 crypto_blkcipher ltq_hcd_ar9 gpio_button_hotplug aead
[19517.020000] CPU: 0 PID: 1895 Comm: mjpg_streamer Tainted: G        W      3.18.23 #1
[19517.028000] Stack : 00000000 00000000 00000000 00000000 804745f2 00000048 00000000 00000000
[19517.028000] 	  83204868 833d5b00 803aafe0 80426c03 00000767 8047382c 83204868 833d5b00
[19517.028000] 	  83b55c00 770d7358 82d86de0 8005546c 00000003 8002d848 00000857 00000000
[19517.028000] 	  803af570 82717c14 00000000 00000000 00000000 00000000 00000000 00000000
[19517.028000] 	  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[19517.028000] 	  ...
[19517.064000] Call Trace:
[19517.064000] [<80019fd0>] show_stack+0x50/0x84
[19517.072000] [<8002d9c8>] warn_slowpath_common+0x84/0xb4
[19517.076000] [<8002da80>] warn_slowpath_null+0x18/0x24
[19517.080000] [<831419ac>] vb2_queue_init+0x548/0xe34 [videobuf2_core]
[19517.088000] 
[19517.088000] ---[ end trace 50717ea3f7ec9747 ]---

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.