What's wrong with this GStreamer pipeline?

好久不见. 提交于 2020-03-06 02:59:05

问题


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

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.

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.

What am I doing wrong?


回答1:


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.

First, try running gst-inspect-1.0. This should output a long list of all the elements gstreamer has detected.

  • 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.


来源:https://stackoverflow.com/questions/36467649/whats-wrong-with-this-gstreamer-pipeline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!