Difference between revisions of "GstSEIMetadata/Examples/Using Gstd"
< GstSEIMetadata | Examples
m |
m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | {{ | + | {{GstSEIMetadata/Head|previous=Examples/Using gst-launch|next=Examples/C Example|metakeywords=}} |
</noinclude> | </noinclude> | ||
Line 24: | Line 24: | ||
pipeline_create receiver udpsrc port=5000 ! capsfilter name=cf ! rtph264depay ! h264parse ! seiextract signal-new-metadata=true name=extract ! fakesink | pipeline_create receiver udpsrc port=5000 ! capsfilter name=cf ! rtph264depay ! h264parse ! seiextract signal-new-metadata=true name=extract ! fakesink | ||
</pre> | </pre> | ||
+ | |||
Set the appropriate caps. | Set the appropriate caps. | ||
<pre> | <pre> | ||
− | |||
− | |||
element_set receiver cf caps application/x-rtp,media=video,clock-rate=90000,encoding-name=H264 | element_set receiver cf caps application/x-rtp,media=video,clock-rate=90000,encoding-name=H264 | ||
</pre> | </pre> | ||
Line 112: | Line 111: | ||
<noinclude> | <noinclude> | ||
− | {{ | + | {{GstSEIMetadata/Foot|Examples/Using gst-launch|Examples/C Example}} |
</noinclude> | </noinclude> |
Latest revision as of 12:57, 7 March 2023
GstSEIMetadata | |
---|---|
GstSEIMetadata Basics | |
|
|
Getting Started | |
|
|
User Guide | |
|
|
Examples | |
|
|
Performance | |
|
|
Contact Us |
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.
Now start the daemon
gstd -e
Start the client
gstd-client
Create the sender pipeline like this.
pipeline_create sender videotestsrc is-live=true ! x264enc ! seimetatester ! seiinject ! rtph264pay ! capsfilter name=cf ! udpsink host=127.0.0.1 port=5000
Create the receiver pipeline.
pipeline_create receiver udpsrc port=5000 ! capsfilter name=cf ! rtph264depay ! h264parse ! seiextract signal-new-metadata=true name=extract ! fakesink
Set the appropriate caps.
element_set receiver cf caps application/x-rtp,media=video,clock-rate=90000,encoding-name=H264
Play the pipelines.
pipeline_play sender pipeline_play receiver
Then receive the signal.
signal_connect receiver extract new-metadata
The expected output is something similar to this:
{
"code" : 0,
"description" : "Success",
"response" : {
"name" : "new-metadata",
"arguments" : [
{
"type" : "GstSeiExtract",
"value" : "(GstSeiExtract) extract"
},
{
"type" : "guint",
"value" : 8
},
{
"type" : "gpointer",
"value" : "((gpointer) 0x7fdb9000fdc0)"
}
]
}
}
A similar but slightly shorter example would be the following:
Once the daemon is running and the client has started create the following pipelines:
Sender:
pipeline_create send videotestsrc is-live=true ! x264enc ! seimetatester ! seiinject ! mpegtsmux ! udpsink host=127.0.0.1 port=5000
Receiver:
pipeline_create receive udpsrc port=5000 ! tsdemux ! h264parse ! seiextract signal-new-metadata=true name=extract ! fakesink
Play the pipelines.
pipeline_play send pipeline_play receive
Receive the signal.
signal_connect receive extract new-metadata
As before, the expected output is something similar to this:
{
"code" : 0,
"description" : "Success",
"response" : {
"name" : "new-metadata",
"arguments" : [
{
"type" : "GstSeiExtract",
"value" : "(GstSeiExtract) extract"
},
{
"type" : "guint",
"value" : 8
},
{
"type" : "gpointer",
"value" : "((gpointer) 0x7ffb9002fe10)"
}
]
}
}