One can use either VLC Source or Media Source.
VLC restrictions: SRT must be in caller mode (this is the default) and not in listener mode.
In a VLC Source in obs :
srt://IP:PORT
and not in listener mode; this implies the stream played in obs must be sent from an IP in listener mode. In a Media Source, uncheck 'Local File'.
timeout=5000000
helped them. So enter the URL as srt://IP:PORT?mode=listener&timeout=5000000
Settings > Stream
Service
dropdown, select Custom
.srt://IP:port
(OBS Studio will also accept any protocol relying on MPEGTS container and supported by FFmpeg, therefore UDP, TCP, RTP, etc.)OBS Studio will accept options in the syntax: srt://IP:port?option1=value1&option2=value2
. The full list of options is those supported by FFmpeg: http://ffmpeg.org/ffmpeg-protocols.html#srt.
The most important option is latency in microseconds (μs). It has a default value of 120 ms = 120 000 μs and should be at least 2.5 * (the round-trip time between encoder and ingest server, in ms).
Ex: for a latency of 1 sec, set latency=1000000 .
Another sometimes required option is the mode, which can be caller
, listener
or rendezvous
. caller
opens client connection. listener
starts server to listen for incoming connections. rendezvous
use Rendezvous connection mode which is a bi-directional link where the first to initiate handshake is considered caller. The default value is caller and usually need not be set for OBS Studio since it'll be in caller mode normally.
A case where it's useful to set the mode to listener
is when sending a stream to VLC. OBS Studio then acts as a server to VLC, which is the client. On a LAN for instance, set OBS Studio to srt://127.0.0.1:port?mode=listener
to establish a connection to VLC which you point to srt://127.0.0.1:port
.