Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

Graphics, sound and multimedia • Re: picamera2 capture circular stream

$
0
0
Setting the buffer size controls how far "back" the recording will start. From the documentation:
The CircularOutput constructor accepts the following optional parameters:

• file (default None) - a string (representing a file name) or a file-like object which is used to construct a FileOutput.
This is where output from the circular buffer will get written. The value None means that, when the circular buffer is
created, it will accumulate frames within the circular buffer, but will not be writing them out anywhere.

• buffersize (default 150) - set this to the number of seconds of video you want to be able to access from before the
current time, multiplied by the frame rate. So 150 buffers is enough for five seconds of video at 30fps.
So you could use something like

Code:

output = CircularOutput(buffersize=300) # 10 second buffer at 30 fps
(untested by me)

Statistics: Posted by rpdom — Sat Mar 30, 2024 12:39 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles