Add webcam to Octoprint Topic is solved

Suggestions for features and software you would like to see in DietPi, goes here.
Post Reply
alaw005
Posts: 1
Joined: Tue May 26, 2020 3:48 am

Add webcam to Octoprint

Post by alaw005 »

Hi,

I have spent hours trying to work out how to get webcam running on Octoprint. I have worked out that you need to build and install mjpg-streamer from git and I have got this going (just) but I cannot work out how to start automatically and included in Octoprint.

Maybe adding a separate mjpg-streamer software install would be a good alternatively. Unfortunately this is beyond my skill level. The following is what I have managed so far from https://github.com/jacksonliam/mjpg-streamer.

Login as dietpi user on fresh install of DietPi with Octoprint and FFMpeg (under Software Additional):

Code: Select all

sudo apt-get install cmake
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
make
sudo make install
I can then run mjpg_streamer:

Code: Select all

./mjpg_streamer -i "input_uvc.so" -o "output_http.so -p 5001"
And access stream or snapshot from:
http://dietpi:5001/?action=stream_0
http://dietpi:5001/?action=snapshot

I then go through the configuration steps for Octopi
http://dietpi:5000/

Under "Webcam & Timelapse Recordings": The above at least documents the install steps, which I cannot find anywhere else on the internet.
Post Reply