Hello,
I'm building an interface for the raspberry pi hq cam with pyqt5 and picamera2.
I've made a menu with different settings including different resolutions (image ratio) and different framerates (24, 30, 60 and 120 fps) to record video in .h264 and .mp4.
Looking at the documentation, I confess I'm a little confused about the notion of framerate.
How do I configure it? UsingOr like this?Or, as I've seen on some forums with FrameDurationsLimits
In this case, if 40000 corresponds to 25fps. What are the framedurationlimits for 24, 60 and 120 fps?
Is it possible to change the framerate when recording a .mp4 video with synchronized audio (usb microphone)? Or is it selected by default? And if it is chosen by default, what is its value?
Another issue is framerate. I don't quite understand what maximum resolution is possible depending on the framerate chosen.
I have a rapsberry pi 5 8go, I record videos on an ssd. So harware isn't too much of a problem.
I'd like to record videos in 2028xheight (depending on the ratio chosen) with the best possible quality without loss of fps. But I read in the documentation that : The H264Encoder class implements an H.264 encoder using the Pi's in-built hardware, accessed through the V4L2 kernel
drivers, supporting up to 1080p30. The constructor accepts the following optional parameters:
Do I need to reduce the resolution to 1920 pixels?
At what framerate should I reduce the resolution?
In section 4.2.2.3. Raw streams and the Sensor Configuration
I read that for 120fps I can have a max resolution of (1332, 990)
For 50fps (2028, 1080).
So if I record in a 1.33 ratio, i.e. 2028x1524, I can't record in 50fps?
Sorry for all these questions, I'm quite lost.
Thanks !
I'm building an interface for the raspberry pi hq cam with pyqt5 and picamera2.
I've made a menu with different settings including different resolutions (image ratio) and different framerates (24, 30, 60 and 120 fps) to record video in .h264 and .mp4.
Looking at the documentation, I confess I'm a little confused about the notion of framerate.
How do I configure it? Using
Code:
picam2.set_controls({"FrameRate": 30})
Code:
config = picam2.create_video_configuration(main, lores=lores, display='lores',controls={"FrameRate": 30}, transform=Transform(hflip=1, vflip=1))
Code:
config = picam2.create_video_configuration(controls={"FrameDurationLimits": (33333, 33333)})
Is it possible to change the framerate when recording a .mp4 video with synchronized audio (usb microphone)? Or is it selected by default? And if it is chosen by default, what is its value?
Another issue is framerate. I don't quite understand what maximum resolution is possible depending on the framerate chosen.
I have a rapsberry pi 5 8go, I record videos on an ssd. So harware isn't too much of a problem.
I'd like to record videos in 2028xheight (depending on the ratio chosen) with the best possible quality without loss of fps. But I read in the documentation that : The H264Encoder class implements an H.264 encoder using the Pi's in-built hardware, accessed through the V4L2 kernel
drivers, supporting up to 1080p30. The constructor accepts the following optional parameters:
Do I need to reduce the resolution to 1920 pixels?
At what framerate should I reduce the resolution?
In section 4.2.2.3. Raw streams and the Sensor Configuration
I read that for 120fps I can have a max resolution of (1332, 990)
For 50fps (2028, 1080).
So if I record in a 1.33 ratio, i.e. 2028x1524, I can't record in 50fps?
Sorry for all these questions, I'm quite lost.
Thanks !
Statistics: Posted by davebixby — Tue Apr 02, 2024 12:50 pm