
The Long, Remarkable History of the GIF - pmcpinto
http://www.popularmechanics.com/technology/a21457/the-gif-is-dead-long-live-the-gif/
======
SquareWheel
It's honestly something I've become quite bitter about. I find the resurgence
of the gif has significantly reduced my enjoyment of browsing websites like
reddit. Even small subs which used to be the place to go for deeper discussion
have largely devolved into image boards targeting the lowest common
denominator.

When it's appropriate I have no problem with a video. But if posting a video
it should really be in its original form. Uploading to Youtube or even just
using a <video> tag lets the viewer decide if they want to listen to audio,
and what resolution to watch in. It's pretty rare that I'd choose to watch in
no sound and at the lowest resolution possible. Not to mention the absurd
amount of data gifs download.

The recent trend of converting videos into gifs _back_ into videos (websites
like gfycat) make even less sense. All you're doing is damaging the quality of
the video. To what end?

Even articles that are posted are now scattered with gifs. Why? I guess
because it's trendy. But it makes it incredibly difficult to focus on the
text. The article above is a good (and likely self-aware) example, but this
one from Atom also stuck out for me.

[http://blog.atom.io/2016/02/03/introducing-block-
decorations...](http://blog.atom.io/2016/02/03/introducing-block-
decorations.html)

Terribly nauseating.

So that's my rant. Frankly I'd welcome a browser extension to block animated
gifs online and hide reddit posts than only link to them.

~~~
derefr
To me, a gif (at its best) is effectively a _quote from_ a video—a short
sample of a film or TV show that can be embedded into an article as an example
to be discussed, serving the same purpose that a blockquote serves.

Ideally, such things should—rather than being copied and cut into shape—be
_transcluded_ , effectively fancy links to an original that include time-
slicing metadata. But making transclusion an easy or default behavior has been
a losing battle for text since the web was created; I don't expect changing
the medium being embedded will change how people think about things.

~~~
joelg
Ted Nelson would be so proud.

The atomicity of the internet - sealed documents at URLs - is really
regrettable. A much more powerful design (although admittedly more
complicated) would have been a "turtles all the way down", IPFS-style approach
where any asset could be transcluded or linked _into_. But I don't think we'll
ever see it.

~~~
cooper12
Mediawiki (the thing behind Wikipedia) actually lets you transclude whole
pages and it's also the way its templates work. It's pretty cool because you
can also have options to not include certain info inside <noinclude> tags and
some templates such as for episode lists even show less information when
transcluding. Oh and you can also transclude specific sections IIRC.

By linked into, are you saying by URL? I notice that archive.is actually adds
its own links to the side like a ruler. I think the status quo of linking only
to headers is okay, but maybe you're envisioning something like linking to
specific words in sentences. That would be great for quoting but the HTML
would probably look/load horribly. Maybe there could be a system that let you
link to offsets so it wouldn't need actual anchors in the source, but those
could break with a simple addition of a word at the beginning. It's an
interesting problem for sure.

------
ianamartin
I'm pretty sure everyone is missing the point here.

GIF isn't about optimization. It isn't about the best technology. It isn't
about anything that we care about as engineers.

It's about what is easy for users to create.

That's it. That's all there is to it.

GIF is easy.

It doesn't matter if it sucks. It doesn't matter if it's not optimal. It's
easy.

~~~
Ezhik
And there's my problem with how people kill GIF. It's never easy.

I right click on a Twitter 'GIF', I can't save it. I go to developer tools,
they did a bunch of JavaScript fuckery just so I couldn't save it. Okay, I
find a third party tool and save it anyway as a .mp4 file. Stupid.

I right click on an Imgur link, it saves a webpage. Okay, replace .gifv with
.webm - oh, it redirects me to gifv. Last time I had to save something from
Imgur, I had to use curl of all things to do it. It's ridiculous.

