Copy image? Nope, here’s the link instead.

  • diaphragmwp@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    4 hours ago

    AVIF has a lossless mode. Although nobody cares for it, the slightly lossy is fine. It’s adjustable just like JPEG is adjustable.

    Also, it’s really annoying to convert since ffmpeg can’t do it yet, but the two major browsers support AV1 video, with alpha, in a .avif that you can shove into an <img> tag. It’s basically just a video. But animated. And transparent. It also works on Discord web now (but not mobile). AND you can set repetition count, if you really want. Can’t show the masterpiece I’ve made before with that since it would be way out of topic, although here’s an HD example with the animation from here:

    demo

    Ironically, the creators of the damn browser didn’t know that it’s possible and used a .webm. Well, the bourgeoisie division of the organization that makes the browser, of course. The @redhat.com emails, lol. Also, the metadata for the .webm says “ezgif”. Oh welp. And yes, the greenscreen leaking at the edges was already there.

    Command (bourne shell): ffmpeg -c:v libvpx-vp9 -i pop-up-1480.webm -strict -1 -f yuv4mpegpipe -pix_fmt yuva444p - | avifenc --stdin pop-up-1480.avif (-c:v needed to get ffmpeg to read the transparency).

    File size:

    .webm: 540KiB
    .avif: 486KiB
    .gif: 6.2MiB

    GIF command used for comparison: gifski pop-up-1480.webm -H 832 -r 33.3333333333333333333333 -Q 100 --extra -o pop-up-1480.gif, 100% to match original quality somewhat

    spoiler

    It also supports HDR. In year 2060, when the @redhat.com people finally get HDR out for everyone, we will have lazer eye “”“gifs”“”

    spoiler spoiler

    Users of custom clients and netsurf (via custom frontend) and such will be complaining about this just like about OP’s repost is complaining about WebP.