Live data from Hacker News

Serve Videos Instead of GIFs

dannyguo.com

41–50 of 242 posts

Re: Serve Videos Instead of GIFs

#41
post #30
post #23

Earlier quoted context omitted.

I believe webp images are generally smaller in size.

webp comes in lossy and lossless flavor. unless you want to degrade the gifs you would have to pick lossless and in that case it's not a clear win over apng even if we ignore the compatibility question.

A lossy 24-bit color webp image (which is encoded with VP8's intra-frame compression) is likely to look better than a 8-bit color palette lossless gif.

Re: Serve Videos Instead of GIFs

#43
post #10

Earlier quoted context omitted.

Why is JPEG the de facto lossy compression format for photos? It always bugs me that video formats get something new every 5 or so years yet photos are in JPEGs for decades.

Because by and large it’s good enough outside of special cases. Video formats get something new pretty much by necessity as resolution and quality increases mean older formats strain links. Serving a 100k heif instead of a 500k jpeg is not going to materially change much.

Also, just about every JPEG image out there is pretty unoptimised, tools like ImageOptim and others can squeeze out more space without any visible quality loss. But few people bother to optimise their images, precisely because the default is small enough.

Re: Serve Videos Instead of GIFs

#44
post #26

Serving videos instead of GIFs is easy to do now with the HTML video element, which is supported almost universally I respectfully disagree. Loading videos instead of GIFs is easy to do now. Serving videos is a nightmarish mess of trying to match divergent, incompatible, sometimes patent-encumbered "standards" against an ever-changing range of browser support taking into account the hardware capabilities of a vast ra…

VP8 in a WebM container is pretty much the lowest bar for most browser support, and comes with no licensing requirements. I'm not disagreeing with the comment about "nightmarish mess". It indeed is one, specially when it comes user-uploaded content.

VP8 in a WebM container is pretty much the lowest bar for most browser support, and comes with no licensing requirements.

Unfortunately, even that isn't supported for general video use on Apple devices. It was also never properly supported on IE and support was only recently added to Edge.

And that's for a standard that is over a decade old, which is now two codec generations behind the state of the art. Of course it still works to the extent that it's supported by the browsers, but it is quite poor in terms of efficiency and quality compared to the progress made with the later generations.

If everyone could just hurry along with hardware and browser support for encoding and decoding AV1, that would be great. However, until I don't need to hire a server farm just to encode a cute little animation in all of the different formats I might need for different visitors, I suspect we'll see animated GIFs sticking around.

Re: Serve Videos Instead of GIFs

#45
post #32

The article compares a single img tag with a single gif src url to a video tag with 2 child nodes linking to 2 separate files encoded with 2 different ways, as mp4 and webm. That’s already more than 2x as much work to post an animated image, not to mention limited support for transparency and needing to pay some extra attention for seamless looping. Video on the web needs to mature quite a bit more.

tsk tsk. it's not like someone is going to need to write all of that HTML. some user will be doing this with twitter/IM/FB/etc where some dev will have implemented a node library that will have some method call to do this for you. it's not like anybody cares what the automated HTML in the background looks like.

Re: Serve Videos Instead of GIFs

#46
post #5

Isn't this exactly what animated WebP [1] is supposed to address? [1]: https://en.wikipedia.org/wiki/WebP#Animation

Why do we need another standard?

webm webp doesn't work everywhere (or very many places at all), you can't copy paste files around, it's mostly just (some) browser based.

Re: Serve Videos Instead of GIFs

#47
post #10

Serve videos as videos. Photo data compresses better with Jpeg. But gifs are still a better option for animated illustrated graphics.

Why is JPEG the de facto lossy compression format for photos? It always bugs me that video formats get something new every 5 or so years yet photos are in JPEGs for decades.

JPEG encoders got better over time.

Re: Serve Videos Instead of GIFs

#48
In addition to what @junaru mentioned [0], about copying pasting GIFs, I would also add that I can send GIFs easy in emails and be assured it will be rendered in the email for the recipient. Unlike videos, people don't have to click multiple times to see them.

I've found this very convenient in sending small clips of screen recordings using ScreenToGif [1].

Of course, what would be really nice is if one could play / pause the GIF!

[0]: https://news.ycombinator.com/item?id=23207292 [1]: https://www.screentogif.com/

Re: Serve Videos Instead of GIFs

#50
post #7

Serve videos as videos. Photo data compresses better with Jpeg. But gifs are still a better option for animated illustrated graphics.

Proper tool for the proper job. You don't shovel snow with a hammer. That doesn't mean a hammer is not useful when engaging in carpentry. (Just to close the loop, you can use a shovel to do carpentry, but a hammer would be much better.)

It would look very funny if you would shovel snow with a hammer ;)
Post reply on HN