In my live streaming scenario I need to grab a video source and inject subtitles that I generate algorithmically during the stream (i.e. I do not know the subtitles upfront), and publish the streams together.
From what documentation and examples I found
-f srt input is always from a file, not a stream, or the subtitles already arrive inside a container stream.
To test, a naive approach of mine was to send UDP packets like this one:
00:00:05,000 --> 00:00:06,999 Hello World
and consume them as follows
ffmpeg -f srt -i udp://localhost:1233 \ -c:s mov_text out.mp4
This does not work which may be obvious to all folks familiar with FFmpeg. I am having a hard time identifying why this does not work or how else to approach the problem, probably because this is not a usual use case?