Blame tools/gst-launch-1.0.1

Packit Service 963350
.TH "GStreamer" "1" "May 2007"
Packit Service 963350
.SH "NAME"
Packit Service 963350
gst\-launch\-1.0 \- build and run a GStreamer pipeline
Packit Service 963350
.SH "SYNOPSIS"
Packit Service 963350
\fBgst\-launch\-1.0\fR \fI[OPTION...]\fR PIPELINE\-DESCRIPTION
Packit Service 963350
.SH "DESCRIPTION"
Packit Service 963350
.LP
Packit Service 963350
\fIgst\-launch\-1.0\fP is a tool that builds and runs basic
Packit Service 963350
\fIGStreamer\fP pipelines.
Packit Service 963350
Packit Service 963350
In simple form, a PIPELINE\-DESCRIPTION is a list of
Packit Service 963350
elements separated by exclamation marks (!). Properties may be appended to
Packit Service 963350
elements, in the form \fIproperty=value\fR.
Packit Service 963350
Packit Service 963350
For a complete description of possible PIPELINE-DESCRIPTIONS see the section
Packit Service 963350
\fIpipeline description\fR below or consult the GStreamer documentation.
Packit Service 963350
Packit Service 963350
Please note that \fIgst\-launch\-1.0\fP is primarily a debugging tool for
Packit Service 963350
developers and users. You should not build applications on top of it. For
Packit Service 963350
applications, use the gst_parse_launch() function of the GStreamer API as an
Packit Service 963350
easy way to construct pipelines from pipeline descriptions.
Packit Service 963350
.
Packit Service 963350
.SH "OPTIONS"
Packit Service 963350
.l
Packit Service 963350
\fIgst\-launch\-1.0\fP accepts the following options:
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-help
Packit Service 963350
Print help synopsis and available FLAGS
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-v, \-\-verbose
Packit Service 963350
Output status information and property notifications
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-q, \-\-quiet
Packit Service 963350
Do not print any progress information
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-m, \-\-messages
Packit Service 963350
Output messages posted on the pipeline's bus
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-t, \-\-tags
Packit Service 963350
Output tags (also known as metadata)
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-e, \-\-eos\-on\-shutdown
Packit Service 963350
Force an EOS event on sources before shutting the pipeline down. This is
Packit Service 963350
useful to make sure muxers create readable files when a muxing pipeline is
Packit Service 963350
shut down forcefully via Control-C.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-i, \-\-index
Packit Service 963350
Gather and print index statistics. This is mostly useful for playback or
Packit Service 963350
recording pipelines.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-f, \-\-no\-fault
Packit Service 963350
Do not install a fault handler
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-T, \-\-trace
Packit Service 963350
Print memory allocation traces. The feature must be enabled at compile time to
Packit Service 963350
work.
Packit Service 963350
.TP 8
Packit Service 963350
Packit Service 963350
.
Packit Service 963350
.SH "GSTREAMER OPTIONS"
Packit Service 963350
.l
Packit Service 963350
\fIgst\-launch\-1.0\fP also accepts the following options that are common
Packit Service 963350
to all GStreamer applications:
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-version
Packit Service 963350
Prints the version string of the \fIGStreamer\fP core library.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-fatal\-warnings
Packit Service 963350
Causes \fIGStreamer\fP to abort if a warning message occurs. This is equivalent
Packit Service 963350
to setting the environment variable G_DEBUG to 'fatal_warnings' (see the
Packit Service 963350
section \fIenvironment variables\fR below for further information).
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-debug=STRING
Packit Service 963350
A comma separated list of category_name:level pairs to specify debugging levels
Packit Service 963350
for each category. Level is in the range 0-9 where 0 will show no messages, and
Packit Service 963350
9 will show all messages. The wildcard * can be used to match category names.
Packit Service 963350
Note that the order of categories and levels is important, wildcards at the
Packit Service 963350
end may override levels set earlier. The log levels are: 1=ERROR, 2=WARNING,
Packit Service 963350
3=FIXME, 4=INFO, 5=DEBUG, 6=LOG, 7=TRACE, 9=MEMDUMP. Since GStreamer 1.2 one
Packit Service 963350
can also use the debug level names, e.g. \-\-gst\-debug=*sink:LOG. A full
Packit Service 963350
description of the various debug levels can be found in the GStreamer core
Packit Service 963350
library API documentation, in the "Running GStreamer Applications" section.
Packit Service 963350
Packit Service 963350
Use \-\-gst\-debug\-help to show category names
Packit Service 963350
Packit Service 963350
Example:
Packit Service 963350
GST_CAT:5,GST_ELEMENT_*:3,oggdemux:5
Packit Service 963350
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-debug\-level=LEVEL
Packit Service 963350
Sets the threshold for printing debugging messages.  A higher level
Packit Service 963350
will print more messages.  The useful range is 0-9, with the default
Packit Service 963350
being 0. Level 6 (LOG level) will show all information that is usually
Packit Service 963350
required for debugging purposes. Higher levels are only useful in very
Packit Service 963350
specific cases. See above for the full list of levels.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-debug\-no\-color
Packit Service 963350
\fIGStreamer\fP normally prints debugging messages so that the
Packit Service 963350
messages are color-coded when printed to a terminal that handles
Packit Service 963350
ANSI escape sequences.  Using this option causes \fIGStreamer\fP
Packit Service 963350
to print messages without color. Setting the \fBGST_DEBUG_NO_COLOR\fR
Packit Service 963350
environment variable will achieve the same thing.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-debug\-color\-mode
Packit Service 963350
\fIGStreamer\fP normally prints debugging messages so that the
Packit Service 963350
messages are color-coded when printed to a terminal that handles
Packit Service 963350
ANSI escape sequences (on *nix), or uses W32 console API to color the
Packit Service 963350
messages printed into a console (on W32). Using this option causes
Packit Service 963350
\fIGStreamer\fP to print messages without color ('off' or 'disable'),
Packit Service 963350
print messages with default colors ('on' or 'auto'), or print messages
Packit Service 963350
using ANSI escape sequences for coloring ('unix'). Setting the
Packit Service 963350
\fBGST_DEBUG_COLOR_MODE\fR environment variable will achieve the same thing.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-debug\-disable
Packit Service 963350
Disables debugging.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-debug\-help
Packit Service 963350
Prints a list of available debug categories and their default debugging level.
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-plugin\-spew
Packit Service 963350
\fIGStreamer\fP info flags to set
Packit Service 963350
Enable printout of errors while loading \fIGStreamer\fP plugins
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-plugin\-path=PATH
Packit Service 963350
Add directories separated with ':' to the plugin search path
Packit Service 963350
.TP 8
Packit Service 963350
.B  \-\-gst\-plugin\-load=PLUGINS
Packit Service 963350
Preload plugins specified in a comma-separated list. Another way to specify
Packit Service 963350
plugins to preload is to use the environment variable GST_PLUGIN_PATH
Packit Service 963350
Packit Service 963350
.SH "PIPELINE DESCRIPTION"
Packit Service 963350
Packit Service 963350
A pipeline consists \fIelements\fR and \fIlinks\fR. \fIElements\fR can be put
Packit Service 963350
into \fIbins\fR of different sorts. \fIElements\fR, \fIlinks\fR and \fIbins\fR
Packit Service 963350
can be specified in a pipeline description in any order.
Packit Service 963350
Packit Service 963350
.B Elements
Packit Service 963350
Packit Service 963350
ELEMENTTYPE \fI[PROPERTY1 ...]\fR
Packit Service 963350
Packit Service 963350
Creates an element of type ELEMENTTYPE and sets the PROPERTIES.
Packit Service 963350
Packit Service 963350
.B Properties
Packit Service 963350
Packit Service 963350
PROPERTY=VALUE ...
Packit Service 963350
Packit Service 963350
Sets the property to the specified value. You can use \fBgst\-inspect\-1.0\fR(1) to
Packit Service 963350
find out about properties and allowed values of different elements.
Packit Service 963350
.br
Packit Service 963350
Enumeration properties can be set by name, nick or value.
Packit Service 963350
Packit Service 963350
.B Bins
Packit Service 963350
Packit Service 963350
\fI[BINTYPE.]\fR ( \fI[PROPERTY1 ...]\fR PIPELINE-DESCRIPTION )
Packit Service 963350
.br
Packit Service 963350
Packit Service 963350
Specifies that a bin of type BINTYPE is created and the given properties are
Packit Service 963350
set. Every element between the braces is put into the bin. Please note the dot
Packit Service 963350
that has to be used after the BINTYPE. You will almost never need this
Packit Service 963350
functionality, it is only really useful for applications using the
Packit Service 963350
gst_launch_parse() API with 'bin' as bintype. That way it is possible to build
Packit Service 963350
partial pipelines instead of a full-fledged top-level pipeline.
Packit Service 963350
Packit Service 963350
.B Links
Packit Service 963350
Packit Service 963350
\fI[[SRCELEMENT].[PAD1,...]]\fR ! \fI[[SINKELEMENT].[PAD1,...]]\fR
Packit Service 963350
\fI[[SRCELEMENT].[PAD1,...]]\fR ! CAPS ! \fI[[SINKELEMENT].[PAD1,...]]\fR
Packit Service 963350
\fI[[SRCELEMENT].[PAD1,...]]\fR : \fI[[SINKELEMENT].[PAD1,...]]\fR
Packit Service 963350
\fI[[SRCELEMENT].[PAD1,...]]\fR : CAPS : \fI[[SINKELEMENT].[PAD1,...]]\fR
Packit Service 963350
Packit Service 963350
Links the element with name SRCELEMENT to the element with name SINKELEMENT,
Packit Service 963350
using the caps specified in CAPS as a filter.
Packit Service 963350
Names can be set on elements with the name property. If the name is omitted, the
Packit Service 963350
element that was specified directly in front of or after the link is used. This
Packit Service 963350
works across bins. If a padname is given, the link is done with these pads. If
Packit Service 963350
no pad names are given all possibilities are tried and a matching pad is used.
Packit Service 963350
If multiple padnames are given, both sides must have the same number of pads
Packit Service 963350
specified and multiple links are done in the given order.
Packit Service 963350
.br
Packit Service 963350
So the simplest link is a simple exclamation mark, that links the element to
Packit Service 963350
the left of it to the element right of it.
Packit Service 963350
.br
Packit Service 963350
Linking using the : operator attempts to link all possible pads between
Packit Service 963350
the elements
Packit Service 963350
.br
Packit Service 963350
Packit Service 963350
.B Caps
Packit Service 963350
Packit Service 963350
MEDIATYPE \fI[, PROPERTY[, PROPERTY ...]]]\fR \fI[; CAPS[; CAPS ...]]\fR
Packit Service 963350
Packit Service 963350
Creates a capability with the given media type and optionally with given
Packit Service 963350
properties. The media type can be escaped using " or '.
Packit Service 963350
If you want to chain caps, you can add more caps in the same format afterwards.
Packit Service 963350
Packit Service 963350
.B Properties
Packit Service 963350
Packit Service 963350
NAME=\fI[(TYPE)]\fRVALUE
Packit Service 963350
.br
Packit Service 963350
in lists and ranges: \fI[(TYPE)]\fRVALUE
Packit Service 963350
Packit Service 963350
Sets the requested property in capabilities. The name is an alphanumeric value
Packit Service 963350
and the type can have the following case-insensitive values:
Packit Service 963350
.br
Packit Service 963350
- \fBi\fR or \fBint\fR for integer values or ranges
Packit Service 963350
.br
Packit Service 963350
- \fBf\fR or \fBfloat\fR for float values or ranges
Packit Service 963350
.br
Packit Service 963350
- \fBb\fR, \fBbool\fR or \fBboolean\fR for boolean values
Packit Service 963350
.br
Packit Service 963350
- \fBs\fR, \fBstr\fR or \fBstring\fR for strings
Packit Service 963350
.br
Packit Service 963350
- \fBfraction\fR for fractions (framerate, pixel\-aspect\-ratio)
Packit Service 963350
.br
Packit Service 963350
- \fBl\fR or \fBlist\fR for lists
Packit Service 963350
.br
Packit Service 963350
If no type was given, the following order is tried: integer, float, boolean,
Packit Service 963350
string.
Packit Service 963350
.br
Packit Service 963350
Integer values must be parsable by \fBstrtol()\fP, floats by \fBstrtod()\fP. FOURCC values may
Packit Service 963350
either be integers or strings. Boolean values are (case insensitive) \fIyes\fR,
Packit Service 963350
\fIno\fR, \fItrue\fR or \fIfalse\fR and may like strings be escaped with " or '.
Packit Service 963350
.br
Packit Service 963350
Ranges are in this format:  [ VALUE, VALUE ]
Packit Service 963350
.br
Packit Service 963350
Lists use this format:      { VALUE \fI[, VALUE ...]\fR }
Packit Service 963350
Packit Service 963350
.SH "PIPELINE EXAMPLES"
Packit Service 963350
Packit Service 963350
The examples below assume that you have the correct plug-ins available.
Packit Service 963350
In general, "pulsesink" can be substituted with another audio output
Packit Service 963350
plug-in such as "alsasink" or "osxaudiosink"
Packit Service 963350
Likewise, "xvimagesink" can be substituted with "ximagesink", "glimagesink",
Packit Service 963350
or "osxvideosink". Keep in mind though that different sinks might
Packit Service 963350
accept different formats and even the same sink might accept different formats
Packit Service 963350
on different machines, so you might need to add converter elements like
Packit Service 963350
audioconvert and audioresample (for audio) or videoconvert (for video)
Packit Service 963350
in front of the sink to make things work.
Packit Service 963350
Packit Service 963350
.B Audio playback
Packit Service 963350
Packit Service 963350
Play the mp3 music file "music.mp3" using a libmpg123-based plug-in and
Packit Service 963350
output to an Pulseaudio device
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.mp3 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Play an Ogg Vorbis format file
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Play an mp3 file or an http stream using GIO
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 giosrc location=music.mp3 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! pulsesink
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 giosrc location=http://domain.com/music.mp3 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Use GIO to play an mp3 file located on an SMB server
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 giosrc location=smb://computer/music.mp3 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
.B Format conversion
Packit Service 963350
Packit Service 963350
Convert an mp3 music file to an Ogg Vorbis file
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.mp3 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! vorbisenc ! oggmux ! filesink location=music.ogg
Packit Service 963350
Packit Service 963350
Convert to the FLAC format
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.mp3 ! mpegaudioparse ! mpg123audiodec ! audioconvert ! flacenc ! filesink location=test.flac
Packit Service 963350
Packit Service 963350
.B Other
Packit Service 963350
Packit Service 963350
Plays a .WAV file that contains raw audio data (PCM).
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.wav ! wavparse ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Convert a .WAV file containing raw audio data into an Ogg Vorbis or mp3 file
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.wav ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=music.ogg
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=music.wav ! wavparse ! audioconvert ! lamemp3enc ! filesink location=music.mp3
Packit Service 963350
Packit Service 963350
Rips all tracks from compact disc and convert them into a single mp3 file
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 cdparanoiasrc mode=continuous ! audioconvert ! lamemp3enc ! mpegaudioparse ! id3v2mux ! filesink location=cd.mp3
Packit Service 963350
Packit Service 963350
Rips track 5 from the CD and converts it into a single mp3 file
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 cdparanoiasrc track=5 ! audioconvert ! lamemp3enc ! mpegaudioparse ! id3v2mux ! filesink location=track5.mp3
Packit Service 963350
Packit Service 963350
Using \fBgst\-inspect\-1.0\fR(1), it is possible to discover settings like the above
Packit Service 963350
for cdparanoiasrc that will tell it to rip the entire cd or only tracks of it.
Packit Service 963350
Alternatively, you can use an URI and gst\-launch\-1.0 will find an element (such as
Packit Service 963350
cdparanoia) that supports that protocol for you, e.g.:
Packit Service 963350
.B
Packit Service 963350
       gst\-launch\-1.0 cdda://5 ! lamemp3enc vbr=new vbr\-quality=6 ! filesink location=track5.mp3
