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

get_frame_read() it's not working

electrocataru

New member
Joined
Mar 2, 2022
Messages
3
Reaction score
0
Hello. I have this code :


import time, cv2
from threading import Thread
from djitellopy import Tello

tello = Tello()
tello.connect()
keepRecording = True
tello.streamon()
frame_read = tello.get_frame_read()


def videoRecorder():


# create a VideoWrite object, recoring to ./video.avi
height, width, _ = frame_read.frame.shape
video = cv2.VideoWriter('video3.mp4', cv2.VideoWriter_fourcc(*'XVID'), 30, (width, height))
while keepRecording:
video.write(frame_read.frame)
time.sleep(1 / 250)
video.release()
# we need to run the recorder in a seperate thread, otherwise blocking options
# would prevent frames from getting added to the video
recorder = Thread(target=videoRecorder)
recorder.start()
tello.takeoff()
tello.move_up(50)
tello.land()
keepRecording = False
recorder.join()

and my output is:

[h264 @ 000001360a7c0840] no frame!
[h264 @ 000001360a7c0840] non-existing PPS 0 referenced
[h264 @ 000001360a7c0840] non-existing PTraceback (most recent call last):
File "C:/Users/c.dogaru/PycharmProjects/drone_tello/main.py", line 12, in <module>
frame_read = me.get_frame_read()
 
Hi, im facing same problem, even with u suggested. Any other suggestions?

me.get_frame_read().frame


2
non-existing PPS 0 referenced



decode_slice_header error



no frame!



2
non-existing PPS 0 referenced
 

Members online

Forum statistics

Threads
5,679
Messages
39,912
Members
16,967
Latest member
jimi