0

I have a ffmpeg-based worker that handles video-generation jobs at very high throughput. Long videos need to be streamed while being generated.

For that purpose, I have introduced a WebRTC server named Janus-Gateway with its streaming plugin, and set the application's output to an rtp:// endpoint at that server (ffmpeg can stream a single stream using the ​RTP protocol).

In order to avoid buffering problems on the other hand, the streaming is done through the ffmpeg's -re option, which means that the stream will be streamed in real-time, i.e. it slows it down to simulate live streaming.

[ffmpeg-based app] (#1)--> [rtp://janus:port @ webrtc server] (#2)--> [webrtc subscribers]

How can I continue processing video jobs at high throughput while streaming the results at real-time speed? I need somehow to decouple ffmpeg output (stage #1) so that consumers at stage #2 get streams at natural playback speed.

dror
  • 3,759
  • 6
  • 31
  • 45

0 Answers0