Packit Service 963350
Packit Service 963350
Records sound from your audio input and encodes it into an ogg file
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=input.ogg
Packit Service 963350
Packit Service 963350
.B Video
Packit Service 963350
Packit Service 963350
Display only the video portion of an MPEG-1 video file, outputting to
Packit Service 963350
an X display window
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=JB_FF9_TheGravityOfLove.mpg ! dvddemux ! mpegvideoparse ! mpeg2dec ! xvimagesink
Packit Service 963350
Packit Service 963350
Display the video portion of a .vob file (used on DVDs), outputting to
Packit Service 963350
an SDL window
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=/flflfj.vob ! dvddemux ! mpegvideoparse ! mpeg2dec ! sdlvideosink
Packit Service 963350
Packit Service 963350
Play both video and audio portions of an MPEG movie
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=movie.mpg ! dvddemux name=demuxer  demuxer. ! queue ! mpegvideoparse ! mpeg2dec ! sdlvideosink  demuxer. ! queue ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Play an AVI movie with an external text subtitle stream
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=movie.mpg ! mpegdemux name=demuxer demuxer. ! queue ! mpegvideoparse ! mpeg2dec ! videoconvert ! sdlvideosink   demuxer. ! queue ! mpegaudioparse ! mpg123audiodec ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
This example also shows how to refer to specific pads by name if an element
Packit Service 963350
(here: textoverlay) has multiple sink or source pads.
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 textoverlay name=overlay ! videoconvert ! videoscale !  autovideosink   filesrc location=movie.avi ! decodebin ! videoconvert ! overlay.video_sink   filesrc location=movie.srt ! subparse ! overlay.text_sink
Packit Service 963350
Packit Service 963350
Play an AVI movie with an external text subtitle stream using playbin
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 playbin uri=file:///path/to/movie.avi suburi=file:///path/to/movie.srt
Packit Service 963350
Packit Service 963350
.B Network streaming
Packit Service 963350
Packit Service 963350
Stream video using RTP and network elements.
Packit Service 963350
Packit Service 963350
This command would be run on the transmitter
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 v4l2src ! video/x\-raw,width=128,height=96,format=UYVY ! videoconvert ! ffenc_h263 ! video/x\-h263 ! rtph263ppay pt=96 ! udpsink host=192.168.1.1 port=5000
Packit Service 963350
Packit Service 963350
Use this command on the receiver
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 udpsrc port=5000 ! application/x\-rtp, clock\-rate=90000,payload=96 ! rtph263pdepay queue\-delay=0 ! ffdec_h263 ! xvimagesink
Packit Service 963350
Packit Service 963350
.B Diagnostic
Packit Service 963350
Packit Service 963350
Generate a null stream and ignore it (and print out details).
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 \-v fakesrc num\-buffers=16 ! fakesink
Packit Service 963350
Packit Service 963350
Generate a pure sine tone to test the audio output
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 audiotestsrc ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Generate a familiar test pattern to test the video output
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 videotestsrc ! xvimagesink
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 videotestsrc ! ximagesink
Packit Service 963350
Packit Service 963350
.B Automatic linking
Packit Service 963350
Packit Service 963350
You can use the decodebin element to automatically select the right elements
Packit Service 963350
to get a working pipeline.
Packit Service 963350
Packit Service 963350
Play any supported audio format
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=musicfile ! decodebin ! audioconvert ! audioresample ! pulsesink
Packit Service 963350
Packit Service 963350
Play any supported video format with video and audio output. Threads are used
Packit Service 963350
automatically. To make this even easier, you can use the playbin element:
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 filesrc location=videofile ! decodebin name=decoder decoder. ! queue ! audioconvert ! audioresample ! pulsesink   decoder. !  videoconvert ! xvimagesink
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 playbin uri=file:///home/joe/foo.avi
Packit Service 963350
Packit Service 963350
Packit Service 963350
.B Filtered connections
Packit Service 963350
Packit Service 963350
These examples show you how to use filtered caps.
Packit Service 963350
Packit Service 963350
Show a test image and use the YUY2 or YV12 video format for this.
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 videotestsrc ! 'video/x\-raw,format=YUY2;video/x\-raw,format=YV12' ! xvimagesink
Packit Service 963350
Packit Service 963350
Record audio and write it to a .wav file. Force usage of signed 16 to 32 bit
Packit Service 963350
samples and a sample rate between 32kHz and 64KHz.
Packit Service 963350
.br
Packit Service 963350
.B
Packit Service 963350
        gst\-launch\-1.0 pulsesrc !  'audio/x\-raw,rate=[32000,64000],format={S16LE,S24LE,S32LE}' ! wavenc ! filesink location=recording.wav
