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 and adding options to change the exposure (-ex i think?

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

do I change to:
ExecStart=/opt/mjpg-streamer/mjpg_streamer -i ' -ex 5 -d /dev/video0' -o ' -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.

ExecStart=/opt/mjpg-streamer/mjpg_streamer -i ' -ex 5 -d /dev/video0' -o ' -p 8082 -n'


1 Like

That got it! Thank you Jappe :slight_smile: