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.
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://receiver.ip.address:port
(Use the IP of the receiving PC, choose a port as you want, f.e. udp://192.168.0.3:5000)
- 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 will be limited by the used container -> For mpegts its currently mpeg2video and mp2
(in theory more encoders should be usable)
- 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 safe 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://@:port
Use the port you entered earlier with the IP address.
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.