tl;dr we want to let people post larger media here, the question is how large?
Description
The current configuration options actually don't modify some of the underlying behavior for handling gifs, and the current behavior is to just reject gifs/videos larger than the max rather than trying to rescale them.
This PR:
Increases the maximum allowed sizes for GIFs
Creates two tiers of maximums: this allows us to accept a wider range of sizes without the server attempting to transcode an adversarially sized memory bomb.
media smaller than the first maximum: unchanged
media larger than the first maximum: rescaled down to the maximum, preserving aspect ratio
media larger than the second maximum: rejected
TODO
[ ] Tests
[ ] ..??
Discussion
this works, but sort of begs the question what we want our storage/media limits to be. There are a few limits that act independent-ish:
filesize limit
resolution limit
frame number limit
and they seem like they sort of should be independent (except for maybe frame number, idk why that wouldn't be better handled by filesize). resolution is the main determinant of bitrate (how much cpu and bandwidth is needed to watch the video) and size is the uh only determinant of storage use.
right now the settings are sorta ridiculous, like i can upload a 4K gif, but it has to be less than 16MB, so it can only be 1 second long.
we want to support ppl being able to upload big stuff, but we might not want to get ourselves in the position of having to guarantee a lot of storage right now. We are committed to preserving whatever is posted to the instance, as we should be, so to what degree do we want to act like an archival video server vs. more limited microblogging server? rn we are not really hungry for storage space, but if we start accepting very large videos, that would be the fastest way for that to happen
Context: https://neuromatch.social/@elduvelle/111597148157826926
tl;dr we want to let people post larger media here, the question is how large?
Description
The current configuration options actually don't modify some of the underlying behavior for handling gifs, and the current behavior is to just reject gifs/videos larger than the max rather than trying to rescale them.
This PR:
TODO
Discussion
this works, but sort of begs the question what we want our storage/media limits to be. There are a few limits that act independent-ish:
and they seem like they sort of should be independent (except for maybe frame number, idk why that wouldn't be better handled by filesize). resolution is the main determinant of bitrate (how much cpu and bandwidth is needed to watch the video) and size is the uh only determinant of storage use.
right now the settings are sorta ridiculous, like i can upload a 4K gif, but it has to be less than 16MB, so it can only be 1 second long.
we want to support ppl being able to upload big stuff, but we might not want to get ourselves in the position of having to guarantee a lot of storage right now. We are committed to preserving whatever is posted to the instance, as we should be, so to what degree do we want to act like an archival video server vs. more limited microblogging server? rn we are not really hungry for storage space, but if we start accepting very large videos, that would be the fastest way for that to happen