Webcam stream not working

Thank you so much! It's so silly :see_no_evil:
Especially when you don't understand how URL's really work.

So the answer is this: http://octopi.local/webcam/?action=stream

1 Like

Hey guys,

I just installed a pi 4 B with octopring using a picam v2. And I cannot get the camera running.

The "control" tab just notes "Webcam stream loading..."

**pi@octopi:~ $ vcgencmd get_camera**
supported=1 detected=1

The log file says

**pi@octopi:~ $ journalctl -u webcamd**
-- Logs begin at Wed 2022-01-05 10:08:57 CET, end at Wed 2022-01-05 10:34:53 CET. --
Jan 05 10:09:01 octopi systemd[1]: Starting the OctoPi webcam daemon with the user specified config...
Jan 05 10:09:01 octopi root[470]: Starting USB webcam
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: starting application
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: Using V4L2 device.: /dev/video0
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: Desired Resolution: 640 x 480
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: Frames Per Second.: 10
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: Format............: JPEG
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: TV-Norm...........: DEFAULT
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: www-folder-path......: ./www-octopi/
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: HTTP TCP port........: 8080
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: HTTP Listen Address..: 127.0.0.1
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: username:password....: disabled
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: commands.............: disabled
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: starting input plugin input_uvc.so
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: starting output plugin: output_http.so (ID: 00)
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: Can't enable video in first time
Jan 05 10:09:01 octopi mjpg_streamer[471]: MJPG-streamer [471]: cleaning up resources allocated by input thread
Jan 05 10:09:02 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.

any idea, how to solve this problem?

EDIT: solved by replacing camera --> hardware defect

1 Like

Thank you! You saved me hours of work!!! My octipi got knocked off by my print head and the jarring caused the camera to come unseated from the camera board.

Hi All,

Piggy/backing on this topic, same issue.

Has been working fine for two years, not doing updates.
Raspberry pi Zero 2W with attached pi webcam. Not brilliant, but good enough.

Camera streaming is AOK on App (Android) but has been getting slower to load on the desktop webui. Now it seems reluctant to load at all - black screen exactly as the first post "Webcam Stream Loading"
Not browser specific, tried chrome & FF, same.
Directly opening URL :8080 = "unable to load page"

---UPDATE--- In the time it took to Google it, find this post, gather the diags, consider the options, and so forth, (about 15 mins) it is now loaded onthe browser UI. Crazy. Diags outputs below are identical. Direct :8080 url still "page not found".

Checking the processes are all look like they're working OK:

ps -ax|grep mjpg
476 ? Sl 0:05 ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
1872 pts/0 S+ 0:00 grep --color=auto mjpg

ps -ax|grep webcam
442 ? Ss 0:00 /bin/bash /root/bin/webcamd
1878 pts/0 S+ 0:00 grep --color=auto webcam

sudo service webcamd status
● webcamd.service - the OctoPi webcam daemon with the user specified config
Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2025-07-31 00:06:51 BST; 13h ago
Main PID: 442 (webcamd)
Tasks: 4 (limit: 255)
CPU: 5.872s
CGroup: /system.slice/webcamd.service
β”œβ”€442 /bin/bash /root/bin/webcamd
└─476 ./mjpg_streamer -o output_http.so -w ./www-octopi -n --listen 127.0.0.1 -i input_uvc.so -r 640x480 -f 10 -d /dev/video0

Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: Frames Per Second.: 10
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: Format............: JPEG
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: TV-Norm...........: DEFAULT
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: www-folder-path......: ./www-octopi/
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: HTTP TCP port........: 8080
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: HTTP Listen Address..: 127.0.0.1
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: username:password....: disabled
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: commands.............: disabled
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: starting input plugin input_uvc.so
Jul 31 00:06:51 octopi mjpg_streamer[476]: MJPG-streamer [476]: starting output plugin: output_http.so (ID: 00)

It all looks like it's working - so what has changed ?
Don't want to start all over again, diagnostic suggestions welcome.
TIA

Gosh! This thread is over 3 years old.
Reviving such old thread isn't good style.

grafik

A lot of things have had happen since then.

I strongly recommend to open a new thread with all requested information - that btw are missing in you post.

;-(
oh good grief