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
111
Reaction score
54
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?
 
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 answers raise new questions.

How do I configure the Tello Camera?
As far as I understand, using the SDK you cannot do much about it.

The other way round, is there a possibility to increase some sort of timeout in opencv?
 
As far as I can tell, these messages are from the h264 decoder code in the libav library, not opencv itself. I haven't found any way to disable them yet, but they seem to be harmless
 

New Posts

Members online

No members online now.

Forum statistics

Threads
5,690
Messages
39,934
Members
17,023
Latest member
Repiv

New Posts