#61 af_zz_imgproxy: cache video and audio as well

Open
roliga wants to merge 1 commits from roliga/master into fox/master
roliga commented 5 months ago

Not really just an image proxy now but since it already did cache videos embedded in the content of articles I thought it might as well cache videos in enclosures and audio as well.

Not really just an image proxy now but since it already did cache videos embedded in the content of articles I thought it might as well cache videos in enclosures and audio as well.
fox commented 5 months ago
Owner

not against the idea in principle but you're seemingly only going through source elements inside audio elements, what about videos then?

also there's the issue of video poster i guess

not against the idea in principle but you're seemingly only going through source elements inside audio elements, what about videos then? also there's the issue of video poster i guess
JustAMacUser commented 5 months ago
Collaborator

Truth be told, I don't know that proxying audio and video will really work well. Though the video poster would certainly not be an issue, and probably should be added to the plugin.

Fox has already implemented fetch filesize limits because caching videos could sometimes consume quite a bit of disk space. A similar issue would exist with videos, but it's a bit worse because it would consume memory and the PHP process handling web requests has different memory and time limit restrictions than the one running as the daemon/CLI.

But with videos (and audio) it gets more complicated because what happens when the user decides to move the playhead to the end of a 1-hour video? Without the proxy accepting the correct ranges, then relaying them upstream, the user would be left waiting for the entire video to download (assuming it worked at all). This also ties up valuable PHP worker processes, which could appear to be frozen and depending on the limits set might even cause the server to appear down.

Even large images are small compared to some media files so the existing proxy plugin handles them with relative ease, but throw in hundreds of megs or gigs of data and that will rapidly change.

Truth be told, I don't know that proxying audio and video will really work well. Though the video poster would certainly **not** be an issue, and probably should be added to the plugin. Fox has already implemented fetch filesize limits because caching videos could sometimes consume quite a bit of disk space. A similar issue would exist with videos, but it's a bit worse because it would consume memory and the PHP process handling web requests has different memory and time limit restrictions than the one running as the daemon/CLI. But with videos (and audio) it gets more complicated because what happens when the user decides to move the playhead to the end of a 1-hour video? Without the proxy accepting the correct ranges, then relaying them upstream, the user would be left waiting for the entire video to download (assuming it worked at all). This also ties up valuable PHP worker processes, which could appear to be frozen and depending on the limits set might even cause the server to appear down. Even large images are small compared to some media files so the existing proxy plugin handles them with relative ease, but throw in hundreds of megs or gigs of data and that will rapidly change.
fox commented 5 months ago
Owner

well this could easily work for smallish meme videos, think imgur gifv posts and such

other than that yeah its all valid points

well this could easily work for smallish meme videos, think imgur gifv posts and such other than that yeah its all valid points
This pull request can be merged automatically.
Sign in to join this conversation.
No Label
No Milestone
No assignee
3 Participants
Loading...
Cancel
Save
There is no content yet.