Jump to content

GstSEIMetadata/Examples/Using Gstd: Difference between revisions

no edit summary
mNo edit summary
No edit summary
Line 5: Line 5:




The following is an example of how to insert and receive metadata using gstd and the GstSEI plugin.
The following is an example of how to insert metadata and receive a signal using gstd and the GstSEI plugin.
Make sure you have gstd [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon_-_GStreamer_Daemon_Basics gstd].
Make sure you have gstd [https://developer.ridgerun.com/wiki/index.php?title=GStreamer_Daemon_-_GStreamer_Daemon_Basics gstd].


Now start the daemon
<pre>
gstd -e
</pre>
Start the client
<pre>
gstd-client
</pre>
Create a pipeline like this one.
<pre>
pipeline_create p videotestsrc is-live=true ! x264enc ! seimetatester ! seiinject ! seiextract signal-new-metadata=true name=extract ! fakesink
</pre>
Play it
<pre>
pipeline_play p
</pre>
Then receive the signal
<pre>
signal_connect p extract new-metadata
</pre>
The expected output is something similar to this:


<syntaxhighlight lang=bash>
{
  "code" : 0,
  "description" : "Success",
  "response" : {
    "name" : "new-metadata",
    "arguments" : [
        {
            "type" : "GstSeiExtract",
            "value" : "(GstSeiExtract) extract"
        },
        {
            "type" : "guint",
            "value" : 8
        },
        {
            "type" : "gpointer",
            "value" : "((gpointer) 0x7fdb9000fdc0)"
        }
    ]
}
}


</syntaxhighlight>




227

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.