Help understanding video and image size restrictions
-
I can increase that if you like.
based admin
-
Why is it that I can post the attached mp4 but not the source as a gif?
To make the mp4 I encoded the gif in handbrake, which actually made increased the file size but reduced the dimensions.
Source gif: 728*408, 785.5 KiB Encoded mp4: 640*360, 836.7 KiB
I've pretty much given up on Lemmy media uploads and I default to hotlinking these days.
Catbox.moe is a popular place for uploading for this purpose. Alternatively, I decided to roll my own for various reasons and you can DM me if you're interested in testing the platform.
-
EDIT: For real though, you can always just hotlink embed the source like this (provided the source site allows hotlinking):
Example:

This specific image:

If you're looking for somewhere to upload files with clear limits which are explained, I suggest catbox.moe
wrote last edited by [email protected]I'm pretty sure that pict-rs doesn't force-convert things to WebP -- the vanilla Lemmy Web UI just fails the upload, and I'm sure that it at least also does PNG and JPEG, as static images go. It might be that your client is doing a conversion to try to work around that limitation?
-
I'm pretty sure that pict-rs doesn't force-convert things to WebP -- the vanilla Lemmy Web UI just fails the upload, and I'm sure that it at least also does PNG and JPEG, as static images go. It might be that your client is doing a conversion to try to work around that limitation?
I only upload photos from the web interface. They all always become webp.
-
I only upload photos from the web interface. They all always become webp.
Hmm. I'm certain that they've just failed on lemmy.today's vanilla Lemmy Web UI, not converted.
goes to test
I just created a test (non-animated) gif. Trying to upload it just fails --- that is, one can select it and try to upload it, but the Web UI never inserts the uploaded image URL in the textbox.
Here it is on catbox.moe:
If I convert it to a PNG, a format that pict-rs does understand, it uploads without being converted to WebP:
Maybe it's something unique to lemmy.blahaj.zone?
EDIT:
There's an option in the docker/docker-compose.yml in the lemmy git repo showing an example of how to add an option to force pict-rs to convert everything to WebP. So my bet is that lemmy.blahaj.zone has done that:https://github.com/LemmyNet/lemmy/blob/main/docker/docker-compose.yml
# we can set options to pictrs like this, here we set max. image size and forced format for conversion # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
EDIT2: @[email protected] would know.
-
I feel like something’s gone very wrong if the MP4 is dimensionally smaller but has a larger file size than the GIF
The original video was not dithered.
GIF is a format that was originally designed to do static images with flat colors. (Or, I think dithered...I know that PNG definitely can encode ordered dithers efficiently, and this is an ordered dither, rather than something like a Floyd-Steinberg dither).
GIF cannot do more than 256 colors in a frame, so whoever created the GIF will have, as part of the compression, caused the number of colors to be reduced, with dithering used to try to compensate for the lack of colors. That's why it looks "grainy".
Most video compression codecs are not optimized for compressing dithered images, because video normally doesn't look like that.
If you took the original, pre-GIF-compression video, which wasn't dithered down, and compressed it with something like MP4, you'd probably get rather better quality per byte size than you do with GIF. But once the video has been passed through GIF's compression...shrugs
-
I can increase that if you like.
5.71MB is plenty generous. I'd give up 5MB of that if we could have anonymous browsing again. I can't recommend Mbin to people if they have to log in to see anything. Would converting all uploads to WebP lighten the load?
-
I reenabled anonymous access and predictably the site started getting hammered immediately. I blocked a bunch of broad IP ranges that were the biggest sources but I’m sure I’ve probably blocked some legit people.
-
Holy crap, that sucks! Why can't those scrapers just scrape each other? I'm sorry, I didn't want to pressure you to open up to that kind of abuse. I want to think of ways to help this situation, but you're probably 10 steps ahead of me. Thank you for trying so hard.
-
Hmm. I'm certain that they've just failed on lemmy.today's vanilla Lemmy Web UI, not converted.
goes to test
I just created a test (non-animated) gif. Trying to upload it just fails --- that is, one can select it and try to upload it, but the Web UI never inserts the uploaded image URL in the textbox.
Here it is on catbox.moe:
If I convert it to a PNG, a format that pict-rs does understand, it uploads without being converted to WebP:
Maybe it's something unique to lemmy.blahaj.zone?
EDIT:
There's an option in the docker/docker-compose.yml in the lemmy git repo showing an example of how to add an option to force pict-rs to convert everything to WebP. So my bet is that lemmy.blahaj.zone has done that:https://github.com/LemmyNet/lemmy/blob/main/docker/docker-compose.yml
# we can set options to pictrs like this, here we set max. image size and forced format for conversion # entrypoint: /sbin/tini -- /usr/local/bin/pict-rs -p /mnt -m 4 --image-format webp
EDIT2: @[email protected] would know.
We run our own custom image caching setup. I'll ask Kaity to look in to it and see what's going on