SRT streaming
I am attempting to stream via SRT to a Cloudflare Stream endpoint.
The URL is in the form:
srt://live.cloudflare.com:778?passphrase=327d18cae6f65ac16ac23db7bf4ed784k666539b2de908b419363c4bd4f51eac7&streamid=786539c4de928b419363d4bd4f71eac7
However, I am having real trouble getting it to work.
I am getting [RootEncoder] Connection failed: SRT - Error configure stream, SRT_REJ_UNSECURE.
• When streaming to a Cloudflare Stream SRT input, you will receive a unique input URL, stream identifier, and passphrase (“secret key”) for authentication.
• Ensure your encoder supports SRT and enter the correct SRT playback/input URL, stream ID, and passphrase as provided in the Cloudflare dashboard or API when configuring your stream session.
Is there an example anywhere that shows the correct way to use SRT?
Hello,
passphrase is not supported in the url. You need set it using the method for it.
//the encryptionType could change depend of your server configuration. You can test all cases if you don't know the correct value
srtStream.getStreamClient().setPassphrase("passphrase", EncryptionType.AES128)
Thanks.
Done that now but I am still getting a SRT_REJ_UNSECURE response from Cloudflare.
Is there a full working example of how to configure a SRT connection anywhere?
Hello,
Are you using the library version 2.6.5? 2.6.4 or less has a bug related with that. Also, test all possible values of EncryptionType because maybe the error is related with an invalid value
I am using v2.6.5
I have tried 128 and 256 but still get the SRT_REJ_UNSECURE response from Cloudflare.
Should I still pass the full endpoint url including the passphrase to the com.pedro.library.srt.SrtDisplay, or should I strip the passphrase and just pass the url and streamId?
Hello,
You should strip the passphrase from the URL Also, try with value NONE and removing the method. (this is to confirm that you can't stream without passphrase)
If you still can't stream, can you provide me an endpoint to test the case? you can share it by email to keep it private.
Hi Pedro. I have sent you an email.
Hello,
I think that I didn't received the email. At least I can't find it. I let you here the email just in case: [email protected]