WEB CAMERA and Ubuntu server 18.04 LTS

Hello. I'm having trouble getting an image. I used the instruction https://www.repetier-server.com/setting-webcam-repetier-server-linux/ but gives an error. How can I fix this?

user@repetier3d:~$ sudo mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480 -f 25"
[sudo] password for user:
MJPG Streamer Version: git rev: 821c330ea6bbb5fbed98d48e00aac156e923161b
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: 25
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 i: Could not obtain the requested pixelformat: MJPG , driver gave us: S910
    ... will try to handle this by checking against supported formats.
 Init v4L2 failed !! exit fatal
 i: init_VideoIn failed
user@repetier3d:~$ 


Comments

  • user@repetier3d:~$ sudo v4l2-ctl --list-formats-ex
    ioctl: VIDIOC_ENUM_FMT
            Index       : 0
            Type        : Video Capture
            Pixel Format: 'S910' (compressed)
            Name        : GSPCA SN9C10X
                    Size: Discrete 160x120
                    Size: Discrete 320x240
                    Size: Discrete 640x480

            Index       : 1
            Type        : Video Capture
            Pixel Format: 'BA81'
            Name        : 8-bit Bayer BGBG/GRGR
                    Size: Discrete 160x120

    user@repetier3d:~$

  • I connected another camera and got -

    user@repetier3d:~$ sudo mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 640x480 -f 25"
    [sudo] password for user:
    MJPG Streamer Version: git rev: 821c330ea6bbb5fbed98d48e00aac156e923161b
     i: Using V4L2 device.: /dev/video0
     i: Desired Resolution: 640 x 480
     i: Frames Per Second.: 25
     i: Format............: JPEG
     i: TV-Norm...........: DEFAULT
     i: Could not obtain the requested pixelformat: MJPG , driver gave us: JPEG
        ... will try to handle this by checking against supported formats.
        ... Falling back to the faster MJPG mode (consider changing cmd line options).
    Setting FPS on the capture device is not supported, fallback to software framedropping
    : Invalid argument
     i: Frame period time ......: 40 ms
    UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
     o: www-folder-path......: disabled
     o: HTTP TCP port........: 8080
     o: HTTP Listen Address..: (null)
     o: username:password....: disabled
     o: commands.............: enabled

    and

    user@repetier3d:~$ sudo v4l2-ctl --list-formats-ex
    ioctl: VIDIOC_ENUM_FMT
            Index       : 0
            Type        : Video Capture
            Pixel Format: 'JPEG' (compressed)
            Name        : JFIF JPEG
                    Size: Discrete 320x240
                    Size: Discrete 640x480


  • No idea what S910 format is. Ideally your webcam supports jpg format. Yuv can be converted if no jpg support is abailable, but that means software jpg conversion and puts some load on cpu, but in general works. So i would thay that webcam is not supported by mjpg_streamer.
  • Thanks, I just assumed that the camera does not fit. I think the best option is to use another camera.
  • I also guess so. As i said, best webcams support jpeg format, so you get nearky no extra load.
Sign In or Register to comment.