Freenove / Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi

Apply to FNK0043
Other
138 stars 154 forks source link

Camera #7

Closed kevkid closed 4 years ago

kevkid commented 4 years ago

I am looking through the code to see how video is being transmitted. It looks like you are using picamera to rapidly capture small jpg images and transmit them over udp (I believe its udp according to the server code s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)). I am curious if this can be replaced with something faster like a direct h264 stream. My assumption is that I can use something like gstreamer to capture the video and stream it quickly.

My question: Where is the code that displays the video in the ui? I am having difficulty finding it.

DenzelChen commented 4 years ago

The code is in main.py 20200908142115

Display the image through a label control. Of course you can also transmit video via HTTP protocol.