Webcam stream not working

The webcam stream via the web frontend worked 2 months ago. Now it only shows "Webcam Stream Loading" on a black background. When I use the iPad app the cam works just fine but not on the website.
I also tried to change the USB ports but it didn't help. I have the latest version of Octoprint installed.

Thanks in advance

What browser are we talking about?

Chrome but I also tried FF which didn't work either. Both the latest versions.

Open another tab and visit http://octopi.local:8080/ and see what's there.

There is a shot from the cam.

Brilliant. That means that mjpg_streamer is running and seems to be happy. I'm guessing that you're seeing two images, one a snapshot and one a video. The second one is something like http://octopi.local:8080/?action=stream . Just the / path from before by itself is some HTML which includes both outputs.

You might want to visit your OctoPrint -> Settings -> Webcam & Timelapse and see if that's been changed from the default.

If you're trying to reach your OctoPrint instance using HTTPS then it's possible that it doesn't like trying to include an HTTP stream as part of that for the webcam. In other words, just try http://octopi.local/ rather than https://octopi.local/ .

1 Like

im having the same issue. i have a new raspberry pi, new webcam and ribbon cables and some issue. when i go to http://octopi.local:8080/ i get

This site can’t be reached

octopi.local refused to connect.

In your case, the mjpg_streamer program probably isn't running. You might try ps -ax|grep mjpg or ps -ax|grep webcam to look for it.

Hello, I also have my new webcam not streaming. I got the following:

pi@octopi:~ $ ps -ax|grep mjpg
 1739 pts/0    S+     0:00 grep --color=auto mjpg

pi@octopi:~ $ ps -ax|grep webcam
  442 ?        S      0:00 /bin/bash /root/bin/webcamd
 1798 pts/0    S+     0:00 grep --color=auto webcam

What shall I do next to load the stream?

Greetings

I think the name of the service/daemon is webcamd and could be controlled via sudo service webcamd start (or stop).

2 Likes

Hello again, the problem is solved so I came back to apologize for my poor use of brain.

I had webcam's cable plugged wrongly -the cupper sides didn't touch each other.

It all works fine now. Though very thankful for the quick response and happy for learning new terminal commands :smiley:

2 Likes

ive started the mjpeg streamer in SSH following setting up octoprint tutorial. but i cant get a image from the camera like sydthe. ive enabled the cam in sudo raspi-config (which is a bit different on a raspberry 3a+)

When the streamer is running and the led on the picam is on:

-if i go to http://<your Raspi's IP>:8080/ i get: 501: Not Implemented!
no www-folder configured.
-if i go to `http://<your Raspi's IP>:8080/?action=stream the page keeps loading.

when i kill the streamer the led goes off and i cant reach the camera on the above adresses, so i guess it is working partially.

any idea`s anyone?

Why not try http://octopi.local:8080/ instead? Or try http://someIPaddress:8080/ ?

octopi.local doesnt work for my printer, never has but when i replace that for my printers ip it gives the 501 : Not Implemented! no www-folder configuration, message.

ive tried the following for troubleshooting:

pi@octopi:~ $ raspistill -o cam.jpg
mmal: No data received from sensor. Check all connections, including the Sunny one on the camerboard

Did you install from the OctoPi image following these instructions or did you do something else?

i did follow that tutorial to install it

And you can't reach the OctoPrint instance using either...

http://octopi.local/
or
http://ipaddress/

...? If you can't reach the OctoPrint instance then it sounds like you either need to find out why or start over from the beginning.

If the web interface isn't working then it could be that something went wrong during the original install. It could mean that the haproxy service isn't happy. It could mean that the OctoPrint service didn't startup. I'd just suggest that troubleshooting the webcam connectivity is 2nd place right now versus getting the main software itself.

1 Like

nah mate you are reading it wrong, everything works except the webcam stream, it keeps loading, doesnt show any image at all. i always use my pie`s ip adress instead of octopi.local because octopi.local doesnt work in my network for some reason. so the raspberry is cofigured right. i can print whatever i want. but the camera doesnt work, searched the whole forum for someone with the same issue and that is this dude that made this tread.

1 Like

I'd guess then that you're on a Windows-based workstation and it doesn't have Bonjour loaded. See octoprint-name-resolution-hacks for details.

So on a Windows workstation, you might be using IE or the Edge browser. I'm pretty sure that they don't like the inline <img src="whatever" /> technique that OctoPrint uses to display the webcam in the Control tab. Try Chrome or Firefox or anything else and see if that displays the webcam.

Also—even from IE—you can visit http://ipaddress:8080/?action=stream and see if this displays.

1 Like