Closed Ghazanfar373 closed 3 years ago
Well, that's a start. What you'll need to do next is read frames from the hdmi_in and then write them to the hdmi_out. Here's a basic streaming example that should work:
from pynq import Overlay
from pynq.pl import PL
from time import sleep
## Skip redownloading base.bit if already loaded (did this b/c the overlay download always shuts off my camera input)
base_needs_download = not 'base.bit' in PL.bitfile_name.split('/')
base = Overlay('base.bit', download=base_needs_download)
hdmi_in = base.video.hdmi_in
hdmi_out = base.video.hdmi_out
## Configure & start the HDMI stream
hdmi_in.configure()
hdmi_out.configure(hdmi_in.mode)
hdmi_in.start()
hdmi_out.start()
while True:
try:
frame = hdmi_in.readframe()
hdmi_out.writeframe(frame)
sleep(0.016)
except KeyboardInterrupt:
break
## Stop stream & clean up
hdmi_in.close()
hdmi_out.close()
Issue with getting real-time video stream into PYNQ via HDMI input cable connected to camera source
I'm successfully done with laptop HDMI input to monitor HDMI out with PYNQ but when i tried to connect camera with HDMI input it didn't work.
I'm using this tutorial provided with Jupyter Docs
To start with download the base overlay and instantate the HDMI input and output.