could look into it, I dunno anything about that kind. Is there a nip #[3]โ€‹ ?

Reply to this note

Please Login to reply.

Discussion

I didn't publish it yet ๐Ÿ˜…

I love this! have you thought about streaming protocols or is that outside of scope? looking forward to the nip!

yeah, 100%, I played a while with webtorrent but (from the very limited time I spent looking at it) I think webtorrents might be insufficient for this, but yeah, definitely want it to support a whole array of media sources

๐Ÿ”ฅ we implemented HLS for streaming audio in #[7]โ€‹ for a couple reasons:

- chunked audio encoding doesnt send full sourcefile to browser. enables monetization (no right click save)

- works across devices and browsers

- same protocol used by e.g. soundcloud

- open standard

- scales extremely well, just static files

- also supports video

would love if the eventual NIP for audio had support for robust streaming like this. Iโ€™m no expert but Iโ€™ve spent a good amount of time on our HLS implementation - happy to answer questions or contribute!

this sounds great!

what are you using on the server to serve the chunks?

just a basic fileserver, in our case itโ€™s implemented in Go but you could use an S3 bucket or whatever. just needs to be accessible over http

end to end it goes roughly like this:

1. user uploads an audio file

2. backend uses ffmpeg to convert it into HLS files (chunked mp3s + text manifest)

3. HLS files made available on basic fileserver over http

4. HLS manifest url goes into note metadata

5. client gets note, fetches manifest, (manifest includes time markers + mp3 chunk urls) and JIT loads chunks into player

ah damn, that's super simple; love it

I think this could fit into NIP-94 if we added some additional tags like โ€œstream_urlโ€ and โ€œdownload_urlโ€.

#[6]โ€‹ uses a custom kind 1808 for this but only because kind 1063 didnโ€™t exist at the time.