midnightstreamer Posted April 21, 2021 Share Posted April 21, 2021 What are Direct Streams? Direct streams are a new way to stream that doesn't rely on FFmpeg. To get the incoming stream and send it to clients, it uses a streaming engine written entirely in PHP (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 streams: 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 streams. It's up to you when to use one or the other. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.