这个GStreamer管道有什么问题? [英] What's wrong with this GStreamer pipeline?
问题描述
我确定我已经在我设置的早期Ubuntu系统(为提高可读性而格式化)上运行了该管道:
I'm sure I've had this pipeline working on an earlier Ubuntu system I had set up (formatted for readability):
playbin
uri=rtspt://user:pswd@192.168.xxx.yyy/ch1/main
video-sink='videoconvert
! videoflip method=counterclockwise
! fpsdisplaysink'
但是,当我尝试在程序中使用它时,我得到了:
Yet, when I try to use it within my program, I get:
Missing element: H.264 (Main Profile) decoder
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
No decoder available for type 'video/x-h264,
stream-format=(string)avc, alignment=(string)au,
codec_data=(buffer)014d001fffe10017674d001f9a6602802dff35010101400000fa000030d40101000468ee3c80,
level=(string)3.1, profile=(string)main, width=(int)1280,
height=(int)720, framerate=(fraction)0/1, parsed=(boolean)true'.
Additional debug info:
gsturidecodebin.c(938): unknown_type_cb ():
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0
现在我可以确定我已经安装了H264解码器,并且确实gstreamer插件autogen.sh/configure
可以正确识别这一事实.已安装的软件包为h264enc
,libx264-142
,libx264-dev
和x264
.
Now I'm pretty certain I have an H264 decoder installed and indeed the gstreamer plugins autogen.sh/configure
correctly recognised the fact. Installed packages are h264enc
, libx264-142
, libx264-dev
and x264
.
如果我使用更可接受的" autovideosink
代替fpsdisplaysink
,或者尝试使用gst-play-1.0
播放RTSP流,则它的作用完全相同.但是,如果我使用测试模式源videotestsrc
,它就可以工作.
It does exactly the same thing if I use the more "acceptable" autovideosink
in place of fpsdisplaysink
, or if I try to play the RTSP stream with gst-play-1.0
. However, it works if I use the test pattern source videotestsrc
.
我在做什么错了?
推荐答案
看来gstreamer找不到适合的解码H264的插件.您未安装H264解码器元素,或者gstreamer在寻找错误的元素路径.
It looks like gstreamer cannot find a suitable plugin for decoding H264. Either you do not have an H264 decoder element installed, or gstreamer is looking in the wrong path for your elements.
首先,尝试运行gst-inspect-1.0
.这将输出一长串gstreamer检测到的所有元素的列表.
First, try running gst-inspect-1.0
. This should output a long list of all the elements gstreamer has detected.
- 如果不返回任何元素,则可能需要设置GST_PLUGIN_PATH环境变量以指向插件安装目录. 正在运行Gstreamer -此链接应该会有所帮助.
- 如果确实返回许多元素,请运行
gst-inspect-1.0 avdec_h264
来验证您是否具有H264解码器元素.
- If this doesn't return any elements, you probably need to set the GST_PLUGIN_PATH environment variable to point to the directory where your plugins are installed. Running Gstreamer - This link should help.
- If it DOES return many elements, run
gst-inspect-1.0 avdec_h264
to verify that you have the H264 decoder element.
这篇关于这个GStreamer管道有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!