Live data from Hacker News

It's time to replace GIFs with AV1 video

singhkays.com

171–180 of 327 posts

Re: It's time to replace GIFs with AV1 video

#171
post #153

Earlier quoted context omitted.

Yes. Just one problem I discovered recently is that no other format does looping properly. With a GIF, you can right-click and save it, and all the looping info is inside the file. The quality is crappy, but it just works. With all “proper” video formats, looping info is metadata, stored separately. You can’t even go for something slightly more modern, animated PNGs, because there are warring formats and very few too…

wasn't webp supposed to have GIF like animations? As far as i know I have never seen one in the wild, just webm. I think the problem is that GIFs are images and so displayed as such with little concept of play-control. A video format communicate that you might want to pause for example. I believe a GIF-killer will need to be considered an image as a format.

Yes, agreed. That lack of play-control is both a weakness and a strength of GIF. The strength is misunderstood and underrated by those who think videos should replace all usage of GIFs.

Re: It's time to replace GIFs with AV1 video

#172

The most important part of GIFs for me is that they behave like images in browsers. They are always auto-playing with no concept of play and pause. You can drag and drop them from a browser to your desktop to save them. You can save an entire page and have all the image files save with it. I've never had this work for webm or other video formats. You could even argue that GIFs not being a video with no video decoding…

>They are always auto-playing with no concept of play and pause.

Which is why I can't wait for GIFs to die.

Re: It's time to replace GIFs with AV1 video

#173

Earlier quoted context omitted.

Yes. Just one problem I discovered recently is that no other format does looping properly. With a GIF, you can right-click and save it, and all the looping info is inside the file. The quality is crappy, but it just works. With all “proper” video formats, looping info is metadata, stored separately. You can’t even go for something slightly more modern, animated PNGs, because there are warring formats and very few too…

Looping is up to the video player, not the format or container. What "video formats" have looping as metadata? Gifs only have a loop flag so static images can be displayed instead of looped indefinitely as video.

Here’s another completely different use case (I came across this while googling unsuccessfully for a way to make videos loop):

You’re setting up a booth at a convention. You want to have a video playing on a TV. It should play forever in a loop.

Apparently, with any normal “smart” TV, that’s very hard to do! You can put a video file on an SD card or something, but you probably can’t persuade the built-in video player to loop it (edit: seamlessly, anyway). You can’t just set a loop flag on the file like you can with a GIF, because proper video formats don’t have any such flag.

I guess you could set up a web page with a looping video on it? That’s more of a hassle than just putting a file on an SD card, and less reliable if the net connection is spotty.

There are companies that will literally sell you a hardware dongle just to loop videos. It’s ludicrous.

Re: It's time to replace GIFs with AV1 video

#174

Earlier quoted context omitted.

I understand that they can be made to autoplay with no controls, but I don't even want the possibility of them being paused. This way the format has no choice but to behave as expected across everything.

I don't see why we can't use the IMG tag for video and the VIDEO tag for images. They should be unified, with all the same media formats supported. IMG would autoplay, would not have sound, would loop, and would not have controls. VIDEO would be the opposite. For something like a plain JPG or PNG file, it just shows the one frame. Animated GIF files would of course benefit from the controls. The same should go for un…

> IMG would autoplay, would not have sound, would loop, and would not have controls.

Why do you hate my phone battery so much?

Re: It's time to replace GIFs with AV1 video

#175

Earlier quoted context omitted.

Looping is up to the video player, not the format or container. What "video formats" have looping as metadata? Gifs only have a loop flag so static images can be displayed instead of looped indefinitely as video.

GIF lets you control the loop count and playback speed. It's baked in when authored and is useful. You can simply save the file and expect it to work everywhere - dead simple. The Internet has voted in favor of looping, "GIF-like" moving images. Platforms try to emulate this with proprietary video players. Some have sound (wanted or not), some of the video players prohibit copying, and none of the files work as simpl…

> You can simply save the file and expect it to work everywhere

I don't quite follow. This is because the gif is decoded and played. No different than a video. You don't need a proprietary player to loop a video, you just go back to the start of the video. For streaming, this is only problematic for large videos that can't be cached, but the same applies to large gifs. Browsers can loop video, it's just a right-click setting. HTML5 can loop video, allowing sites to serve video in e.g. a banner, replacing gifs. You can save any video file just like a gif.

> Something that browsers treat as a moving image and not a video.

