Input SRT from OBS

Good morning,

I am currently studying audiovisual engineering in France and I plan to use Caspar CG as a live and media player mixer with automation. I explored the client’s custom commands a little but I would like to know if it was possible to create a TSOIP source from an SRT stream encoded via another machine (OBS). The output url would be for example srt://ipadress:port?listener&condition1&condition2.

I know that CasparCG uses FFMPEG as a base but I can’t figure out if the client can create this kind of entry or if it has to be hard defined in the configuration file.

Thanks in advance

Couasnon Corentin

I barely understood, so I’m not by far the best here to help you.

Not sure if you meant custom commands in general or the “Custom Command” entry in the client, because it looks like what you need.

As a side note, if you are studying automation and haven’t done yet, take a look at “Sofie TV Automation” it may be interesting for you.

In the custom command, add this to the PLAY field:

PLAY 1-10 “srt://[CASPAR_IP]:port?mode=listener&transtype=live&latency=100”

You may also add something to the STOP command, like:

PLAY 1-10 EMPTY

In OBS, the output should be almost the same line, except you change the mode:

srt://[CASPAR_IP]:port?mode=caller&transtype=live&latency=100

That said, you should know that the ffplay instance that plays it in CasparCG will add a second of buffering. For low latency video across the network, you actually have NDI available.
After you install the NDI OBS plugin, you enable NDI output in OBS from the tools menu and in CasparCG you instead add this command:

PLAY 1-10 “ndi://[COMPUTER_NAME]/[SOURCE_NAME]"

1 Like

I’m trying the commands you provided but cannot make it work. What version are you using?

This case is for streaming with OBS and receiving in Caspar, right? I thought the caller was for the receiving end and the listener for the streaming origin.

Have you managed to stream srt with Caspar? I’m trying a bunch on commands with ADD 1 STREAM but no luck so far.

I understand the call/listen role is just a handshake matter and it’s not indicative of the source/destination role.

What are you trying to accomplish? Stream from Caspar?
The commands I showed above just how to receive an OBS stream in a Caspar layer and not the other way around.

I don’t think the server has that capability as the ffmpeg consumer is picky as hell regarding formats and parameters. I never even bothered… I just do NDI or DeckLink to OBS and stream from there.

Yeah, we can use OBS of course, but I’d be nice to use just use Caspar for this as well.

Unless the support for ffmpeg consumers is reworked, I doubt this is a viable option.
My own past experience tells me just use the server for what it’s meant to be… a graphics compositing server.

This command actually worked. I only checked that VLC was receiving it in the same machine for now.

ADD 1 STREAM “srt://10.10.12.175:10000?mode=listener&transtype=live&latency=100” -codec:v libx264 -tune:v zerolatency -preset:v ultrafast -crf:v 25 -format mpegts

Tested on latest build 2.4 from 27th of September.

note: when pasting the command here on the forum the " symbol becomes “opening and closing” quotation marks. That’s why sometimes I was copying them from here and it did not work, I had to type them again. (" " vs “test”)

Thanks to the examples from @rrebuffo and @vimlesh1975 I managed to make the working command.

By the way, how do I stop the stream? REMOVE 1 STREAM is not working… :thinking:

Add with ADD 1-100
Remove with REMOVE 1-100

1 Like