towolf wrote:Thanks a lot, 6by9. Those are all very useful additions. The variable frame rate mode is highly appreciated. Of course in many video applications fixed fps is needed, but modern digital video often operates on timestamps and frame pts is stored in the container. In MP4, for example, the container frame rate is merely informational and every frame has a time stamp (unlike .avi).
Indeed, any camcorder use case generally wants fixed frame rate, but most stills use cases want to improve image quality by allowing longer exposure times (generally limited by not wanting image blur on the preview). Where and how timestamps get attached to frames is always an entertaining question - I'm just glad we don't currently support B-frames otherwise you need to maintain both decode and presentation timestamps accurately.
We've got a funny one with Motion as it doesn't set the framerate with V4L2 and is therefore the exposure time is restricted by the default FPS of the driver. It seemed that exposure_dynamic_framerate may be a nicer solution to improving image quality than having to tweak the framerate.
towolf wrote:One question regarding this. In exposure_dynamic_framerate=1 mode, what are the limits? I assume the lower limit is ~ 1 sec. What is the upper limit? Still 30 fps? So it will emit at most 30 frames per second but expo time would get shorter (down to 1/6000s)?
I actually set the framerate limits as being a minimum of 1fps, and a maximum of whatever the defined framerate is, so
Code: Select all
v4l2-ctl -p 15
would set a range of 1-15fps.
Yes, exposure can go down below the frame time of that max framerate if the light level warrants it.
towolf wrote:Another question that I have: I suspect that -- as scene brightness decreases -- the exposure code first ramps up the analog gain (ISO) and then ramps up exposure time (in "night" mode).
For an application that I have I would prefer it the other way around. Does that make sense?
I'm not involved in the AE algorithm directly, and James is right with his comment that it's involved.
It could be configured to do what you ask as it is set up with stages that have a max AG and exp time defined, however we can't really get into supporting everyone trying to define their own exposure modes.
I'm being cautious in what I'm saying here, but it may be possible to open the tuning up to tinkerers, however with no support provided (ie if your tuning settings don't work, then we won't be helping out with why not, and we won't be documenting it in detail either). Whether that can be got past the lawyers is another matter.
towolf wrote:Would it be possible to divulge what all the presets do? We have a lot of reports here on the forum where people tried to derive what the presets do, but nothing explicit.
I don't believe there is anything too sensitive in this area, so I'll give some general details for night mode here. It has four bands,
- - 200usec-10msec, and up to x1.5 AG
- 10ms-125ms, and up to x2.5 AG
- 125ms-250ms, and up to x4.0 AG
- 250ms-1s, and up to x8.0 AG.
It will allow a level of digital gain as well within each band, but I don't know enough detail.
Actually with those settings you will broadly get exposure time being increased in preference to AG, which is the situation that you wanted.
The default exposure mode maxes out at a 66ms exposure time to avoid too much motion blur on video, so those wanting better low light performance really will be wanting the night scene mode.
Sports is the only other mode that is currently exposed via V4L2, and that goes for short exposure times to really minimise motion blur. Max exp time in that mode is 16.6ms.
I hope that helps.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.