OBS-Studio: Send an UDP Stream to a second PC using OBS
Instead of using OBS in the usual way of sending out a 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.
First we of course have to configure OBS-Studio:
- Settings -> Output -> Output Mode -> Advanced
- Recording -> Type -> Custom Output (FFmpeg)
- FFmpeg Output Type -> Output to URL
- File path or URL -> udp://188.8.131.52:9999
This is a multicast address which means any PC on your local network can receive the stream. A different port can be used.
- Container Format -> Depends on the protocol, for udp it would be mpegts
- Video Bitrate -> 15000 or higher for a local network stream
- Audio Bitrate -> 128 or higher for a local network stream
- Video and Audio Encoder are currently limited. With one of the next updates of OBS you will be able to use pretty much any encoder that ffmpeg supports.
- Enter any Muxer/Video Encoder or Audio Encoder settings as desired.
See the FFmpeg Manual for more info on the available options.
- Click ok to save the settings.
- Start a Recording, not a Stream.
You can now watch the stream in VLC on your receiving PC (the IP you used earlier). Open a network stream on this PC and enter the following address: udp://@184.108.40.206:9999 (or whatever Port you used earlier)
That way VLC will listen for the incoming stream from OBS.
In the future I hope the current restrictions between container format and available encoders can be removed to improve the available options and codecs.