C ⸝⸝𓏗 ` | ')
/)(\
i made this to use as a pfp but i couldn't find a way to export it as an animated image smaller than a MB ; ;
@pebble i think that would be down to how infrequent the ear wiggles are, compared to the other motions in it
-F
@Hearth it's 100% that bc the rest of the animation repeats 4 times for 1 ear flick, but i need the ear flicks :(

@pebble Oh I definitely understand! You could maybe make them more frequent?

GIF is not a format designed for different things repeating at different rates, unfortunately
-F

@pebble could be with a smaller resolution and FPS (I tend to use ezgif for these kind of operations, I think there are command-line tools here and there but I'm not aware of them yet)
@carbonacat i didn't wanna go under 250x250px and at lower framerates it felt like it lost some of the charm :/
@pebble does sharkey support webm?
@pebble does it uhhhh support webp

@pebble in case it does, this looks okay at pfp scale i think

ffmpeg command: ffmpeg -i mp4.mp4 -vf scale=300:300,fps=30 -vcodec libwebp_anim -lossless 0 -compression_level 6 -quality 60 -loop 0 -preset picture -an b.webp

@pebble otherwise here’s a gif. both are 300x300@30fps, both around 950KB

gifski command: gifski mp4.mp4 -o a.gif -W 300 -H 300 --repeat 0 --fps 30 --extra --motion-quality 50 -Q 60

@pebble sorry I’m autistic about encoding and squeezing quality in encoding the art is very cute my brain just went monkey mode the moment i read that you’re struggling to compress it ssjsidhsud
@[email protected] kjhd omg !! this is so helpful thank u !!

would it be difficult to make an optimized gif like this from a sequence of PNGs? bc this was originally rendered with a transparent background which mp4 doesn't support
@pebble gifski also takes sequence of pngs :> I’m outside so i cant do it myself but gifski is pretty easy to use in the cli
@[email protected] i'll mess around with it! thank u
@[email protected] idk what you did differently but with the exact same parameters (except framerate being 25 instead of 30) the webp ends up being 1.7MB while the gif ends up being 2.3MB :/ maybe it's the transparency?
@pebble that’s really funky!! i can try messing with it in about 2h if u give me the pngs
@[email protected] https://f.pebb.in/frames-11kmyDkn.zip here u go ! no pressure though don't feel like u have to
@pebble don’t worry about pressuring me :> I’m just autistic about it you’re not pressuring at all 🩷

@pebble ah, well, as i’m beginning to find out, it is very hard to optimize gifs with transparency because gif optimisation heavily relies on not discarding the previous frame (because gif has very basic tools for “only discard pixels in this rectangle please”). ive done everything i can to squeeze it while not losing too much quality. here’s 160x160@25fps for around 1MB

and the commands:

ffmpeg -framerate 25 -i ./frames/%04d.png -c:v libvpx-vp9 -filter_complex "[0]lutrgb=a=val+val*maxval" -crf 15 -b:v 0 -pix_fmt gbrap -strict experimental ./a.webm -y ffmpeg -c:v libvpx-vp9 -i a.webm ./new-frames/%04d.png -y gifski ./new-frames/*.png -o a.gif -W 160 -H 160 --fps 25 --repeat 0 -Q 50 --extra

@pebble literally the 2 ffmpeg commands just do the following 2 things:

  • slightly reduce quality by converting it to vp9 (vp9 might have something better to say about quantising the colours :P)
  • replace all alpha that’s not 0 to 255 i.e. remove all semi-transparent pixels. this just helps gifski
@[email protected] that makes sense.. thanks a lot for helping out with this !! i really appreciate it

@pebble pebble you're exceptionally cute

and that's a very pettable snout
-F

@Hearth eee thank u felth <3

u may pet the snout if you'd like
@pebble *pets snout!!*
-F
@Hearth awawawaa <3
@pebble you are an *intensely* cute critter
-F
@pebble I was going to suggest .APNG, but then I remembered Fedi doesn't handle it. Which is a shame, because you have a bunch of really good solid color fields to work with that would allow PNG compression to do its thing nicely, I think.
@pebble That's cute² 💜 🐉
@pebble Yeah!! Wonderfully cute...
@Aether aa thank u !! <3