Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latency and Passphrase #10

Open
vasudevavarun opened this issue Mar 26, 2021 · 5 comments
Open

Latency and Passphrase #10

vasudevavarun opened this issue Mar 26, 2021 · 5 comments

Comments

@vasudevavarun
Copy link

Hey,
I want to define "latency"and "passphrase" options in the outgoing connection.
Can you please tell me how can I do it!
Thanks.

@eirenik0
Copy link

eirenik0 commented May 8, 2021

@vasudevavarun you could specify them in URL. You could check specification here https://obsproject.com/wiki/Streaming-With-SRT-Protocol

The example of URL: srt://0.0.0.0.:9001?type=caller&latency=2000000.

@eirenik0
Copy link

eirenik0 commented May 8, 2021

About passphrase I'm not sure. @amukhsimov maybe you know more?

@amukhsimov
Copy link
Collaborator

Hi @vasudevavarun. About passphrase, what you mean under "outgoing" connection? (I ask this question since the server now supports only pull mode)
But you can set passphrase for connecting/pushing to srt server by setting SRTO_PASSPHRASE option on the listener socket. See https://github.com/Haivision/srt/blob/master/docs/API/API-socket-options.md#SRTO_PASSPHRASE
Also you can checkout v0.3.0 branch, the code is more readable there.

@FilipStadler
Copy link

I tried with

srt-server "srt://0.0.0.0:9008?latency=2000000&passphrase=test12345" "srt://0.0.0.0:9009?latency=2000000&passphrase=test12345"

srt-server 0.0.0.0:9008?passphrase=test12345678 0.0.0.0:9009?passphrase=test12345678

But it says operation not supported: Invalid socket ID or srt_listen: Operation not supported: Invalid socket ID

So I have tried to set a passprase on both listen port and send port

I can't make it work - but to get passprase solution I run another ffmpeg in listen with passprahse and with srt output to port 9008 but maybe a silly workaround but this is because I cant assign a passphrase.

But a very usefull if you need more than one OBS to get the stream from the server.

@FilipStadler
Copy link

I solved the need for passphrase using /etc/systemd/system/securesrt.service
securesrt1.service

[Unit]
Description=SecureSrt1

Wants=network.target
After=syslog.target network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/srt-live-transmit "srt://:1935?mode=listener&passphrase=verylongpassword" srt://127.0.0.1:4001

Restart=on-failure
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants