Quantcast
Viewing all articles
Browse latest Browse all 4852

Camera board • Re: FrameRate, FrameDurationLimits and Resolution HQCAM

Hi, first thing is always to create a really simple and minimal script - no more than a dozen lines if possible - that runs standalone and demonstrates the problem. Then we have something we can look at.

Some simple things to try: if you're not recording, do you get the camera framerate you think you've set? Does allocating more buffers in your configuration help? Does it work better if you don't have a preview window?

Sorry about that.
I understand. Here's a simplified code.
I tried everything to define the framerate. But if I go above 50fps whatever the number, I always stay at 51.8 fps when I play the video.
I tried with no preview same results.
Below that, the framerate is more or less accurate (for 10 fps I get 12, for 24 I get 26).
Why can't I go above 50fps despite the fact that the resolution is below the specified maximum resolution?

I've also tried adding a buffer_count=2 to the video configuration.
In this case it divides the number of fps by two when I'm above 50fps.

I'm having a really hard time understanding how to define the framerate of a video for sure.

Code:

import timefrom picamera2 import Picamera2from picamera2.encoders import H264Encoderfrom picamera2.outputs import FfmpegOutputpicam2 = Picamera2()main = {'size': (1280,720), 'format': 'XBGR8888'}video_config = picam2.create_video_configuration(main,controls={"FrameRate": 120})picam2.configure(video_config)encoder = H264Encoder(10000000)output = FfmpegOutput('test.mp4')picam2.set_controls({"FrameRate": 120})picam2.start_recording(encoder, output)time.sleep(5)picam2.stop_recording()

Statistics: Posted by davebixby — Wed Apr 03, 2024 2:46 pm



Viewing all articles
Browse latest Browse all 4852

Trending Articles