Packit Service 963350
Packit Service 963350
Packit Service 963350
.SH "ENVIRONMENT VARIABLES"
Packit Service 963350
.TP
Packit Service 963350
\fBGST_DEBUG\fR
Packit Service 963350
Comma-separated list of debug categories and levels (e.g.
Packit Service 963350
GST_DEBUG=totem:4,typefind:5). '*' is allowed as a wildcard as part of
Packit Service 963350
debug category names (e.g. GST_DEBUG=*sink:6,*audio*:6). Since 1.2.0 it is
Packit Service 963350
also possible to specify the log level by name (1=ERROR, 2=WARN, 3=FIXME,
Packit Service 963350
4=INFO, 5=DEBUG, 6=LOG, 7=TRACE, 9=MEMDUMP) (e.g. GST_DEBUG=*audio*:LOG)
Packit Service 963350
.TP
Packit Service 963350
\fBGST_DEBUG_NO_COLOR\fR
Packit Service 963350
When this environment variable is set, coloured debug output is disabled.
Packit Service 963350
.TP
Packit Service 963350
\fBGST_DEBUG_DUMP_DOT_DIR\fR
Packit Service 963350
When set to a filesystem path, store 'dot' files of pipeline graphs there.
Packit Service 963350
These can then later be converted into an image using the 'dot' utility from
Packit Service 963350
the graphviz set of tools, like this: dot foo.dot \-Tsvg \-o foo.svg (png or jpg
Packit Service 963350
are also possible as output format). There is also a utility called 'xdot'
Packit Service 963350
which allows you to view the .dot file directly without converting it first.
Packit Service 963350
.br
Packit Service 963350
When the pipeline changes state through NULL to PLAYING and back to NULL, a
Packit Service 963350
dot file is generated on each state change. To write a snapshot of the
Packit Service 963350
pipeline state, send a SIGHUP to the process.
Packit Service 963350
.TP
Packit Service 963350
\fBGST_REGISTRY\fR
Packit Service 963350
Path of the plugin registry file. Default is
Packit Service 963350
~/.cache/gstreamer\-1.0/registry\-CPU.bin where CPU is the
Packit Service 963350
machine/cpu type GStreamer was compiled for, e.g. 'i486', 'i686', 'x86\-64', 'ppc',
Packit Service 963350
etc. (check the output of "uname \-i" and "uname \-m" for details).
Packit Service 963350
.TP
Packit Service 963350
\fBGST_REGISTRY_UPDATE\fR
Packit Service 963350
Set to "no" to force GStreamer to assume that no plugins have changed,
Packit Service 963350
been added or been removed. This will make GStreamer skip the initial check
Packit Service 963350
whether a rebuild of the registry cache is required or not. This may be useful
Packit Service 963350
in embedded environments where the installed plugins never change. Do not
Packit Service 963350
use this option in any other setup.
Packit Service 963350
.TP
Packit Service 963350
\fBGST_PLUGIN_PATH\fR
Packit Service 963350
Specifies a list of directories to scan for additional plugins.
Packit Service 963350
These take precedence over the system plugins.
Packit Service 963350
.TP
Packit Service 963350
\fBGST_PLUGIN_SYSTEM_PATH\fR
Packit Service 963350
Specifies a list of plugins that are always loaded by default.  If not set,
Packit Service 963350
this defaults to the system-installed path, and the plugins installed in the
Packit Service 963350
user's home directory
Packit Service 963350
.TP
Packit Service 963350
\fBGST_DEBUG_FILE\fR
Packit Service 963350
Set this variable to a file path to redirect all GStreamer debug
Packit Service 963350
messages to this file. If left unset, debug messages with be output
Packit Service 963350
unto the standard error.
Packit Service 963350
.TP
Packit Service 963350
\fBORC_CODE\fR
Packit Service 963350
Useful Orc environment variable. Set ORC_CODE=debug to enable debuggers
Packit Service 963350
such as gdb to create useful backtraces from Orc-generated code.  Set
Packit Service 963350
ORC_CODE=backup or ORC_CODE=emulate if you suspect Orc's SIMD code
Packit Service 963350
generator is producing incorrect code.  (Quite a few important
Packit Service 963350
GStreamer plugins like videotestsrc, audioconvert or audioresample use Orc).
Packit Service 963350
.TP
Packit Service 963350
\fBG_DEBUG\fR
Packit Service 963350
Useful GLib environment variable. Set G_DEBUG=fatal_warnings to make
Packit Service 963350
GStreamer programs abort when a critical warning such as an assertion failure
Packit Service 963350
occurs. This is useful if you want to find out which part of the code caused
Packit Service 963350
that warning to be triggered and under what circumstances. Simply set G_DEBUG
Packit Service 963350
as mentioned above and run the program in gdb (or let it core dump). Then get
Packit Service 963350
a stack trace in the usual way.
Packit Service 963350
.
Packit Service 963350
.SH FILES
Packit Service 963350
.TP 8
Packit Service 963350
~/.cache/gstreamer\-1.0/registry\-*.bin
Packit Service 963350
The plugin cache; can be deleted at any time, will be re-created
Packit Service 963350
automatically when it does not exist yet or plugins change. Based on
Packit Service 963350
XDG_CACHE_DIR, so may be in a different location than the one suggested.
Packit Service 963350
.
Packit Service 963350
.SH "SEE ALSO"
Packit Service 963350
.BR gst\-inspect\-1.0 (1),
Packit Service 963350
.BR gst\-launch\-1.0 (1),
Packit Service 963350
.SH "AUTHOR"
Packit Service 963350
The GStreamer team at http://gstreamer.freedesktop.org/