ffmpeg does not receive udp packets from tello-edu drone
CompletedHi,
I am having trouble receiving video from my Tello-EDU drone on my laptop. I can control the drone and receive state information however I am having an issue with getting the video with ffmpeg.
My understanding is that to get the video you must send the streamon command after connecting to the drone. After this, the video should be sent as UDP packets on port 11111. On my laptop I can see the packets arriving with wireshark or netcat however when I try to open them in ffmpeg with `ffmpeg -i udp://0.0.0.0:11111 out.mp4` ffmpeg does not appear to receive any udp packets.
This is a problem since ffmpeg is a very common backend for many video libraries and applications. Therefore, when I try opening the stream in VLC, for example, it also does not work. Or importantly, when I try to read the frames using the djitellopy library it also does not work. Specifically, an error is thrown here because of the av.error.ExitError. In the PyAv documentation here we can see that this corresponds to the “Immediate exit requested” error from ffmpeg which it is a wrapper for. This is also the same thing that happens when I try to receive the udp stream in fmpeg on the command line after pressing Ctrl-C to close it. My assumption is that this error indicates it has not received any information from the input as it also happens when I close it and am not attempting to stream anything to it.
My laptop is a Lenovo Thinkpad t14s gen 3 running Linux Mint 21.3 (which is based on Ubuntu 22.04)
I have tried:
- Updating the firmware on the drone using the Tello. I can now see it supports commands from the SDK 3.0
- Trying a different UDP port using the newer SDK
- Updating ffmpeg to 6.1-1build2~22.04
- Trying to view the stream in VLC player (I assume this is using ffmpeg in the backend and so does not work)
- Downgrading the djitellopy library to <2.5 when it used opencv instead of PyAv (results in a different error which also appears to be related to opencv using ffmpeg in the backend)
- Using ffmpeg to copy a local mp4 and output a copy, using localhost to do the same using udp, sending a video from one laptop to another on the same network using udp (not on the drone’s network) – all of these work
- Sending a video from one laptop to another over the drone’s network – does not work and no packets seem to be shown in netcat which is even less than before
- Connecting the drone to the tello app on my phone which does display video correctly.
Does anyone know where I might be able to see how the Tello App connects and can receives video in case there are any obvious differences to what I am doing.
Otherwise, I am stuck. I find it very strange that my laptop seems to receive the udp packets but ffmpeg is not able to access them despite being able to do so from other streams. If you have any ideas of what might be causing this issue and how I might be able to fix it that would be much appreciated.
-
Our engineers will be on holiday for the Chinese New Year(2-06~ 2-17), which may cause some delays in responding to your ticket. We appreciate your patience and apologize for the inconvenience this may cause you. You can first search for related articles in our knowledge base https://djisdksupport.zendesk.com/hc/en-us. We will answer your ticket as quickly as possible when the holiday is over. -
You are able to develop based on the Robomaster SDK we provide. The Robomaster SDK has already integrated video stream decoding functionality. There is no need for you to decode it yourself. The link to the Robomaster SDK is https://robomaster-dev.readthedocs.io/en/latest/.
Please sign in to leave a comment.
Comments
2 comments