shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
2.01k stars 511 forks source link

feat(http): Add DELETE method support #1442

Closed joeyparrish closed 1 month ago

joeyparrish commented 1 month ago

When we try to remove an old segment from a live stream we uploaded via HTTP, we need to send DELETE requests.

joeyparrish commented 1 month ago

I'm still in the process of verifying this change. Converting to draft.

joeyparrish commented 1 month ago

I am not sure there's a storage API out there that doesn't have both PUT and DELETE. And without DELETE, your cloud storage fills up and you have to clean it out periodically with some other process. My guess is that HTTP output support was half-implemented and never seriously used. I think this PR finishes the feature for the first time.

joeyparrish commented 1 month ago

I suppose preserved_segments_outside_live_window could be configured in a way that would never attempt to delete files. If anyone is using it that way, then this isn't going to impact them anyway.

joeyparrish commented 1 month ago

Verified on my live stream!

I'm going to leave this open for comment for another day or so, in case anyone thinks I'm being unreasonable about not putting this change behind a flag.

cosmin commented 1 month ago

I agree that preserved_segments_outside_live_window seems like a reasonable workaround for anyone that doesn't want to delete.

joeyparrish commented 1 month ago

It's been nearly 24 hours without comment, so I'm going to merge this. If this ruins somebody's day, we can add a flag later. I suspect it will be fine.