GStreamer Daemon - Quick Start Guide

From RidgeRun Developer Wiki



Previous: Building GStreamer Daemon Index Next: Interacting with Pipelines




This page describes very briefly how to get GStreamer Daemon up and running, and how to use the GstdClient application to draft some quick tests. It should give you a feel of how to move around Gstd, the remainder of the Wiki will detail more in each section. Skilled cmdline users may find this guide enough to figure the rest out.

How to Read this Wiki

This, and all the further pages, will use the standard described in this section.

Frequently Used Terms

The following terms will be frequently used and, while in Gstd's context, must be interpreted as:

local system
The system where Gstd will run.
remote system
An external system where the client application will run and request commands
local prompt
The shell prompt of the local system
remote prompt
The shell prompt of the remote system
gstd prompt
The shell prompt of the gst-client application

Local Shell

These are commands that are supposed to be executed in the local shell. They will appear in a gray box in the Wiki. For example:

echo "This is a local shell command"
echo "Starting gstd:"
gstd

Remote Shell

These are commands that are supposed to be executed in the remote shell. They will appear in a yellow box. For example:

echo "This is a remote shell command"
echo "Listing gstreamer pipelines:"
gst-client list_pipelines

Gstd Shell

These are commands that are supposed to be executed in the gstd shell. They will appear in a purple box. For example:

sh echo "This are Gstd shell commands"
list_pipelines
list_elements pipeline

Starting GStreamer Daemon

In order to run GStreamer Daemon simply run:

gstd

Note that using "gstd &" to put GStreamer daemon in the background is no longer necessary since gstd now daemonizes itself.

This will start the process in the background. Different options can be configured for the server. To view a list of supported options run:

gstd --help-all

GStreamer Daemon now supports a flag to avoid executing it as a daemon itself. You can specify it using -e, for example:

gstd -e

Will be executed as a regular app and not as a daemon.

Starting GStreamer Client

Once the server is up and running, you may use the cmdline application to create, play and stop pipelines. Start by entering gstd-client:

gst-client

gstd-client is still supported for backward compatibility, but will eventually be dropped. gst-client is the new command.

Note: If you are using gstd as a daemon, open a new terminal to run the gstd-client commands.

You should see a prompt like the following:

Gstd-1.0  Copyright (C) 2015-2017 RidgeRun Engineering
This program comes with ABSOLUTELY NO WARRANTY; for details type 'warranty'.
This is free software, and you are welcome to redistribute it
under certain conditions; read the license for more details.
gstd>

In that prompt you may interact with the server. For example:

# Create the pipeline
pipeline_create testpipe videotestsrc name=vts ! autovideosink

# Play the pipeline
pipeline_play testpipe

# Change a property
element_set testpipe vts pattern ball

# Stop the pipeline
pipeline_stop testpipe

# Destroy the pipeline 
pipeline_delete testpipe

Type help to list all the possible commands:

help

Alternatively, you may use the cmdline application in single-command mode, in which the command is provided as an argument. Gstd-client will exit immediately after executing the command. This mode is ideal for shell scripts. For example:

gst-client list_pipelines

Troubleshooting

To enable GStreamer to debug and other troubleshooting mechanisms, please refer to the Troubleshooting section


Previous: Building GStreamer Daemon Index Next: Interacting with Pipelines