You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change framerate on the fly. From time to time Raspberry 3B with camera V2.1 I get module freeze. Nothing helps, but reboot. Code to reproduce:
import picamera
import time
print('Initializing camera')
camera = picamera.PiCamera()
time.sleep(0.5)
camera.resolution = (640, 480)
camera.framerate = 10
camera.annotate_frame_num = True
print('Ok')
n_cycles = 10
camera.start_recording('test.h264')
for i in range(n_cycles):
if i > 2 and i % 2 == 0:
camera.framerate_delta = -9.5
else:
camera.framerate_delta = 0.
msg = f"{i}: {camera.frame.index:4d} F{float(camera.framerate_delta):2.1f}"
print(msg)
camera.annotate_text = msg
camera.wait_recording(1.)
camera.stop_recording()
Output:
Initializing camera
Ok
0: 0 F0.0
1: 4 F0.0
2: 14 F0.0
3: 24 F0.0
4: 34 F-9.5
5: 36 F0.0
6: 36 F-9.5
Traceback (most recent call last):
File "framerate_delta_issue.py", line 21, in <module>
camera.framerate_delta = 0.
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 2417, in _set_framerate_delta
self._check_camera_open()
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 538, in _check_camera_open
raise exc
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1995, in _control_callback
"No data recevied from sensor. Check all connections, "
picamera.exc.PiCameraRuntimeError: No data recevied from sensor. Check all connections, including the SUNNY chip on the camera board
I was not able to reproduce issue on Pi Zero with different camera module. But I've seen same issue a couple of times.
If someone knows safer method to change framerate, please, share it.
The text was updated successfully, but these errors were encountered:
I want to change framerate on the fly. From time to time Raspberry 3B with camera V2.1 I get module freeze. Nothing helps, but reboot. Code to reproduce:
Output:
I was not able to reproduce issue on Pi Zero with different camera module. But I've seen same issue a couple of times.
If someone knows safer method to change framerate, please, share it.
The text was updated successfully, but these errors were encountered: