Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

Displaying video with ffmpeg or opencv works, but I get a lot of messages

martinpi

Well-known member
Joined
Dec 15, 2019
Messages
76
Reaction score
44
Location
Vienna. Austria
Website
martinpi.at
I display the video from the camera with one of these methods.

Code:
import cv2

cap = cv2.VideoCapture("udp://@0.0.0.0:11111")

while(True):
    # Capture frame-by-frame
    ret, frame = cap.read()
    if(ret):
        cv2.imshow('Tello Video',frame)
    if cv2.waitKey(1) == ord('q'):
        break

cap.release()
cv.destroyAllWindows()

or by letting FFmpeg do the job

Code:
oscommand FFmpeg -i udp://192.168.10.1:11111 -f sdl "Tello Video"

Both work, but I get lots of messages looking like this:

ffmpeg_cv2_messages.jpg

I would like to get rid of them by
a) finding some settings so that the errors don't occur (preferred) or
b) somehow suppressing or redirecting the messages

I tried adding an error handler with the with cv.redirectError(handleError) but it didn't help. Any ideas?
 

cumulus

New member
Joined
Jan 3, 2021
Messages
2
Reaction score
1
You will get these messages for every frame until the decoder sees a key frame.
Configure the Tello camera to send key frames in regular intervals.
 

New Threads

Members online

Forum statistics

Threads
4,856
Messages
35,400
Members
12,791
Latest member
saz