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

Tello Video Web Streaming

On my Mac works great !
Great to hear that it is possible. I would very much like to find out what is needed to make my Mac work with ffmpeg. I can show the video on my Mac using Python libraries pygame and cv2, but with ffmpeg I've had no succes so far.
My Mac IOS is Mojave (MacBook Pro 2018 model) and for ffmpeg I downloaded a static ffmpeg build from ffmpeg.org. Could it be permissions? (I used chmod +x ffmpeg) Any other suggestions?
 
On my Mac works great !
That made me try again and I found the problem: libsdl was missing from my ffmpeg build

I solved the problem with:

brew reinstall sdl2 ffmpeg

Then, aften 'command' and 'streamon' in af Python script, it worked on my Mac with:

FFmpeg -i udp://192.168.10.1:11111 -f sdl "VideoWindow"
 
  • Love
Reactions: martinpi
A simple way to display video would be ffplay, which is included in ffmpeg.
I got it to work like this.
  1. Send "command" and "streamon" to udp port of the tello 8889. I use the Python Script provided by Ryze to do this, but feel free to use a different program.
  2. The tello will now be sending an h264 stream over udp on port 11111.
  3. Use the following command to display the stream: ffplay -probesize 32 -i udp://@:11111 -framerate 30
("-probesize 32" makes the delay of the stream minimal.)


I cant send streamon with python script, shows Unkown Command!
 
Hello, fellow droners!
I think I have kind of figured out this one.
Krag and Tikum almost nailed it, but there is some little unsolved problem.

"ffplay -probesize 32 -i udp://0.0.0.0:11111 -framerate 30"

Probesize will only bug you at the start of the stream. Also my ffmpeg version won't let me use anything below 2048, and the stream can only be decoded if I use something around 500.000. (which is a lot less than the default of 5.000.000)

I have noticed that ffplay has a counter named "vq=". It is a buffer that should stabilize at some time in normal conditions, but it is constantly going up.
I figured out that ffplay correctly decodes the video format, but it miss when setting the framerate. The drone produces more that 24fps, hence the buffer is constantly growing because it is sending more frames than what ffplay is displaying.

The solution to probe delay should be specifying the correct format via command line so the program doesn't have to figure out (if it is possible). The solution for the delay and buffer filling up is forcing the framerate to a number higher than what the drone can produce. (or ideally, using some parameter that forces ffplay to display the frame as soon as it is received. But normal encoders doesn't understand why would you like to use VARIABLE frame rate, that is a big NO in normal video files)
Tikum proposed 30, but during my testing the drone can produce more. so just go with 35 or 40 and you are done!
so the final command line would be:

"ffplay -probesize 5000000 -i udp://0.0.0.0:11111 -framerate 35"

Also, trying ffmpeg with sdl instead of ffplay can be a very bad idea, because ffmpeg might encode the video before sending it to display, and that would be a big cpu overhead!

So, enjoy your lagless video!
 
Hello, fellow droners!
I think I have kind of figured out this one.
Krag and Tikum almost nailed it, but there is some little unsolved problem.

"ffplay -probesize 32 -i udp://0.0.0.0:11111 -framerate 30"

Probesize will only bug you at the start of the stream. Also my ffmpeg version won't let me use anything below 2048, and the stream can only be decoded if I use something around 500.000. (which is a lot less than the default of 5.000.000)

I have noticed that ffplay has a counter named "vq=". It is a buffer that should stabilize at some time in normal conditions, but it is constantly going up.
I figured out that ffplay correctly decodes the video format, but it miss when setting the framerate. The drone produces more that 24fps, hence the buffer is constantly growing because it is sending more frames than what ffplay is displaying.

The solution to probe delay should be specifying the correct format via command line so the program doesn't have to figure out (if it is possible). The solution for the delay and buffer filling up is forcing the framerate to a number higher than what the drone can produce. (or ideally, using some parameter that forces ffplay to display the frame as soon as it is received. But normal encoders doesn't understand why would you like to use VARIABLE frame rate, that is a big NO in normal video files)
Tikum proposed 30, but during my testing the drone can produce more. so just go with 35 or 40 and you are done!
so the final command line would be:

"ffplay -probesize 5000000 -i udp://0.0.0.0:11111 -framerate 35"

Also, trying ffmpeg with sdl instead of ffplay can be a very bad idea, because ffmpeg might encode the video before sending it to display, and that would be a big cpu overhead!

So, enjoy your lagless video!
can u help me with a correction code ???
 
Thanks, folks, for posting in this thread!
I successfully tried to receive the video stream and put this feature in tellTello.

You can use tellTello (which is based on the Tello3.py demo program) to send the "streamon" command.
Then you quit tellTello or open a new window for the ffmpeg/ffplay command. You can let tellTello do both tasks with one command.
You can experiment with different commands. You don't need to type the commands every time, you can use the script feature.

tellTello version 1.2

My program is growing fast, even though my ideas come even faster and so the todo list still grows.
The new commands in tellTello are:
  • oscommand ... enter an os command which is executed in a new window.
    This is, sorry Linux and Mac users, Windows-specific.
    I leave the window open for later inspection.
  • video ... send "streamon" and open ffmpeg in a new window
  • ready ... ready for takeoff: start motors and enter joystick mode
Check it out on cozmobotics/tellTello and have some fun with it!
See the more detailed description on this thread: tellTello - A console-based frontend to the SDK. Written in Python3
 
I am facing a weird problem.
When I connect to Tello's own WiFi, the video stream works fine perfectly.
But, when I connect the Tello with my Home WiFi, the stream doesn't work.

Is there any limitation that we can only get Tello's video stream through its own WiFi and not when we connect it to our own WiFi?
 
I am facing a weird problem.
When I connect to Tello's own WiFi, the video stream works fine perfectly.
But, when I connect the Tello with my Home WiFi, the stream doesn't work.

Is there any limitation that we can only get Tello's video stream through its own WiFi and not when we connect it to our own WiFi?
video stream is not supported in station mode
 
Hello, I am trying to get the video stream using an RPi 3B+. I can get the stream using TelloPy and DJITelloPy libraries and can see the footage using the OpenCV's imshow() function with a <10sec delay and at a much lower FPS. I tried connecting to drone, streamon and using ffplay (ffmpeg 5.0) which worked in my MacOS flawlessly. However, when I do that on that RPi 3B+ (Raspbian buster ffmpeg 4.2) ffplay seems to be running but not getting the stream. Is there anyone with suggestions?
 
I am getting video feed in windows but I am not getting video in Linux both are same scripts .Can anyone give solution?
 

Members online

No members online now.

Forum statistics

Threads
5,727
Messages
40,059
Members
17,206
Latest member
payne2x