I am currently working on a robot that runs on a Pi4 and it’s remotely controlled from another Pi4 with a Tkinter GUI. The robot Pi and the controller GUI Pi are connected with an umbilical cable allowing ethernet connection between the two Pi4s.
The robot has a Pi Camera so it can be controlled remotely from the GUI but I am stuck with showing the video feed on the Tkinter GUI.
Currently, to stream the video from one Pi to the other I am running a bashfile on boot that gets the video feed using raspivid and sends it through Netcat to the other Pi. Then on the controller Pi, the GUI runs a bash file that opens the video feed using mplayer.
The bash file on the robot Pi has this code:
raspivid -w 320 -h 240 -fps 20 -o | nc 192.168.1.80 7000
The bash file on the controller Pi has this code:
netcat -l -p 7000 | mplayer -fps 20 -demuxer h264es -
This has been working well for me with minimal lag and good camera quality but the problem is that mplayer opens up its own window separate from the Tkinter GUI so it doesn’t look good.
Does anybody know any way of displaying the video feed through a Tkinter window/frame directly instead of using mplayer?
Thank you for your help,
Pablo.
I havent been able to find anything specific