简体   繁体   English

如何在 Raspberry Pi 上使用 python 无缝显示图像和视频?

[英]How can I display Images and Videos seamlessly with python on a Raspberry Pi?

I have a Raspberry Pi which pulls images and Videos from a Database.我有一个 Raspberry Pi,它从数据库中提取图像和视频。 Now I want to display the Images and Videos Fullscreen via HDMI with Python.现在我想使用 Python 通过 HDMI 全屏显示图像和视频。 I tried to use python-vlc, but when I displayed an Image and want to load the next one the Image disappears for a second and you can see the Console.我尝试使用 python-vlc,但是当我显示一个图像并想要加载下一个图像时,图像会消失一秒钟,您可以看到控制台。

Do you have any Idea how I can display the Media seamlessly?您知道如何无缝显示媒体吗?

I work with Python3 and Raspbian Lite.我使用 Python3 和 Raspbian Lite。

Don't destroy the window after displaying one image.不要在显示一张图像后破坏 window。 An example code is:一个示例代码是:

img1=cv2.imread('image1.jpg')
cv2.imshow('window',img1)
cv2.waitKey(3000)   # display for 3 seconds
img2=cv2.imread('image2.jpg')
cv2.imshow('window',img2)
cv2.waitKey(3000)

and so on...等等...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM