How do I add a local delay to my stream?

faporwave

New Member
Hi all
I've been scratching my head at this issue for some time now and after exhausting my limited knowledge with obs and networks, I still found no solution.

I am trying to implement a local delay on my stream so that if anything happens that I don't want broadcasted, I have a time window to change scenes, or mute audio before its broadcasted.
note: I am not talking about the 'stream delay' option in obs. This option is almost what I need.

I'd like to be able to delay my stream to give myself time to switch scenes, or mute any audio before it gets sent out to the streaming platform.
This is how news and radio broadcasts operate, I'm just trying to find a way to make it work at home.

I've used NDI to stream an obs capture back to my own computer on a second instance of obs but again there isn't a way to delay the capture from one to the next.
I've also thought of streaming to a local server, and then doing a vlc capture of that server output, but still no way to delay the stream.

Does anyone have any ideas on how I could do this without having to set up a server with its own video player and delay it on there (similar to twitch's delay setting)?


Thanks in advance.
 

koala

Active Member
Don't remember I saw a good solution for this on the forum, unfortunately. If you find a solution, please tell us how you finally did it. OBS doesn't have such function built in. May be some plugin, but I don't remember any.

The challenge is where and how the regular stream data is stored while it is pending (not yet sent) and how you interrupt/roll back the pending stream that is not yet send and replace the not-to-send part on the fly with something else.

Perhaps 2 instances of OBS. The first instance creates the regular stream that is delayed, and the second instance receives the delayed stream and processes it a second time, then sends its output without delay. Usually the second instance just passes the stream through and doesn't switch any scene, but you are able to switch to some replacement scene in case you actually don't want to send some of the pending data. Feels clunky, I admit, since there is no feedback from the second instance back to the first.
 

carlmmii

Active Member
Koala's solution would not result in any need to worry about a buffer. It's just replacing live content with static "safe" content for as long as necessary. The NDI feed could even have audio/video delayed using async buffer/audio sync instead of dealing with anything on the actual source side for simplicity.

Unfortunately, it's also the only "easy" solution that I can think of within the capacity of OBS/NDI without dealing with dedicated servers. Maybe there's a way within VLC to set up a delayed AV stream, but I just don't know enough for its capabilities.
 
Top