I ned to share a ffmepg encoder with a independent client applications inside the same machine.
I tried to use udp multicast but I have multiple drops and packet loss (I don't understand how this ocurr inside the same machine.). For example:
Encoder: ffmpeg -i <input> -c:v <encoder v + params> -c:a <encoder a + params> \
-f mpegts udp://@239.192.1.1:1234&pkt_size=1316
Transmitter 1: ffmpeg -i udp://@239.192.1.1:1234 -c copy -f flv rtmp://<url>
Transmitter 2: ffmpeg -i udp://@239.192.1.1:1234 -c copy -f mpegts srt://<url>
I have also tried rtp but I have problems with audio and video synchronization.
I can't use ffmpeg multiple outpus because the transmitters are unknown at init time and they start and stop completely independent of the encoder. Any ideas how to implement this?