help with ts-srt protocol and/or triggers

60 views
Skip to first unread message

Robert Hamon

unread,
Aug 23, 2023, 7:21:03 PM8/23/23
to Mistserver.org
I'm trying to require a password to access TS-SRT streams on Mistserver 3.2.2.
I've tried to follow the example here: https://news.mistserver.org/news/67/Building+an+access+control+system+with+triggers+and+PHP
But I'm not getting any url or url params passed to the trigger "USER_NEW" neither with url nor local executable.

I get these values only:
stream name
connection address
connection identifier
connector
request url (always blank)
session identifier

How can I require a password to make use of the "Secure" part or SRT with Mistserver?
Thanks

Robert Hamon

unread,
Aug 23, 2023, 10:00:42 PM8/23/23
to Mistserver.org
I've mixed 2 issues together in my previous message.
1st) 
Regarding access control:
I've tried to put everything in the url when calling mistserver's srt input:
srt://myuser:myp...@mistserver.local:8889/mypath1/mypath2?streamid=mystream&myarg=myvalue
Only streamid is making it to triggers, nothing from myuser, mypass, mypath1, mypath2, myarg are passed.

2nd) 
Regarding encrytion:
I can't find information on how to use encryption with srt streams in mistserver

And note that my ts input streams are working good and I can view the output as ts-srt from mistserver in VLC unencrypted just fine.

Thanks

Balder Vietor

unread,
Aug 24, 2023, 5:28:38 AM8/24/23
to mists...@googlegroups.com
Hey there,

If you want to use SRT parameters like passphrase you'll need to set them up like a push. It's a bit confusing, but the passphrase parameter would affect the entire port you're binding to. So setting this on 8889 would mean all SRT streams using that port share the same password (both input and output). Which would kind of be against the entire point of the passphrase...

That said we will just add the parameters to SRT protocol style, it wouldn't hurt being able to set the defaults for values such as latency.

Currently, your easiest option is setting a listener push with the passphrase activated, we briefly mention this in our SRT guide (Chapter 3, SRT output), but perhaps this isn't quite clear. I'll see if I can make it easier to find as well.
An example:

Source: Stream name you want to push ("videogen" is used in example)
Target: srt://address:port?parameters   ( srt://:8867?passphrase=mysecretpassphrase10charlongatleast&mode=listener used in example)

2023-08-24-11-03-54-selection.png

For as long as the live stream is available the stream will be pushed as a listener process to the given port using 0.0.0.0 (ipv4). You can then connect to this as a viewer/caller by connecting to:
srt://mistserveraddress:8867?passphrase=mysecretpassphrase10charlongatleast

Other SRT parameters such as latency can be used as well, setting them int he target directly or using the optional parameter fields below the target field has the same effect, use whatever you find easier. And obviously the reminder that for SRT any passphrase must be at least 10 characters long or the protocol will fail to start. That is part of the SRT specifications.

Make sure you have the automatic push settings set to retry whenever a stream is online as well:
2023-08-24-11-19-11-selection.png

With kind regards,

Balder Viëtor
Head of Testing

MistServer


--
You received this message because you are subscribed to the Google Groups "Mistserver.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mistserver+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mistserver/66c74aa8-e851-41b4-bde4-36da5d73bcb6n%40googlegroups.com.

Robert Hamon

unread,
Aug 24, 2023, 2:11:10 PM8/24/23
to Mistserver.org
Thank you for explaining everything in detail. I really appreciate it!
Where can I send you some beer/coffee tip?

Balder Vietor

unread,
Aug 28, 2023, 5:14:13 AM8/28/23
to mists...@googlegroups.com
Hey Robert,

At the moment we don't really have a place for that yet, though the thought is really appreciated!

Perhaps we'll do something in the future as you're not the first to ask.

With kind regards,

Balder Viëtor
Head of Testing

MistServer

Jithin pramod

unread,
Aug 31, 2023, 8:49:09 AM8/31/23
to mists...@googlegroups.com
full stream is stopping showing invalid parameters on a particular stream. after server rebot it ok

Jithin pramod

unread,
Aug 31, 2023, 9:04:11 AM8/31/23
to mists...@googlegroups.com
If a issue affects a stream all stream is down what is the solution 

Jithin pramod

unread,
Aug 31, 2023, 10:00:50 AM8/31/23
to mists...@googlegroups.com
Unrecognized stream state on status
And all streams down whats the issue 

Balder Vietor

unread,
Aug 31, 2023, 10:16:53 AM8/31/23
to mists...@googlegroups.com
You'd have to look at the logs as to what it could be. Is there anything in there that looks suspicious?

You can get them through journalctl if you're using the linux builds:
journalctl --since=-1d -u mistserver > mistlogs.log

To reset things, you could try nuking the stream:
MistUtilNuke streamname

or you can try and do a hard reset of MistServer if that doesn't work:
systemctl stop mistserver
rm /usr/bin/*Mst*

Then check if all MistProcesses have stopped:
ps aux|grep Mist

if processes are still active, kill them through:
kill PID

systemctl start mistserver


With kind regards,

Balder Viëtor
Head of Testing

MistServer

On Thu, Aug 31, 2023 at 4:00 PM Jithin pramod <jithinpra...@gmail.com> wrote:
Unrecognized stream state on status
And all streams down whats the issue 

--
You received this message because you are subscribed to the Google Groups "Mistserver.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mistserver+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages