Running GStreamer Applications3GStreamer CoreRunning GStreamer Applications
How to run and debug your GStreamer application
Running and debugging GStreamer ApplicationsEnvironment variables
GStreamer inspects a few of environment variables in addition to standard
variables like LANG, PATH or HOME.
GST_PLUGIN_SYSTEM_PATH
This environment variable can be set to a colon-separated list of paths.
If this variable is not set, GStreamer will fill in this list for you
with
plug-ins in the user's home directory. These are stored in a directory called
plugins inside the
.gstreamer-&GST_MAJORMINOR; directory in the user's
home directory.
plug-ins installed system-wide. On this system, they are stored in
&GST_PLUGINS_DIR;.
GStreamer will scan these paths for GStreamer plug-ins. These plug-ins will
be loaded after the plug-ins in the GST_PLUGIN_PATH variable below.
The paths are scanned in the given order. This allows a user to override
system-installed plug-ins with his own versions.
Setting this variable to an empty string will cause GStreamer not to scan any
system paths at all for plug-ins. This can be useful if you're running
uninstalled (for development purposes) or while running testsuites.
GST_PLUGIN_PATH
This environment variable can be set to a colon-separated list of paths.
GStreamer will scan these paths for GStreamer plug-ins. These plug-ins will
be loaded in addition to, and before, the plug-ins in the system paths.
GST_DEBUG
If GStreamer has been configured with ,
this variable can be set to a list of debug options, which cause GStreamer
to print out different types of debugging information to stderr.
The variable takes a comma-separated list of "category_name:level" pairs
to set specific levels for the individual categories.
The level value ranges from 0 (nothing) to 5 (LOG).
1 -
Logs all fatal errors. These are errors that do not allow the core or elements
to perform the requested action. The application can still recover if
programmed to handle the conditions that triggered the error.
2 -
Logs all warnings. Typically these are non-fatal, but user-visible problems
are expected to happen.
3 -
Logs all informational messages. These are typically used for events in
the system that only happen once, or are important and rare enough to be
logged at this level.
4 -
Logs all debug messages. These are general debug messages for events
that happen only a limited number of times during an object's lifetime;
these include setup, teardown, change of parameters, ...
5 -
Logs all log messages. These are messages for events
that happen repeatedly during an object's lifetime;
these include streaming and steady-state conditions.
The category_name can contain " as a wildcard.
For example, setting GST_DEBUG to
, will cause the
category to be logged at full
level, while all categories starting with
will be logged at level.
To get all possible debug output, set
GST_DEBUG
to
GST_DEBUG_NO_COLOR
Set this environment variable to any value ("1" typically) to switch off
colouring in GST_DEBUG output. This has the same effect as specifying the
command line option to well-behaved
GStreamer applications (ie. those that pass command-line options correctly to
GStreamer).
This is particularly useful to reduce the size of debug output and also allows
for the output to be compressed much better than with colours turned on.
GST_DEBUG_DUMP_DOT_DIR
Set this environment variable to a path to turn on all
#GST_DEBUG_BIN_TO_DOT_FILE or #GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS calls
and have the dot files in that location.
GST_REGISTRY_FORK
Set this environment variable to "no" to prevent GStreamer from forking on
startup in order to update the plugin registry. This is useful for debugging
purposes, but should not be used under normal circumstances, since it means
that plugins may be loaded into memory even if they are not needed by the
application.