Setting up OctoPrint on a Raspberry Pi running Raspberry Pi OS (Debian)

Hi,
i have a problem with the webcam.i use the guide from here, but my camera will not start. I also read all posts here. no result.
User pi, Bananapi A20, Image Armbian (debian10), Video device ist /dev/video1
i have a webcam and a WebcamDaemon (green) in ./scripts
/boot/octoprint.txt.
if i enter the mjpg_streamer by hand it will work. I think i have a problem with the autostart of mjpg_streamer.
Can anybody help?
And what do you want me to show you?
Regards
Alero

Did you change the pi related stuff to your username / directories ?
Are the scripts executable (chmod +x)?
Did you put them into /etc/rc.local as the guide said?

Hi,
Yes both. and my user is pi
Regards
Alero

Hi, i think my problem is that mjpg_streamer should start at boot.

Regards
Alero

hi,
when i start me a20 i see that webcam ist started.
if i enter
./mjpg_streamer -i "./input_uvc.so -d /dev/video1 -r 1920x1080 -f 15" -o "./output_http.so"
my camera works fine. but it dosn´t start after reboot.

no idea what i can do?
Regards
Alero

Sry I was quite busy today. I'll try to look at it tomorrow.

Hey it's going to be another day or two.. It's too hot for me right now. Can't think straight :sweat:

Hi,
No problem.
Thanks 4 your help.
Regards
Alero

hi,
do you need some Files or other details?
regards
Alero

hi, nobody here who can help?

Regards

Alero63

I made it
thank

grafik
No Ideas?
Need Help.

Regards Alero

good evening ... excellent guide, perfect even for beginners
I have a problem, I can't find the octopi.txt file, it looks like it hasn't been installed and if I download one from github, it doesn't let me save it in the root folder

As its name implies, the octopi.txt file is OctoPi specific. If you don't use OctoPi (and if you are using this guide you probably aren't or you wouldn't be using the guide) you won't have it.

I need some help/direction pointing...
OctoPrint 1.4.2 on Raspberry Pi 4, fully updated\upgraded
fresh install of Octo everything Octo-wise works fine, but when attempting to get the Raspberry Pi Cam to auto start, I get notta!
I can manually start the cam, and it works as expected, just not as a daemon
followed the instructions here to a TEE..

I created a directory </home/pi/scripts> as it didn't exist, I then created to blank files, an cut\paste the corresponding contents from this page in to the files "webcam" & " webcamDaemon", I also applied executable permissions. and Finely edited the rc.local file as instructed as well!
I get no love!

this is the working manual command I can use...
<./mjpg_streamer -i "./input_raspicam.so -vs -x 1280 -y 720 -fps 32" -o "./output_http.so" >

as a side note, I have looked all over attempting to use all kinds of different configurations

IMHO, the "Optional: Webcam" section is more complicated than it needs to be especially for the latest Raspberry Pi OS based off Debian using systemd.

Build mjpg-streamer

cd ~
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer-experimental
make

Start it automatically

Create the systemd service by sudo nano /etc/systemd/system/mjpg-streamer.service and add this inside the file

[Unit]
Description=mjpg streamer for octoprint webcam
After=network.target

[Service]
Restart=always
# Adjust the CLI params (see https://community.octoprint.org/t/available-mjpg-streamer-configuration-options/1106)
# Replace `pi` with your raspberry pi username if different
# For camera plugged via USB cable (i.e. webcam)
ExecStart=/home/pi/mjpg-streamer/mjpg-streamer-experimental/mjpg_streamer -o "/home/pi/mjpg-streamer/mjpg-streamer-experimental/output_http.so -p 8080 -w /home/pi/mjpg-streamer/mjpg-streamer-experimental/www" -i "/home/pi/mjpg-streamer/mjpg-streamer-experimental/input_uvc.so -f 15"
# For camera connected via the dedicated camera port using the ribbon cable
# ExecStart=/home/pi/mjpg-streamer/mjpg-streamer-experimental/mjpg_streamer -o "/home/pi/mjpg-streamer/mjpg-streamer-experimental/output_http.so -p 8080 -w /home/pi/mjpg-streamer/mjpg-streamer-experimental/www" -i "/home/pi/mjpg-streamer/mjpg-streamer-experimental/input_raspicam.so -fps 15"


[Install]
WantedBy=multi-user.target

Then enable, start with the following commands

sudo systemctl daemon-reload 
sudo systemctl enable mjpg-streamer 
sudo systemctl start mjpg-streamer
sudo systemctl status mjpg-streamer

This is WAY more direct than all the unnecessary bash scripts that make it more fragile.

I request the instructions be updated to reflect this simplicity.

3 Likes

hello I am trying to install octopring manually, on the other hand the above described manipulation uses phyton 2.7 which is obsolete so I can not do the installation.

OMG that was so MUCH easier!!! I had to change the path to MJPG-streamer dude to the git I had pulled previously but FFS those directions were clear and understandably

thanks!!!!!!

At the cost of easy configurability through a simple text file similar to how it is done on OctoPi. Which people then get confused about ("I created /boot/octopi.txt but nothing happens!!1!").

But considering that this part of the guide is years old by now I agree that it's time for an overhaul. The post up there is a wiki node. Anyone who's been on this forum long enough to be in trust level 1 (read: a couple of hours with some minor participation, so pretty much everyone who actually stays a while and doesn't just play hit and run here) can edit it. Be my guest in improving the docs :slight_smile:

If you want to be able to start and stop the webcam server through OctoPrint's system menu, add the following to config.yaml :

Where can I find config.yaml