我试图使它,以便VLC播放器将正确导入,以便它将播放一系列的VLC媒体文件,在连续。但是,我似乎不能让VLC正确地导入!我下载了vlc.py并将其添加到我的工作区中。看起来是这样的;
import vlc
class PlayerWindow(Frame):
def __init__(self, parent):
super().__init__()
self.parent = parent
self.parent.attributes('-alpha', 0)
self.parent.attributes("-fullscreen", True)
self.parent.bind_all("<Key>", self.key)
# VLC player controls
self.Instance = vlc.Instance()
self.player = self.Instance.media_player_new()
self.player.toggle_fullscreen()
self.player.video_set_key_input(False)
self.parent.update()我在使用微软VS 2017
发布于 2018-09-20 06:02:29
尝试卸载vlc ( pip卸载vlc )并重新安装它的组合。python也是如此。还要检查是否设置了路径变量( VS Code和VideoLAN\VLC )。那就一定管用了。
发布于 2019-05-12 03:46:21
在我的例子中,它是通过在linux上安装libvlc-dev来解决的。
https://stackoverflow.com/questions/52405364
复制相似问题