Raspberry Cam not streaming

edited October 2016 in Repetier-Server
Hi, I took the opportunity of the new SD mount of repetier-server for raspberry to add a cam to my setup.
I selected the pi cam preset in the printer setting and activated the timelapse under the Webcam tab.
All settings seems to be OK and the red indicator of my cam is up, showing that it's all good on that end.
However, I don't get any image in the display area. Only a blank square with a "rec" indicator (see here).
Any ideas where I could have gone wrong and what can be done to fix it?



  • Please check if webcam server is running correctly. Normally if not running you would get a replacement image, so we need to dig a bit deeper. Try

    which opens the webcam server ui. If that also shows empty image it is server setting or linux not detecting it correctly. We had tested it with a picam 2.
  • I guess it's the cam's server that simply not running.
    I tried several time to restart it but the clicking on the button to that end under the "webcam" tab doesn't give any feedback

    the url only gives back a page error without anything of ui.
  • The ui never gives feedback to started webcams. It just assumes success. In next image all servers are started automatically.

    What it does is calling 
    sudo /usr/local/Repetier-Setup/bin/installWebcam pi
    on your pi, whcih should start the pi. You can run it manually from ssh console.
    tail -100 /var/log/syslog
    should show if it finds the cam.
    I think with
    vcgencmd get_camera
    you can ask pi if a pi cam is detected and supported at all.

  • I get "supported=1 detected=0"
    guess I need to work that out.
    That's a good thing to have a way to know that. I'll start with this.
  • I was able to plug my cam. The red led is alight, I can connect to it via SSH and the webcam server ui is there on :8080.
    but yeah, I still get a blank square instead of the mjepg http://i.imgur.com/I7J6IO7.png

    It's a Picam 1.3 so I guess it's a compatibility issue?
  • I tested with picam 2. Red led gets only on when mjpg_streamer is active. You could login and kill mjpg_streamer
    kill -9 mjpg_streamer

    and then start it manually so you see all outputs

    /usr/local/bin/mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_raspicam.so" -o "/usr/local/lib/mjpg-streamer/output_http.so -w /usr/local/share/mjpg-streamer/www"

    You could also test with different parameters for input_raspicam. E.g. -x 640 -y 480 would be an idea to set a smaller resolution to also reduce traffic.

  • the kill -9 mjpg_streamer command gives me: "-bash: kill: mjpg_streamer: arguments must be process or job IDs"

    as for the outputs, it's already in 640 X 480 at 5 fps

    this might be a lead: bind: Address already in use
     o: server_thread(): bind(8080) failed
  • Sorry, should be
    killall -9 mjpg_streamer

     bind: Address already in use mean there is already a server process running, I guess due to kill not being executed.
  • the new command is right but it returns:
    mjpg_streamer(1467): Operation not permitted
    mjpg_streamer: no process found

    same bind(8080) failed
  • Put a "sudo" before the command to execute it with root permissions then.
  • edited October 2016
    I had tried it already before my previous comment.
    I had a little "I own you!!" moment but without great success

    without the sudo I get the previous feedback but with it, nothing.
  • I have same Problem. My Webcam does work for first. After a few Days it doesnt work anymore. I dont know why. Nothing changet :-(

  • pi@RepetierServer:~ $ sudo /usr/local/bin/mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_raspicam.so" -o "/usr/local/lib/mjpg-streamer/output_http.so -w /usr/local/share/mjpg-streamer/www"
    MJPG Streamer Version.: 2.0
     i: fps.............: 5
     i: resolution........: 640 x 480
     i: camera parameters..............:

    Sharpness 0, Contrast 0, Brightness 50
    Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
    Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
    Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
    Rotation 0, hflip No, vflip No
    ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
     o: www-folder-path...: /usr/local/share/mjpg-streamer/www/
     o: HTTP TCP port.....: 8080
     o: username:password.: disabled
     o: commands..........: enabled
     i: Starting Camera
    bind: Address already in use
    bind: Address already in use
     o: server_thread(): bind(8080) failed

  • bind: Address already in use 
    means some other process is streaming over that port already. If you are using our image you might have pressed on usb cam button in configuration? That would have replaced pi webcam streaming by usb webcam streaming. But without usb webcam it would stop so that may not be the reason. In that case the problem is the process already using port 8080. Have you tested http://<ip>:8080 to see what is running on that port.
  • That's the thing, I did use the Pi cam configuration and the 8080 port load the cam UI. However, all the spaces supposed to stream the cam are blank.
    the latest command you gave doesn't pass and adding sudo before doesn't give any feedback. I'm stuck at that point.
  • So 8080 shows camimage. Ok, then you only need to set correct image/mjpg url in printer configuration. Should be
  • That's the preset loaded when choosing the Pi cam settings. Which lead to the current situation.
  • What browser are you using? Have you tried with firefox? Chrome had for some time a problem with mjpg stopping playback. My current chrome versions seem all to work well.
  • That may be it. I'm indeed using Chrome. I'll try with Firefox and get back to you. Thanks
  • Nope, no change with Firefox. Still the same.
  • Do you have a license? Webcam is a pro feature and only works with license. But you should see a message then.
  • yes I do have a license
  • Please try 

    the next release (but update when final is out). It previews the cam already in configuration screen. As you can see it over :8080 it must appear with correct urls set. I have it even working with 3 webcams in parallel so I know it works in general. If it does not work with updated version, please share a image of the configuration screen. Maybe I can then see more.
  • Just saw your screenshot of :8080 where the screen is empty. If that is the case server will of course not work. Then mjpg_streamer does not work correctly with your webcam. A laways assumed this was already fixed and now you want to see the same :8080 image in server.
  • yes, as I was saying it's a Pi Cam v1.3
    Is it that Repetier Server is simply not compatible with cam priors to v2?
    I'll get a new can if needed but of course I'd rather not if I can use this one.
  • Not sure if it helps for a PI-cam but my cam (old laptop cam) only works in YUV mode and without the resolution set (-r 640x480) When i set resulution i get the MJPEG-streamer page without the camstream.
    https://www.repetier-server.com/setting-webcam-repetier-server-linux/ end of the page
  • You have to distinguish the software and responsibilities. Server requires a JPG or MJPG source and it is not relevant where it comes from.

    Your problem is that mjpg_streamer with current configuration does not offer a picture. So you need to either change command line option when calling mjpg_streamer or there is a problem. You could try specilized software like raspistill to make a jpg snapshot and see if they work.

    The next V3 image will get a new mjpg init script from us which will detect yuv only cameras, but this is only for usb webcams. But yuv only cams make th epi slow as now the pi needs to convert it to a jpg image and not the webcam.
Sign In or Register to comment.