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

NIP-5E: Censorship Resistant Live Streams #1790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

NIP-5E: Censorship Resistant Live Streams #1790

wants to merge 1 commit into from

Conversation

v0l
Copy link
Member

@v0l v0l commented Feb 17, 2025

Read

TODO:

  • Encryption
  • More examples

@v0l v0l requested review from vitorpamplona and hzrd149 February 17, 2025 12:02
@fiatjaf
Copy link
Member

fiatjaf commented Feb 17, 2025

Why aren't the current livestreams censorship-resistant and how this makes them better?

@v0l
Copy link
Member Author

v0l commented Feb 17, 2025

Why aren't the current livestreams censorship-resistant and how this makes them better?

They are hosted on a single server, like zap.stream hosts the stream, or cloudflare.

This NIP creates a live stream format that can store and distribute segments anywhere that can be linked to via NIP-94 events.

@fiatjaf
Copy link
Member

fiatjaf commented Feb 18, 2025

I don't think that's a big deal. Having one single stream on one server for the duration of a couple of hours is ok as long as you're able to host it elsewhere the next time and that URL is announced on the event.

But also what prevents you from hosting a stream in two different places? Just add two URLs in the event.

Obviously I'm not in the weeds as you are but NIP-53 seems to work very well and the HLS stuff looks very standard. For example, during the FOSDEM Nostr talk @Sebastix published a livestream by just reusing the same HLS URL provided by the FOSDEM organization, and it worked in every client, so interoperability is already at an all-time high. This new scheme would require completely new implementations across the board and may end up being de facto more centralized, and we can't know if it will be fast enough.

@v0l
Copy link
Member Author

v0l commented Feb 18, 2025

All very good points @fiatjaf, But i think its already very centralised, its not that hard to run something like owncast to host your own stream but very few are doing that, this is partially my own fault because i wanted it make it easy for people to use.

I would rather have the standard option be something more decentralised. In the future i want zap.stream to run the transcoding service for you but upload all the segments to the users own blossom servers which they are hopefully paying for. Ideally those users could just do the transcoding and uploading locally though since its not that much CPU work, most users have some sort of hardware accelerated encoding for H264.

so interoperability is already at an all-time high

Like i mentioned in the NIP, its possible to expose a http server that generates the HLS playlist from the nevent so it will continue to work with NIP-53 clients.

@fiatjaf
Copy link
Member

fiatjaf commented Feb 18, 2025

its already very centralised, its not that hard to run something like owncast to host your own stream but very few are doing that

Well, it always starts centralized since there has to be just 1 thing in the beginning before others are created.

My point wasn't that people would run their own, but that we would have other providers. As you said there are already some others, like Cloudflare. That guy running sats.gg with the live Pokemon also ran his own thing I believe.

I think actually we just don't have more because people do not know it's possible and the specs are not anywhere to be seen, so they just assume zap.stream is a centralized "platform" instead of a standalone client that can talk to any backend.


I'm still skeptical that this new approach will scale but I don't understand these streaming things so if you're willing to try it and it works better then I'm happy.

@chdwlch @suhailsaqan what do you think?

@suhailsaqan
Copy link
Contributor

I think it's a good idea but I think we would def need some aggregator that generates an HLS playlist like @v0l mentioned in the NIP. The aggregator can also employ CDNs and caching which would help performance geographically and reduce latency. Also as mentioned will be way more interoperable to existing stuff

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

Successfully merging this pull request may close these issues.

3 participants