Tello-Python icon indicating copy to clipboard operation
Tello-Python copied to clipboard

Python 3 (again)

Open f41ardu opened this issue 5 years ago • 10 comments

Any thoughts to migrate the Tello-Python code to Python 3.X

I managed to migrate the H264 that it can be used with Python 3.X on my Raspberry PI. The rest is straightforward. So if someone could help to build the H264 dll or pyc from my fork could be helpful.

See my gist. udp video stream can be encoded by opencv:

https://gist.github.com/f41ardu/b75da46dae383e5c835295600deef604

f41ardu avatar Dec 28 '19 07:12 f41ardu

I'm a beginner, but I would like to help. I want this project to be in python 3 for my project.

RahilRehan avatar Dec 28 '19 12:12 RahilRehan

Stay tuned. I've nearly finalised it either on Raspberry x86 implementation. The implementation on my native Raspberry isn't completed yet. Be aware, video performance on a Raspberry PI3+ isn't perfect. But I assume that it will work on Linux, too. See my fork for further details.

Update: Test on Raspberry PI 3B. Videoperformance is slwo and I got still decoding errors:

[h264 @ 0x25a8c50] error while decoding MB 52 12, bytestream -7 [h264 @ 0x25a8c50] concealing 1977 DC, 1977 AC, 1977 MV errors in P frame [h264 @ 0x25a8c50] left block unavailable for requested intra mode [h264 @ 0x25a8c50] error while decoding MB 0 41, bytestream 1998 [h264 @ 0x25a8c50] concealing 289 DC, 289 AC, 289 MV errors in P frame [h264 @ 0x25a8c50] error while decoding MB 55 39, bytestream -8 [h264 @ 0x25a8c50] concealing 354 DC, 354 AC, 354 MV errors in P frame

f41ardu avatar Dec 29 '19 07:12 f41ardu

Public comment from Ho.Yan in Zendesk ticket #31175:

Dear Developer, Thank you for contacting DJI.

This question you can contact RYZE Tello's technical support: [email protected]

Warm Regards, DJI Developer Support

dji-dev avatar Dec 30 '19 03:12 dji-dev

Hi,

Thanks for trying to port this to Python 3.X. I tried to install the original 2.7 version but received a warning that 2.7 is no longer supported (as of Jan 1st 2020, apparently). I'd like to get video_test up and running. I can help test for you but I'm probably not as good a Python programmer as yourself! :)

I saw @f41ardu that you are experiencing the decode problems - does this mean that the video_test isn't working yet in Python 3.X please? To be honest I don't think I really need video but would more likely need a still image from the stream...

Thanks again. WW.

woofwoof avatar Jan 08 '20 19:01 woofwoof

I should have also mentioned that the 'one click install' couldn't install openCV either - not sure if that's related to Python 2.7 or something else. I haven't tried a manual install just yet though. Cheers, WW.

woofwoof avatar Jan 08 '20 19:01 woofwoof

My fork works fine using Python3, only on PI 3+ is somewhat slow. But there is a wrong path in my README for the boost lib for Raspberry. Stay tuned I'll update soon. Do we have information on the performance in Ubuntu or ???

f41ardu avatar Jan 18 '20 06:01 f41ardu

udp video stream can be encoded by opencv:

https://gist.github.com/f41ardu/b75da46dae383e5c835295600deef604

No need to use the h264 lib any longer. Migration to Phyton3 could become fairly easy.

f41ardu avatar Jan 22 '20 05:01 f41ardu

So can we run this with Python3 or not? I'm sure I can manage. But any official support would be appreciated.

jstolp avatar Feb 25 '20 18:02 jstolp

Any update on a Python3 version or progress of one we could create a PR. It looks a bit like this repo is abandoned by DJI.

justingrayston avatar Jun 23 '22 11:06 justingrayston

very latancy with video stream how remove the latency?

juanmill4 avatar Aug 25 '22 17:08 juanmill4

(The last update was two years ago, so maybe no one is interested in this,) The easiest way to play Tello videos with the lowest latency using Python 3 is to use the h264decoder: https://github.com/DaWelter/h264decoder

If you are using windows you will need to replace some of the code. Here is a guide I wrote. https://github.com/meekworth/pylwdrone/issues/10#issuecomment-2396154826

Replace import libh264decoder in tello.py with import h264decoder.

nobu835 avatar Oct 08 '24 01:10 nobu835