# Receive stream from other OBS instance as source



## dstensnes (Nov 28, 2017)

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.


----------



## lebaston100 (Nov 28, 2017)

there is the vlc and media source which can play network streams, but you can try https://obsproject.com/forum/threads/obs-ndi-newtek-ndi™-integration-into-obs-studio.69240/


----------



## dstensnes (Nov 29, 2017)

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 (Nov 29, 2017)

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.


----------



## dodgepong (Nov 29, 2017)

NDI seems like a much more appropriate implementation of this concept.


----------



## dstensnes (Feb 14, 2019)

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


----------



## therentabrain (Mar 23, 2020)

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.






						OBS-Studio: Send an UDP Stream to a second PC using OBS
					

Instead of using OBS in the usual way of sending out an rtmp stream, the custom ffmpeg output offers us even more output protocols that we can use. In this guide I will use UDP as an example. (A full list of supported protocols can be found here...




					obsproject.com


----------



## marcelosmack (Apr 21, 2020)

Hello, can this be done over the internet? Someone pushed this and I open it in OBS? ... maybe as a media source?


----------



## EduardoFerreira (Jun 18, 2020)

marcelosmack said:


> Hello, can this be done over the internet? Someone pushed this and I open it in OBS? ... maybe as a media source?


Hi! Did you found a way to do it over the internet?


----------



## marcelosmack (Jun 29, 2020)

EduardoFerreira said:


> Hi! Did you found a way to do it over the internet?


I did! 

you know what? i came up with my own technology lol. 

streamvoodoo.com :) 

M


----------



## Wallby (Feb 1, 2021)

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.




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




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.


----------



## marcelosmack (Aug 25, 2021)

Wallby said:


> 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
> ...


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 (Mar 1, 2022)

therentabrain said:


> 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...


----------



## therentabrain (Mar 6, 2022)

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.


----------

