The mind blowing part here is not my unix tool, it is showing that nostr is a practical decentralized alternative to Usenet NZBs (torrents are a different thing) - Blossom servers do not need to store a whole large video file - Blossom servers do not need to stream an entire large file - Blossom operators have plausible deniability in terms of content as the segments are encrypted (and they may not have all) and they don't control the key - Video clients now have mutiple failovers if a segment is stored in multiple servers - There are bandwidth savings if the video is not watched entirely - Content creators can exchange the AES key against a zap Youtube, here we come.
franzap's avatar franzap
I just built a tool. Video on-demand from encrypted chunks on multiple Blossom servers ๐Ÿคฏ If you have (or can install) nak, nodejs, ffmpeg can you check it works for you? nak req --id ec1688e87843e8774d1813c371fe65af890be090bdb831f03ceefdd2144ad679 wss://relay.damus.io | npx --yes github:franzaps/n2m3u8 | ffmpeg -f hls -allowed_extensions ALL -protocol_whitelist file,http,https,tcp,tls,crypto,fd -i - -f mpegts - | mpv - This: - Fetches a nostr event with hashes of video chunks - Input into my tool that finds the working chunks in Blossom servers and outputs a HLS playlist - Input to ffmpeg that decrypts and decodes the stream - Input to video player. (Replace mpv with vlc or other video player, can also save to a video file) Volume UP! #asknostr #blossom #devstr
View quoted note →

Replies (51)

