python-vlc-Codec`h264';(H264-MPEG-4 AVC(第10部分))不受支持

python-vlc-Codec`h264';(H264-MPEG-4 AVC(第10部分))不受支持,python,libvlc,python-vlc,Python,Libvlc,Python Vlc,我正在尝试在python中使用python vlc播放视频。它给了我以下的错误 [00007f92180098b0] main decoder error: Codec `h264` (H264 - MPEG-4 AVC (part 10)) is not supported. [00007f92180098b0] main decoder error: Codec not supported [00007f92180098b0] main decoder error: VLC could no

我正在尝试在python中使用python vlc播放视频。它给了我以下的错误

[00007f92180098b0] main decoder error: Codec `h264` (H264 - MPEG-4 AVC (part 10)) is not supported.
[00007f92180098b0] main decoder error: Codec not supported
[00007f92180098b0] main decoder error: VLC could not decode the format "h264" (H264 - MPEG-4 AVC (part 10))
播放视频的代码如下所示

import sys
import vlc
import easygui

if(len(sys.argv) < 2):
    print("Please enter file name as command line argument")
    exit(0)

media = vlc.MediaPlayer(sys.argv[1])
media.play()
while True:
    pass
导入系统 进口vlc 轻松导入 如果(len(sys.argv)<2): 打印(“请输入文件名作为命令行参数”) 出口(0) media=vlc.MediaPlayer(sys.argv[1]) 媒体播放() 尽管如此: 通过
非常感谢您的帮助。谢谢。

我在使用Anaconda虚拟环境时遇到这个问题。我通过更新非常旧的
ffmpeg
包解决了这个问题。此操作还触发了新库的安装

conda install -c conda-forge ffmpeg
对于通常的
python
运行,我认为安装/更新ffmpeg库可以解决这个问题