Closed chrizbee closed 5 months ago
Hi, interesting problem. Here are a few random thoughts off the top of my head.
YUV422 may have some benefits if you can avoid h264 compression. If you do need that, then it would get converted to YUV420 anyway.
I'm afraid I don't know a lot about DRM. (One of my regular complaints is that you can usually find some Linux kernel API documentation, but the "yeah, now how do I actually use it in an application" bit just doesn't exist). There are some Raspberry Pi graphics related forums, I think, so you may find more knowledgeable folk there.
I ended up using rpicam-vid
and ffplay
as suggested (4).
#!/bin/bash
rpicam-vid -n -t 0 --width 1920 --height 1080 -o /tmp/delayed.data &
sleep 20
ffplay -fs -i /tmp/delayed.data
pkill rpicam-vid
I just used /tmp/
to store the data since that was fast enough and I didn't have to worry about RAM size.
Thanks a bunch @davidplowman 😄
Question / Problem I am trying to delay the preview by a specified number of seconds (or frames) (~20s). I don't care about recording. Is this possible with picamera2 (maybe using CircularOutput)?
Specs
At 1920 x 1080 x 3 x 30fps x 20 = 3.7GB the buffers should fit in RAM (without blanking). I don't really want to do encoding to write the data to a file on the sd card...
Alternatives
rpicam-delay
which is based onrpicam-hello
where I put incoming requests into a queue and then start processing requests from this queue after the time I've set has passed. This way I can achieve a bit more than a second (after increasing buffer count) before running into all kinds of errors.libcamerasrc -> queue min-threshold-time=x ns -> kmssink
I can achieve almost a second of delay. Increasing the threshold time further results in a pipeline that is "stuck" (showing only the first undelayed frame).