Open fusir opened 6 months ago
I think most of the issues here are better solved with https://github.com/calzoneman/sync/blob/3.0/docs/custom-media.md -- this is the "I know what I'm doing" version of the self-hosted content feature.
The ffprobe check has to be somewhat conservative because users dump questionable links into it without understanding how the feature works.
This solves a number of minor problems.
One is the addition speed. ffprobe can get meta data out of a URL without downloading the whole file. This means almost any video can be added with very little wait.
Two is the maximum size of files. I have noticed that it doesn't matter how a channel sets its permissions, a file larger than 500MB cannot be added likely because the server doesn't want to download a file larger than that, which is reasonable. But with ffprobe getting metadata directly from a URL that's a non-issue.
The third issue it solves is URLs with redirects. The current code does not handle redirects very well. FFprobe does out of the box.
The fourth, though it takes some changes in how ffprobe is spawned, is it could make it easier to add in useful headers to the configuration file. For example adding -headers "sec-fetch-dest: video". That or you could just add that one by default. Though there could be situations where people would want others.
I have successfully gotten meta data from a video using
ffmpeg "url"
behind both redirects and destination checks so I know it works.