Replies: 1 comment 1 reply
-
It seems like a good idea that in some cases streamid can be represented in multiple formats. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
There are some ways we could improve the parsing of the streamid when working with SRT and oven media.
Currently, the stream ID is the full URL of the SRT. Theoretically this is because the VirtualHost parser needs to know which VirtualHost to route to (reference #454).
I'm assuming that the SRT ingest server doesn't have any kind of hostname headers or metadata about the srt URL? Does it also not have the port number?
Even so, I think It could be improved.
For example, on my install, the hostname is not needed. This works:
srt://10.9.8.118:9999?streamid=srt://foo/app/mytest
I assume that it just uses the default VirtualHost, and in my install I'm not currently using VirtualHosts. Maybe having it be optional for those that are using VirtualHosts would make sense?
Also, is the srt:// scheme in the streamid is not really necessary.
srt://10.9.8.118:9999?streamid=foo://bar/app/mytest
Adding the srt:// doesn't "look" right, so seems confusing. It probably requires encoding on some SRT encoders (eg "srt%3A%2F%2F").
We're only using final_url->Host() and final_url->App(), so it isn't being used as part of the parser.
From /src/projects/providers/srt/srt_provider.cpp:
auto vhost_app_name = ocst::Orchestrator::GetInstance()->ResolveApplicationNameFromDomain(final_url->Host(), final_url->App());
Proposal
My proposal is simply passing the virtual host information via query string rather than using ov::Url::Parse, and just using ov::Url::Decode.
If not using multiple Virtual Hosts
srt://10.9.8.118:9999?streamid=mytest
If using Virtual Hosts
srt://10.9.8.118:9999?streamid=mytest&host=virtual.host.com
Default to app being 'app', otherwise could override.
Non-standard 'app':
srt://10.9.8.118:9999?streamid=mytest&host=virtual.host.com&app=customapp
I feel like I could take a stab at updating the code, but C++ is not my forte, and I'm not sure if I could really compile and test this on my own. I'd need some help.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions