Hi new to the forum/thread;
I have had success installing and using mjpeg-streamer on a raspi zero, but ran into some issues I thought I would share; specifically no manual shutter speed and invalid timestamps. Before that though, thanks for the great software.
There does not seem to be a way to manually set the exposure time with input_raspicam, so I dug around and patched the current github version to have it. In order to make this work I also had to switch out the mmal directory with the one on my raspbian install due to the shutter speed stuff not being in the current github one. I basically copy pasted from this commit https://github.com/JamesH65/userland/co ... c1b1ebf3b4
"Userland issue #76 Added option to set the exposure/shutter time." in the most appropriate places I could find. Getting the option exposed as a command line arg (-shutter) took some digging, but it seems to work now (taking microseconds i think).
The other issue I ran into was that the timestamps for each jpeg were all set to 0.00000 (I think the timestamp was being read from a v4l structure but it was being set to 0 for every image). I tried just sampling the time on the receiving end in the python script as soon as the jpeg magic sequence end was found but there was still a lot of variance/delay with this approach. I tested it by taking consecutive images of a time app (with 0.1s precision display) on my phone with the camera, and this approach gave 1-3s offset.
I worked around this by also patching my local copy of mjpeg-streamer inside the send_stream function of plugins/output_http/httpd.c to call gettimeofday immediately following pthread_cond_wait /* wait for a fresh frame */ and using that value instead for the X-Timestamp field of the jpeg. https://github.com/jacksonliam/mjpg-str ... tpd.c#L458
Doing the same test of free running capture of the time display app on a phone in front of the camera, the offset of the jpeg timestamp vs the time shown on the app in the image dropped down to a much more consistent ~0.2s. I still need to do more tests to confirm the consistency of this, but 0.2s is good enough for my needs for now.
I have attached a sample image of the offset test I did.
Is there an easy way I can share thee changes to perhaps be integrated into the repo? Hopefully I didn't break a bunch of conventions thus making the changes worthless