Octoprint webcam suddenly stopped working, V4L interface error (with octolapse) octoprint on raspbian

I got everything setup yesterday on my pi 3B running raspbian using this guide. The server worked and i had a video stream comming from my webcam (logitech c270). octoprint and the webcam stream started up on startup of the pi.

I then went to set up the pi with the printer so i could finaly use it. everything worked and i used the built in timelaps mode on a few prints.
The only weird thing was that my pc in my printer room didn't give me the webcam stream. It just said webcam stream not loaded.... While this did work on my other pc and laptop. So i think i just had something to do with that pc. (i tried clearing cache multiple times)

I setup octolapse and after getting all the settings right i tried it and it made pictures and rendered the timelapse. However sometime while i was dialing in octolapse settings the webcam stream wasn't loading anymore on any pc. But octolapse still got images so my webcam could still do things. The only thing i was changing when the stream stopped working was the octolapse stuff.

I tried restarting the pi and the octoprint server: no succes
When i tried starting the webcam stream manually with this command:

./mjpg_streamer -i "./input_uvc.so -y" -o "./output_http.so"

i got the following:

MJPG Streamer Version: git rev: ddb69b7b4f114f3c2ca01adf55712792ca8aed43
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: -1
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
ERROR opening V4L interface: No such file or directory
i: init_VideoIn failed

This is not what i got before when it did work but the thing with the frames per second being -1 i did have before.
I also tried removing and reinstalling the mjpg streamer: same problem
I searched on the forums but no succes.

My octoprint and everything are up to date since i installed everything yesterday.

Make sure the ribbon cable didn't move in the connector on either end. It is extremely sensitive about being in perfectly straight and it will do that if it's not makeing a perfect connection

Thanks for the reply i think you mean the ribbon cable of the raspberry pi cam. however as i mentioned i am using a logitech c270. I was able to fix it by uninstalling octolapse and mjpg streamer and reinstalling mjpg streamer. Its working now but i can only see the stream on my laptop and on the pi itself I have two other pc's that don't want to display the stream even if i clear the cache multiple times.

For what it's worth, the Internet Explorer browser has a problem with the img tag way that OctoPrint displays the webcam in the interface.

What about google chrome? It doesn't want to display it either.

after getting it to work yesterday with the stream loading on my laptop and the pi itself today it doesn't load anymore. I just did the excact same thing as yesterday and I did not change anything. I tried printing and using the built in timelapse feature which somehow does get images from the webcam. Really don't understand what the problem is.

Visit the http://octopi.local:8080/ interface and see what you get. (Chrome should work for your earlier question.)

nothing happens if i go there i just says that standard "this site is not available" message you get when you go to a site that doesn't exist. i have never during or after the setup (not even with octopi instead of raspbian) been able to acces the server on octopi.local.

Okay, so either the mjpg_streamer service isn't running on the Raspberry (which can be determined by running ps -ax|grep mjpg locally) or perhaps this is a networking problem.

Running ps -ax|grep mjpg gives the folowing:

456 ?        Sl     0:00 ./mjpg_streamer -o output_http.so -w ./www -i input_uvc.so -r 640x480 -f 10
1028 pts/0    S+     0:00 grep --color=auto mjpg

also something i didn't mention before. When i reinstalled mjpg streamer and the stream worked on my laptop i had the same error message when starting mjpg streamer as in the beginning when it didn't work:

MJPG Streamer Version: git rev: ddb69b7b4f114f3c2ca01adf55712792ca8aed43
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: -1
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
ERROR opening V4L interface: No such file or directory
i: init_VideoIn failed

If mjpg streamer would'nt be running how would octolapse get images? Or does'nt that have anything to do with the mjpg streamer?

If it were me, I'd review that -w ./www argument from the program's execution and I'd think in terms of which user is running the program and where the current working directory might be when it's executed.

Since I'm too lazy to bootup my printer or a test rig, I'll virtually walk over to Guy's OctoPi repository and search for "mjpg_streamer".

Since the path for src/modules/octopi/filesystem/home/root/bin/webcamd suggests that this will live within the root user's bin folder, I'm guessing that this could possibly be the current working directory (or not). Right at the top of this I see MJPGSTREAMER_HOME=/home/pi/mjpg-streamer which sounds authoritative to me. So maybe I need to look for an ~/mjpg-streamer/www folder on one of my OctoPi installs. Bummer, I guess I'll need to boot one...

48%20PM

Yep, there's the www folder on mine.

1 Like