Video Stream freeze

Hi, I’m trying to do some real-time image processing to guide an ANAFI Drone.
To do that I use the StreamingExample class and instead of showing the cv2frame I put it in a variable self.frame and with another class I call its getter to process the frame. I know that the question was already asked but it wasn’t answered. I got the error

...
2021-07-30 13:23:38,394 [INFO]  olympe.drone.ANAFI-L124860 - _recv_cmd_cb - wifi.rssi_changed(rssi=-36)
timer 0x1d30ac0: missed 1 events
2021-07-30 13:23:40,394 [INFO]  olympe.drone.ANAFI-L124860 - _recv_cmd_cb - wifi.rssi_changed(rssi=-36)
vdec_ffmpeg_buffer_pop_all:546: failed to get an output buffer (frame dropped): 11(Resource temporarily unavailable)
vdec_ffmpeg_decoder_thread:687: vdec_ffmpeg_buffer_pop_all err=11(Resource temporarily unavailable)
timer 0x1d30ac0: missed 8 events
2021-07-30 13:23:42,395 [INFO]  olympe.drone.ANAFI-L124860 - _recv_cmd_cb - wifi.rssi_changed(rssi=-35)
failed to get an input buffer (-11)
2021-07-30 13:23:53,465 [INFO]  olympe.pdraw.ANAFI-L124860 - _video_sink_flush - vbuf_queue_flush() returned 0

I know it has something to do with the buffer, but only the cv2frame is kept, the yuv_frame is unref at the same time as in StreamingExample.

yes its possible to get such errors. Video stream is using queue and its own threading. If you want to process it in another class, try making a function get_cuurent_frame() . in the run() function set a gloabal variable to yuv_frame and return it.

in run(): inside first try block

self.current_frame= self.frame_queue.get(timeout=0.01)
get_cuurent_frame():
     return self.current_frame
1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.