# Stream to 2 Destinations



## chaoscommander (May 8, 2017)

Dear Team,

OBS is used by some of our editorial people. As we are looking for a solution that enables us to check the rtp streams sent to Facebook we found a system by Rhode&Schwarz, which is able to compare two network streams and determine the quality loss between these two streams. To use such a system we would need to have the possibility to send the stream not only to Facebook but also to certain IP adress in our own network.(Which is supposed to be "input A" of the monitoring system. "input B" would be the stream coming from Facebook)
Is something like this possible or are my ideas totally strange and not suitable for what we are trying to do? If you have any suggestions I would be really thankful.

Thanks in advance for your help.
Cheers,
Joe


----------



## Cigarsurgeon (May 11, 2017)

It currently isn't implemented, so you have to use a solution like streaming on the local network to an NGINX install which you can then configure to split the stream.

We have ours set up to stream to YouTube and Facebook Live. 

I'd love to see the ability to stream to multiple outputs as managing the workaround pre-show and post-show is tedious.

My understanding is this was discussed roughly a year ago and is low priorty.


----------



## pkv (May 12, 2017)

another simple workaround without nginx is to use the output > recording > advanced > custom output ffmpeg > ffmpeg output type:  output to URL
pro: simpler to setup than nginx ; con:this is a second encode so cpu has to be strong enough

Again another method, a little bit more complex is to use : output > recording > advanced > standard > encoder: use stream encoder
==> this records to a file but there is no re-encode
Use then ffmpeg to stream this file:
ffmpeg -re -i record_file.mp4 -acodec copy -vcodec copy -f flv rtmp://youtube

-re ensures that the file is read as if it was a video stream from a capture card
-acodec copy -vcodec copy ensures that there is no reencode ==> very light cpu load


----------



## chaoscommander (May 12, 2017)

Thank you guys for the suggestions.
I'm afraid these workarounds are far too complex for our editors. We are a public broadcaster and the described ways are probably helpful for "regular" Youtubers or Let's Players. We have to deal with many people who are involved in such a system and our service department is probably not capable of handling 20 workstations configured like this. 
My idea was to motivate the developers to simply add a second destination. 

Another point is that entering the destination under "settings -> stream" is a bit uncomfortable. Maybe, as this happens to be changed quite frequently, it could be placed with a dedicated button directly under the button "Start Recording" on the right side of the window. What do you think?

Best regards,
Joe


----------



## Stephen Bingen (May 15, 2017)

I would also like to second this request. Is there any plan to add the ability to stream to two RTMP servers simultaneously? For example, YouTube and Facebook at the same time.


----------



## regstuff (Feb 15, 2019)

pkv said:


> another simple workaround without nginx is to use the output > recording > advanced > custom output ffmpeg > ffmpeg output type:  output to URL
> pro: simpler to setup than nginx ; con:this is a second encode so cpu has to be strong enough
> 
> Again another method, a little bit more complex is to use : output > recording > advanced > standard > encoder: use stream encoder
> ...



Hi pkv
I'm trying to use this method but I get an "Unspecified error occurred while recording" error message when I hit the record button.
These are my record settings:
Custom Output--> Record to url 
Filepath is rtmp://a.rtmp.youtube.com/live2/[my-key-abcd-1234 etc]
Container format is flv
Muxer settings left blank
Bitrate and keyframe set as per reqment
Video encoder is libx264
Audio bitrate as per reqment
Audio encoder set as aac

Any clue what I might be doing wrong.


----------



## pkv (Feb 16, 2019)

regstuff said:


> Hi pkv
> I'm trying to use this method but I get an "Unspecified error occurred while recording" error message when I hit the record button.


no idea, a log would be helpful.
if you use the streaming output , does it work with same settings ?


----------



## regstuff (Feb 20, 2019)

pkv said:


> no idea, a log would be helpful.
> if you use the streaming output , does it work with same settings ?


Sorry ignore that. Got it to work.


----------



## federicogc3 (May 17, 2019)

pkv said:


> another simple workaround without nginx is to use the output > recording > advanced > custom output ffmpeg > ffmpeg output type:  output to URL
> pro: simpler to setup than nginx ; con:this is a second encode so cpu has to be strong enough
> 
> Again another method, a little bit more complex is to use : output > recording > advanced > standard > encoder: use stream encoder
> ...




hey pkv,

i have a problem with the second method you propose. The first high-cpu-usage method works fine. But i need to low this cpu usage. I set Output > Advanced > standard. I set the path on desktop and format:flv, encoder: use stream encoder and on muxer settings i use the code you propose as:

ffmpeg -re -i ‪C:\Users\...\Desktop\namefile.flv -acodec copy -vcodec copy -f flv  rtmp://a.rtmp.youtube.com/live2/[streamingkey] 

I get th OBS to record and save but it does not stream to my channel. Where i went wrong? What can i do to get it to work?


----------



## pkv (May 17, 2019)

i'm not sure why it does not work for you; it's an old post you 've dug up. Check on YouTube side that the stream settings are the same if you're using an event (ex: 720p for a 720p source). If you use the 'Stream Now' feature of YT , there's nothing to set. Make sure you 've set the codecs right.


----------



## federicogc3 (May 17, 2019)

It's indeed an old post but it seems you are the only person in the internet who knows to set this up. I have the stream settings right. I attached streaming and recording settings, hope you can know what i'm doing wrong.


----------



## pkv (May 17, 2019)

OH of course it can't work. You should use the ffmpeg command in a cmd shell or power shell opened in the recording folder ... not as in your second pic. There is no ffmpeg exe within obs though it uses the ffmpeg libraries.


----------



## federicogc3 (May 24, 2019)

Ohh, thank you so much. Works perfectly!!


----------

