Webcam doesn't works ?

Hello,

I'm french and i build my first 3D printer, i have chosen repetier server to work on Raspberry Pi 3 and Repetier Firmware on Pibot V2. All works great except the webcam. 
I activated the pro trial version, when i connect the webcam on raspberry, it is detected on video0 and by repetier server. 
I set 320x240 and 15 fps, assign parameters and restart server but it doesn't works.

The repetier server log is: 

May 25 17:11:22 RepetierServer kernel: [ 1790.777701] usb 1-1.3: new full-speed USB device number 7 using dwc_otg
May 25 17:11:22 RepetierServer kernel: [ 1790.880057] usb 1-1.3: New USB device found, idVendor=0c45, idProduct=613a
May 25 17:11:22 RepetierServer kernel: [ 1790.880071] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
May 25 17:11:22 RepetierServer kernel: [ 1790.880078] usb 1-1.3: Product: USB camera
May 25 17:11:22 RepetierServer kernel: [ 1790.880897] gspca_main: sonixj-2.14.0 probing 0c45:613a
May 25 17:11:22 RepetierServer kernel: [ 1790.959798] input: sonixj as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/input/input3
May 25 17:11:23 RepetierServer systemd[1]: Stopping mjpg_streamer for picam...
May 25 17:11:23 RepetierServer systemd[1]: Starting mjpg_streamer for picam...
May 25 17:11:23 RepetierServer systemd[1]: Started mjpg_streamer for picam.
May 25 17:11:23 RepetierServer systemd[1]: Stopping mjpg_streamer for picam...
May 25 17:11:23 RepetierServer systemd[1]: Starting mjpg_streamer for picam...
May 25 17:11:23 RepetierServer systemd[1]: Started mjpg_streamer for picam.
May 25 17:11:23 RepetierServer startAllCams[3457]: Webcam does not support MJPG - using slower YUYV instead!
May 25 17:11:23 RepetierServer startAllCams[3457]: Best resolution: 0 x 0 at 0
May 25 17:11:23 RepetierServer startAllCams[3457]: /usr/local/bin/mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_uvc.so -d /dev/video0 --fps 0 -q 85 -r 0x0 -y -r 320x240 -f 15" -o "/usr/local/lib/mjpg-streamer/output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www" -b
May 25 17:11:23 RepetierServer MJPG-streamer [3474]: starting application
May 25 17:11:23 RepetierServer MJPG-streamer [3474]: enabling daemon mode
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: MJPG Streamer Version.: 2.0
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: Using V4L2 device.: /dev/video0
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: Desired Resolution: 320 x 240
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: Frames Per Second.: 15
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: Format............: YUYV
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: JPEG Quality......: 85
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: TV-Norm...........: DEFAULT
May 25 17:11:23 RepetierServer MJPG-streamer [3476]: init_VideoIn failed
May 25 17:11:23 RepetierServer startAllCams[3457]: enabling daemon modeforked to background (3476)


I used your Raspberry image 0.80.3.

Thanks a lot for your help. 

Comments

  • The problem lies here:

    May 25 17:11:23 RepetierServer startAllCams[3457]: Webcam does not support MJPG - using slower YUYV instead!
    May 25 17:11:23 RepetierServer startAllCams[3457]: Best resolution: 0 x 0 at 0
    May 25 17:11:23 RepetierServer startAllCams[3457]: /usr/local/bin/mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_uvc.so -d /dev/video0 --fps 0 -q 85 -r 0x0 -y -r 320x240 -f 15" -o "/usr/local/lib/mjpg-streamer/output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www" -b

    as you see the webcam does not support MJPG. Also you can get away with software encoding, it will eat so much CPU that you do not really want that solution. So best is to use another webcam.

    Next problem is that the script concludes best resolution is 0x0 with 0 frames which makes the final problem. YOu need to correct mjpgStart in /usr/local/Repetier-Setup/bin

    before the last line add
    BEST_WIDTH=320
    BEST_HEIGHT=240
    BEST_FRAMERATE=15

    that should fix the missing params from detection process and override it with values that hopefully work.
  • I have tried to modify mjpgStart without solved the problem.

    I will buy a PiCAM, it is a good idea ? What is the best webcam for compatibility with Repetier Server and cost saving ?

    Thanks.
  • Picam 2 works for me but also different Logitech models work. Picam has a short cable only so you would also need a cable extension in most cases. You can also google for "compatible webcam raspberry" and find lists of compatible webcams (hopefully also mentioning mjpg function which is a important part to have no extra load).
  • Hello, 
    I have buy a Picam 2 and its works very well and out of the box ! ;)

    For a long cable i use this version: https://www.tindie.com/products/freto/pi-camera-hdmi-cable-extension/

    Thanks a lot for your support.
Sign In or Register to comment.