GIF is simple. You upload the file as an image, something everybody mastered
doing, and it will play, no questions asked. Videos are hard. Everybody wants
to re-encode them in different formats, everybody has to include a fancy
player in an iframe. You have to check for browsers since you can't solely use
mp4 because of patent whatever, and can't solely use webm because Apple hates
Google that much.

GIF, the file format, is bad. 256 colors, file size, etc. But everything
people are trying to replace it with is even worse.

~~~
kalleboo
Your examples are poor.

Twitter is a massive pile of JavaScript garbage - it's just as difficult to
download a still image off it (I have a bookmarklet for the task).

On imgur I can just right-click on an animation and select "Download Video..."
and I get the mp4. Just as simple as images.

~~~
neotek
Could you share the Twitter bookmarklet with us please? It sounds very useful.

~~~
kalleboo
It's very simple:

    
    
       javascript:location.href=$('.media-image')%5B0%5D.src
    

This navigates to the picture currently in the lightbox (so you might have to
click on it in the tweet to zoom it)

------
fsiefken
In the article Battilana is quoted as saying: "Even browsers today don't have
a good alternative to GIF unless you want a very sophisticated and still
patent-covered video like MPEG-2 or MPEG-4."

But we have WebM, works on Chrome, Firefox, Opera and on IE with components
[https://www.webmproject.org/ie/](https://www.webmproject.org/ie/) \- is that
not good enough?

No mention of the Animated extention to PNG, which Firefox, Safari and Opera
do support. Chrome has an add-on for it but I don't know about IE. You wonder
if the image is smaller when it's a silent video or when it's a APNG, probably
it's the same with animated GIF, the movie format is more efficient then the
animated image format.

Perhaps someone can make a proxy plugin that converts all animated gifs on the
fly to webm and all gifs to png. You never have to see these GIFs again,
another SaaS subscription model

~~~
wodenokoto
One of animated gif's strengths are the promise of being silent. When users
see GIF, they have the promise of a bite size animation, that loops and is
silent. It is very hard to teach users a new name for that.

webm doesn't promise to be silent, which is why we are seeing this gifv
container format, which does promise to be silent.

You need out-of-box support by Safari and Chrome to cover enough users.
Preferably IE in the mix. This is why all the big gif sites use both gif and
gifv.

~~~
Springtime
_> When users see GIF, they have the promise of a bite size animation_

This isn't always true. Many, _many_ GIFs I see around now are longer, if not
full length clips and/or at obscenely un-optimized resolutions/sizes. Due to
the ease of video to GIF conversion tools like Imgur, etc users have no reason
not to clip longer and larger potions of videos for GIF conversion.

 _> webm doesn't promise to be silent_

This isn't really such a problem with a change of a browser preference or use
an addon. Part of this is also the responsibility of the site to auto mute if
it offers embedding for that purpose.

At some point though there needs to be more user awareness and push for the
better alternatives all around so the experience doesn't devolve further into
posting 10-100MB GIFs of video clips (I see this on a daily basis) just
because Imgur or GfyCat spat it out and their posting platform only
encourages/supports raw GIFs. There also needs to be more hosts that allow
direct video clip uploads to support this.

Edit: brevity.

~~~
wodenokoto
> Many, many GIFs I see around now are longer, if not full length clips and/or
> at obscenely un-optimized resolutions/sizes

Which is why I wrote that the length promise can be broken.

> This isn't really such a problem with a change of a browser preference or
> use an Haddon.

Yes, it is such a problem. If you promise the user that the clip is silent,
you also promise the user that it can be consumed in silence. Yes you can
click a youtube link while keeping your computer on silence, but guess what,
chances are the video is made for consumption with audio.

> and their posting platform only encourages/supports raw GIFs.

All the gif purveyors support webm. It is typically called gifv, because users
recognise the gif word and believe all the promises I mentioned. But there
isn't an alternative as ubiquitous as animated GIF.

~~~
Springtime
_> Which is why I wrote that the length promise can be broken._

I didn't see this in your comment but was responding to the expectation that
GIFs are 'bite size'. I would honestly love for them to be that but it's
regularly not the case.

 _> Yes, it is such a problem. If you promise the user that the clip is
silent, you also promise the user that it can be consumed in silence. Yes you
can click a youtube link while keeping your computer on silence, but guess
what, chances are the video is made for consumption with audio._

It's still the responsibility of the user/site as video clips have different
purposes. If the purpose of the embedding is a 'clip' rather than video the
site can mute it (or a pseudo-container format like GIFV, like you mentioned).
Some hosts disable audio encoding, others mute them by default (eg: Vine), but
I still don't believe that GIFs being the incredibly poorly optimized, 256
color limited bloated format it is should 'win' merely because videos can have
sound. There needs to be the concept of a generic 'clip' upload/post to
differentiate from a regular video upload, GIFV is one such solution. Users
expect Youtube videos to have audio, they mightn't for a short clip, which is
why it would be great to see sites adapt and continue to be more conscious of
this.

 _> All the gif purveyors support webm. It is typically called gifv, because
users recognise the gif word and believe all the promises I mentioned. But
there isn't an alternative as ubiquitous as animated GIF._

By posting platform I mean every site/app a user will post on that either
encourages or only supports the use of GIFs over video clips. Yes Imgur and
Gfycat will auto encode GIFs to VPx/h.264 however only GfyCat supports direct
video uploads, on Imgur you can't upload a video clip directly. With only GIF
uploads supported by most hosts it fuels the cycle of users, clip creators,
sites (blogs, forums, etc), and even browser compatibility sticking to GIFs as
the primary clip format.

------
Gankro
Great read, but the initial description of the inefficiencies in gif are off.
They touch on it a bit at the end but make it vague so I'll explain it here
(because I love gif because it's a hillarious mess).

Gif is actually a mosaic format. It defines a canvas on which you can render a
series of images. By adding a (per image) delay between images, you can make
an animation. All this data comes as a stream of blocks. Most are images, but
some are extensions. The "NETSCAPE 2.0" extension is what makes gifs loop.

Nothing at all says an image needs to fill the whole canvas, and the format
for rendering a new image specifies what should happen to the existing pixels.
It also can specify a colour to be interpretted as transparent. Gif is also a
palletized format, and you can actually abuse this to get more than 256
colours -- each subimage can have its own palette.

By picking "leave all the pixels there" as the transition format, you can do
non-iframes by overlaying only pixels that have changed. You can also apply
many small deltas "at once" with 0-second delays to optimize this further
(think: only changing the corners of the image). You can then of course
"stick" pixels to a single color of they don't change by much to avoid re-
encoding them.

The end result of all these tricks is a pretty dramatic compression as one
would expect from a "real" video format. It's not _great_ but it's a lot
better than the naive encoding described at the start of the article.

If you find a real gif that's "live action" and decode the individual frames,
you will very likely see all these optimizations in action!

Note however that much of this is underspecified! The only reason your
animated gifs work is because everyone vaguely agrees on an interpretation of
certain things which are honestly quite ambiguous. Firefox's testsuite has a
pile of ambiguous gifs which will render messed up in different image viewer
applications!

Edit: this one is super cool to watch in delta-only mode (don't have that
version on hand anymore): [https://github.com/Gankro/gif-
rs/blob/master/data/cat-jump.g...](https://github.com/Gankro/gif-
rs/blob/master/data/cat-jump.gif)

~~~
aikinai
Do you have a recommendation for an encoder that will make sure to apply all
of these optimizations?

------
xvilka
This is web browsers developers fault: Chrome developers actively resisting
APNG support [1], while Firefox developers actively resisting WebP support for
years [2] and [3].

[1]
[https://bugs.chromium.org/p/chromium/issues/detail?id=1171](https://bugs.chromium.org/p/chromium/issues/detail?id=1171)

[2]
[https://bugzilla.mozilla.org/show_bug.cgi?id=600919](https://bugzilla.mozilla.org/show_bug.cgi?id=600919)

[3]
[https://bugzilla.mozilla.org/show_bug.cgi?id=856375](https://bugzilla.mozilla.org/show_bug.cgi?id=856375)

~~~
maxst
The resistance is all but disappeared. No doubt we'll see APNG is Chrome, and
WebP in Firefox within a year or so.

~~~
xvilka
Yes, but looks like it's too late - WebM and MP4 taking over by now.

------
danso
That was a nice lengthy read. While the GIF format itself is a bit outdated, I
hope the artform of excerpting video/animation into a silent, short-loop never
goes out of style.

Is it impossible to turn back GIF adoption? What if someone makes the
equivalent of Steve Jobs's declaration against Flash? To me, Flash was far
more vital to the very operation of web services. Then again, processing GIFs
doesn't require near the same complexity or security risks as Flash did.

~~~
wodenokoto
I think the gifv container format will mostly kill animated gifs in a few
years. It promises the silent, looped animations, maintains name recognition,
but has good compression.

~~~
lfender6445
the conversation with the imgur ceo was my favorite part of this piece. for
those interested:

> GIFV is not actually a distinct file format, but it is an MP4 or WebM video
> that is presented via a HTML 5 video element or an Adobe Flash element with
> options set so as to make it work similarly to an animated GIF (i.e. endless
> loop with no video controls visible

>
> [http://fileformats.archiveteam.org/wiki/GIFV](http://fileformats.archiveteam.org/wiki/GIFV)

------
garaetjjte
Actually animated PNGs exist:
[https://upload.wikimedia.org/wikipedia/commons/1/14/Animated...](https://upload.wikimedia.org/wikipedia/commons/1/14/Animated_PNG_example_bouncing_beach_ball.png)
(though it maybe works only in firefox, idk)

~~~
feld
APNGs were popular in video slot machines in the late 2000s. I found it
intriguing that it was the technology of choice because it seemed so obscure.

------
runaway
The author is wrong about gifs encoding full frames. Properly encoded gifs
only store the pixels that change in each frame. His own example with the dog
shows this [http://i.imgur.com/wISu3An.png](http://i.imgur.com/wISu3An.png)

------
justinator
[https://news.ycombinator.com/y18.gif](https://news.ycombinator.com/y18.gif)

~~~
ec109685
What is the point of that?

------
hartror
The limitations of a medium drive creativity, and there is an expectation when
publishing a video of a certain quality. Not so with gifs, the format lowers
the bar for people to be creative overcoming many expectations of quality.

------
mxfh
While this article excells on the technical aspects of the GIF format, it
misses out on the significance of the GIF art renaissance of ca 2011 to 2014,
which was most likely initiated by tumblr's arbitrary file size limits.

Here is a primer on that:

[https://news.artnet.com/art-world/a-brief-history-of-
animate...](https://news.artnet.com/art-world/a-brief-history-of-animated-gif-
art-part-three-88928)

~~~
maxst
The article is completely wrong about technical aspects of animated GIFs:

> Unlike GIFs, video files don't actually contain every frame of animation you
> see

> As a GIF, it takes up more than 60 MB because every single frame needs to be
> stored as a complete image.

This is ridiculous. See [http://www.drdobbs.com/optimizing-gif-
animations/184412988](http://www.drdobbs.com/optimizing-gif-
animations/184412988)

------
Waterluvian
Can someone point me to how I show full quality animations on an iOS device?
I've seen some canvas style spritr sheet solutions but those feel bulky for
when I just want a looping animation.

WebM has been awesome for animations on desktop but they don't work properly
on iOS: won't animate inline.

~~~
reaperhulk
As of iOS 10 autoplay and playsinline on a video element will do what you want
as long as the video has no audio track or is muted. No webm of course

~~~
Waterluvian
Ooh good to know. Thank you. :)

------
_fs
I know we are supposed to be commenting on the article, but why is this
headline "* is dead, long live *" so overused[1] on hackernews. It is so
tiring.

[1]
[https://hn.algolia.com/?query=%22is%20dead%20Long%20live%22&...](https://hn.algolia.com/?query=%22is%20dead%20Long%20live%22&sort=byPopularity&prefix=false&page=0&dateRange=all&type=story)

~~~
tomcam
Yep--new title is far superior. Actually made me read the article, whereas the
old one put me off

------
ausjke
It's painful to read the article with fonts/colors/videos came out everywhere.
Is there a better and practical format on the way to replace gif since it's
dead?

I use gif once a while and feel it does its job pretty well.

------
digi_owl
Never liked gifs.

In particular those "joke"/shock gifs that pretend to be a still image.

One of the first things i go looking for in a new browser install is some way
to stop gifs from animating.

------
rangersanger
I had an incredibly hard time concentrating on the article with all the GIF's
(or videos, I suppose) looping on the page. Down with the GIF!

------
ppod
Great article. Gets the tone and level of detail exactly right for talking
about something like this to a wide audience.

------
4684499
I can google image search gifs, but can't google image search webms.

------
kozak
GIF is an excellent example of how constraints facilitate creativity.

------
witty_username
To me, GIF = slow loading animation.

------
EGreg
Animation!

------
cocktailpeanuts
Please somebody provide a TLDR.

The content is too long and the title too click-baity for me to invest time in
reading without what I'm getting myself into.

~~~
ju-st
There's an app for that!
[http://smmry.com/http://www.popularmechanics.com/technology/...](http://smmry.com/http://www.popularmechanics.com/technology/a21457/the-
gif-is-dead-long-live-the-gif/)

~~~
Nadya
Sadly that worked pretty poorly. While Giphy was mentioned it was more of a
tangent - relating to the overall lifetime of the gif format, its pros and
cons.

The article is a lengthy article about the history of the .gif format - the
recent trend of converting it to a video or video-like format - and this being
centered around the ability to _share_ the .gif itself.

This is due to many sites (Twitter, Facebook) making it difficult to save a
.gif to share later. You need to share the Twitter or FB link instead (which
is what they want...). Giphy was mentioned as a way to share .gifs easily, but
it has its own limitations (eg: no pornography).

It was something that was thought of as a "gimmick" but turned out to be
popular. Mostly due to browsers not having good inline video support outside
of Flash. I also, in large, blame tooling and discoverability of that tooling
for easily creating webm, mp4, or other video formated. For example - if I
want to record 8 seconds of a video to turn into a .gif, I can do so easily
with an online tool nowadays! If I want that same 8 seconds as a .webm, I now
need to find a way to download the source file, trim it down to the 8 seconds
I want, save it as an .mp4, then use my .mp4 to .webm converting software to
finally have the .webm I wanted. Most people will opt for the shorter/easier
.gif conversion.

~~~
noisem4ker
There actually are online webm converters, just like there are for gif.

And if you decide to do it yourself, I don't understand why you'd need to go
through an mp4 intermediate. With ffmpeg you can trim and encode your clip to
webm with a single command and a couple switches. Or if you want an easy GUI
tool, there's always WebM for Gits
([https://github.com/nixxquality/WebMConverter](https://github.com/nixxquality/WebMConverter)
)

~~~
Nadya
That's the actual tool I use! Proper link is now found here, by the way:
[https://gitgud.io/nixx/WebMConverter](https://gitgud.io/nixx/WebMConverter)

 _> And if you decide to do it yourself, I don't understand why you'd need to
go through an mp4 intermediate._

Screen recording. Although I use a tool that simply records as a .webm (
[https://github.com/thetarkus/WebMCam](https://github.com/thetarkus/WebMCam) )
Most people aren't going to be installing random Github projects to meet their
needs. I doubt many people even know what Github is outside of the tech niche.
:P So they record with some other desktop recorder that outputs as a .gif or
.mp4/.m4a and then would need to convert from there.

Also Imgur's .gifv wrapper seems to be more widely known than .webm. Which is
unfortunate but is the case due to Imgur's popularity.

