-
Notifications
You must be signed in to change notification settings - Fork 851
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
embedding streamid in url leads to usage issue #1871
Comments
Well, this example indeed isn't very fortunate, but this is the URI that can be parsed by our example applications. This means nothing for the SRT library because it doesn't do URI parsing at all. This should be understood as setting - in this case - the The standard URI should of course sound as Still, this document describes only the socket option and doesn't mention the URI you showed, so I don't understand the problem. |
Looks like some quotation marks (
|
Not sure if this will work, but again, this is a shell trick. This kind of URI as a whole isn't used anywhere in our documentation.
in the |
Let me summarize the question: Is it a valid use case to embedding streamid in url?
|
It is a valid case to set a socket option of string type to a string value containing printable characters. For streamid case, it is a valid case to call All other things are out of the scope of the SRT library. How an application receives parameters for itself that should be transformed into the SRT socket options is within the sole scope of the application. The URI used in the demo and testing applications serve only as a bridge between the library API and the shell command. It should not serve as a "URI model" for applications using SRT. Maybe this should be written somewhere explicitly in the documentation. |
Just to add something as I've checked how things look like in the documentation: The URI specification is used in the documentation for |
@quink-black We don't have a dedicated SRT URI documentation yet, however, supported URI querys can be found in srt-live-transmit.md. Passing StreamID in URI is one of the use cases. Most products though use alternative methods to configure SRT, e.g. UI, REST API, etc. Still, handling the My comment regarding handling the quotation marks ('query') was about adding this kind of handling in Might be there are other possibilities to resolve this. Feel free to suggest. |
I know VLC and FFmpeg both support the use case and support setting streamid by option. Since FFmpeg av_find_info_tag does little URL decoding, and the srt plugins in VLC don't use vlc_UrlParse but write from scratch, they should work with the format specified by "Access Control Guidelines". Actually I was trying to clean up some code in VLC and found out streamid doesn't work after refactor. Some suggestions:
|
The only way how applications can accept URI so that it is standard is:
|
I think URL encoding use Percent-Encoding, not html encode. |
Right, of course. This should be |
If url encoding is the way to go, the next question is: should client do url decoding and pass the decoded streamid to libsrt, or should client pass the encoded streamid to libsrt and let server handle the decoding process? The url can come from a signal server, so let client do passthrough can improve interoperability. |
I think this answers this question well enough.
As for using this URL by applications, transforming, sending, etc. - this is the application layer and out of scope for the library. The library only needs that the |
Let client do url decoding is only one of many choices. In my opinion, this project is more than a library, it should consider what's the best practice for interoperability, how the downstream software works with libsrt. |
I think this issue is what I posted before; #1173 |
Resolved by #2015. |
Embedding streamid in url is a common usage. AccessControl recommend streamid value starts with '#', for example:
This leads to url like
Now, "streamid=" is a query, "#!::u=admin,r=foo" is not the query's value, but a fragment.
https://tools.ietf.org/html/rfc3986#section-3.4
This leads to a usage issue: we can't use some standard library to parse the url, unless treat the fragment specifically as streamid value.
The text was updated successfully, but these errors were encountered: