【问题标题】:Kivy: Unable to load GStreamer on OSXKivy:无法在 OSX 上加载 GStreamer
【发布时间】:2016-05-18 12:26:03
【问题描述】:

我按照https://kivy.org/docs/installation/installation-osx.html#using-pip上的说明进行操作

如果运行 kivy/examples/demo/kivycatalog/main.py 但是我得到了错误:

   File "/Users/sonium/anaconda/lib/python3.4/site-packages/kivy/uix/video.py", line 171, in _do_video_load
     self._video = CoreVideo(filename=filename, **self.options)
   File "/Users/sonium/anaconda/lib/python3.4/site-packages/kivy/core/video/video_gstplayer.py", line 56, in __init__
     super(VideoGstplayer, self).__init__(**kwargs)
   File "/Users/sonium/anaconda/lib/python3.4/site-packages/kivy/core/video/__init__.py", line 83, in __init__
     self.filename = kwargs.get('filename')
   File "/Users/sonium/anaconda/lib/python3.4/site-packages/kivy/core/video/__init__.py", line 115, in <lambda>
     lambda self, x: self._set_filename(x),
   File "/Users/sonium/anaconda/lib/python3.4/site-packages/kivy/core/video/__init__.py", line 112, in _set_filename
     self.load()
   File "/Users/sonium/anaconda/lib/python3.4/site-packages/kivy/core/video/video_gstplayer.py", line 68, in load
     self.player.load()
   File "kivy/lib/gstplayer/_gstplayer.pyx", line 233, in kivy.lib.gstplayer._gstplayer.GstPlayer.load (/private/var/folders/vq/y67f0ypn5857c1k0xh0qmhvr0000gn/T/pip-build-iolf02v6/kivy/kivy/lib/gstplayer/_gstplayer.c:2791)
 kivy.lib.gstplayer._gstplayer.GstPlayerException: Unable to create a playbin

编辑: 该问题已通过“brew install gst-python”部分解决,但似乎需要已重命名为 gst-libav 的 gst-ffmpeg。播放视频仍然失败:

WARNING] [VideoGstplayer] b"No decoder available for type 'video/x-matroska'."
[ERROR  ] [VideoGstplayer] b'Your GStreamer installation is missing a plug-in.'
[ERROR  ] [VideoGstplayer] b'GStreamer encountered a general stream error.'

【问题讨论】:

  • 我会先尝试旧的 gst-launch-1.0 测试,例如从 shell 运行:gst-launch-1.0 videotestsrc ! autovideosink 如果您已正确安装 gstreamer..我不知道 kivy 如何安装/使用 gstreamer..跨度>

标签: python macos python-3.x kivy gstreamer


【解决方案1】:

也许您需要安装几个 gstreamer 插件...试试这个:

https://groups.google.com/forum/#!topic/kivy-users/LJrQGiN773A

用自制软件执行以下命令:

brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg010

【讨论】:

    猜你喜欢
    • 2013-06-07
    • 2022-08-10
    • 1970-01-01
    • 1970-01-01
    • 2014-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多