Sending metadata across UDP
priyanka kataria
priyanka.kataria86 at gmail.com
Thu Sep 26 09:15:21 UTC 2019
Hello,
I have an interesting problem:
Need to transfer some kind of metadata (say frame number) with each frame
over UDP. Receiver on the other hand, extracts he frame numebr from each
frame and maintains it for some other work.
Sample sender and receiver pipelines:
Sender: gst-launch-1.0 -v filesrc location=file.h264 ! h264parse !
rtph264pay ! udpsink port=5001
Receiver: gst-launch-1.0 -v udpsrc port=5001 caps="application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" !
rtph264depay ! decodebin ! autovideosink
Things I have already tried (I am still a beginner, so some of the below
things may look stupid):
1. In Sender pipeline, attaching a probe on "h264parse" element and
assigning incremental values to "GST_BUFFER_OFFSET".
But the set offset value is not reflected in the next element in the same
pipeline only.
2. In Sender pipeline, attaching a probe on "h264parse" element and
assigning incremental values to "GST_BUFFER_PTS".
The set PTS value is reflected in the next elements in the same pipeline,
but gets lost across UDP.
I checked this by attaching a probe on "rtph264depay" element (src pad).
3. Using "gst_rtp_buffer_add_extension_twobytes_header()".
This method works for H264 files, but fails with MJPEG files, and my
solution needs to be generic.
Here, I can provide more details with code if required.
4. Last thing I am trying is to mux KLV metadata into stream and send it
across UDP.
I refer the following link:
https://www.aeronetworks.ca/2018/05/mpeg-2-transport-streams.html.
This doesn't work though as written in the article but gave me an overview
on how to use the pipeline.
Now I want to create my custom my KLV metadata file which contains only
frame numbers and try to mux it.
Please help me in creating such file.
Also please share if there are any other working approaches I should try to
append metadata in each frame buffer.
Thanks,
Priyanka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190926/55e51832/attachment-0001.html>
More information about the gstreamer-devel
mailing list