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

Can't able to get real time video streaming from tello

Witt77

New member
Joined
Apr 17, 2020
Messages
2
Reaction score
0
Hello everyone

I'm trying python script to control and streaming real-time video from Tello drone. Drone control is functional but I can't get video streaming. When I turn on camera on the GUI it will print errors in the console.I work in Linux(Ubuntu).

Can anyone please suggest me a solution?

Exception in thread Thread -2:
Traceback (most recent call last):
File "/usr/lib/python2,7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "main.py", line 32, in camStream
cv2.imshow('cap', frame)
error: OpenCV(4.2.0) /io/opencv/modules/highgui/src/window.cpp:376: error: (-21 5: Assertion failed) size.width>0 && size.height>0 in function 'imshow'
 

Dan

Well-known member
Joined
Feb 20, 2020
Messages
50
Reaction score
20
Hello

I am dong a lot of work on livestreaming videos from drones of all kinds. I am not a programming, but a sophisticated user. I have some programming skills at a beginner to intermediate level in a few languages. With the Tello, the best solution that I have found, comes from Dennis Baldwin site on Github.He also has some good videos on Youtube and some courses on DroneBlocks.. It uses many plugin, that I do not know how to program, but his program works. i.e. nodeJ, Flask, CV2, etc. He is trying to shortne the complex programmiong, but with cut and paste and your modifications, it does work. Another one that just came up yesterday on this site from Italy, is doing the same, but the goal is tracking up to ten objects. I hope this helps some. You might have to move to python 3.7 ( not 3.9 ) fro these to work.
 

Witt77

New member
Joined
Apr 17, 2020
Messages
2
Reaction score
0
Hello thank you for response

I tried Python-Tello script but I have a problem everything installed correctly but if I run a script the streamon is receive but no video show up. I use sudo ufw allow 11111 to open UDP port but videostream can't show.
 

mbazli

Member
Joined
Apr 11, 2020
Messages
13
Reaction score
21
Location
Malaysia
Hi,

perhaps you can checkout my python script at Bitbucket -> Bitbucket

steps:
1. open terminal #1 -> execute tello-command.py, ex: python tello-command.py
2. send "command" command, ex: "command" without quote
3. send "streamon" command, ex: "streamon" without quote
then:
4. open terminal #2 -> execute tello-stream.py, ex: python tello-stream.py
5. you should able to view the camera feed from Tello

Regards,
Bazli
 
  • Like
Reactions: tello-ajd

tello-ajd

Member
Joined
Jun 19, 2020
Messages
8
Reaction score
0
Hi there, I tried your code from bitbucket as I am trying to do a similar thing and I'm getting the error OpenCV: Couldn't read video stream from file "udp://@0.0.0.0:11111". Have you ever gotten this error before? I have tried many other codes to try and accomplish getting the video stream from my Tello and encounter this error every time.
 
Last edited:

New Threads

Members online

Forum statistics

Threads
4,582
Messages
33,710
Members
11,822
Latest member
TelloDronny