paxdiablo
paxdiablo

Reputation: 881443

gst-launch works with fakesink but not autovideosink

I'm trying to figure out how to create a pipeline in GStreamer (1.4.4) beyond the very simple playbin one. I have a stream being fed into a GTK+ DrawingArea widget but it's currently letter-boxing it whereas I want to experiment with the video stream expanded to fit the entire widget.

To that end, I've played with the gst-launch-1.0 app but I'm finding that a fakesink at the end seems to work but an autovideosink doesn't. The two pipelines are (X being an rtspt:// URI for an IP camera):

gst-launch-1.0 rtspsrc location=X ! rtph264depay ! h264parse ! decodebin ! fakesink
gst-launch-1.0 rtspsrc location=X ! rtph264depay ! h264parse ! decodebin ! autovideosink

In other words, the only difference is the sink itself. It appears that, no matter where I place the sink (even if it's just an rtspsrc location=X ! sink), the problem still occurs, and that problem manifests itself as:

rtspsrc gstrtspsrc.c:5074:gst_rtspsrc_loop<rtspsrc0> error: Internal data flow error
rtspsrc gstrtspsrc.c:5074:gst_rtspsrc_loop<rtspsrc0> streaming task paused, reason not-linked (-1)

I've tried running at higher debug levels but the output doesn't seems to have any useful information beyond the warnings already given.

Note that both the following commands work okay:

gst-play-1.0 X
gst-launch-1.0 playbin uri=X

But, as discussed, I don't really want a playbin since I want to install be own video scaler in the pipeline.

My (albeit limited) understanding is that the rtph264depay removes the unnecessary RTSP protocol stuff, h264parse decodes the H.264 data, decodebin auto-magically selects the correct decoder and the autovideosink selects the correct sink for displaying the stream.

I'm not entirely certain how changing something at stage five of the pipeline would affect how stage one works.

So why is it that a fake sink works but the automatic selection one does not?

Upvotes: 0

Views: 3526

Answers (1)

matilda gl
matilda gl

Reputation: 339

Add videoconvert before autovideosink will make it works.

gst-launch-1.0 rtspsrc location=X ! rtph264depay ! h264parse ! decodebin ! videoconvert ! autovideosink

The reason is sink element does not support format output from your decode, thus cause the error "streaming task paused, reason not-linked".

fakesink is different. It simply drops the data, not care about format, so it does not this error.

playbin can play because it automatically add convert element when need.

Upvotes: 2

Related Questions