我尝试使用gstreamer在Raspbian stretch上播放视频,但失败了。我开始安装gst-omx,并尝试了以下管道:
gst-launch-1.0 videotestsrc ! videoconvert ! glimagesink
-> ERROR: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink: Failed to connect to X display server
gst-launch-1.0 --gst-debug=3 uridecodebin uri=file:///opt/test/file.mp4 ! autovideosink
and
gst-launch-1.0 --gst-debug=3 playbin uri=file:///opt/test/file.mp4
-> gldisplay gstgldisplay_x11.c:88:gst_gl_display_x11_new: Failed to open X11 display connection with name, '(null)'看起来GStreamer正在寻找一个X显示服务器。但我不想用它。
有没有人让它在Raspbian上运行?它似乎在Wheezy上起作用。
发布于 2018-10-02 01:40:52
最后让它按照这个要点工作:https://gist.github.com/moritzvieli/417de950209a24a4f7a57ce1bb5bfeb7
我不得不从源代码中构建gstreamer。这是我如何配置基本插件的:
./configure --prefix=/usr \
--disable-gtk-doc --disable-examples \
--disable-opengl --enable-gles2 --enable-egl --disable-glx \
--disable-x11 --enable-wayland --enable-dispmanx \
--with-gles2-module-name=/opt/vc/lib/libbrcmGLESv2.so \
--with-egl-module-name=/opt/vc/lib/libbrcmEGL.so在此之后,我总是收到EGL_NOT_INITIALIZED错误,因为gstreamer选择了错误的共享库。这个问题可以通过这个技巧暂时解决:
sudo ln -fs /opt/vc/lib/libbrcmEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1
sudo ln -fs /opt/vc/lib/libbrcmGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2我还得想出一个合适的解决方案。也许可以卸载egl mesa库。
https://stackoverflow.com/questions/52247497
复制相似问题