๐Ÿ‘€ nevent1qqszevvhychldtuhu35atyql47ktcpdye778z4xkdf28w7n7j3e6tfcpramhxue69uhkummnw3ezuetfde6kuer6wasku7nfvuh8xurpvdjs9uzg7m
Yep we will probably need to pay someone for hosting if we want to compete with Usenet? I get like blistering fast downloads and almost anything I can imagine for like $20-30 a year.
The missing part I see is a standardized way to do discoverability of the blobs. Something like DHT, but its just an event written in a particular nip that link users to the various pieces. Nip-01 + blossom blob + Nip-?? to have a decentralizable, replicable, indipendently updatable (clients should decide who trust in updating nip-?? note)
Niel Liesmons's avatar
Niel Liesmons 7 months ago
You're gonna make me work on Video/Audio widgets asap aren't you? :haha:
Niel Liesmons's avatar
Niel Liesmons 7 months ago
Need a #5yo version on that last line :prayinghands:
I didn't even realize that nobody was doing this, already. Sort of funny. We do this with PDFs and stuff, too. Break it up into a stream, including the pictures and videos and games (people put computer games into PDFs because of course they do). But the whole thing makes me nervous, so we only store Asciidoc and export the embedded media to a media server, and call it from there. We don't work with anything encypted, but you do you. The police know where we live. LOL
Niel Liesmons's avatar
Niel Liesmons 7 months ago
Oh :eyes: so you mean when the publisher of the video/podcast/song/... defines sections, you could just chop up along those marks?
Itโ€™s easier to use time stamps for anchors. Subtitles for example are just text with a timestamp. Breaking up a video in segments is mostly important for handling uploads/downloads of large files (>100MB) especially over slow connections. It also has benefits for CDN caching.
We will have paid blossom servers. - Uploaders will have to pay a certain amount of sats/GB/month for storage. - with automatic cashu payments from a NIP-60 wallet - Users / Downloaders might need to pay a few sats for bandwidth to get content from the blossom servers. - Only payments will incentivize people to run blossom servers with Terabytes of storage and Petabytes of bandwidth.
Yeah, sure. And you can add arbitrary anchors to a a video stream that you're converting. Not just a point in the movie, but a face on the screen at the point in a movie. Like, if someone is giving a Powerpoint presentation and presents a chart, you could highlight a bar in that chart and add some text, or cause the video to pause and add an explanatory slide.
We're using the anchors on the images themselves. We also alter the text inside of images by breaking it up into layers and then replacing the text layer. There's been a trend to put table of contents directly into images because it looks pretty, including page numbers, on PDFs, but if you convert PDF into something pageless (like Asciidoc), then you need to remove those references and replace them with something like relative placements or a hyperlink to a new anchor.
I'm just sort of surprised by everyone getting so excited about this, as it seems sort of obvious to me. Everything is numbers, to an operating system, and a matrix of numbers can always be broken down into sets or strings, transmitted in parts, and then pasted back together. The computer isn't actually saving pictures or sounds, it's saving text instructions for recreating pictures or sounds. This is just signal processing.
I don't know what CDN caching is, but it's probably easier and cheaper to store lots of little chunks, than one large one, as it's easier to find a spot in the memory that size. Little chunks are probably generally better than large chunks, now that processors and networks are so fast. Chaotische Lagerhaltung, but for computers.
I love your incentive. Streaming services still have superior UX, we need to work on that. I want to: find video, watch trailer, sounds good, play and starts streaming and I'm certain it won't stall. Will pay many sats for that.
That is already happening, in my example nak is pulling an event of kind 1663. Not sure where the nip01 is. Kind 1663 is a placeholder and draft proof of concept for now. It describes the segments and the servers. As segments are hashes they can be djscovered and updated by other mechanisms too
I think thats cool and hopefully we can do zap splits to send a (major) portion to the creators who publish directly to nostr. Fuck the middle men. Bitcoin disintermediated payments. Nostr will do the same for comms and content distribution.
I don't pretend I discovered gunpowder. So far, all videos are entire files and that's it. I wanted to showcase and start defining a NIP for HLS because of the insane amount of advantages it unlocks
I did not implement it to help traffic kiddie porn, wtf. Those people can rot in jail. By that same token Signal should have a backdoor because its encryption is helping that traffic too. We've seen this argument countless times, it's tiring.
I'm extremely happy to pay sats for youtube videos I know I can access fast, without ads, and that don't prompt me to "sign in to confirm you're not a bot"
Iโ€™ve been experimenting with HLS on blossom but I had put the m3u8 in blossom as well. Generating the m3u8 playlist dynamically makes more sense and enables nice features like the aes encryption. I was solving the server failover on the fly in the browser while playing but doing it before playing with HEAD requests is also reasonable (short delay). We could have a kind 21 video event pointing to multiple 1663 events and generate a master playlist dynamically to support multiple resolutions. I will build a browser version of your demo if no one else beats me to it.
Failover on the fly sounds even better! Mine was a shitty proof of concept, you are much more familiar with all this so happy to keep chatting about a potential NIP that makes sense.
Just struck me as someone "inventing" something we have been doing since the telegraph, and collecting hysterical praise from people who don't understand the topic. That said, I like the idea of a chaotic logistics system for media, analog to the one we built for text. Of course, it opens the door to remixing the media or referring to the media piecemeal, but that might not work, for third parties, if its stored in an encrypted state.
If that works, it would solve the problem, but it would also remove the plausible deniability argument, as it proves that you could find out what you were storing, with a reasonable effort. Reasonable efforts are reasonable. I feel like the encryption damages the potential without adding anything, since it can't be securely encrypted without making it impossible for the public to rebuild it. Encryption adds value if only the person who receives the package can open it, or you are trying to circumvent censorship in-transit. We already automatically encrypt in-transit relay communations, tho, and these aren't only meant to be pay-per-view, or something. But maybe I'm just confused and missing the point of encryption, in this use case.
Niel Liesmons's avatar
Niel Liesmons 7 months ago
Yeah, makes sense. Little benefit anyway I think. For clips (etc), is it easy to just only load the blobs needed for the clip? #noobquestion
Henry 's avatar
Henry 7 months ago
Since I started following my manager's new trading plan, I've seen a significant improvement in my financial situation. I'm truly grateful for the support I'm receivingโ€”earning $150,000 as a beginner in crypto trading is a huge milestone. If you're looking to get started, I highly recommend reaching out to Mrs. Susan. You can contact her via email at susandemorirs@gmail.com or on WhatsApp at +1 (472) 218-4301
Henry 's avatar
Henry 7 months ago
Since I started following my manager's new trading plan, I've seen a significant improvement in my financial situation. I'm truly grateful for the support I'm receivingโ€”earning $150,000 as a beginner in crypto trading is a huge milestone. If you're looking to get started, I highly recommend reaching out to Mrs. Susan. You can contact her via email at susandemorirs@gmail.com or on WhatsApp at +1 (472) 218-4301
Henry 's avatar
Henry 7 months ago
Since I started following my manager's new trading plan, I've seen a significant improvement in my financial situation. I'm truly grateful for the support I'm receivingโ€”earning $150,000 as a beginner in crypto trading is a huge milestone. If you're looking to get started, I highly recommend reaching out to Mrs. Susan. You can contact her via email at susandemorirs@gmail.com or on WhatsApp at +1 (472) 218-4301
โ†‘