-
Notifications
You must be signed in to change notification settings - Fork 33
How to change JPEG quality when using rapid image capture #206
Comments
Hi, This project hasn't been worked on for a few years now due to the Pi Foundation moving away from MMAL in favour of libcamera. However if you're still using this library, I'd recommend looking at the wiki for more information as I spent a long time making that area comprehensive. What resolution are you taking images in? If you're not configuring this, it'll be defaulting to 1280x720 which will be rather large. Regarding quality, I would like to say that if you set the Regarding the MMALNullSinkComponent, this is necessary for calculating exposure compensation, please see here for info. Thanks, Ian |
Wow, I didn't expect to get an answer that fast for a project that hasn't been worked on for a few years. Thanks again!
|
No problem, I've enjoyed my time supporting this library over the years but as to its future, I'm unsure due to my previous statement. If you're looking to further reduce the overall size of your images, you could potentially look to using a different pixel format which has a lower bit depth per pixel. At the moment you're using I420 (YUV420) as defined against your A list of the pixel formats available in MMALSharp can be found here and search for Out of interest, what filesize are the images when you store them? |
To use only 10bit for colors is actually a really nice idea. This reminds me of the old days when I set my computer's screen colors to 8bit so that the games ran more smoothly ;) Right now I have 70kbyte per image. With 40fps I have about 22mbit/s at the moment. This is too much. I could also just create an h.264 stream using v4l2rtspserver, but if the connection is bad, the rtsp player always stops. If I just send the JPEGs over with your lib, that's no problem, and the latency is much better (100ms) |
Ah I see, I did have my suspicions the pixel format change may not work, the native library can seemingly accept a change for certain operations but not actually honour this. Can you not lower the requested FPS to a lower value to achieve your goal? |
Hi there,
I am sending jpeg frames from the rapid image capture over the network and I am quite happy with the performance!
-> Thank you for that.
However, the images are very large. Is there a way to change the quality of the images afterwards with this lib?
The quality parameter probably only affects still images.
Another Question: Do I need the MMALNullSinkComponent? I removed it without any effect. I just want to make sure I'm not using anything unnecessary.
The text was updated successfully, but these errors were encountered: