
It's time to replace GIFs with AV1 video - singhkays
https://www.singhkays.com/blog/its-time-replace-gifs-with-av1-video/
======
Ezhik
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 test - I need to
be able to just right click and save it.

[0]:
[https://news.ycombinator.com/item?id=14181158](https://news.ycombinator.com/item?id=14181158)

~~~
iainmerrick
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 tools that support them.

~~~
paavoova
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.

~~~
echelon
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 simply as GIF for sharing.

We need something more modern than GIF, but that has playability baked in.
Something that browsers treat as a moving image and not a video.

~~~
paavoova
> 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.

~~~
echelon
Video isn't superior for sharable, loopable images.

Try downloading a video from a popular social network. Can you easily do it
without inspecting the source? If it's a two second clip, does it loop on your
system? Or does the video player exit / end the stream?

This is absolutely a problem that GIF doesn't have.

> You don't need a proprietary player to loop a video

> You can save any video file just like a gif.

Except social networks force you to use a locked down or DRM'd player. You can
get chunks of the video sometimes. Your non-tech friends are out of luck.

> you just go back to the start of the video

"just". Yeah, how many players support that out of the box? Yours might, but
there are many more that do not.

~~~
clouddrover
> _Can you easily do it without inspecting the source?_

Yes, I use Page Info (Tools menu -> Page Info) in Firefox. It lists all the
media assets on the page and you can download the one you want.

The inability to right-click and save a video is less a problem with the video
file itself and more a problem with how the page is structured. You can have
the same right-click problem with GIFs depending on where they appear in the
page structure.

~~~
asutekku
... That’s far from what I would call an acceptable ux.

~~~
clouddrover
So make an add-on which does the same thing with whatever UX you want. It's a
good project for you. I look forward to using it when you're finished.

Alternatively, use one of the media downloading add-ons which already exist.

~~~
asutekku
Mass adoption doesn’t want to use addons or go in to the developer tools.
That’s my point. I know how to do it but even for me it is not intuitive.

~~~
clouddrover
Your point doesn't address the fact that you can have the same right-click
problems with GIFs as with video files. The file type doesn't matter, the page
structure does.

The great mass of people don't care about saving media assets from a page.
There will never be mass adoption of this, no matter how easy it is.

~~~
asutekku
They do though. For example love to share memes to each other and with phone
it’s as simple as pressing the image for a long time. Video formats do need
the same kind of actions to compete with the ease of use of gifs.

~~~
clouddrover
They don't though. You're in a bubble of a minority use case.

Video formats don't need to compete with GIFs. That competition is already
over. GIF files are too big to be practical at scale. Video won the file size
war a long time ago, which is precisely why Twitter "GIFs" are videos.

------
izzydata
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
required is a feature. It may take longer to load, but I can have 100+ GIFs
playing at once with no impact to my CPU.

I don't care about video compression or hardware decoding or whatever until
they function the same way as GIFs do.

~~~
yoavm
> It may take longer to load, but I can have 100+ GIFs playing at once with no
> impact to my CPU.

I don't know what you're talking about really... I was just using Google
Slides today and both Firefox and Chrome went to 250% CPU usage, only because
there was one slide with a 5 seconds full screen recording GIF. I begged to
the person who added it to turn that to a video.

~~~
lotyrin
Yep, browsing pages laden with too many GIFs is my favorite way to have a hot
laptop that sounds like it's getting ready to lift off and get my low battery
warning to pop up.

------
HocusLocus
1995: Compuserve/Unisys is becoming obnoxious!

1996: The GIF KILLER is going to be PNG! (We wait for animation. The PNG
committee fails to deliver, they had a LZ method not covered by patent, they
had the world cheering them on -- and having myself seen some of the listserv
emails back then, some of the committee had asshole reasons thinly disguised
like someone didn't like blinking banner ads.)

2001: The GIF killer is going to be MNG! (Oh now simple animation is too
hardz! We're going to dump a kitchen sink of video features into it! Later!
The rest of us have given up on the PNG committee) The GIF KILLER is going to
be APNG! (Says Mozilla, not too convincingly but they did deliver something)

[embarrassing span of time passes]

2007: (The world gave up on all that. GIF is still alive)

[Interestingly, within this time the only other embed besides GIF that loops
smoothly is Flash, and --- surprise -- it is universally hated by the
Beautiful People]

[embarrassing span of time passes]

2016: With stupid player and JS tricks Geniuses loop video files that stutter
and jump at the loop point and pretend they're GIFs. We have millions of
colors but crappy loop stitches.

2019: GIF is still alive! Who'da thunk it. We have crappy 256 dither barf BUT
perfect loop stitches! Because extending the simple concept to 16 million
colors waaaay back in 1996 was just too advanced for the human race.

Let's have a round of applause for the PNG committee.

/SARC fuelled by some frustrating web development compromises

------
acdha
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](https://caniuse.com/#feat=mpeg4) 97.16%

[https://caniuse.com/#feat=webm](https://caniuse.com/#feat=webm) 86.39%

[https://caniuse.com/#feat=hevc](https://caniuse.com/#feat=hevc) 16.57%

[https://caniuse.com/#feat=av1](https://caniuse.com/#feat=av1) 35%

Note also that this is _any_ support at all, including the slow software
implementations which boost the VP9 and AV1 numbers but have significant
drawbacks if you care about quality, battery life, or the impact on other
things running on the same device.

~~~
nine_k
Do you remember that time [1] when GIFs had a patented algorithm, and
_suddenly_ the the patent holder decided to enforce it more strictly? This is
how GIFs were massively replaced with PNGs, except for the animated. PNG
support sucked at the time, too (see e.g. IE6). By now it's far superior to
GIF in every way.

I think there is a bit of a parallel here. H.264 and WebM may be brilliant
codecs from the engineering POV, but they are somehow encumbered [2]. This
_may_ end up in obvious legal problems; if possible, these should be avoided
early on, by not investing the content in them where we can.

[1]:
[https://en.wikipedia.org/wiki/GIF#Unisys_and_LZW_patent_enfo...](https://en.wikipedia.org/wiki/GIF#Unisys_and_LZW_patent_enforcement)

[2]:
[https://en.wikipedia.org/wiki/WebM#Licensing](https://en.wikipedia.org/wiki/WebM#Licensing)

~~~
masklinn
> PNG support sucked at the time, too (see e.g. IE6). By now it's far superior
> to GIF in every way.

IIRC the stuff which broke in IE6 were features GIFs didn't support at all
(translucence and gamma correction).

For GIF replacement you'd use palettes and binary transparency, and it was
supported just fine since IE4.

------
niftich
AV1 is an open and free format, but if people really wanted to replace GIFs
they could've done it with H.264 or VP9 or VP8.

Notwithstanding any issues about video codec support in browsers, GIFs will
continue to have value until browser-vendors, spec-writers, and webmasters
accidentally or deliberately coalesce around a sane ruleset for embedded
motion picture _completely devoid of audio_.

Today, browser-makers have concerns about which videos to autoplay,
webmasters' tools for specifying "muted" videos have been unreliable. GIFs
completely sidestep that conversation, because GIFs cannot contain audio, and
will always autoplay.

~~~
FreeFull
Perhaps audio-free videos should be allowed in <img> tags

~~~
pavlov
I'd support that (as if anyone's asking me...) on three conditions:

1) Maximum duration of, say, 10 s (with mandatory looping)

2) Maximum display size of, say, 25% viewport area

3) Browsers must enforce "Click to stop" on these "video-img" elements even if
there are other DOM elements on top.

~~~
TheCoreh
If none of these conditions apply to gifs, why should they apply to videos in
img tags?

~~~
jodrellblank
Because we can't change the past, but we can improve the future.

------
codetrotter
> It is 2019 and we need to make a decision about GIFs

I thought "everyone" already agreed on this. Video files are smaller and if
you choose the right set of codecs for which clients have hardware
acceleration then playback consumes less energy, meaning your visitors don't
drain the batteries of their devices as fast.

> replacing GIFs with video has now been common for a few years

Indeed. Which kind of leaves me wondering why author seems to be introducing
their article as though it wasn't.

Of course, the article _does_ go on to argue for a specific codec. Still, to
me it seems to talk in a way as if not using GIF is "controversial".

------
errantspark
You can pry my GIFs from my cold dead hands.

Aesthetically speaking GIFs have a character that you gotta jump through a lot
of hoops to approximate with another format.

In addition to that they function everywhere, always autoplay, can't have
annoying audio, and support transparency, these are all important features
that nothing else on the 'market' can match.

I'm aware that there is lossless animated WebP with transparency, and I can
encode a low-color animation into one of those for something functionally
identical to a GIF, excepting the fact that it won't be supported anywhere
except a recent Chrome.

~~~
bscphil
If you want a "degraded" aesthetic, nothing is stopping you from encoding a
gif, then encoding the gif to a video format. The last stage should be roughly
lossless, and the video will still use way less space than the corresponding
gif.

------
jjordan
What ever happened to the APNG format? I remember dabbling with it years ago
but seems to have never caught on.

[https://en.wikipedia.org/wiki/APNG](https://en.wikipedia.org/wiki/APNG)

~~~
Dylan16807
It's fine, but it's lossless so it's not good for most video use cases.

~~~
pjc50
So is animated gif, though.

~~~
Dylan16807
What I'm saying is, in uses akin to this article, apng is not a meaningful
upgrade over gif.

It's a huge upgrade for certain kinds of content, especially animated icons
with aliased edges. But that narrowness means there's only a moderately small
push toward adoption.

~~~
iainmerrick
In principle it has the same advantages PNG has over GIF for static images --
24-bit color and 8-bit alpha, both of which are a big deal.

APNG or something similar _should_ have replaced GIF completely, but the
delivery was badly fumbled. Browsers now mostly support it, but authoring
tools mostly don’t.

~~~
Dylan16807
More color depth is sort of useful for heavily compressed video. Transparency
very rarely matters in that use case.

~~~
iainmerrick
“Sort of useful”?? 8-bit versus 24-bit color is like night and day!

Transparency for video is kind of a niche thing, sure, but when you need it
you really need it. A good example would be compositing green-screen footage.
(Keying transparency on a specific color is exactly the kind of hack GIF uses,
whereas PNG does it properly, with a separate alpha channel.)

Omitting obvious stuff like an alpha channel because you don’t think anyone
needs it is exactly the kind of oversight that makes all these “modern” video
formats unable to completely replace GIFs. Looping is another example.

~~~
Dylan16807
For a super compressed video there's really not that much difference. And
that's almost all videos as gifs. You don't want it to be 100MB.

And I didn't say transparency isn't needed by "anyone". I said it's very rare
for video-ish content.

Apng is better than gif. But its advantages really shine in realms _other
than_ video content. They're both pretty bad at video content, even despite
looping properly.

------
qwerty456127
Hell no, it's not. None of my devices can play HEVC videos filmed with a
recent iPhone without severe performance glitches. I fear to imagine how hard
it is going to be to play AV1.

MP4 AVC feels like a great replacement for animated GIFs and almost every
device in use today plays it nicely yet, sadly, most of the websites that
would allow inserting a GIF in a post won't allow an MP4 file instead. For
some sites you even have to convert an MP4 to GIF before uploading it just to
see it converted back to MP4 on their side for serving.

Perhaps it could be handy if img tags would just be extended to accept video
files (of all the video formats the browser supports) below certain size. Or
we should better (perhaps) just forget such a category as an "animated
picture" and switch to treating them like regular videos, introducing a
separate button to insert such alongside to the "insert picture" button.

~~~
indolering
AV1 has enough support from enough vendors that it has a very high chance of
replacing H.264 as _the_ ubiquitous video codec. The headline is a bit click-
baity, but proposing new web standard "now" means it would be available
everywhere in ~5 years.

------
ChrisGranger
AV1 is not enabled by default in Firefox 66 on Linux. You have to flip a
switch in about:config to get it to work.

    
    
        media.av1.enabled
    

For what it's worth, AV1 videos play really slowly on my machine. There's
probably a reason AV1 is not enabled by default yet.

~~~
bscphil
As far as I know, dav1d can be enabled even on 66:

    
    
        media.av1.use-dav1d = true

------
the8472
This is fine for real world videos crammed into gifs. But please think of
animated pixel art, which is antithetical to many the assumptions that DCT-
block based codecs make. Doubly so when you consider that most encoders
default to 4:2:0 and ignore transparency.

APNG or similar image formats are better for this purpose

~~~
bscphil
>Doubly so when you consider that most encoders default to 4:2:0

I agree, but I want to add that this has another side effect you don't
mention: it makes high quality images impossible. In 2019, it would nice to
have something better than cjpeg -q 98 for near lossless (or completely
lossless images). I've spent many hours tinkering with the new inter frame
based image codecs, and I haven't been able to achieve this because despite
their advertised support for better standards, the decoders seem to have only
implemented 8 bit 4:2:0 subsampled sRGB images.

I guess I'll go on storing my photography in 150 MB TIFF files...

------
silversconfused
The code shows the first three video formats being available and prioritized
before gif, but the sample videos do not include gifs. It'd be nice to see the
quality difference between the format that is being discouraged and the format
being encouraged.

Personally, I love gifs. They work with no fuss.

~~~
PhasmaFelis
Aside from the size issue, GIF only support 256 colors per frame, so photos
and real-life videos almost always have visible dithering artifacts.

It's a terribly shitty format, but remains popular because it has universal
support and so works with no fuss. We need to get the same amount of support
for a better format.

~~~
silversconfused
Unless you're willing to backport that support to 10+ year old browsers, it
will never happen. You need UNIVERSAL support. Edge cases, corner cases, and
plain old "bad ideas" included. This is what the incumbent has going for it.

~~~
cookiecaper
The polyfill principle addresses this. As long as transparent fallbacks exist,
there's no reason new technology can't be rolled out for the benefit of the
significant userbase that can take advantage of it.

Anyone who cares about their data bill should be asking very serious questions
about why we're still stuck with the massively inefficient 32-year-old GIF
format as the only widely supported way to display an inline animation,
especially as many superior alternatives like FLIF, BPG, etc. have been
released over the last several years.

GIFs waste _absolutely ungodly_ quantities of bandwidth. Any semi-modern video
codec is at least an order of magnitude more efficient. Any way you slice it,
the continued dominance of GIF is, at best, an egregious oversight, and it has
a direct dollar impact on anyone with a metered connection (this is your
phone, but increasingly likely to be your home connection too).

As a community, we need to make an alternative to GIF a real priority.

------
nightfly
Calling AV1 something that looks almost exactly like AVI seems like a
mistake...

~~~
mkl
The naming is a bit annoying, but they are completely different kinds of
thing: AVI is a container format (which can contain a variety of different
codecs, e.g. mpeg-4), and AV1 is a codec (which can be put in a variety of
different container formats, e.g. mp4). We don't seem to get confused between
mpeg-4 and mp4, which have the same kind of similarity.

------
simlevesque
The article claims that AV1 works since FF 65 but the examples do not work on
FF 66.

~~~
dwheeler
Confirm, doesn't work for me on FF on Windows.

And this is a challenge for a "new" format: if AV1 works on 90% of systems,
and GIF works on 100%, then in many cases GIF is the clearly correct solution.
Why would I throw away 10% of my money? Why would I ignore 10% of my
customers? In many businesses, just a few customer calls because of this could
seriously hurt profitability.

~~~
sp332
The article shows how to make a fallback that serves GIF in cases where AV1 is
not supported. That saves you 90% of your bandwidth for 90% of your image
loads.

------
xvilka
You can blame both Google and Mozilla for ruining the chance to replace GIFs
with APNG and WebP respectively. People were waiting the support of those for
years in Chrome/Firefox, but their stubbornness already forced some image
hosting sites to use video formats like WebM. At this point I am not sure WebP
or APNG would become popular. But using proper image format for animation is a
better solution , I think.

------
floatingatoll
The test results in this blog do not function correctly on iOS latest, so
while I endorse this as a general future goal, make sure you have a proper
fallback solution in place if iPhone users are relevant to you.

~~~
singhkays
Normally, you can specify GIF as a fallback as seen in this article
[https://www.singhkays.com/blog/detect-rolling-credits-
video-...](https://www.singhkays.com/blog/detect-rolling-credits-video-
indexer/)

Even though the first preference is AV1, the 2nd, 3rd & 4th preferences are
VP9, H264 and GIF which should play

------
_Gyan_
Just a parenthetical note:

The article, in its ffmpeg encoding guide says,

    
    
      -f - Only used in the first pass. Specifies the format of the output file in the second pass i.e. MP4 in this case
    

This is not required to be the same as the intended output format. Using `-f
null -` will work just as well, as long as the encoder is epxressly set, which
it is, in the commands shown.

~~~
singhkays
Thank you for the explanation. I'll update the article.

------
Flavius
For whatever reason my browser is crashing when trying to read this article,
so I guess I'll keep my GIFs.

~~~
singhkays
I've noticed Firefox crashes more often than Chromium based browsers. Most
likely a point in time thing as Firefox updates to the latest version of dav1d
decoder

------
CameronBanga
The VP9 and AV1 aren't loading in my browser, (latest Safari on Mojave
10.14.4).

I understand pushing for progress, but with this table, I'm not sure "it's
time" just yet.

[https://caniuse.com/#feat=av1](https://caniuse.com/#feat=av1)

~~~
jraph
Maybe this would incentive Apple into supporting these formats. For vp9, it
seems to me there isn't any good excuse for not supporting it.

~~~
acdha
> For vp9, it seems to me there isn't any good excuse for not supporting it.

Exporting video formats is expensive: there's a lot of optimization work to
have a high-quality battery-friendly implementation, decode hardware has to be
licensed & updated, and they have to do security hardening and support every
time they add a new format. If they're already working on AV1, why double the
cost to add support for an older format which is almost never used as the only
option?

~~~
jraph
It’s not like Apple can’t bear this cost. VP9 has existed since 2012, Android
has supported the format since version 4.4 released in 2013. AV1 was then
unheard of. Surely they weren’t working on it then.

VP9 is still interesting today since there are many devices out there that
decode it and will never decode AV1 with hardware.

I think the reason is not technical. Apple has patents for MPEG formats, I
think they wanted to push these formats instead. By not supporting VP8/VP9,
they force(d) everyone to support their formats.

Now, if I want to make a video call with someone with an Apple device, I'll
probably need, if I live in a place where software patents apply, to pay a
license to decode/encode an MPEG format where the royalty-free VP9 would have
done the job. Worse, I probably indirectly pay these fees (anyway) when I buy
devices with support for MPEG formats, even if I live at some place were
software patents don't apply.

~~~
acdha
> It’s not like Apple can’t bear this cost. VP9 has existed since 2012,
> Android has supported the format since version 4.4 released in 2013. AV1 was
> then unheard of. Surely they weren’t working on it then.

4.4 shipped with software support, which meant that it was slow and chewed
battery like it was going out of style. You had to wait until around 2015-2016
for hardware decoding support and around 2017 for encoding support before it
became competitive.

Even then, however, there's a bigger problem: what really matters is the
amount of unique video recorded in VP9, which even Google doesn't seem to do.
Apple's users almost never run into the situation where they miss out on
something because their device doesn't support VP9. Since the entire industry
is moving to the newer AV1 format, the question is whether it's worth taking
on the long-term security & support commitment of supporting an old-new format
or simply putting those resources into something which will actually replace
H.264 as a universally-supported format.

> By not supporting VP8/VP9, they force(d) everyone to support their formats.

This is trying too hard to construct a conspiracy theory: VP8 had no
advantages over H.264 and arrived years later. VP9 had no significant
advantages over H.265 and arrived years later. The only significant source of
original content in either one is WebRTC chat, which is a pretty limited hook
to justify a major {development,support,security,patent risk} commitment.

------
xmichael999
Well let's get one thing straight, VP9 does not achieve 50% more compression
compared to H.264... Second the demo videos were cherry picked to support
their argument - using full motion panning...

~~~
clouddrover
Netflix disagrees with you:

[https://medium.com/netflix-techblog/optimized-shot-based-
enc...](https://medium.com/netflix-techblog/optimized-shot-based-encodes-now-
streaming-4b9464204830)

------
MagicPropmaker
One great thing about GIFs is that they are always silent!

~~~
follower
What if I told you that is now (publicly) no longer true:
[https://news.ycombinator.com/item?id=19935900](https://news.ycombinator.com/item?id=19935900)?
:)

------
njsubedi
As an app developer, whenever I need something animated, I use the baseline
MP4 format. My main motivation was that animated GIFs were not supported by
Android without third party libraries.

I've had 10-15 seconds of videos (640x480) at 10 fps well under 200 KB. I also
compared JPEG with MP4 and decided to use MP4 video (1 frame) instead of JPEG
to keep myself from re-implementing a UI again for an image.

------
ezoe
Wake me up when the AVI encoder's performance can be measured by Frames Per
Second. Currently, it should better be counted by Frames Per Day. Decoder is
also slow. We need a high end desktop computer for real-time decoding of AV1
video.

There is no phone/tablet that can afford such performance.

~~~
clouddrover
> _Wake me up when the AVI encoder 's performance can be measured by Frames
> Per Second._

Okay, I will. Hrm. Intel's AV1 encoder is getting 24 frames per second:

[https://www.phoronix.com/scan.php?page=news_item&px=SVT-
AV1-...](https://www.phoronix.com/scan.php?page=news_item&px=SVT-AV1-Ending-
April-High)

WAKE UP!

> _There is no phone /tablet that can afford such performance._

Isn't there? I wonder how well the top end iPhones are decoding AV1:

[https://code.videolan.org/videolan/dav1d/issues/15](https://code.videolan.org/videolan/dav1d/issues/15)

Decoding at over 100 frames per second multithreaded two weeks ago. Not bad.

------
syphilis2
My browser (FF66 Win10) lags and hangs when browsing this site. Also, the AV1
videos have frozen and I can't get them to play again without refreshing. I
can recreate both of these bugs by simply changing tabs. Despite that, I'm
ready to switch to video too.

------
travofoz
I think it really comes down to use case.

If your intent is to display content that is originally video, then you should
use the best and most supported video format.

If your intent is to display some effect through animation, a gif isnt a bad
thing.

For example, the ajax loader that we are all familiar with? The size
difference is minor. The gif is 16k, an mp4 is 11k. HOWEVER, with the video I
have worry about the browser playing it, looping it, and does it handle
transparency? (i dunno)

If I wanted one of those full page & full motion backgrounds, it would
definitely be a video. The first time I saw a page like that load, load really
fast, and be high quality video, I was amazed (leave aside aesthetics)

------
davidcollantes
It seems VP9 and AV1 do not play on macOS Safari.

~~~
ihuman
Safari recently added VP8 support for WebRTC, so hopefully they also support
VP9 in the future.

[https://webkit.org/blog/8672/on-the-road-to-
webrtc-1-0-inclu...](https://webkit.org/blog/8672/on-the-road-to-
webrtc-1-0-including-vp8/)

~~~
tpush
That's for WebRTC only, though.

~~~
ihuman
Yes, that's what I said, and why I hope they will expand VP* support in the
future.

------
davidhyde
This is the one time I am very happy that standards have failed to
materialise. Leave me to read in peace with distraction free web pages thank
you very much. If I want to see an animation I’m fine with touch or a click
for activation.

------
cm2187
None of his AV1 samples display on my ipad. It kinds of kill the idea in my
opinion.

------
darkpuma
Okay, I'm on board. But what container am I meant to be using for my AV1
content? I see the value of a limited subset of mkv, e.g. webm, but webm is
_too_ limited in my opinion. It has no facilities for soft subtitles for
instance. How is that an acceptable state of affairs? That's an accessibility
issue.

And yes, I know websites can send subtitles separately then render the
subtitles over the <video> element, but that's no excuse for an ostensibly
modern media container to not support subtitle tracks.

~~~
singhkays
In the article, I embed AV1 in MP4 container. Does that not work for your
scenario?

~~~
darkpuma
That works, but at the same time I'd like to see webm amended to include
optional subtitle tracks.

------
libraryatnight
The limitations of GIFs are part of what makes them great. The constraints
sort of lend themselves to forcing a little extra creativity. Finding that
perfect loop, finding that great moment that so perfectly works out of
context, spoofing text that fits the scene/mood to repurpose those frames for
a niche community - it's just fun to make and share GIFs. The problem with
video is its a video.

------
felixfbecker
Can I easily record a screencast as a video and paste it into a GitHub issue?
If not, it’s useless for my use case and I need to stick with gifs

------
booleandilemma
I predict that users will go on calling AV1 video (or any other formats we use
in the future) “gif”s anyway.

The word “gif” will come to mean “animated image”.

~~~
iainmerrick
I thought that had happened already!

------
leshokunin
I'd love to AV1 to become the standard, but as far as I've seen, it's just not
implemented anywhere, and the spec wasn't 100% final. I was messing with
ffmpeg a couple months ago, and it didn't look like a straightforward option
to convert either. I'd say it's not quite time we replace GIFs with it.

~~~
BlackLotus89
It's implemented nearly everywhere (firefox, ffmpeg, edge, chrome, opera,
vlc,...) and the spec is 100% final. Problem is that (and now the everywhere
gets weak) android didn't implement it yet (afaik) and some packaged versions
of the software haven't got it enabled or are just out of date.

What we can get from the article thought is: why isn't gif replaced by
webm/vp9 yet? Can be encoded in no time and is actually supported everywhere.

~~~
zsiec
> why isn't gif replaced by webm/vp9 yet?

Apple has significant market penetration, and you can't get VP9 to easily work
in safari/iOS/tvOS

~~~
paavoova
But why is this tolerated, for lack of a better word? There's no barrier to
adding support, a decoder ships with ffmpeg. Youtube has been serving webm/vp9
video for years, so does that mean VP9 Youtube is unavailable on Apple
platforms?

~~~
msbarnett
> Youtube has been serving webm/vp9 video for years, so does that mean VP9
> Youtube is unavailable on Apple platforms?

Youtube serves h.264 to Apple platforms.

~~~
paavoova
Well not if users force VP9 using something like youtube-dl and pipe to a
compatible player. But I looked it up and the reason Apple refuses to adopt
VP9 is not so arbitrary but rather because they're part of MPEG LA, with HEVC
being the competitor to VP9. It's unfortunate that there's so much
fragmentation with standards simply because of corporate interests.

~~~
iainmerrick
It is unfortunate but it’s been happening forever.

And yet, things continue to work and continue to progress for the most part,
so format wars aren’t necessarily as big a problem as we like to think.

------
usermac
While investigating if I could actually use this—animated PNG, I found this
website and it convinced me it is the new direction I should take:
[http://littlesvr.ca/apng/gif_apng_webp.html](http://littlesvr.ca/apng/gif_apng_webp.html)

------
Andrex
Animated PNG seems to be the least-bad option that covers every key GIF
feature, and most importantly will be supported by every major browser once
Edge-Chromium ships:
[https://www.caniuse.com/#feat=apng](https://www.caniuse.com/#feat=apng)

------
xster
Nobody mentioned so I'll add: the one thing holding me back is the current
ability to insert autoplaying gifs into GitHub's markdown.

No <video> type formats are supported and being able to add an animated gif
showing what you're creating a pull request for is immensely useful.

------
natch
Sounds good but my browser (Safari on iOS) shows just white space for the VP9
and AV1 example videos.

------
imdsm
In order to truly have a shot at replacing gifs, it has to be as frictionless
to use as gifs are. That means being able to refer to it with a single, simply
tag.

<video src="example.av1">

and, in addition, for as many people as possible to support opening of av1s as
they do with gifs.

------
parentheses
I don't think it can be killed unless (unordered)

\- looping is solved and convenient to configure

\- it can be cross media barriers (copied into a text, copied into an e-mail,
etc.)

\- it pleases the bandwidth gods (are gifs usually smaller? i know that they
have a limited color palette)

~~~
singhkays
Your problems 1 & 3 are solved in the article. I compare the size of the GIF
to the videos. In one of the scenes it's ~11 MB for GIF and < 500 KB for AV1
video

~~~
parentheses
My bad. I should have read more of the article before "contributing".

That being said, #2 is critical. I often open Safari to get gifs to copy to
iMessage because Chrome and Firefox don't properly copy gifs.

AV1 may be a way to make that more "standard" (big hand wave) but adoption is
conditional upon this type of common man friendly portability.

------
EliRivers
_GIFs take up a massive amount of space (often multiple megabytes!) and if
you’re a web developer, then that’s completely against your ethos!_

Judging by most websites I comes across, this must be referring to some other
universe.

~~~
silversconfused
They usually just blame marketing and wash their hands of the finished
product.

------
sexyflanders
Fine, but do it transparently so the file is named .gif and it behaves the
same as a gif only better optimized.

I hate opening “gifs” that are actually videos and, for example, interrupt my
currently playing music to playback silence.

------
debt
"The AV1 recipe..."

 _fifteen ffmpeg commands_

Yeah I don't think AV1 is the answer.

~~~
singhkays
That's why it's a recipe and not a command ;) Also it can be easily scripted
out, where the only input needs to be a source video

------
Jnr
But can I put those videos in PowerPoint presentations?

------
therealmarv
Waiting for end 2020 Macbooks which can decode (and encode?) AV1 on CPU
hardware hopefully (and hopefully also solved the keyboard mac problems).

------
vkaku
In my unpopular opinion, the first steps that we need to bring AV1 to the web
is to stop using HLS and start using DASH

------
dana321
I kind of thought it was pointless until i saw the file size difference. From
11.7 Meg to 330k is pretty good.

------
tomc1985
These "It's year 20XX, throw out this outdated tech!" arguments get so very
old after a while

------
self_awareness
Well, the videos on this page are empty areas on my browser. But I can see
GIFs just fine.

------
gok
Er, it has only ~35% global support today. I'd hold off.

------
telesilla
Anyone know what the movies are in the sample GIFS?

~~~
singhkays
Tears of Steel [https://mango.blender.org/](https://mango.blender.org/)

------
miguelmota
TLDR; article suggests to replace a gif img tag with

    
    
      <video style="display:block; margin: 0 auto;" autoplay loop muted playsinline poster="RollingCredits.jpg">
        <source src="media/RollingCredits.av1.mp4" type="video/mp4">
        <source src="media/RollingCredits.vp9.webm" type="video/webm">
        <source src="media/RollingCredits.x264.mp4" type="video/mp4">
        <img src="media/RollingCredits.gif">
      </video>

------
samirm
As long as AV1 works without js, sure.

~~~
singhkays
It sure does

------
aidenn0
Why no h265? I suspect it's similar to VP9 in quality, but h264 is pretty old
at this point (nowhere near as old as GIFs of course).

~~~
degenerate
I believe the big issue with h265 was the huge licensing cost to bundle the
decoder in the browser.

~~~
singhkays
Correct and also lackluster browser support
[https://caniuse.com/#feat=hevc](https://caniuse.com/#feat=hevc)

I've added a note to the article

------
thanatropism
Worse is better.

------
compiler-guy
The "We need a gif replacement" discussion isn't quite in xkcd 927 territory
yet, but its very close.

And that is what is working against something completely replacing it.

[https://xkcd.com/927/](https://xkcd.com/927/)

------
antirez
GIFs are still here because people make art with it, in some form. This is how
we got still GIFs around, not because we needed to transfer videos. The idea
of replacing everything based on technical superiority is extremely
shortsighted. We need more humanists in computing.

~~~
tdb7893
You can make the same art with other formats. I'm not sure exactly what your
point is here.

~~~
antirez
1\. One of the reasons a kinda secondary feature of GIFs (animations) became
so popular is because it's so easy to generate them. 2. A big feature is that
they are not lossy compressed so you can do animations of all the kinds. 3.
They allow to set very slow FPS settings in a trivial way.

Animated GIFs are not really a video format, they are just a set of non-lossy
compressed images shown at a timer interval. Such small details are hugely
important when some media is used in a creative way.

~~~
vortico
If you have an application where you need lossless and optionally low FPS,
then GIF is fine (and APNG and webp for smaller filesizes but less
compatibility). But the average GIF in the wild these days is a reencoding
from a video that doesn't match this description, which is what should be
changed to h264, vp8, vp9, or AV1.

~~~
silversconfused
Maybe the movement could and should clarify their goals for world domination
do not include dancing baby gifs?

