Jump to content

Direct Streaming


Recommended Posts

What is Direct Streaming?

Direct streaming is a new way of streaming (1 to many) that does not rely on FFmpeg. It uses a streaming engine written entirely in PHP to acquire the incoming stream and send it to clients. Future versions will be written in Rust to save even more CPU cycles.


Here is a short list illustrating the pros and cons when using Direct Streaming:


  • no audio-sync issues
  • no need to restart streams under any circumstances (some FFmpeg streams need to be restarted periodically in order to work properly)
  • ultra fast stream start when on-demand mode on, even from multiple hops (server1 (on-demand) -> server2 (on-demand) -> server3 (on-demand) -> server4 (on-demand) -> server5 (on-demand) in 4s<)
  • no need to tweak the probe size setting
  • can open sources without prebuffer (slow streams) in on-demand. Regular on-demand cannot open streams in time without or with a small prebuffer
  • avoided issues caused by demuxing and remuxing (note: FFmpeg de/remuxes even if the stream is just copied without transcoding, while Direct streams forward the input to the output as-is)
  • no issues when restreaming encrypted streams
  • less CPU usage (-20% per stream on average compared to FFmpeg)


  • no transcoding available
  • no mapping available (audio and subtitle tracks cannot be selected)
  • no HLS input and output available (only MPEG-TS input / output is supported by Direct streams)
  • no archives available
  • no video/audio codec and bitrate info is shown


➡️ In MidnightStreamer you can choose between both FFmpeg and Direct Streaming. It's up to you when to use one or the other.

Link to comment
Share on other sites


  • Create New...