Webcam config in Octopi.txt

I'm a newbie and this is probably a classic newbie question, but..

Logitech V-U0022 TV Skype webcam - I've modified the /boot/octopi.txt file to suit this camera using the line
camera_usb_options="-r 1280x720 -f 15 -d /dev/v4l/by-id/usb-046d_080c-v$"
but it only works after running the command (via ssh)

sudo service webcamd restart

what file (and how?) do I need to modify to have it see the camera_usb_options=" line every time the RaspberryPi starts?



we could try to run sudo service webcamd restart automatically at startup

ssh into the pi and open /etc/rc.local with a text editor ( e.g. with sudo nano /etc/rc.local)
scroll down to the end off the file and insert the following before the exit 0 line:

sleep 10
sudo service webcamd restart
exit 0

(I've included the exit 0 line so you know how it should look like)

if it doesn't work we can try to increase the sleep time to idk let's say 30

I'll try that, thanks!

I tried sleep 10, 30 and 50. But still doesn't work from reboot. Always have to enter

sudo service webcamd restart

from ssh prompt - then it starts working immediately using the webcam stream test button - the display on the "control" tab only works after a page refresh.

Where else can I put this command to execute?


mhmm let's try

sleep 30 && service webcamd restart

instead of the two lines I gave you before

that worked twice, then hasn't worked since. Something on the edge of working somewhere?

Can you explain what the difference is in changing to execute the sleep and the restart on the same line. I just like to understand why I'm entering stuff.

Also, there are many cameras listed in the faq page at
USB webcams known to work with mjpg-streamer

why would this Logitech camera need the webcamd service restarted later? How are all the other cameras restarting the service?



I'm not a dev so I can't really tell you why it makes a difference. I just thought it could be worth a try :person_shrugging: .

Good question. I have honestly no idea, but we had that issue before.
Could be pi related or could be an issue with v4l or mjpg-streamer.
But since I don't have that issue I can't really try to solve it.

Since it works sometimes you could try to run the line twice - maybe with a short sleep timer the second time. I know it's pretty hacky.. but if it works it doesn't matter.

We're working on other ways to stream the video tho.
Hopefully that solves your problem in the future.

Can you upload the systeminfo bundle so we can check the webcam logs? It might help to realise why the changes are not taking effect on a reboot.