Push subtitle dynamically

Peter Biro pettair at gmail.com
Sun Mar 19 16:58:23 UTC 2023


Hi,

In my project I have a streaming datasource (H264 RTP on UDP) on the receiving side Im saving the stream into a mkv file and I would like to add sensor data as subtitle track (I might need to add a separate track for every sensor type). I want to add this as subtitle track to the file, and not burn the text as an overlay to the video.

I create a simplified python script to test, which was very simple:
Have a videotestsrc to simulate the streaming datasource
An appsrc that I intend to use to push data from the sensors
Set the cap on the appsrc as ‘text/x-raw,format=utf8”
And connect both of these element to the matroskamux
Conect a callback to “ appsrc”’s “need-data” signal to push random text fro testing purposes

However I had not much luck with this. I have not found any topic related to my use case, so now Im doubting if my approach is right.

Do you have any suggestion how to do it better? Or do anyone know and example app which is doing similar things and I can use as a base for my use case?

Thank you!

Bests,
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230319/f96fb407/attachment.htm>


More information about the gstreamer-devel mailing list