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

Cloudflare R2 compatibility? #4060

Closed
walt93 opened this issue Dec 19, 2024 · 6 comments
Closed

Cloudflare R2 compatibility? #4060

walt93 opened this issue Dec 19, 2024 · 6 comments

Comments

@walt93
Copy link

walt93 commented Dec 19, 2024

Share your bug report, feature request, or comment.

I tried many different ways to configure a Cloudflare R2 bucket to work with Owncast. I had not much luck getting it to stream successfully. Many variations of parameters, do we have the bucket name in the URL, not have the bucket name in the URL, to have trailing slashes, to not have trailing slashes and so on. I have tried rather all of the permutations I could think of here.

It seems that it must have a region, we cannot leave this blank, and it does accept "auto" as a region, this seems like it may be how you configure it. It is hard to say. I just don't know.

I told it to put things into a folder "livestream" and I do see a livestream/hls/0 and livestream/hls/1 with some variety of .ts and even a stream.m3u8 in the bucket, so at least on one of these attempts it was able to write.

But get it successfully to play even in the owncast player window - I could not.

Has anyone else had any success (or failures) to share?


Update: It seems there was some discussion about it and even some documentation, and a feature "Serving Endpoint" which we very much need to configure, as these directions also mention configuring r2 in "development" mode with this r2.dev nonsense that explicitly says do not use, has rate limits. So we have to put this on a custom domain, and except for this pull request for documentation that seems to no longer exist, I can't find any other reference to it.

https://github.com/owncast/owncast.github.io/pull/112/files/461a4025a9fc5e0c478c9a614e5f7de057a9be40#diff-38fdd3747a2a9a113b93a9bb11e3b5beb8947dea352b1a4e33a84145a2e618bc

I assume therefore support has been removed because of _______ ?


Update(2): It looks like the issue is with Cloudflare's lack of documentation, and lack of clarity on the use case for R2 "free egress"*, and apparently I found a reported issue where Cloudflare redirected viewers watching m3u8 streams to their Abuse page, because they apparently prefer to abuse their customers rather than provide adequate documentation that explains the use case for R2 a little better than buried in some sub section of some legalese nonsense which it apparently is.

REQUEST: A warning somewhere to guide people away from Cloudflare. I wasted several hours here and would have really appreciated it.

@rmens
Copy link

rmens commented Dec 19, 2024

This should work. @unclebinary1001 and i even wrote a manual for this last year. It's up here https://github.com/unclebinary1001/owncast.github.io/blob/master/content/docs/storage/cloudfare.md (but not in the main repo. The whole storage directory seems to be missing there @gabek?).

GitHub
Owncast's public facing web site. Documentation and info. - unclebinary1001/owncast.github.io

@gabek
Copy link
Member

gabek commented Dec 19, 2024

The whole storage directory seems to be missing there

Yes, earlier this year I took down all the vendor-specific documentation because it was becoming out of date, and people were coming to me saying it didn't work. Incorrect documentation is the worst kind. It would be impossible going forward for us to document, in detail, how to use every storage provider, so instead we just need better general documentation about how this stuff works, and leave the specifics of how to create a bucket, make it public, enable CORS, etc etc etc to the vendors themselves. It simply doesn't scale for us to have to keep up to date on other people's products.

@walt93
Copy link
Author

walt93 commented Dec 19, 2024

It is not at all clear how to proceed.

Cloudflare R2 seems to require its users to configure it behind a domain. We would need to configure this domain in Owncast. There seems to be no place to do it, except for this mention in a github issue https://github.com/owncast/owncast.github.io/pull/112/files/461a4025a9fc5e0c478c9a614e5f7de057a9be40#diff-38fdd3747a2a9a113b93a9bb11e3b5beb8947dea352b1a4e33a84145a2e618bc

Without this, which appears to be removed, there appears to be no way to make Cloudflare R2 work.

Listening is a dying art. Practice it before it is gone forever.

GitHub
In this PR, I add documentation for configuring Owncast to serve streaming clients from the cloudflare r2 bucket s3 storage option.

@gabek
Copy link
Member

gabek commented Dec 19, 2024

I'll reiterate what I've said previously. I found it not possible to keep up with every single storage provider and check and see if their UIs and functionalities have changed all the time so I can keep up to date documentation for their services. It was simply impossible. I know that's frustrating, and I'm sorry.

When we did this, the Owncast project would have documentation for other vendors, people would read them, it would get out of date, and people would get frustrated because the documentation is literally telling them the wrong thing. This kept happening over and over again, that's why the documentation got removed. Not because I'm a jerk and I want to make your life more difficult.

There is only so much hand holding that can be expected from a small open source project such as Owncast. Asking Owncast to write documentation and support other companies is simply not possible. I'm very sorry.

The software is free, but support is a kindness from people using their time. Time is not free. I'm not the villain, and if you want to use your pretentious phrases to make me out to be one I won't be terribly encouraged to help. So let's be cool, yeah? We're all doing our best out there. I'm very willing to help troubleshoot with you. I don't know anything about R2, but hopefully we can figure it out together.

@walt93
Copy link
Author

walt93 commented Dec 19, 2024

What I found last night, and - just spend 5 minutes going through my browser history to not find - is this.

Someone had reported in a GitHub issue they were using Owncast to stream to 100 users, and their stream diverted to a Cloudflare "abuse" page. After reading deeply into the TOS it appears that HTML is the supported use case for R2 / Unlimited free egress.

I found this after finding a chunk of deleted documentation on Owncast referenced in a Github issue where it appears to have had support in a previous iteration, that has been removed. I can't help but suspect there is a correlation between these datapoints.

So there are people besides yourself @gabek who apparently understand the issue. You may now consider yourself illuminated. Would have saved me a bunch of time if this crap were properly documented.

@gabek
Copy link
Member

gabek commented Dec 19, 2024

Would have saved me a bunch of time if this crap were properly documented.

https://developers.cloudflare.com/support/more-dashboard-apps/cloudflare-stream/delivering-videos-with-cloudflare

From the beginning, we prohibited streaming video content using our bandwidth.

You may now consider yourself documented.

Cloudflare Docs
Cloudflare launched in 2010 believing everyone deserves a secure, fast, reliable web presence. We did not think you should have to pay more when you came under cyber attack, so we offered free and fixed-rate pricing for websites. That worked because most websites don’t consume much bandwidth, and so we could provide our services in an affordable way to everyone. From the beginning, we prohibited streaming video content using our bandwidth. While you could embed a video from another provider, we limited your ability to use our services to deliver video bits from our network to your visitors. This is because every second of a typical video requires as much bandwidth as loading a full web page.

@gabek gabek closed this as completed Dec 19, 2024
@owncast owncast locked as too heated and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants