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

Moving to python3

Open pniedzwiedzinski opened this issue 6 years ago • 5 comments

Python 2.7 will soon be deprecated. Have you considered moving the project to python3?

pniedzwiedzinski avatar Feb 25 '19 20:02 pniedzwiedzinski

Does anybody knows how to modify the h264decoder to work with phyton3.x ?

Solved. I've built a working version of Tello_Video running on python3.5: There is one minor issue I still have with the default ./usr/lib/arm-linux-gnueabihf/libboost_python.so pointing to ./usr/lib/arm-linux-gnueabihf/libboost_python-py27.a instead of ./usr/lib/arm-linux-gnueabihf/libboost_python-py35.a on my system. Some minor modifications are necessary in tello_control_ui.py. But it is working now. Performance seems to be much better using Python 3.5 instead of 2.7. I have still issues with the video stream. Seems not to work, yet.

Code fragment:

            res_string, ip = self.socket_video.recvfrom(2048)
            print(type(res_string)) 
            packet_data += res_string.decode('latin-1')
            print(type(packet_data))

11082 <class 'bytes'> <class 'str'> <class 'bytes'> <class 'str'> <class 'bytes'> <class 'str'> <class 'bytes'> <class 'str'> <class 'bytes'> <class 'str'> <class 'bytes'> <class 'str'> <class 'bytes'> <class 'str'> 10140 [h264 @ 0xa952d0] non-existing PPS 28 referenced [h264 @ 0xa952d0] non-existing PPS 28 referenced [h264 @ 0xa952d0] decode_slice_header error [h264 @ 0xa952d0] no frame!

But end up with non-existing PPS 28 referenced

f41ardu avatar Mar 17 '19 10:03 f41ardu

Solved. I've moved Tello_Video from python2.7 to python3.5 (on Raspberry PI). I'll prepare a pull cause I have to do a cleanup in my repository and integrate the h264 library based on the development branch. So stay tuned. At least and after some research it was pretty easy.

f41ardu avatar Mar 30 '19 15:03 f41ardu

I'd love to control my Tello from Raspberry Pi in Python3!

mike-shock avatar Mar 31 '19 15:03 mike-shock

How could I get the libh264decoder.pyd file in the windows environment? I want to run tello in the windows environment, what should I do?I am completely obsessed with it for several time, please help me.@f41ardu

cjs123456 avatar Dec 01 '19 15:12 cjs123456

Find out how to build the h264 decoder library on a Windows client. My version will work on Rasperrypi (tested) and Linux clients (not tested yet). I'm sorry to say and looking for myself to get a version running on Windows 10.

f41ardu avatar Dec 25 '19 06:12 f41ardu