python-3.xvideo-streamingraspberry-pi3

Raspberry Pi 3 b+ Video Streaming to Python GUI


I have PC A & PC B. PC A is Raspberry Pi 3 b+, streaming video while open netcat listening port 8090 using this code:

PC B uses MPlayer to connect to PC A Port 8090 and open up the Video Stream, output is really awesome with low latency, the command:

But the thing is:

-> 1, Is there any Python lib or code can help me catch the streaming video and pipe it into GUI ? So i can add some info on my GUI while display the Video on background.

-> 2, Is there anyway to use the Mplayer as embed output inside my GUI? And then I can editing my GUI as I want and the video stream is playing on the background.


Solution

  • After a day, I've figured out the Solution for this.

    For anyone who looking Solution, this will be your write-ups:

    1. PC B (Client Side, which is my DebianOS Laptop): You create these 2 files:
    1. PC A (Raspberry Pi 3 Stream Server): You create a .sh file with this code:

           #!/bin/bash
           raspivid -t 0 -w <video_width> -h <video_height> -hf -ih -fps 60 -o - | nc <PC-B_IP> <port>