问题
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