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):
sudo apt-get install cmake
git clone https://github.com/jacksonliam/mjpg-streamer.git
sudo make install
First of all you freshly installed mjpg-streamer via dietpi-software, right?
Do not edit /etc/systemd/system/mjpg-streamer.service directly, it would be overwritten by any reinstall/update. Doing it via dietpi-services > mjpg-streamer > Edit was the best approach. Take care to add an empty ExecStart= before the actual new ExecStart line, so that it looks like that:
This doesn’t appear to be working. I had to manually edit /etc/systemd/mjpg-streamer.service to get the camera to change resolutions. mjpg-streamer isn’t using the edited one created in dietpi-services.
You can verify this by looking at the status in the diet-pi services.
This is my edited one that is shown in dietpi-services->mjpg-streamer->edit (the only difference is the resolution and this is due to me testing if it was loading and the blank ExecStart as mentioned earlier in this thread).
Hello, I have the same problem. When editing with dietpi-services the changes are not saved in “/etc/systemd/system/mjpg-streamer.service.d/dietpi-services_edit.conf” but in “/dietpi-services_edit.conf”. Moving the file to the correct location fixes the issue.
Many thanks, that was a good hint. Indeed a v7.9 regression where we combined multiple variable definitions into one line. But when defining local variables with a single local call, later ones in the same call cannot reference earlier ones, but the calls need to be split. When defining regular/global variables, it works well to defining multiple ones in one line, where later ones reference earlier ones .
Also the process tool settings were affected for the same reason.