Well, the Pi 5 goes through libav (FFmpeg) rather than the hardware v4l2 encoder (as there isn't one), so things could wind up a bit different. I said the h264 file has no timestamps, but I think you can optionally signal a framerate in the headers, so maybe that's happening? This is not a great solution because the framerate has to be totally fixed, but you sense at one time sometime complained about the lack of framerate and got this slight "bodge" put in. But I'm speculating.
A good solution would be to store frames and timestamps in the circular buffer so that you could "replay" both into FFmpeg. Unfortunately I don't know of a good way to get timestamps and pre-encoded frames into FFmpeg. IIRC correctly there's an mkv tool that does this, so you could in theory convert to mkv and then onwards into mp4 (or just stick with the mkv file). But it's all a bit of a minefield...
A good solution would be to store frames and timestamps in the circular buffer so that you could "replay" both into FFmpeg. Unfortunately I don't know of a good way to get timestamps and pre-encoded frames into FFmpeg. IIRC correctly there's an mkv tool that does this, so you could in theory convert to mkv and then onwards into mp4 (or just stick with the mkv file). But it's all a bit of a minefield...
Statistics: Posted by therealdavidp — Mon Feb 26, 2024 1:06 pm