This is how -ex night used to work. It ranged between 4fps in low light and 30fps in fully lit conditions. And that was fine.Webcams, I believe, use variable frame rate, since they are not bothered about maintaining a fixed rate, which we are. So in darker conditions the rate is lowered to help exposure times.
Many video solutions cope just fine with variable frame rates. If one just dumps h264 of course playing that will speed up when frame rates drop, but any modern video system works using PTS timestamps that are associated with each frame.
What is needed is to get -ex night back to working as it did and then one can continue to pipe raw video into ffmpeg (to get derived timestamps, i.e., timestamps of the frame coming in on stdin).
Better would be to tag frames with precise pts at the time of capture and wrap a container (mp4, ts, mkv, whatever). There are containers that allow even to add a timecode track (timecode as is time of day and date). MP4 has the tmcd track, which would be super cool to reference RTC to the video and later burn in timecode onto the video, or correlate other signals.
mmal has references to physical and other timestamps, can they be hooked up?