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
90
Reaction score
52
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
2
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.
 

martinpi

Well-known member
Joined
Dec 15, 2019
Messages
90
Reaction score
52
Location
Vienna. Austria
Website
martinpi.at
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?
 

robagar

Active member
Joined
Apr 17, 2021
Messages
30
Reaction score
14
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 Threads

Members online

No members online now.

Forum statistics

Threads
5,220
Messages
37,714
Members
14,303
Latest member
ben.northwales