Hi,
I'm working on a raspberry pi 4B and I'm trying to perform a video streaming with a resolution equal to 3840x2160
I need to use picamera2 and ideally I need to have just the "lores" stream but I'm not able to find a way to deactivate the "main" stream.
Indeed, keeping active both streams is not possible if we need an high resolution because of memory issues due to the fact that if "lores" stream resolution is set to 3840x2160, "main" stream resolution must be higher or the following error will be raised:
" File "/usr/local/lib/python3.11/dist-packages/picamera2/picamera2.py", line 830, in check_camera_config
raise RuntimeError("lores stream dimensions may not exceed main stream")
RuntimeError: lores stream dimensions may not exceed main stream "
I already set cma memory to 512 in the config.txt but memory is still not enough.
I hope someone have some suggestion to deactivate "main" stream and keep just "lores" which seams to be faster.
(to delete main stream, It seams not enough to define just "lores" stream in the configuration like in the following command: create_video_configuration(lores={"size": (3840, 2160), "format": "YUV420"}, encode="lores"))
I also tried to define main stream with same configuration of the example above:
however, the use of "yuv420" format and MJPEGencoder on "main" stream raises the following error:
File "/usr/local/lib/python3.11/dist-packages/picamera2/encoders/v4l2_encoder.py", line 149, in _start
fcntl.ioctl(self.vd, VIDIOC_STREAMON, typev)
ProcessLookupError: [Errno 3] No such process
If you have any suggestion (different from "use raspberry pi 5") let me know.
thank you in advance for your help.
I'm working on a raspberry pi 4B and I'm trying to perform a video streaming with a resolution equal to 3840x2160
I need to use picamera2 and ideally I need to have just the "lores" stream but I'm not able to find a way to deactivate the "main" stream.
Indeed, keeping active both streams is not possible if we need an high resolution because of memory issues due to the fact that if "lores" stream resolution is set to 3840x2160, "main" stream resolution must be higher or the following error will be raised:
" File "/usr/local/lib/python3.11/dist-packages/picamera2/picamera2.py", line 830, in check_camera_config
raise RuntimeError("lores stream dimensions may not exceed main stream")
RuntimeError: lores stream dimensions may not exceed main stream "
I already set cma memory to 512 in the config.txt but memory is still not enough.
I hope someone have some suggestion to deactivate "main" stream and keep just "lores" which seams to be faster.
(to delete main stream, It seams not enough to define just "lores" stream in the configuration like in the following command: create_video_configuration(lores={"size": (3840, 2160), "format": "YUV420"}, encode="lores"))
I also tried to define main stream with same configuration of the example above:
however, the use of "yuv420" format and MJPEGencoder on "main" stream raises the following error:
File "/usr/local/lib/python3.11/dist-packages/picamera2/encoders/v4l2_encoder.py", line 149, in _start
fcntl.ioctl(self.vd, VIDIOC_STREAMON, typev)
ProcessLookupError: [Errno 3] No such process
If you have any suggestion (different from "use raspberry pi 5") let me know.
thank you in advance for your help.
Statistics: Posted by etdev — Thu Dec 19, 2024 2:45 pm