paxdiablo
paxdiablo

Reputation: 882406

What's wrong with this GStreamer pipeline?

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

Answers (2)

Evdokimos Theodoridis
Evdokimos Theodoridis

Reputation: 133

Try to do the following:

  1. sudo apt-get install h264enc
  2. 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
  3. 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

jfoytik
jfoytik

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.

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

Upvotes: 4

Related Questions