-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Config: Add option to stream videos over the specified CDN #2875
Comments
Videos are complicated in that these are streamed, the supported formats must be detected and the video must be transcoded on demand if the format is not supported or the bitrate is too high. We found this not to work well with (at least) our provider and that's why it's not supported. If you have a lot of practical experience and know how to build it so that it always works and is compatible with any CDN provider, please let us know! 👍 |
@shivanshs9 This issue is related to what I've been working on this week: If I remember correctly, KeyCDN had problems with video streaming. I can't remember any details though. It will definitely cause a lot of extra traffic that you have to pay for. Not all users might want to do that!? Cloudflare doesn't support video by default either, only for an additional fee (because of the traffic it causes). Note that we had to switch our website and demo.photoprism.app from KeyCDN to Bunny CDN last weekend, which might work better for videos based on the settings I've seen in their admin UI. I've also started working on a CDN setup guide (contributions and feedback welcome): |
Signed-off-by: Michael Mayer <michael@photoprism.app>
An updated preview build will be available for testing soon. As always, help with testing is much appreciated! Thank you ❤️ |
Signed-off-by: Michael Mayer <michael@photoprism.app>
Had to add more cache headers for this to work. CDN caching can then be enabled by adding the following variable to your docker-compose.yml file: PHOTOPRISM_CDN_VIDEO: "true" |
Signed-off-by: Michael Mayer <michael@photoprism.app>
The last change prevents token headers from being sent in public mode (like on our demo), so that the default tokens are used for viewing and downloading. Changing tokens each time the instance is restarted would otherwise prevent caching because these are part of the URL. |
A new development preview will be available for testing soon! |
Our demo works great with this. Let us know if you require any further changes. We'll otherwise release it like it is and close this issue. |
Describe what problem this solves and why this would be valuable to many users
Right now, the
PHOTOPRISM_CDN_URL
envvar only enables static assets, thumbnails and compressed library images to be delivered via CDN. Not for video files.Describe the solution you'd like
CDN could be enabled for videos too.
The text was updated successfully, but these errors were encountered: