Whenever I make a post with a link to a gif as the URL, the post on clients like Sync, Liftoff, and Photon all actually show the .gif file in the post so it will play correctly. Whenever I view the post on lemmy-ui (the basic UI) though, sometimes it has some .webm file that was created on the original instance, and to actually get the gif to play you have to click on that or click on the link to the original website. How do I get the behavior on other clients to be the same for lemmy-ui, so the gifs will actually play? it

Example:

Photon Working

Lemmy UI Not Working

Lemmy UI Working

Edit: I don’t think it’s size, since this gif is smaller in size than this one

Also, here are my .env variables:

PICTRS__MEDIA__VIDEO_CODEC=vp9

PICTRS__MEDIA__GIF__MAX_WIDTH=512

PICTRS__MEDIA__GIF__MAX_HEIGHT=512

PICTRS__MEDIA__GIF__MAX_AREA=262144

PICTRS__MEDIA__GIF__MAX_FRAME_COUNT=500

I increased the values from default to see if that would fix it but no luck

  • WhoRoger@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    Nothing except that it’s a horribly obsolete, bloated, barely compressed format with shit quality that’s misused for a completely different purpose than what it’s meant for.

    When I download gifs of stuff I can’t find anywhere else, I convert them to mp4. A 50 MB gif turns into a 300 kB mp4.

    So… I guess that’s wrong.

    • Izzy@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Gifs are extremely efficient though. There is only downloading and no decoding necessary to play it back so it has no impact on your CPU. If you have a screen full of 1000 GIFs then your CPU won’t start melting. Try playing 1000 video files on your computer no matter how small they are.

      However, there is no reason for a 50mb GIF to exist. If you actually have something that is longer than a few seconds you should not use GIF.

      • WhoRoger@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Oh come on, every cpu in the last 15 years has hardware support for multiple simultaneous playbacks of h264 video, and in the last 10 years x265 too.

        1000 gifs on a screen, yea that’s definitely not a page I ever want to see, thanks. Why the hell would I need that?

        And yea sure obviously gif is efficient on bare metal cpu, because it’s a format made for 33 MHz CPU without a floating point. It was also made with a handful specific use cases in mind and specced accordingly, so it has absolutely no place in anything else than animated clipart loops. Don’t even argue, please, this is so silly.

        • Izzy@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          It can be an argument if you want, but it seems more like a discussion to me. I refute the idea that gifs are horrible and obsolete. You even give a use case in your post. If I have a 1 second looping image I’d much rather use a gif than a video format. So I believe they should work on Lemmy. The rest of the internet has no problem supporting this format.

          • WhoRoger@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            I’m not against gif in general as a format, nor for the specific use case I mentioned. (Even tho afaik webp or others can do animations and transparency too.)

            But you know that when people say “gif” they really mean “short video”, and don’t know the difference. And so when they are making a short video and saving it, they see “gif” in export options and choose that, because they think that’s what it is.

            A while ago I was debating with someone who was looking for an optimal way to encode gifs - as actual gif the format - of gameplay videos. Like, several minutes of HD gameplay, and they were using gif for that.

            Similar problem is with PNG which people use for just about anything, like screenshots of Instagram posts.

            If using more modern, better formats means killing old formats but also making the whole internet faster and me needing less storage space or not needing to go through conversion process every time, and maybe even eventually eliminating the ridiculously overcompressed or 100x recompressed or 8-bit dithered crap that are supposedly images and “gifs” these days, then I’m definitely for it.

    • Xusontha@ls.buckodr.inkOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Nah, that makes sense. I’m now trying to use webps instead of gifs, but Lemmy-UI makes some of em randomly crackly (no other UI/app that I’ve found does this), but of course it isn’t consistent and it’s only when using them in posts, not in comments

      • WhoRoger@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        This animation bugs out even when I just view it in plain browser or in jerboa, looks like a compression problem. Is that a converted gif? The artifacting looks consistent with gif compression rather than webp, so probably the software you’re using to convert it is reading it wrong. Try some of the online converters, maybe this https://cloudconvert.com/gif-to-webp (it’s what I use to convert gifs to mp4)

        • Xusontha@ls.buckodr.inkOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Do you mean the image above bugs out? That one is always weird, but that’s because it’s the image my instance keeps generating and putting instead of what I ACTUALLY want and put in the URL field, which is this one:

          label

          It’s something to do with how Lemmy deals with images and putting up a copy of it instead of just showing the original image or something, I’m not smart enough to fully figure it out

          • WhoRoger@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            Weird. Did you try through catbox.moe? That’s what I use to post images. I don’t have experience with animated stuff though, sorry.