Jump to content

Direct Streaming


midnightstreamer
 Share

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.

Direct.jpg.70a1c01b432f9deb5edd761376cb46d0.jpg

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

Pros:

  • 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)

Cons:

  • 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

 Share

×
×
  • Create New...