NVIDIA Jetson AGX Thor - GStreamer Daemon or gstd to control audio and video streaming

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page



Previous: RidgeRun Open Source Projects/GstPerf Index Next: RidgeRun Open Source Projects/GstInterpipe









Overview of GStreamer Daemon

GStreamer Daemon, also called gstd, is a GStreamer framework for controlling audio and video streaming using TCP connection messages. The embedded media server, Qt application, web interface, and GStreamer element test suites are examples of different ways the framework can be utilized. GStreamer Daemon is gst-launch on steroids, where you can create a GStreamer pipeline, play, pause, change speed, skip around, and even change element parameter settings all while the pipeline is active. GStreamer Daemon was created to remove the drudgery of writing GObject-based streaming media servers.

GStreamer Daemon is designed for production deployment, where the control logic runs in a separate process for the audio video streaming server. The control application can be written in any language and does not need to use GObject / glib, as long as data can be exchanged over a TCP connection. The control application can run on the same processor (using localhost for the TCP destination) or a separate machine. Isolating the control logic from the streaming logic solves many difficult problems, from setting priorities to avoiding audio dropout to having a working user interface if the streaming application encounters corrupt data. By separating the audio/video streaming logic, it is easy to create automated A/V tests, extend a product's features to support remote control, and allow the control application and the streaming daemon to be developed independently.

Promo/Demo Video



Examples

Before testing each example is important to follow the next steps.

1 Create the script as bash file .sh.

2 Change the file permissions to be executable:

chmod 777 <file.sh>

3 Run the GStreamer Daemon:

gstd &

4 Run the script

5 Kill the GStreamer Daemon

killall gstd

Simple example

With GSTD is possible to control during execution the properties of an element as one of the key features. For example the following pipeline changes the pattern of videotestsrc.

#!/bin/bash

# Path to the video location
VIDEO=$1

# Make sure there is no pipeline with this name already
gstd-client pipeline_delete p

gstd-client pipeline_create p "videotestsrc is-live=true pattern=ball name=vsrc ! nvvidconv ! queue ! nvv4l2h264enc ! h264parse ! mp4mux ! filesink location=$VIDEO"
gstd-client pipeline_play p

for (( i=1; i<=5; i++ )); do
  gstd-client element_set p vsrc pattern $i
  sleep 2
done
gstd-client event_eos p
gstd-client pipeline_stop p
gstd-client pipeline_delete p

echo "Video recorded to \"${VIDEO}\""

Then execute it as follows

./script.sh test.mp4

Getting Started

To know more about the extension, please refer to the GStreamer Daemon Basics wiki page.

Contact Us



For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.


Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.




Previous: RidgeRun Open Source Projects/GstPerf Index Next: RidgeRun Open Source Projects/GstInterpipe