Adjust mjpg-streamer exposure

Hi all,

I am trying to figure out how to change the exposure of mjpg-streamer. I followed the instructions for the HTML authentication to access the config but not sure what I need to change. I read about the input_uvc.so and adding options to change the exposure (-ex i think? https://github.com/jacksonliam/mjpg-streamer/blob/310b29f4a94c46652b20c4b7b6e5cf24e532af39/mjpg-streamer-experimental/plugins/input_uvc/README.md)

The line:
#ExecStart=/opt/mjpg-streamer/mjpg_streamer -i 'input_uvc.so -d /dev/video0' -o 'output_http.so -p 8082 -n'

do I change to:
ExecStart=/opt/mjpg-streamer/mjpg_streamer -i 'input_uvc.so -ex 5 -d /dev/video0' -o 'output_http.so -p 8082 -n'

Just reading the provided doc it looks correct.
Why not just try to start it and see if it works? But keep in mind, -ex is an optional parameter:

Optional parameters (may not be supported by all cameras)

I edited the settings and mjpg-streamer didn’t restart. The log says:

| Dec 19 13:45:06 DietPi systemd[1]: mjpg-streamer.service: Service has more than one ExecStart= setting, which is     │ 
| only allowed for Type=oneshot services. Refusing.                                                                    │ 
| Dec 19 13:45:06 DietPi systemd[1]: mjpg-streamer.service: Current command vanished from the unit file, execution of  │ 
| the command list won't be resumed.                                                                                   │ 
| Dec 19 13:45:06 DietPi systemd[1]: Stopping mjpg-streamer (DietPi)...                                                │ 
| Dec 19 13:45:06 DietPi systemd[1]: mjpg-streamer.service: Main process exited, code=killed, status=15/TERM           │

If I am reading this right, it is saying there are two ExecStart’s?

Sorry if I am being dumb, not used to fiddling at this level!

This is without the -ex option as I wanted to just make sure it worked first before adding in more variables

Oh yes, I ran also into this.
When you edit the service file, you need a line ExexStart= before the actual one, so it looks like this.

ExexStart=
ExecStart=/opt/mjpg-streamer/mjpg_streamer -i 'input_uvc.so -ex 5 -d /dev/video0' -o 'output_http.so -p 8082 -n'

See: https://dietpi.com/forum/t/papermc-service-failed-with-result-exit-code/5882/3

1 Like

That got it! Thank you Jappe :slight_smile: