research a bit from https://trac.ffmpeg.org/wiki/StreamingGuide Then, use that to send streams when using ffmpeg as a backend. Send the information for picking up the stream with ffmpeg through pubsub.