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

MSC3052: Sample events #3052

Closed
wants to merge 11 commits into from
Closed

MSC3052: Sample events #3052

wants to merge 11 commits into from

Conversation

erkinalp
Copy link

@erkinalp erkinalp commented Mar 5, 2021

This is a rudimentary way of streaming sample streams using Matrix.

Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
@turt2live turt2live added kind:feature MSC for not-core and not-maintenance stuff proposal A matrix spec change proposal proposal-in-review labels Mar 5, 2021
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
"sample_width" : undefined,
"sample_depth" : undefined,
"sample_encoding" : "encoding",
"samples" : "whatever_samples"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the samples encoded in some way? base64?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base64 is just one of the allowed encodings. Base85 or JSON-escaped are also possible.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this proposal is not very useful without also specifying something concrete (including the encoding) that would use it, whether as part of this MSC or as a companion MSC (or MSCs). And while I'm happy to that you're trying to make this mechanism generic, I don't think it will ever make it into the spec without also having a specific thing that uses it.

proposals/3052-sample-events.md Show resolved Hide resolved
proposals/3052-sample-events.md Show resolved Hide resolved
JSON part is formatted as follows:

```json
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably you could use relations to chain together samples

"sample_width" : undefined,
"sample_depth" : undefined,
"sample_encoding" : "encoding",
"samples" : "whatever_samples"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For someone ill informed:

  • What's the expected duration of an average base64 encoded samples? (is it practical?)
  • Is it realistic to expect a browser application to load and buffer a base64 audio sample seamlessly or will there be stutter in practise?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 125-150 milliseconds to 10-20 minutes, depending on the average communication latency between the sampler and intended receivers in the room.
  • That needs to be tested in practice.

Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
@@ -0,0 +1,54 @@
# MSC3052: Sample events
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be missing something obvious here but: what is the use case? Why would you want to do this, rather than (say) streamed file transfer via the media repository, as per #2354?

Trying to tunnel RTP over Matrix events - or indeed any kind of binary data over Matrix, feels like a bad smell: we have a media repository for that.

Copy link
Author

@erkinalp erkinalp Mar 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The designed-for use case is high (but controlled) latency voice calls and IoT with full replayability, down to sample level.

@erkinalp erkinalp marked this pull request as draft March 18, 2021 18:00
@erkinalp
Copy link
Author

Marked as draft as there are unresolved concerns before having this implementable.

## Alternatives

Having signalling on Matrix and actual data separately, which unfortunately means the samples
and the metadata possibly having different latency.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me an obvious alternative is to store the samples in the media repo rather than base64-encoding them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Media repository does not allow for conference moderation semantics where you can change the permission to talk midway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is: instead of having the samples field be an encoding of the samples, it would instead be an mxc:// URL pointing to the samples in the media repo, while still using the m.samples event type.

I'm not saying that I think it should be done that way. But I think that it's an obvious alternative that I would expect to see listed in the "Alternatives" section.

Copy link
Author

@erkinalp erkinalp Apr 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean is: instead of having the samples field be an encoding of the samples, it would instead be an mxc:// URL pointing to the samples in the media repo, while still using the m.samples event type.

I understood that, but it is not an alternative, due to stark difference in timing, persistence and moderation semantics of media repository and room events. Those two cover entirely different use cases.

@turt2live turt2live added the needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. label Jun 8, 2021
…erns

Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
Signed-off by: Erkin Alp Güney <erkinalp9035@gmail.com>
@richvdh richvdh deleted the branch matrix-org:master August 27, 2021 18:24
@richvdh richvdh closed this Aug 27, 2021
@turt2live turt2live added the abandoned A proposal where the author/shepherd is not responsive label Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned A proposal where the author/shepherd is not responsive kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants