Reputation: 882406
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:[email protected]/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?
Upvotes: 4
Views: 28236
Reputation: 133
Try to do the following:
sudo apt-get install h264enc
sudo apt-get install --yes libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
sudo apt-get install --yes libgirepository1.0-dev libgstrtspserver-1.0 libgstreamer1.0-dev
if you face broken packages run this command: sudo apt --fix-broken install
and then execute the abovementioned steps.
Upvotes: 1
Reputation: 910
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.
gst-inspect-1.0 avdec_h264
to verify that you have the H264 decoder element.Upvotes: 4