GstSEI Examples
RidgeRun Product Demos RidgeRun documentation is currently under development. |
RidgeRun Product Demos |
---|
Introduction |
Building examples |
Example overviews |
Contact Us |
Summary
GstSEI is a plugin with three elements, that allow inserting and extracting metadata into and from a H264 or H265 encoded stream.
Example | Description |
---|---|
Recording metadata | Examples pipelines for inserting metadata into a recording. |
GStreamer C App |
|
GStreamer Python App | Example application on handling signals generated by the GStreamer element. |
Recording metadata
This example shows how to use the GStreamer elements to insert and extract metadata into a video file. There are example pipelines for both H264 and H265 encodings.
The metadata can then be extracted from the file and displayed in the terminal. The user also has the choice of changing what metadata string is inserted in the file. The video file will also be played back though there is no way to view the metadata in the video.
GStreamer C App
The application shows dynamic way to insert metadata into a video stream. This allows for the metadata to be updated constantly without need to stop the stream. The video stream is transmitted over UDP to a client application.
The client application is able to receive the UDP stream and extract the metadata. The client application will display the metadata in the terminal but it is also can be seen in the video by making use of a text overlay GStreamer element.
Metadata in this case is the machines current time, but this could replaced with other metadata like GPS information, sensor information and more.
GStreamer Python App
The Python application creates UDP transmitter and receiver pipelines. The pipelines streams a video with metadata inserted. The receiving pipeline extracts this metadata.
The metadata extraction element (seiextract
) emits a signal when a new metadata buffer is detected. This signal can be used by other processes as a trigger or for other purposes.
The example shows how to wait for the metadata signal and process it. Waiting for a signal will block the thread, this example shows an alternative to avoid blocking the main application while processing the signal.
This application makes use of the GStreamer Daemon Python API to manage the pipelines, along with their signals and events. The user will have to install the GStreamer Daemon to run this example.