The entire point of deprecating gifs is because video is superior. Gif as an image format being able to specify frame duration and looping is hardly a noteworthy feature.

Re: It's time to replace GIFs with AV1 video

#176

Earlier quoted context omitted.

> I don't even want the possibility of them being paused That's downright hostile to the end user… https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-pause...

A behavior being unchanged for 30 years is hardly user hostile. It's reliable and trustworthy. Like a good tool should be.

Any application that doesn't allow me to stop something from being annoying, will be stopped from being annoying by being uninstalled.

If browsers made it such that I couldn't not stop .gif animations (or playing video, or...), I would trash that browser.

Bluntly, you do not get to control my computer.

Re: It's time to replace GIFs with AV1 video

#177
post #38

It's telling that the author doesn't list all of the file sizes. The GIFs are gigantic but the AV1 files are LARGER than either the H.264 or VP9 versions in every example. If we wanted to replace GIFs you'd want to go with something closer to a comparable level of support and at this scale there's no reason to use a format with no hardware support and limited client support in general: https://caniuse.com/#feat=mpeg4…

The H264, VP9 and AV1 files are all targeting the same file size. The only reason they aren't the exact same size down to the byte is because ratecontrol is somewhat finicky and no one cares enough about that level of precision to make it work.

Re: It's time to replace GIFs with AV1 video

#178
post #73

Earlier quoted context omitted.

Strong agree. Just as HEIF is a video format adapted to be a still image format, the GIF successor should fit in an img tag and be guaranteed not to have sound. Perhaps it could be a different sort of container with the same compressed bitstreams. There is an AV1 "image" format too, which supports "image sequences" but not, oddly, animation.

GIFs, in pre-AV1 terms, are simply a video with 100% lossless I-frames and autoloop enabled. You can express the “lossless frames” aspect of GIFs today in existing video ways supported by MJPEG, H.264, H.265, or AV1 today. AV1 image sequences are meant for sharing an album of stills, and are not a convenient shortcut for this. Feeding a sequence of frames into `aomenc --lossless=1` should, assuming everything else is…

Would looping not make more sense at a container level, not a codec level?

Re: It's time to replace GIFs with AV1 video

#179
post #126

At this point, killing GIF is a UX problem, not a format problem. I've talked about this before [0], but the big problem for me is that video is just difficult as hell. Compared to a GIF, it is just that much harder to save a video on a phone, and then upload it the same way as an image. Try to save a "GIF" from Twitter or from GIPHY - it's a /huge/ pain. Whatever the GIF killer is will need to pass the right click t…

Right, in my opinion for this to work, we need an AV1 derivative that acts as a GIF: 1. Similar looping behavior 2. No audio 3. Can be put in an tag You should be able to save the file like you would a gif, and viewers should also show it as they would a gif (not a video).

Given the current direction of the industry, the most likely candidate for this in the not-so-distant future is HEIF, which has support for an image-sequence [1].

HEIF is an ISOBMFF (aka Quicktime/MP4 container)-derived container format for images, image sequences, and transformations. Its most visible use right now is Apple Live Photos, but various use-cases exist [2]. OS and application support is increasing.

Work is ongoing on defining AV1-encoded frames as a payload in HEIF [3].

[1] https://nokiatech.github.io/heif/technical.html [2] https://nokiatech.github.io/heif/examples.html [2] https://aomediacodec.github.io/av1-avif/#av1-image-sequence

Re: It's time to replace GIFs with AV1 video

#180
post #126

At this point, killing GIF is a UX problem, not a format problem. I've talked about this before [0], but the big problem for me is that video is just difficult as hell. Compared to a GIF, it is just that much harder to save a video on a phone, and then upload it the same way as an image. Try to save a "GIF" from Twitter or from GIPHY - it's a /huge/ pain. Whatever the GIF killer is will need to pass the right click t…

Yes. Just one problem I discovered recently is that no other format does looping properly. With a GIF, you can right-click and save it, and all the looping info is inside the file. The quality is crappy, but it just works. With all “proper” video formats, looping info is metadata, stored separately. You can’t even go for something slightly more modern, animated PNGs, because there are warring formats and very few too…

Animated PNG support was shipped in Chromium, the last major hold out, two years ago: https://www.chromestatus.com/feature/6691520493125632

This means that once the new Chromium-based Edge ships, all major browsers will have support: https://www.caniuse.com/#feat=apng

Post reply on HN