HDMI output using vdma and python

I am using a picture from Internet and changing its shape into a list of 12807203 length, and I want to flush it into DDR so that my vdma readchannel can then output it to HDMI. Now I don’t have clue to do it because the tutorial did it with baseOverlay and a “video” module. Could someone help me with this?

Hi Zhang,
Welcome to Pynq forum. Can you please describe what is your exact problem you are experiencing? If you can’t find base overlay vivado project, then necessary project tcl files you will get here: https://github.com/Xilinx/PYNQ/tree/master/boards. Other than that, if you want to create a new overlay, that’s also possible (you might need to buy hdmi license for some boards like zcu104).
Apart from that, It can’t be solved until you describe what exact problem you are having.


Now I can describe my problem more precisely. I need to write a picture from Python to vdma, and now I want to use vdma.writechannel.writeframe(myframe) to write my picture into vdma. The problem is that my “myframe” is of numpy.array form and it is not compatible with vdma.writechannel.writeframe(myframe) function. How can I write my pixel array into vdma? Thanks

That the error I got with vdma0.writechannel.writeframe(frame): ‘numpy.ndarray’ object has no attribute ‘flush’, where “frame” is np.ndarray

This might be because you are not using a buffer, or trying unsupported image file from PIL or scipy.Try following code with making a vivado project:

frameMode = VideoMode(1280,720,24)
vdma = overlay.axi_vdma_0
vdma.writechannel.mode= frameMode 
buffer= allocate(shape=(720, 1280, 3), dtype=np.uint8, cacheable=True)
buffer[:]=img[: ]

Not the best implementation, but it should work

Thanks for your reply, these phrases will not cause error in Jupyter. The new problem is that there is no image presented in my hdmi screen, and the hint is “input is not supported”. I have made sure that my cable and screen can work well(because an example design can show 720p video right with pynq board). Is there any clue?