What effect does the media type string inserted in a gstreamer pipeline have

Tim Müller tim at centricular.com
Sat Mar 8 09:40:56 PST 2014


On Sat, 2014-03-08 at 08:47 -0800, manickam palaniappan wrote:

Hi,

> Iam quite a newbie to gstreamer. Could somebody pls answer my below
> queries:
> I have seen this kind of pipeline-running commands in gstreamer:
> 
> e.g.,gst-launch-1.0 videotestsrc ! video/x-raw, format=I420,
> framerate=25/1, width=640, height=360 ! xvimagesink
> And I have read in some pages that "video/x-raw, format=I420,
> framerate=25/1, width=640, height=360 " specifies the media-type. But
> Iam not able to understand what effect would it make - is it
> transforming the input to the specified framerate/format/width/height
> etc.. or is it just like specifying the input is in this
> framerate/width/ht already ? and What effect it would have on the
> pipeline if it is just specifying the input is in this framerate
> etc... instead of transforming.
> And is it really necessary or we can ignore it ?

This construct is called a 'caps filter' or 'filter caps'. It forces the
source to output a specific format (or error out if it can't, but
videotestsrc can output pretty much anything). You can remove the filter
caps here, then you just let videotestsrc decide what to output.

Here nothing is 'transformed'. It just restricts that part of the
pipeline to a certain format. That will then either work or generate an
error if it's impossible. If you put a videoconvert ! videoscale in
front of the filter caps, then those elements would convert/transform
whatever the source uses to make sure the right format is output (or
they would just work in passthrough mode if the source can output that
format already).

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list