This is not true:<p>"A GIF is literally a sequence of independent images squeezed into the same file. An mp4 video can take advantage of all kinds of fancy compression techniques like keyframes and forward-predictive frames."<p>That's not why the mp4 is smaller. A GIF is not [just] independent images, you can have each frame reuse pixels from previous frames.<p>The mp4 is smaller because lossy jpeg compression is used on each frame, while the gif stores each frames losslessly.<p>This has implications from the predictive frames as well - the jpeg is lossy, so two almost similar parts of the images can be considered "the same", while the gif is not, so they must be identical in order to compress that way, and the realities of video noise makes that unlikely.
Correct me if I'm wrong, but wasn't the whole reason gifs started proliferating on the net because people wanted to share short video loops, but didn't want to embed flash or video which may not load or play correctly in a user's browser? And now we are championing the conversion of those gifs back into video? Seems like a strange round-about way of doing things.<p>I forsee a future where all video clips on the net have been converted back and forth between gif and video so often that they all slowly merge into a single amorphous blob of greyish-brown pixels. Actually, now that I think about it, that would almost certainly be an improvement over the current situation.
This article makes it sound like Twitter invented a whole new optimization, when they really just recycled a concept already in use by gfycat (<a href="http://www.gfycat.com/" rel="nofollow">http://www.gfycat.com/</a>) and MediaCrush (<a href="https://mediacru.sh/" rel="nofollow">https://mediacru.sh/</a>).
I'm curious if anyone is noticed the flickering Loading icon when the .mp4 version loops? It only shows up for 50 ms, but seems kind of annoying. Or maybe it's just my machine?<p>Here's a cap:
<a href="http://imgur.com/2R84ImD" rel="nofollow">http://imgur.com/2R84ImD</a>
This is on a fully-patched RHEL6 workstation:<p><a href="http://i.imgur.com/NleqJTD.png" rel="nofollow">http://i.imgur.com/NleqJTD.png</a><p>Another example of "use bleeding-edge tech or go fuck yourself" from the modern web.
I made a site that drove this innovation, MediaCrush. It's open source.<p><a href="https://github.com/MediaCrush/MediaCrush" rel="nofollow">https://github.com/MediaCrush/MediaCrush</a><p>if you want to try to do this yourself, our code is a good reference.<p><a href="https://mediacru.sh" rel="nofollow">https://mediacru.sh</a>
"Videos allow Twitter to leverage the browser. This means play, pause, and seek, but also cool things like slow-motion. Think your GIF is funny now? Wait til you see it in slow motion."<p>Gifs have built in slow motion, it's called waiting for the 10mb file to download frame by frame upon initial play-through.
Unfortunately the MP4 looks worse than the GIF, due to chroma compression in the YUV 420 colorspace. While each pixels luminance value is kept, the color information for a 4-pixel square is stored as a single CrCb pair, which is really obvious when you look at how the orange hat has artifacts against the blue background. Increasing the bitrate won't solve this either, since it's a limitation of the colorspace.
We've been doing that at my company on our mobile applications for a few years now. There is no reason to be shoving 5-10mb GIFs down a users throat on a mobile device. Not only does are MP4s smaller (file size), frames per second will be constant on all browsers, unlike GIF (although most browsers are supporting up to 50fps these days). Although outdated, you can read more about that here. <a href="http://nullsleep.tumblr.com/post/16524517190/animated-gif-minimum-frame-delay-browser-compatibility" rel="nofollow">http://nullsleep.tumblr.com/post/16524517190/animated-gif-mi...</a><p>I wrote a simple js lib for detecting the duration of a GIF for each browser. It was a fun weekend project. <a href="https://github.com/rfrench/gify" rel="nofollow">https://github.com/rfrench/gify</a><p>If webp gains more adoption, it's another alternative now that it supports animation.
Much like what <a href="http://gfycat.com/" rel="nofollow">http://gfycat.com/</a> do, then?<p>Interesting also that 4chan recently added looping, muted WebM videos for similar reasons.
Is there a flash blocker solution that removes all traces of the page element rather than leave an ugly placeholder? It's going to be annoying to see this on Twitter from now on.
Another option (for supporting browsers) is to use animated webp: <a href="https://developers.google.com/speed/webp/faq#why_should_i_use_animated_webp" rel="nofollow">https://developers.google.com/speed/webp/faq#why_should_i_us...</a>
GIFs indeed are bad for video (quality, size, no control, no sound, etc.) but in order for that to be really true, the site must allow embedding videos using the video tag (i.e. videos which people upload in proper video formats). Does Twitter allow it?
So. Who was first. 4chan or twitter?<p>How long has twitter been doing this? Just out of curiousity.<p>(Yes I know 4chan doesn't convert but there was some talk that 4chan might be a major player in pushing webm forward. Is it even webm or x264? On mobile. Can't check right now.)
This is what I see on the page: <a href="http://i.imgur.com/wFjEY8t.jpg" rel="nofollow">http://i.imgur.com/wFjEY8t.jpg</a><p>I can understand why twitter is saving money on hosting these new "gifs"
The saddest part is that you can't add a zip to that gif and use twitter as a sharing platform.<p>cat x.zip >> y.gif and upload would have been nice ;)
For me the main lesson here is that I should be more attentive and investigate. I remember noticing some un<i>gif</i>fy vibe about animated clips on Twitter, but quickly dismissing the observation. Perhaps if my timeline contained a lot of GIFs I'd dig deeper, but it doesn't help feeling shallow.