# Example srtrouter configuration. # # Every input and output names a `transport` ("srt", "ndi", "omt", or # "media" — ndi/omt only take effect when the router is built with the # matching Cargo feature; media has no such requirement, only ffmpeg on # PATH at runtime) plus that transport's own `mode`. SRT's modes are # "listener" (this router waits for the far end to connect) or "caller" # (this router dials out); NDI/OMT's are "receiver" or "sender"; media's # are "stills"/"mediaplayer"/"scaler" (inputs only — media has no output # side, see docs/architecture.md). Mix transports and modes freely within # inputs/outputs — a common SRT setup is encoders calling *in* to fixed # input ports, and decoders/downstream systems listening for this router to # call *out* to them, but any combination works, and an NDI/OMT/media # source can feed an SRT output or vice versa exactly as easily as staying # within one transport (media publishes plain MPEG-TS, the same wire format # SRT relays, so a stills slate needs no transcoding to feed an SRT output). [web] # Local web UI + REST API for the crosspoint grid. bind = "0.0.0.0:8080" [state] # Optional. If present, routing changes made via the web UI/API are # persisted here and reloaded on startup (overriding each output's # default_source below). Remove this section to keep routing in-memory # only, reset to default_source on every restart. path = "state/routes.json" [[inputs]] id = "cam1" transport = "srt" mode = "listener" bind = "0.0.0.0:5001" [[inputs]] id = "cam2" transport = "srt" mode = "listener" bind = "0.0.0.0:5002" [[inputs]] id = "remote-feed" transport = "srt" mode = "caller" connect = "203.0.113.10:5000" # NDI and OMT inputs/outputs look like this (uncomment once the router is # built with `--features ndi` / `--features omt`): # # [[inputs]] # id = "ndi-cam" # transport = "ndi" # mode = "receiver" # source_name = "SOME-MACHINE (Camera 1)" # # [[outputs]] # id = "omt-monitor" # transport = "omt" # mode = "sender" # name = "srtrouter Program" # default_source = "cam1" # Stills/media-player/scaler inputs look like this — no Cargo feature # needed, just ffmpeg on PATH at runtime. width/height default to # 1280x720 if omitted; loop_playback defaults to true. # # [[inputs]] # id = "slate" # transport = "media" # mode = "stills" # image_path = "/opt/srtrouter/slate.png" # # [[inputs]] # id = "sponsor-loop" # transport = "media" # mode = "mediaplayer" # file_path = "/opt/srtrouter/sponsor-loop.mp4" # loop_playback = true # # [[inputs]] # id = "cam1-720p" # transport = "media" # mode = "scaler" # source = "cam1" # rescales/re-encodes an existing source # width = 1280 # height = 720 [[outputs]] id = "program" transport = "srt" mode = "listener" bind = "0.0.0.0:6001" default_source = "cam1" [[outputs]] id = "preview" transport = "srt" mode = "listener" bind = "0.0.0.0:6002" default_source = "cam2"