Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CV2 stream does not load properly in developer mode #178

Open
Isabella-L opened this issue Feb 24, 2023 · 2 comments
Open

CV2 stream does not load properly in developer mode #178

Isabella-L opened this issue Feb 24, 2023 · 2 comments

Comments

@Isabella-L
Copy link

Isabella-L commented Feb 24, 2023

I am running a simple program to test video streaming with tello drone.
When I follow the instruction to clone and install for developer mode, the cv2.imshow() function is not working properly.

On Windows 10 the stream shows up incorrectly, with the R value replaced by B. Everything red shows up as blue.
On Ubuntu 20.04 the program stuck at cv2.imshow() and the cv2 window stream never shows up at all.

The console output is:

non-existing PPS 0 referenced
non-existing PPS 0 referenced
decode_slice_header error
no frame!
left block unavailable for requested intra4x4 mode -1
error while decoding MB 0 5, bytestream 11800

However, if I use pip install djitellopy then everything works just fine.
There will be a cv2 window prompt with the live stream and the console looks like this:
image
Don't be alarmed by the red lines it doesn't affect the program running. The video stream is working properly.

I am not an expert in H264 decoding. I hope someone can help me understand what is happening here.

My code is very simple:

from djitellopy import Tello
import cv2

me = Tello()

me.connect()
print(me.get_battery())
me.streamon()
frame_reader = me.get_frame_read()

while True:
    cv2.imshow("Tello Stream", frame_reader.frame)
    c = cv2.waitKey(1) 
    if c == 27: #ESC
        break

me.end()
cv2.destroyAllWindows()
@faisalnjs
Copy link

+1

1 similar comment
@ccjimmy777
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants