我是Gstreamer的新手,所以如果这个问题非常简单,我会道歉,但是我已经被困了太久了。
我在覆盆子pi上使用Mopidy通过扬声器播放音乐。当Mopidy正在播放时,我希望能够将一些灯光与低频段,中频和高频同步。根据我的理解,Mopidy在后端使用Gstreamer,您可以通过指定
来自定义管道[audio]
output= spectrum bands=3 ! autoaudiosink
我需要在频谱和接收器之间放置一些东西来分析通过频谱'频谱发布在总线上的元素消息。 (除非有人有更好的主意)。我试图在python中编写一个通过音频的简单元素,但是有一个可以实现我的自定义逻辑的消息处理元素。但是,我甚至无法开始使用简单的在线示例,因为我不知道如何为gstreamer注册元素以识别它。当我在https://github.com/GStreamer/gst-python/blob/master/examples/plugins/python/identity.py处遵循gst-python identity.py示例时,指定的指令不起作用。
jlc@FuzzPi:~/Rise $ export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD
jlc@FuzzPi:~/Rise $ GST_DEBUG=python:4 gst-launch-1.0 fakesrc num-buffers=10 ! identity_py ! fakesink
WARNING: erroneous pipeline: no element "identity_py"
我已经尝试了所有可以想象的GST_PLUGIN_PATH,并尝试了我能找到的每个在线帖子中的所有内容,而且我可能只是遗漏了一些非常基本的东西,但我真的可以用一只手弄清楚它是什么我失踪了!据我所知,这不应该是这么复杂。
我的操作系统是Ubuntu MATE 16.04,我的所有gstreamer软件包都是版本> 1.6
jlc@FuzzPi:~/Rise $ dpkg -l | grep gst
ii gir1.2-gst-plugins-base-1.0 1.8.3-1ubuntu0.2 armhf GObject introspection data for the GStreamer Plugins Base library
ii gir1.2-gstreamer-1.0 1.8.3-1~ubuntu0.1 armhf GObject introspection data for the GStreamer library
ii gstreamer1.0-alsa:armhf 1.8.3-1ubuntu0.2 armhf GStreamer plugin for ALSA
ii gstreamer1.0-clutter-3.0 3.0.18-1 armhf Clutter PLugin for GStreamer 1.0
ii gstreamer1.0-libav:armhf 1.8.3-1ubuntu0.2 armhf libav plugin for GStreamer
ii gstreamer1.0-nice:armhf 0.1.13-0ubuntu2 armhf ICE library (GStreamer plugin)
ii gstreamer1.0-plugins-base:armhf 1.8.3-1ubuntu0.2 armhf GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-good:armhf 1.8.3-1ubuntu0.4 armhf GStreamer plugins from the "good" set
ii gstreamer1.0-plugins-ugly:armhf 1.8.3-1ubuntu0.1 armhf GStreamer plugins from the "ugly" set
ii gstreamer1.0-plugins-ugly-amr:armhf 1.8.3-1ubuntu0.1 armhf GStreamer plugins from the "ugly" set
ii gstreamer1.0-pulseaudio:armhf 1.8.3-1ubuntu0.4 armhf GStreamer plugin for PulseAudio
ii gstreamer1.0-tools 1.8.3-1~ubuntu0.1 armhf Tools for use with GStreamer
ii gstreamer1.0-x:armhf 1.8.3-1ubuntu0.2 armhf GStreamer plugins for X11 and Pango
ii libclutter-gst-3.0-0:armhf 3.0.18-1 armhf Open GL based interactive canvas library GStreamer elements
ii libgstreamer-plugins-base1.0-0:armhf 1.8.3-1ubuntu0.2 armhf GStreamer libraries from the "base" set
ii libgstreamer-plugins-good1.0-0:armhf 1.8.3-1ubuntu0.4 armhf GStreamer development files for libraries from the "good" set
ii libgstreamer1.0-0:armhf 1.8.3-1~ubuntu0.1 armhf Core GStreamer libraries and elements
ii libreoffice-avmedia-backend-gstreamer 1:5.1.6~rc2-0ubuntu1~xenial1 armhf GStreamer backend for LibreOffice
ii python-gst-1.0 1.6.2-1build1 armhf GStreamer GObject Introspection overrides for Python
ii python-gst-1.0-dbg 1.6.2-1build1 armhf GStreamer GObject Introspection overrides for Python (debug extensions)