I'm already building this into a relay to bootstrap NostrFans.

That relay will then be readable to subscribers only.

Writable by the content creators only.

Now we can control what relays images stay on, the content will stay limited to paid subscribers.

๐Ÿ‘€

Reply to this note

Please Login to reply.

Discussion

How are you planning to scale that? How many users one meager server can support? How are you planning to adopt you media to the clients form factor and bandwidth constraints? ๐Ÿถ๐Ÿพ๐Ÿซก

I've already got multiple content creators interested.

Tradfi hates to serve the adult industry so a lot of those models are already familiar with Bitcoin payments.

I can take a percentage of subscriptions to cover server costs and even directly pay for the VPS in BTC. Can simply upgrade the VPS as needed.

Known fact, one server never scales! Known fact, creator is not consumer of their own media. Know fact, everyone uses the clients and hardware they like. Every adult site now uses CDN, videos are reencoded and optimized on the server. Videos are chunked and streamed to the client from closest POP and only what is watched, with small buffer! ๐Ÿถ๐Ÿพ๐Ÿซก

Known fact: there's a large overlap between guys who pay camgirls and nerds who like using Bitcoin ๐Ÿ˜‰

I have ideas for spreading between servers. Most obvious one is using a load balancer.

I can use Cloudflare to cache media through a CDN.

On enterprise plan, yes! Will cost you from $2.5K a month. Otherwise you will be blocked! ๐Ÿถ๐Ÿพ๐Ÿซก

They have a separate video streaming plan. Starts at $5/m.

I am very aware of that. That works only if you store video on their service and have them encode and manage it. It is not CDN per se, it is streaming service.

I am a user of that, and few others! ๐Ÿถ๐Ÿพ๐Ÿซก

I could work with that. Set a max file size on the relay so photos work fine, maybe short clips, but full length videos have to be embedded from somewhere. Either a service I offer at some extra cost, serving from an S3 through a CDN, or they can upload and paste in a URL to post to NostrFans themselves at no extra cost on my end.

Images are adopted to a client by CDN too! Have you seen picture and img HTML tags? Not new, and thatโ€™s how we have seamless experience on all clients!

Video needs re-encoding for even short clips, or say goodbye to mobile users (majority)! ๐Ÿถ๐Ÿพ๐Ÿซก

Yeah but Cloudflare and CloudFront just cache images automatically, they can just be set to cache everything coming out of a server so I don't think special config is needed.

Any CDN offering a video streaming service will auto encode for the target device if needed. If that ends up being costly I could simply have my web app encode and compress videos on upload using ffmpeg so they're mobile friendly already.

Honestly things are so flexible these days with services offering pay for what you use type plans it's never been easier.

If I was trying to do the same thing just 10 years ago I'd have to rent a lot more compute power upfront!

Depends on CDN, new generation does much more. Hash will be broken. JSON images will not play well.

Re-encoding on the client is not feasible, since resource consumption and number of formats/sizes needed is high. No mobile will last on battery.

Re-encoding is usually not done on-the-fly, only for real-time streaming at reduced quality.

And I do know what offerings are out there for most of that, just due to the nature of my profession! ๐Ÿถ๐Ÿพ๐Ÿซก๐Ÿซ‚

I wasn't suggesting encoding on the client. Rather when the content creator uploads the video to my site to embed in a Nostr note, my site would run a little ffmpeg script on the server to encode on upload, compressing and making sure it'll play nice with mobile.

Since this only happens when a video is uploaded and the result is lower CPU and bandwidth usage for playback it seems like the sensible approach, otherwise I'm probably paying extra to a CDN to automate that task for me per client.

I am not sure if you have experience encoding many videos on a server, but I assure you that it is a very costly operation. Youโ€™ll need a whole farm of GPU fitted servers to handle the load.

If you expect small number of uploads, then external service like Qencode, mux, etc. might be within reason from cost perspective, otherwise it can be prohibitive.

Scripting ffmpeg can be done, but diversity of source media can be a huge challenge, if you expect good results!

๐Ÿถ๐Ÿพ๐Ÿซก

I've only done this kinda thing on a small scale before but I do have experience encoding videos including on servers.

I'm not gonna be hosting 4K HDR here. I'm thinking 720p max. And the upload will be limited by file size so I wouldn't need to worry about the expensive task of transcoding 4K down to 720p for example.

In my experience working with videos in the 720p range is no problem for a modern CPU VPS.

As the service grows we may see demand for higher resolution but by that point the money would be rolling in.

But realistically most people will view this content on their phones. I don't anticipate huge demand for high res video. 720p is the sweet spot where it can be compressed sufficiently to minimize storage and bandwidth usage and not make any difference in viewing experience on a phone.

Fair. But youโ€™ll also need to consider using HLS and adaptive quality, if phones is your target. Also, relay and encoder should never be on the same system (security and performance). And synchronizing all of that between relays will be a challenge, once you want to go beyond 2-3.

Solved problem with CDN and object storage! ๐Ÿถ๐Ÿพ๐Ÿซก

I'm definitely planning on using object storage. I mentioned S3 earlier. Ideally wouldn't wanna use AWS, but obviously a lot of other hosts have adopted the standard nowadays.

Like I said from the start I'm only planning to store images or maybe small short clips on the actual relay. Any videos would be on a separate server.

Yes I'd have another VPS dedicated to encoding videos, then it would fling them to object storage once they're ready and they get served from there so I only pay proportionally to how popular the content is.

And at this point I'm really just building something experimental for the fun of it. If I get to the point where my biggest problem is keeping up with the sheer volume of high demand for my service I'd be pretty happy to say the least! At that stage I'll have enough subscriptions coming in I can scale up, pay staff if needed.

Not even thinking that far ahead yet though this is just a hobby project to try building something new on new technology. If it happens to actually take off that's a bonus.

Understood! It was a pleasure discussing this with you, thank you! ๐Ÿถ๐Ÿพ๐Ÿซ‚๐Ÿซก

Likewise, you made me think through some details I hadn't considered. And if it does come to the point where I need a video expert I know who to ask ๐Ÿ‘Œ

Always happy to help and contribute! ๐Ÿถ๐Ÿพ๐Ÿซก๐Ÿซ‚๐Ÿ’•

I like it. My ceiling fans are ready.

I want to know more! This could be big for the porn industry. If you get it right, itโ€™s big money (eventually).

We can work together, when I have things up and running you can beta test, if it all works I'll help you configure things for your use cases too.

Definitely big money potential here, and doing good for the industry by cutting out the middleman.

Onlyfans takes a 30% cut iirc. I definitely don't need to charge anywhere near that.

If you're taking any kind of a cut then aren't you a middle man?

To provide the distribution yes, but the zaps would go direct to their wallets, the payments can be split automatically.

So what I mean is I'm not acting as a payment processor. It's all going directly through the lightning network. I'm not a custodian of their funds. I'm therefore not charging to handle payments - this is why OF has to charge so much, because they get hit with high tx fees by the banks and credit card companies for being a high risk business.

Bitcoin fixes this!

But it doesn't make servers free, so yes I still need to pay for storage, bandwidth, and compute power to run infrastructure.