Mjpg_streamer可以查看网页界面但不能查看

时间:2018-04-06 12:56:01

标签: ubuntu-16.04 webcam mjpeg

我的问题是我正在尝试配置mjpg_streamer以使用我内置的网络摄像头或通过USB网络摄像头将网络摄像头流式传输到网页上。使用Mjpg_streamer,我能够到达应该显示流“localhost:8080”和“localhost:8080 / action?= stream”的页面,但是我看不到任何图像或打印出任何错误。下面你可以看到我的USB网络摄像头可以与mjpg_streamer之外的其他程序一起使用。

Webcam works with cheese but not with mjpg_streamer

$ lsusb 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 06cb:7b0e Synaptics, Inc. 
Bus 001 Device 003: ID 174f:14e6 Syntek 
Bus 001 Device 002: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo
Receiver
Bus 001 Device 015: ID 05a3:8830 ARC International <-This is the USB Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

我检查了很多其他来源,但他们的修补程序似乎都不适合我。 https://www.raspberrypi.org/forums/viewtopic.php?t=100818这个来源似乎很有希望,但修复程序是他们的pi的内核版本,但我目前正在使用Ubuntu 16.04 LTS。

这是我用来启动流的命令(必须将路径传递给input_uvc.so和output_http,因为这些错误先前给了我错误)。

~/mjpg-streamer-code-182/mjpg-streamer-experimental$ LD_LIBRARY_PATH=/home/XXXXXXXX/mjpg-streamer-code-182/mjpg-streamer-experimental/plugins/input_uvc:/home/aquabotix/mjpg-streamer-code-182/mjpg-streamer-experimental/plugins/output_http mjpg_streamer -i "input_uvc.so -f 30 -d /dev/video1" -o "output_http.so -p 8080 -w ./www"

我想补充的另一件事是很多有类似问题的人能够使用VLC查看他们的流并输入流URL,但不幸的是,这对我来说也不起作用。

如果这是啰嗦和混乱,我很抱歉,但我在其他地方找不到任何相关的问题答案。

编辑:这是执行我使用的mjpg-streamer脚本的输出,它包含来自上面的相同命令,除了有一行来杀死在执行命令之前可能正在运行的任何mjpg-streamer进程。

$ ./mjpg_streamer.sh 
mjpg_streamer: no process found
MJPG Streamer Version: svn rev: 
DBG(input_uvc.c, input_init(), 136): argv[0]=UVC webcam grabber
DBG(input_uvc.c, input_init(), 136): argv[1]=-n
DBG(input_uvc.c, input_init(), 136): argv[2]=-f
DBG(input_uvc.c, input_init(), 136): argv[3]=30
DBG(input_uvc.c, input_init(), 136): argv[4]=-d
DBG(input_uvc.c, input_init(), 136): argv[5]=/dev/video1
DBG(input_uvc.c, input_init(), 253): case 14,15
DBG(input_uvc.c, input_init(), 223): case 6,7
DBG(input_uvc.c, input_init(), 194): case 2,3
DBG(input_uvc.c, input_init(), 302): input id: 0
i: Using V4L2 device.: /dev/video1
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 30
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
DBG(input_uvc.c, input_init(), 355): vdIn pn: 0
DBG(v4l2uvc.c, init_videoIn(), 96): Input name: Camera 1
DBG(v4l2uvc.c, init_videoIn(), 109): Current size: 640x480
DBG(v4l2uvc.c, init_videoIn(), 138): Supported format: Motion-JPEG
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the 
current format: 1600x1200
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 3264x2448
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 2592x1944
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 2048x1536
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 1280x960
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 1024x768
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 800x600
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 640x480
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 320x240
DBG(v4l2uvc.c, init_videoIn(), 170):    Supported size with the current format: 1600x1200
DBG(v4l2uvc.c, init_videoIn(), 178): current resolution: 7
DBG(v4l2uvc.c, init_videoIn(), 138): Supported format: YUYV 4:2:2
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 1600x1200
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 3264x2448
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 2592x1944
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 2048x1536
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 1280x960
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 1024x768
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 800x600
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 640x480
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 320x240
DBG(v4l2uvc.c, init_videoIn(), 172):    Supported size: 1600x1200
DBG(v4l2uvc.c, init_videoIn(), 178): current resolution: -1
DBG(v4l2uvc.c, enumerateControls(), 988): V4L2 API's V4L2_CTRL_FLAG_NEXT_CTRL is supported
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Brightness value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Contrast value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Saturation value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Hue value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: White Balance Temperature, Auto value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Gamma value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Gain value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 856): Menu item 0: Disabled
DBG(v4l2uvc.c, control_readed(), 856): Menu item 1: 50 Hz
DBG(v4l2uvc.c, control_readed(), 856): Menu item 2: 60 Hz
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Power Line Frequency value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: White Balance Temperature value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Sharpness value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 873): V4L2 parameter found: Backlight Compensation value 0 Class: USER 
DBG(v4l2uvc.c, control_readed(), 858): Unable to get menu item for Exposure, Auto, index=0
DBG(v4l2uvc.c, control_readed(), 856): Menu item 1: Manual Mode
DBG(v4l2uvc.c, control_readed(), 858): Unable to get menu item for Exposure, Auto, index=2
DBG(v4l2uvc.c, control_readed(), 856): Menu item 3: Aperture Priority Mode
DBG(v4l2uvc.c, control_readed(), 881): V4L2 parameter found: Exposure, Auto value 0 Class: EXTENDED 
DBG(v4l2uvc.c, control_readed(), 881): V4L2 parameter found: Exposure (Absolute) value 0 Class: EXTENDED 
DBG(v4l2uvc.c, control_readed(), 881): V4L2 parameter found: Exposure, Auto Priority value 0 Class: EXTENDED 
DBG(v4l2uvc.c, enumerateControls(), 1023): JPEG compression details:
DBG(v4l2uvc.c, enumerateControls(), 1024): Quality: 0
DBG(v4l2uvc.c, enumerateControls(), 1025): APPn: 0
DBG(v4l2uvc.c, enumerateControls(), 1026): APP length: 0
DBG(v4l2uvc.c, enumerateControls(), 1027): APP data: 
DBG(v4l2uvc.c, enumerateControls(), 1028): COM length: 0
DBG(v4l2uvc.c, enumerateControls(), 1029): COM data: 
o: www-folder-path...: ./www/
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled
DBG(input_uvc.c, input_run(), 400): launching camera thread #00

1 个答案:

答案 0 :(得分:0)

您的网址应为:

/?action=stream

不是

/action?=stream