Open rossGardiner opened 3 years ago
Update: I suspect the steam corruption is due to large gaps in frames caused by latency of the split_recording
function.
I measured the split_recording
latency for h264 stream. It can grow to be as large as 1.5 seconds. I'm recording at 1080p 25fps 17Mbps.
How is this possible? I'm only changing the location in memory the stream writes to - right? Why does split_recording
occasionally take absolutely ages to complete?
As far as I know split_recording
will ask the encoder to produce a new keyframe.
This does not mean the encoder will immediately generate one, although 1.5seconds seems like a lot.
There also was an issue with the ringbuffer not being able to hold an entire frame when it was too big. Supposedly this was fixed but there isn't a new release of it. So maybe try installing directly from the repo
or just try using picameraX -> https://github.com/labthings/picamerax
Hi,
I'm writing an application which saves h264 and rgb streams when motion is detected. My strategy to get around slow RPi IO is to implement two buffers and switch between them. See my program snippet below:
When I view H264 files which I've saved, they are corrupted and only play to the sections where they have been joined together before vlc player gives up and starts again. Is there some problem with the way I'm appending the video to disk? I followed a PiCamera example.
Many thanks for any advice.