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

Tello Video Web Streaming

jgraves

Member
Joined
Apr 27, 2018
Messages
13
Reaction score
13
I've been following the reverse-engineering threads and I am particularly interested in the live video feed from the drone. I'm wanting to control the drone and offer remote web video feeds from the same raspberry pi. (REST calls to control the drone).

I almost have this working, but no matter what I try (vlc stream, flask, rtsp server), I seem to get huge delays in the video.

Is anyone able to make the Tello video available via something like a feed into Motion or using M-Jpeg streamer (MJPG-streamer).

Thanks.

-John
 
  • Like
Reactions: LarryP

Krag

Well-known member
Joined
Mar 22, 2018
Messages
252
Reaction score
199
I got significant delay with everything but finally discovered you can actually play video streams in ffmpeg, and with minimal delay. This is from memory and might not be right but you get the gist.

ffmpeg -i udp://<server ip> -f sdl "window title"

I have been using ffmpeg for years and didn't know it could "play" video.
 
Last edited:

jgraves

Member
Joined
Apr 27, 2018
Messages
13
Reaction score
13
Interesting. Maybe that would help to eventually stream in a browser window.

I tried ffmpeg -i udp://192.168.10.1 -f sdl "Tello", but nothing. :(

-John
 

Krag

Well-known member
Joined
Mar 22, 2018
Messages
252
Reaction score
199
You can't consume the feed from the drone directly. You have to strip out the NALs before you send it to ffmpeg.
 

brizey

New member
Joined
Jun 2, 2018
Messages
2
Reaction score
0
I was thinking of something like this Dregu/visio after the NALs were stripped. You could use hello_video to play the raw packets on a RPI.
 

Krag

Well-known member
Joined
Mar 22, 2018
Messages
252
Reaction score
199
I was thinking of something like this Dregu/visio after the NALs were stripped. You could use hello_video to play the raw packets on a RPI.
That project uses Broadway.js for playback in a browser and I have never had much luck getting that to work. First it is really slow (it is c++ compiled to java) and second it only supports h264 baseline. I think Tello uses Main.

I have been wanting to try out this project.

samirkumardas/jmuxer

In theory it should be able to play Tello streams in a browser with only a little massaging of the NALs. And since it uses MSE it should be fast and compatible.

You would still have to have some kind of server tho. For security reasons I don't think Websockets can ever connect directly to the Tellos UDP stream.
 

jgraves

Member
Joined
Apr 27, 2018
Messages
13
Reaction score
13
@Krag .

Interesting. My plan was to have a Raspberry PI with a second WiFi USB dongle connected to the Tello. On the Pi would be a node server serving REST calls to control the drone. This same Pi could be used to serve the jmuxer video. Let me start to play around with this.

Thanks.

-John
 

brizey

New member
Joined
Jun 2, 2018
Messages
2
Reaction score
0
Thanks krag, I tried with the spark and didn't get a decode so figured the profile was not baseline but thought it might be worth a shot on this one.
 

Rob_28

New member
Joined
Dec 21, 2018
Messages
2
Reaction score
0
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.)
 

chiel

New member
Joined
Dec 28, 2018
Messages
2
Reaction score
0
Hey Rob,
Thanks for the good advice. I got the streaming working as well. But even with the probesize option I still have a huge delay;
I don't know if I am the only one. Does someone know if there is way to get a lot less latency like on the tello app?
Delay is now between 1-10 sec.
 

Krag

Well-known member
Joined
Mar 22, 2018
Messages
252
Reaction score
199
As I said in the #2 post I got minimum delay by using ffmpeg instead of ffplay.

ffmpeg -i udp://<server ip> -f sdl "window title"
 

chiel

New member
Joined
Dec 28, 2018
Messages
2
Reaction score
0
@Krag
Hey, thanks for the suggestion. But I don't get video.

I tried:
ffmpeg -i udp://192.168.10.1:11111 -f sdl "window title" => no video.

ffplay -i udp://192.168.10.1:11111 => does work, but has big delay.

Any idea's what I might be doing wrong?
 

kmostafa

Member
Joined
Dec 18, 2018
Messages
5
Reaction score
0
Hi All,
As I am new here and interested in the same, can you please share a more details steps.

Thanks in advance
 

Neoflash

Member
Joined
Dec 28, 2018
Messages
24
Reaction score
0
@ababa

This is very similar to what I'm trying to do except that I'm using a Node.js instead of Python and I'm trying to send the videostream through the Data Channel instead of the Media Channel. Could you share your ffmpeg command with us to see how you deal with the h264 to vp8 conversion for live streaming.
 

Tikum

New member
Joined
Jan 6, 2019
Messages
1
Reaction score
1
Try:
ffplay -probesize 32 -i udp://0.0.0.0:11111 -framerate 30
ffmpeg -i udp://0.0.0.0:11111 -f sdl "Tello"
 
  • Like
Reactions: Neoflash

Krag

Well-known member
Joined
Mar 22, 2018
Messages
252
Reaction score
199
@Krag
Hey, thanks for the suggestion. But I don't get video.

I tried:
ffmpeg -i udp://192.168.10.1:11111 -f sdl "window title" => no video.

ffplay -i udp://192.168.10.1:11111 => does work, but has big delay.

Any idea's what I might be doing wrong?
Its been forever since I did this. Maybe I have the command wrong. But if ffplay plays the stream then ffmpeg should too.
 
Last edited:

SteenN

Member
Joined
Nov 22, 2018
Messages
6
Reaction score
2
The commands suggested by Tikum works on Windows
:
ffplay -probesize 32 -i udp://0.0.0.0:11111 -framerate 30
ffmpeg -i udp://0.0.0.0:11111 -f sdl "Tello"

However, on my Mac the screen opens and there is no errors, but the screen remains black. Maybe it's because the sdl library isn't included in the ffmpeg build
 
  • Like
Reactions: DinoBaldi

New Threads

Members online

Forum statistics

Threads
3,097
Messages
24,145
Members
7,871
Latest member
Tellanut