Receive stream from other OBS instance as source

dstensnes

New Member
Hello. I (and probably others) would like to receive a stream from another computer and use it as a source in OBS studio. I have tried a few different things, but for now I have found that running ffplay sort of solve my problem with fairly minimal lag (maybe as low as ~200ms):

ffplay -fflags nobuffer -listen 6788 rtmp://0.0.0.0:6788/

That opens up an ffplay instance which listens on port 6788 and pops up a video window when something connects, and I am able to stream from one computer to another. It would be nice to have something like this as a native source in OBS studio. This would allow someone else to act as stream director or stream host or whatever, while someone else might focus on playing.

We have used this trick to stream from an PS4 by hijacking the stream-to-twitch functionality with some iptables redirection rules in the router. Same also works for receiving the video stream from a DJI Phantom Mavic drone connected to the wireless network.

It might not be horribly relevant for everyone, but I would say it opens up a lot of possibilities. I would also think that it might not be that difficult to implement, and might actually have much the same code as the "Media Source" input I see in my OBS.
 

dstensnes

New Member
Doesn't need to be that advanced. As I said, the feature is already there in ffplay, and I suspect you could have made something similar if the "Media Source" source accepted custom flags. Just a guess though, so don't take my word for it :)
 

dstensnes

New Member
And with regards to the VLC plugin; as far as I know, that cannot receive a stream directly from another instance of OBS. It can play the stream if you bounce it via something like nginx-rtmp, but I just want to cut out the middleman, so to speak. The ffplay way works fine for me, it would just be nice to be able to configure a receiving source directly in a scene, without having to start up other external programs to achieve the same result.
 

dstensnes

New Member
Hello, I am back at this again. Got an email from someone that had read this thread and needed the same thing. I thought I could update this thread with a tiny bit of info. I have found the following command works okay for receiving directly from another instance of OBS, receiving the stream on port 6000:
ffplay -fflags nobuffer -i -rtmp_listen 6000 'rtmp://0.0.0.0:6000?listen'
For me, it seems to consistently cause ~1 second of latency, but that part is acceptable for the most part for my use.

With a little network routing trickery, we were also able to intercept streams meant for twitch, redirect it to that port, thus giving us access to a video stream from a PlayStation 4, and a DJI mavic drone. Problem is that it just gives you a window that has to be scaled and captured again with OBS, resulting in degraded video quality. I still think this could be a really handy feature to have directly inside OBS studio, without having to reimplement another instance of ffmpeg in a new plugin.

Maybe a listening feature could be implemented as a "listen for network stream on port X" option inside the existing Media Source?

Pretty please?

Anyway, thanks for taking the time reading this post :)
 
I played with this and it seems to work well, bandwidth allowing. If bandwidth is interrupted, it can get all out of sync for a while, and/or freeze the video and/or audio. But with good bandwidth it's great.

 

Wallby

New Member
I was thinking, if this were to become a native feature, this is a design I would really like..

On the last machine in the obs-chain, you would create a "stream source", which would allow you to set up a stream target.
1612183758237.png

In the properties of this stream source, you can see the key..
1612183780889.png


Then on the machine that you want to capture the stream from, you would set stream service to obs, and set the ip of the server to the machine on which you set up the stream source (if this is a reasonable requirement). Then you would input the stream key of that source.
1612183936694.png
 

marcelosmack

New Member
I was thinking, if this were to become a native feature, this is a design I would really like..

On the last machine in the obs-chain, you would create a "stream source", which would allow you to set up a stream target.
View attachment 66806
In the properties of this stream source, you can see the key..
View attachment 66807

Then on the machine that you want to capture the stream from, you would set stream service to obs, and set the ip of the server to the machine on which you set up the stream source (if this is a reasonable requirement). Then you would input the stream key of that source.
View attachment 66808
I made my own tool, its called StreamVoodoo. It does this but way simpler.

Just sign up, get in a video room and click on the magic link. Use that link ass a browser source in OBS and boom.

Full HD 1080p 60fps with no latency and studio quality sound.

I know it sounds like self promotion, but I'm really proud of what we made. Hard work.

Thank you.
 

Deeson

New Member
I played with this and it seems to work well, bandwidth allowing. If bandwidth is interrupted, it can get all out of sync for a while, and/or freeze the video and/or audio. But with good bandwidth it's great.

how to access this?
i don't have the permission...
 
hmm I'm just seeing this thread again for the first time in forever. This method was really buggy, had sync probllems, etc. I gave up on it. The latency was long enough that it was impossible to have a conversation over it. Good luck! I'd be interested in this Voodoo thing but I'm not budgeted to pay $30/mo.
 
Top