Hacker News new | past | comments | ask | show | jobs | submit login
Serve Videos Instead of GIFs (dannyguo.com)
273 points by todsacerdoti on May 16, 2020 | hide | past | favorite | 230 comments



I already said that before and I'll do it again: it won't work until we make videos act like gifs, which act like images.

The video per se won't loop if I save it in my computer or phone. I can't drag and drop, right click, long tap.

To have anything replacing gif you need THE EXACT SAME BEHAVIOUR, EVERYWHERE.

It doesn't matter for the consumer whose fault it is: encoding, the app, how the file is created. The user uses it, they don't care how it works. They will use whatever have the same behaviour.


I'm glad someone else thinks like this, the other devs on my team get so caught up on the little things in the application we are building and all this little crap the user won't care about if it doesn't work as they expect. I end up being the only person saying "If I was the user, I'd expect this. And if I was doing this, I expect this behavior". Instead, they act as if the user has a PhD in cs, and instead, the user for what we are making likely barely graduated high school.

software should be developed in terms of the user, not the developer. Not every one knows every windows/linux command and debugging to fix problems.


While I agree with this pro-user sentiment, you best believe I will be there in 5 years to complain about all the unbelievable choices made by software developers for the sake of pleasing the lowest common denominator users who just gets used to whatever UI they learned first and now all future programmers are forced to copy that UI, no matter how bad it is for future generations to come.


Well, that doesn't apply here because gifs still have better UX than video for many use cases. Nobody wants to use video as it's implemented right now for reaction gifs.

Browsers and platform defaults could go a long way to improve video UX but they don't. Not having to open my network tab to save video would be a place to start. Being able to right-click to copy/paste them would be another.

These aren't "lowest common denominator" things. They're everyone things.


> Browsers and platform defaults could go a long way to improve video UX but they don't. Not having to open my network tab to save video would be a place to start.

Uh... Right click, "Save video as..." in Chrome. Has been that way as long as I can recall. I'm 95% sure Firefox works the same way. No idea about IE or OG Edge because who really cares, presumably Edgium behaves like Chrome.

A lot of sites override the right click menu in one way or another, but that's not the browser's fault. A standard video embed is easy to save.

> Being able to right-click to copy/paste them would be another.

I think that might run in to some practical limitations, both in terms of simple clipboard data limits and the fact that while an image is loaded entirely in to RAM to play a video may not be. If the user does a right-click>copy five seconds in while the video is still loading but has already started playing, what should the browser do? How should it handle extreme situations like someone clicking "Copy" on their Plex Web Player embed of a 100GB 4K UHD movie?

Copy/paste with video in a browser is not as straightforward as images.


> How should it handle extreme situations like someone clicking "Copy" on their Plex Web Player embed of a 100GB 4K UHD movie?

You can’t yet. Thats the point. GIFs are not 100GB 4K movies, yet the current state of the art treats the two the same.

We need a standard method to distinguish an (optionally) looping, soundless “GIF” video from a traditional video, and mimic the behavior of an image in the case of a GIF.

Also GIF videos needs to behave like GIF images consistently across all modern browsers and mobile devices.


If the right click menu itself is the problem, that kind of is the browser's fault. Especially when firefox has an override for that, pressing shift.

> Copy/paste with video in a browser is not as straightforward as images.

Copy is already broken and weird for images, since it doesn't get you the original file. But if you fixed that, I would expect pasting to give me a 'transferring...' window as long as the browser is still open and it can't be fed from cache. That wouldn't be particularly hard to implement. (And being unable to feed from cache wouldn't be unique to video at all. Image downloads already ignore the cache all the time.)


And as long as licensed video codecs are a thing, the UX for gif's will always be better.

Yes, videos lose quality and sound when converted to a gif. They also lose proprietary encoding and all their metadata (including licensing information).

This makes gif's infinitely more transmittable on the web.


When you run the user studies to tell me what's good, I'll believe you. Until then, I'm using the last published user studies which were Microsoft's work leading up to Windows 95. :P


Just depends on whether or not there is a genuine usability and discoverability improvement or not. Most new UI is trending towards way worse. Particularly in mobile.


I only ever got to participate in live user testing once. We shelled out for the room with the one-way mirror and everything. Watching normal people use our thing was most excruciating and educational. We were literally hopping up and down on our side of the glass, hooting and shouting. It was brutal.


At my job we try and do this weekly or every other week with real users testing our apps. You can’t ever guess what they want without seeing them use it and asking questions.


This is a good point, and it's something I have often come across with various experts. Some take it to an extreme and assume everyone else is dumb and they're the only one who knows what's good for them. I'm not sure what the correct term for this type of thinking is, but I've always disliked it and tried to help people actually empathize with the other side. And yet, people still like to go around saying "people are stupid" etc.

If I were to guess, I think the internet has somewhat helped make this worse, because it separates some of the human connection from your everyday interactions. If you can't read someone's emotions on their face, and you're just reading their words on a support ticket, it's very easy to dismiss them as dumb or foolish when in fact it's you who does not understand the problem from their perspective.

I guess part of the problem might be that what's obvious to someone who's already encountered that problem may be non-obvious to someone who's entirely new to a particular domain (or product or whatever).


Many developers didn't realize yet that the average person actually don't care about technology. They want to press a button to send an audio message, search and watch cat videos, read some news, with less friction as possible. They are not even remotely interested in how it works.


Yeah, this will be part of what holds back A.I. in the future. A.I. software is being built in the mirror of how the developer thinks. It's being made to think and act robotic with error correction instead of being made of mistakes, misunderstandings and abstractions like a real person.


I think there's a chance this can happen when AV1 starts to gain adoption. Webp had a chance - you can have well encoded, looping video in a .webp container that operates exactly like an image. The issue was lack of adoption - it never took hold due to Apple not adopting it in their ecosystem. AV1 has support from every major player in tech, and .avif images support gif functionality just fine.

Until that happens though, I just don't see .gifs ever losing traction. I still need to upload gifs to slack if I want autoplaying/looping behavior without user interaction, I still need to embed .gifs in my confluence pages, and when documenting user interactions in github readmes gifs are still king.

FWIW I've made a small user script for encoding gifs in a two pass approach (as most gif encoders I've seen do a pretty shit job). If anyone wants it here's the script: http://files.jjcm.org/gif.sh

(to use, just type `./gif.sh -s=SIZE -f=FPS input.mp4 output.gif`)


>The issue was lack of adoption - it never took hold due to Apple not adopting it in their ecosystem

It's not just Apple, webp files can't even be opened by Photoshop. You're basically making proprietary Chrome image files if you actually use that format.


Ehh... Firefox can open them just fine, as can GIMP, as can (apparently) my OS's image thumbnailer. (Though oddly enough not my OS's image viewer.) Support isn't universal, but it's certainly not a proprietary Chrome format.


Almost every computing app in the world supports JPG,PNG and GIF. Together we could only name 3 apps that can open webp and only one of those is an editor.

Shaking my head as to why this format has any support at all.


GIMP is supported on every practically usable operating system and can edit animated webp just as well as gifs.


Doesn't matter how many platforms it's on it's still one app.

Until webp works everywhere then the web shouldn't be polluted with this proprietary Google Chrome image format.


But most people use photoshop already


Most people? Given how much it costs? I doubt it, or Adobe would be the company with the highest valuation in the world.


Why is this?


Yes I think the fact that GitHub doesn't support videos at all shows how far away a gif-free world is.


AV1 (AVIF) is going to hit the same lack of adoption. Apple is already steaming ahead with HEIF files, while Google is stalling implementing them, and vice versa.


It looks like WebP Animation only supports I-frame like GIF Animation. I-frame only video should not be efficient so not suitable for video, looks better to just use VP9. (maybe good for icons)


> I-frame like GIF Animation

What does that mean?


Actually webp is widely adopted but you may not know it. For example giphy.com encodes to webp but they’re renamed to .gif files.


I suspect any future attempt/format may have a similar problem. Has anything changed re: Apple preferring to stick with MPEG LA endorsed formats?


>AV1

I often trip on that, was similarity with AVI accidental or intentional..?


I use a chrome-based browser, but because it's missing some component, probably due to stupid DRM crap, most videos on most sites don't play for me. However, some of them do work. I don't feel like I'm missing much. But GIFs are certainly way more usable than video. I'm also writing web-based forum designed for backwards compatibility with older browsers, so GIFs will always be the default for me.


Chrome has insane behavior where it will only autoplay videos from web sites Google trusts. If I put a video on my own web site and domain (muted, autoplay, etc.), it won't autoplay. If I put a gif up, it will.

Google claims this doesn't apply to videos with muted, but at least in my Chrome, it does.

Muted-by-default makes complete sense to me. I hate it when a web site makes noise. But no autoplay (even muted) is broken.

So is having Google act as the arbiter of which web sites get to autoplay (Google's Youtube) and which ones don't (my personal domain). That's a huge conflict-of-interest and hugely anti-competitive behavior right there. It crushes the little guy.

Disclaimer: Google claims this is based on some kind of objective metrics.


Considering the noisy ads on some websites I visit, I believe they're using some other metric.

But the metric is bad.


Author here. That is good criticism! Thanks for bringing it up. I didn't consider other factors like ease of sharing.

They are definitely tradeoffs. At least for my personal website, the size disadvantage of GIFs still outweighs them, in my opinion. I think bandwidth usage and battery drainage are also worth thinking about on behalf of the user.


I disagree, the phone/laptop manufacturer will get blamed for bad battery drainage, not the app/website/media.

For bandwidth, I'm going to blame my ISP, Chrome, firefox, etc.

For the media (gif versus movie), I'm going to blame the website.


As a website operator, I feel a personal responsibility to consider how my choices affect those things, even if my users might incorrectly blame others instead of me.


Thank for you reply. And of course, you have a good point. If what is important to you is saving space and bandwidth, then serving videos is probably the best solution.


The irony is a modern gif filetype would be even better. Something that retained the advantages of gifs, but allowed for better compression.


We don't even need a new file type, we just need browsers to let us use video files like MP4 et al in IMG tags and give us gif-like behavior (muted, autostart, and loop).

I mean, I know everybody is really pumped about webGL and shadow DOMs and webcomponents and webASM, but I feel like the basic "html as document language" could use some loving to solve this.

This whole mess reminds me of SVG. I get that there are fantastic reasons why SVG has JavaScript and its own DOM and can pull in external resources, but sometimes we don't want a whole new framework for new forms of content, we just want an IMG.


Amen, thank you. It's incredibly user-hostile to replace gifs with video.


Truth.

Gifs have just enough capability to be really useful and very hard to replace.

I personally hate videos just served up. Not always, just most of the time doing that causes more grief than it adds value.


> The video per se won't loop if I save it in my computer or phone

it does for me with VLC (it is dependent on your player if you save it to your computer)

But yeah, I can't right click on a video to save it. Got to use youtube-dl for that...

> THE EXACT SAME BEHAVIOUR, EVERYWHERE.

no sound?


> no sound?

No sound by default depending on user settings would actually be progress in my opinion. But considering half the online video players break in some way as soon as I disable autoplay in the browser I don't think this will be achievable before the end of the century.


I'd rather take inconvenience instead of insane worldwide bandwidth waste. Whenever I used to see my own gifs stats on imgur I was quite sad.


isn't what gifv is?


if you try to save, you get a webm or mp4 video


[flagged]


Doesn't using webm require sigining away their right to ever sue Google for patent infringement?


No. Originally, the webm license required that you couldn’t sue google for patents related to webm. They switched to BSD in 2013.

Meanwhile, there have been numerous patent suits against google from other big companies around VP8, VP9, and webm. Google isn’t the bad guy in this story.


Thanks I didn't know about those developments!


I use GIFs because I want videos that act like images, not videos. GIFs I can copy & paste, and I know that they'll infinitely loop without ever showing a play/pause button.

Yes, videos are smaller, but I'm unfortunately stuck with GIFs until videos work well in Google Slides and iMessage (which also means I'm also stuck with Google Slides presentations always on the verge of crashing...)


Meanwhile, I really wish I could instruct my browser to treat GIFs as videos, and load only the first frame and show controls if I wish to actually play it. Because >99% of GIF usage that I encounter is abuse of the format.


Firefox has image.animation_mode on top of which one could probably build an extension that does what you want.


Hold the mic drop. Those that claim videos are superior over GIF's will never understand. The only benefit that a video tag has over a gif is a smaller file size. Animation's and meme's, cinimigraphics and simulations are more than simply video. How about for all other animated graphics? And file size is increasingly becoming less and less of a factor at all. (disclosure: I built https://gif.com.ai)


Not just smaller file size. Drastically smaller file size. I've never been on a network so fast that I couldn't appreciate a 97% savings in bandwidth usage.

A sufficiently large quantitative change becomes a qualitative one. This is one of those times.


As someone who frequently works from a hotspot, where 1GB of data costs $5 - $10 per GB (depending if I load up when it is on sale), smaller file size saves me money, and pages load faster.


>(disclosure: I built https://gif.com.ai)

That site completely freezes when opened in Firefox. I can't even select it if I opened it with a middle click, and I need to right click on it and and select close tab to kill it. (Firefox 76.0.1 (64-bit), Windows 10)


In Firefox Nightly on Windows, my first visit to that site (with video autoplay disabled and uBlock Origin operating, but probably nothing else out of the ordinary) is just utterly broken. Header mostly visible, but breaking apart as you scroll, and no content below the header ever visible.


I'll admit that It's not really that optimized for FireFox (at all) at the moment. It may be because of a browser trick it uses on Firefox to get the bookmarklets to resemble Chrome Extensions. I'll look into Firefox more now that it's relying less on the Chrome Extension and providing more import options browser side. Thanks for the report.


Works just fine on firefox on linux.

I even have the privacy settings set to strict, which usually breaks things.


Hmm have you visited the site before? Some old settings probably got cached.


gif is a bad standard. No two ways about it. If you absolutely cannot afford computation because it is 1995 or you know your graphics do not need more than 256 colors, use gif.

Lossy compression is necessary for videos. As an example, I recently calculated the entropy of a 24 bpp 1024x768 600 frame avi video (a random frame I chose had 8000 colors). The file was 373 MB, but it contained 170 MB of information (64 bit word size). That is the smallest that lossless compression could make the file. Real gif encoding (including LZ compression) results in a file size of 500 MB. Transcoding the avi to AVC video (Q=20) looks visually comparable and results in a 16 MB file size.

The color of gif is unacceptably bad (8 bit indexed) and the file size is unacceptably large.


> The color of gif is unacceptably bad (8 bit indexed)

That's like saying the character limit of a tweet is unacceptably restrictive or a painting by Picasso is unacceptably blocky. You can use any color in a GIF but you can only use 256 colors at a time. This makes the GIF recognizable as high art. You can point to any GIF and say "That's a GIF!". I suggest you browse https://gifcities.org to see GIF gold. It is impossible to mistake these graphics with video.


No. It’s like saying sharing a Picasso painting with transformatively bad compression while not trying to change the art is worse than compression that doesn’t.

If I took a tweet and changed every third word when trying to share it with others, would that be acceptable?

If you can represent 16 million colors in video, then you can make a video that only uses a subset of those 256 colors (exactly what gif does). If you need the high frequency information then you can tune the encoder and still get a filesize that is an order of magnitude smaller than gif.

I do admit that some 90s and 00s internet art is tightly coupled to its medium. There's no reason old art can't be converted to more efficient formats or that new art in an old style can't be made in new mediums. I should have prefaced with a statement that my argument is technical.


> If you can represent 16 million colors in video, then you can make a video that only uses a subset of those 256 colors (exactly what gif does). If you need the high frequency information then you can tune the encoder and still get a filesize that is an order of magnitude smaller than gif.

and that's like fitting a square peg into a round hole. If you downscale to a gif you get the graphical effects for free.

https://i.imgur.com/8LdcFn5.gif


Downscaling to get a limiting effect 'for free' is not 'high art'.

https://twitter.com/cyangmou/status/1254089487870722048

Pixel art is an art form, but you have to deliberately design around the medium. And there are other ways to deliberately design something to fit the gif format. But someone converting a generic animation or video to gif is not gaining anything.


Much of what art is, is serendipity, accident and discovery. If you’re overly deliberate your not creating high art.

Anyway I just find it funny that gifs were invented to solve the problem of over sized video and now he’s saying that videos are solving the problems of over sized gifs.


Interestingly, a lot has changed in computers in the past 33 years. When gif was made there were no good lossy compression algorithms that had been developed, let alone implemented efficiently enough to run on computers of the day. This changed by the early 90s.

>he’s saying that videos are solving the problems of over sized gifs

And they have been for the past 25 years.


The format was designed so you could do simple animation in a way that otherwise acts like an image format. For actual video style content, it never saved space. And codecs for video have massively improved over the years, while gif hasn't.


The biggest advantages of videos to me are the controls. I absolutely hate the fact that I can't pause GIFs and have to deal with them flashing in the corner of the page as I'm trying to read.


Honestly, I just want to be able to put a video in an IMG tag and get gif-like semantics.


The image quality of that mic drop is amazing. I’ve only ever seen that in a compressed gif. Reminds me of when I first seen a retina screen


file size is not a problem in big cities of the developed world. Many poorer countries and even remote regions in rich countries are left behind.


Even developed world, people uses metered LTE connection.


The ffmpeg command will default produce one that can only be decoded on Chrome. You should specify a codec supported by most browsers (`-c:v libx264`).


Thank you very much for posting that. I've been trying to figure out how to do that for a while.


I've also learned that -pix_fmt yuv420p is necessary, changes the colorspace from RGB to YUV

The full git gist (not mine): https://gist.github.com/ingramchen/e2af352bf8b40bb88890fba4f...


If ffmpeg has been built with libx264 support, than this is the default encoder for mp4 video.


Not sure why he put this at the end:

> One final note: according to Wilhite, GIF is pronounced with a soft “G,” like “jif.” That settles the never-ending debate for me.

Now all he's done is make 1/2 of the population immediately discount everything else he said, regardless of its merit.


>> One final note: according to Wilhite, GIF is pronounced with a soft “G,” like “jif.”

That would be correct if GIF stood for "Gerbil Interchange Format" rather than "Graphics Interchange Format".


I've never understood that argument; why would an acronym need to preserve the exact sounds of the letters in the original words? I don't think it's very uncommon for them not to. "UNICEF" is not pronounced "yoo-ni-chef", "POTUS" is not pronounced "po-thuss", "OSHA" is not pronounced "oss-huh", etc.


As a Spaniard, that's exactly how I would pronounce those acronyms. Time to learn a bit more about English :)

Funnily enough, in Spanish "gi" is pronounced "ji" as in "Girar" (pronounced Jirar), while "gui" is pronounced like "gi" and "güi" is pronounced "gu-i". But "GIF" in Spanish is still pronounced with a soft "g", contradicting the general rule.

Edit: wait Google Translate says those are pronounced that way? https://translate.google.com/#view=home&op=translate&sl=en&t...


I've always heard the acronyms I listed as "yoo-nih-sef", "po-tuss", and "oash-a" (the first syllable like "ocean"). It would be genuinely surprising to me to find out that those were not the standard pronunciations, but I guess it's possible that I've been living in a bubble my whole life!

From the limited Spanish experience I have (a few years in middle school and high school), I was aware of the subtleties of how "g" is pronounced with relation to the following vowel, but I didn't know about how "GIF" was pronounced! It fits what I remember about loan words though; I think we had the word "hockey" as a vocab word once during a unit where we had all sports words, and we were taught that it was pronounced the same way as in English, which stuck out to me given that "ho" at the beginning of a word in Spanish would usually not have an "h" sound like in English. Of course, "ck" is basically never found in real Spanish words either; from what I recall, "k" isn't really used much at all besides in loan words!


I think it was a joke (an attempt to start a classic flame war with a classic argument)


If so it's a bad joke to use, because a million people that didn't think that argument through use it unironically.


> That would be correct if GIF stood for "Gerbil Interchange Format" rather than "Graphics Interchange Format".

Exactly like the well known Joint Potatographic Experts Group, yeah? I guess it's time to start saying JayFeg.


JΦEG


I say "Giraffe-ics Interchange Format" when I explain it that way. Plus the only English words in common usage that start with "gif" have a hard G.


It's correct because the original developers said so.


Author here.

I added the "for me" to try to convey that it's a personal choice. I don't care what pronunciation others use.

In this case, it doesn't bother me if someone chooses to discount what I wrote just because of that statement. That's on them.

I know it doesn't add much to the post. I just really liked the video of him accepting the Webby award. It was nice to see the person behind the technology, and I like letting creators decide things like pronunciation and casing. For example, I always make sure I spell "GitHub" instead of "Github" for no reason other than that's how they spell it themselves.


I took it as a fun throwaway comment, which you tacked on to the end.

Whatever way you pronounce it, the important thing is to realize that videos have advantages over gifs that you should always keep in mind - which came through loud and clear.


Everyone knows that it’s actually pronounced like the g in “garbage”.


I'm not sure why anyone else thinks they have a say in how to pronounce a name. I hope I don't meet anyone who tells me I'm pronouncing mine incorrectly.


Gif isn't a name, it's an acronym. The creator of an acronym doesn't get to decide how it's pronounced -- it follows the rules of standard english if it's an acronym of english words. Yes english has a lot of edge cases, but it has defaults too.

In this case, english rules dictate that any word that starts with "gif" is a hard g sound. You will not find an english word that starts with "gif" with a soft g.

The only reason there is a controversy at all is because the creator insists on his incorrect pronunciation with a soft g. If he wanted a soft g, it should have been a "jif".


> In this case, english rules dictate that any word that starts with "gif" is a hard g sound. You will not find an english word that starts with "gif" with a soft g.

English rules tell you how to pronounce "gi" at the start of a word, and the "f" doesn't change it.

Girl. Giraffe. Giddy. Gin. It can go either way.


>Gif isn't a name, it's an acronym

Those aren't mutually exclusive.

>You will not find an english word that starts with "gif" with a soft g.

If I was going to make a post with an assertion like this, I'd pick up a dictionary.


The G in GIF is pronounced like a J, as in José.


Because everyone knows Gin is for drinking, gif is for watching, gym is for exercising.


I would be happy if i got 2mb GIFs these days. You click on something that ends with gif or mp4 and you get half a megabyte of tracking javascript instead of the file you expected.


exactly. gif is a choice about the limitations of what can happen. A gif will play and repeat with NO SOUND POSSIBLE.


Imagine a browser prompt for ”This site would like to play audio” alá ”This site would like to send you notifications”

Too bad that would break Youtube, so Chrome will never deliver it


That sounds awesome. Maybe not as a 'prompt' (those are awful, and don't scale), but some mechanism for requiring the user to confirm their intent to allow it.

Web browsers are the first real application sandbox that most people have experience with. It's a really good one. There's this rectangle on the screen, and there's a label at the top that says who delivered the content, and everything it can do happens inside that rectangle. Any way it wants to escape that box ought to require my approval.


If the browser has a memory per-site it doesn't break youtube. It could easily be made to work.


What's weird is that the outlook web interface can generate sounds under firefox. I think I have everything turned off but meeting notifications (somehow) make sound.


Chrome is doing it on mobile to decide whether media should autoplay, except YouTube gets whitelisted by the heuristic (which they tuned for YouTube obviously)


Firefox mutes audio from videos by default. YouTube also functions perfectly in Firefox.


Users having to click a prompt once to turn on audio would break youtube?


One important thing that was not mentioned in the article: gifs automatically play and are not easily stopped. Videos have more knobs on the client side to tweak whether it plays or not. If I use a gif, I know with great certainty that unless all images on the client are blocked they are going to see my animated content. There are tons of extensions and browser features out there that attempt to stop that feature from videos.


1. Users have bandwidth limits. (And videos are big.)

2. Users hate constant motion on the page. (And videos have constant motion.)

3. So users stop videos from playing automatically.

4. Publishers want the video to play, so they stop using a proper video format, and use the GIF format, which produces even bigger files, and prevents users from stopping the motion.

Something’s horribly broken here. I really want browsers to let me treat GIFs as videos and block autoplay.

Typical usage of GIFs is flatly obnoxious.


Producers don't care, they want you to see their content if you go to their site.


If they're willing to abuse technology to ruin my day, I don't see why their opinion should have any weight.


You're missing the point. Why do you think you get a say in whether their opinion has any weight? As of right now their opinion of how it should work IS how it works until all of their wasteful bytes are rendering and animating in your face.


The point is, if they do shit like this they have outed themselves as hostile. I'll do what I can to either avoid them, or if I get tricked into experiencing their wasteful bytes, attempt to prevent them from doing so on my client end. They've done me, and the rest of the world, wrong. Therefore it's no longer productive to have a conversation with them about it and instead I'll apply technological and behavioural changes on my end to mitigate the damage rather than attempt to convince them to change their ways.


Good? Should the user not be able to decide how something plays on their own machine?


It's about defaults.


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.


Yes, exactly. All that needs to be built still. I can't just copy and paste a video into my messenger app for instance, which I have been able to do with gifs for ages.


True but the story is posted at HN, and there is a good chance one of your messenger app's devs or designers is reading it and saying "maybe we should add that bit of code".


I can't right click / long tap and copy and paste a video into another app


That’s really an application issue, but god damn is it an annoying one.


Gifs (and videos that people call gifs) wouldn’t be what they are today if it weren’t for their ease of copying/saving and pasting/uploading to somewhere else, which you could similarly call an application feature. So this application issue with video (as implemented in this article) is almost certainly what will stop gifs from being replaced.


But it's being done above the format level entirely.

Every browser that can decode video has a "Copy Video URL" context menu item. It's just that the websites hide it to discourage hotlinking


but the thing is, i want to copy the video itself

not copy the url, paste in a terminal for curl or wget to download it, then copy the video..


I don't think that's necessarily true for mobile browsers, and that's a big and important-to-gif-perpetuation demographic.


This only worked properly in Firefox since 2016 https://bugzilla.mozilla.org/show_bug.cgi?id=664717 so that's probably not it.


Except it is... The first thing I did when I read the article on my phone was try to save the videos, copy the videos, or copy the links for the videos in the article. I was unable to do any of those actions. I firmly believe that for it to overtake the gif, doing those actions with video on popular phones needs to be as easy (if not easier) than with gifs.


I'm pretty sure I was able to right-click save gifs all the way back to Netscape...


You can also right-click save the videos in the article right now. What I meant was copy and pasting GIFs.


No, its a os one.

windows, and most other os's, allow copy and pasting images as image data in the clipboard, but can only handle video links, there is no way to natively copy and paste the video contents.


You could treat them as files and use the file copy-paste mechanism.


> windows, and most other os's, allow copy and pasting images as image data in the clipboard

OSX has pasteboard types for png and tiff, yet that doesn't preclude copy/pasting JPEG or SVG. So no it's probably not "a OS one".


Does a JPEG you copy get pasted as a PNG though?


Sounds like a microservice waiting to happen


The OP calls out a thoughtfully-designed, open source, screen recording software, Kap. [0] Even though Kap does not have annotation tools, I think it compares well with software recently featured on the front page of HN. [1]

[0] https://getkap.co

[1] https://news.ycombinator.com/item?id=22815227


Zappy, an offline screen capture tool requires an online account to use. The CEO's answer is "we wanted to make it available quickly." not sure why that means I need an account.


> Each image in a GIF is limited to a color pallete of 256 colors

Don't let this fool you into thinking that you cannot render a true color image with GIF!

It's 256 colors PER FRAME, each of which allows for... dum-dum-dum... TRANSPARENCY. Do you see the potential or do you see the potential?

Get all your colors, split into 256 groups and then render all pixels of each group as a separate frame, leaving the rest transparent. Set delay to 0 and you will have a true color GIF in no time.


Set delay to zero and it will be treated as a tenth of a second. Browsers treat delays of '0' and '1' as mistakes. The fastest a gif will go is 50fps.

https://web.archive.org/web/20160318174811/http://www.humpy....

In the old days it was even worse. Delays under 3 or 6 or 10 centiseconds were all unreliable in some browsers.

https://web.archive.org/web/20151031034345/http://humpy77.de...


Isn't this exactly what animated WebP [1] is supposed to address?

[1]: https://en.wikipedia.org/wiki/WebP#Animation


Yes, and would Apple please support WebP in Safari as the only remaining holdout? Before we all just boycott Safari and go ahead and use WebP anyways.


Safari can play MP4 directly from <img>, so it's actually best of all browsers in this area.

You should be mad at Google, who invented a whole new format based on obsolete VP8, which is even less efficient than its VP8-based WebM precursor. And it's literally because they couldn't make their VP9-capable decoder work in <img>. Animated WebP is Chrome's tech debt.


boycott iOS? good luck...


No, boycott Safari. Just like the successful IE boycott on Windows.


There is no other rendering engine on iOS. You can’t “boycott Safari” on iOS in any meaningful way. WebKit is used by all browsers on iOS.


You might as well use APNG then, which is more widely supported too.


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.


Unless it's pixel art (lossy webp is chroma-subsampled). Another issue is that it often is a reencode from a gif, so it's strictly lossy if you don't use a lossless format for the reencode.


GP is talking about APNG not GIF. APNG has 24bit with alpha transparency.


But this is in the context of what to use instead of gif. The point is, for many gifs (like say a short clip from a movie, or funny video) you can get a lossy webp that looks better than a gif, but and is smaller than an APNG.


Animated WebP has poor compression. It is based on WebM video, but it dropped most features that make videos small (but still kept the now-obsolete VP8 encoding, and added a second codec internally, which makes WebP decoding complex compared to GIF).


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.


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 range of different devices and the corresponding rendering costs, decoding costs and bandwidth considerations based on incomplete and sometimes contradictory documentation from dozens of different sources that will be out of date by the time you've finished reading this paragraph.

One of these is not like the other, and that's why GIFs are still so prevalent.


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.


unfortunately, mpeg4/h264 is still only common denominator for browser support, because of Apple Safari.


Isn’t it mp4? That is pretty universal and displays well in all platforms. Webm isn’t that ubiquitous in support.


MPEG LA holids patents for mp2/mp4/hevc/h.264. I'm not sure what the licensing terms are, but they are not as liberal as VP8.


Most common MP4 formats are patent encumbered. I guess you could serve DivX;-) format and be in the clear as far as that goes?


I think they are talking about the webserver side requirements for streaming video so the browser will play it.


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/


Can you embed video in email and have it play by default?

Can you drag and drop videos onto your desktop to save?

Can you upload videos anywhere that accepts an image?

Can you loop and make sure it always plays on a webpage?

If no, I'm not using video. No one gives a crap about your technical specs. Videos suck as a user interface.


Gifs suck as a user interface. It’s not just the huge file size, they also

- Must load entirely before playing (whereas video formats can load as they play)

- Don’t show any progress/buffering icon while they load, so it just looks like the page has frozen

- Lack the ability to skip/scrub through the video (if I miss a part, now I have to wait the entire thing to loop)

- Don’t have audio

Actually, these aren’t really issues for short gifs (<5 seconds). But long videos which have been converted into gifs are quite common.


> Actually, these aren’t really issues for short gifs (<5 seconds). But long videos which have been converted into gifs are quite common.

Anybody doing the latter is the problem, not really the format’s fault it’s being used improperly. Any GIF with more than XX frames (for me that’s up to around 100 depending on content, but everyone is free to make their own decision) should be a video. GIF is meant to be for short animations, not for showing videos.


> Must load entirely before playing (whereas video formats can load as they play)

Huh? What browser are you using, that's not normally true.

You can even stream live content via gif. http://gifsockets.twolfson.com/


No thanks, my "This Site Under Construction" pixel art would look awful as a video. And last I checked, video didn't even support transparency!


Transparency is supported now.

https://codepen.io/pbhj/pen/dyPzwEj


Of course this won't work on iOS


TIL!


There's always going to be a case of when using the gif file format is perhaps the best choice for the job. Like all things considered, a limited palette, reasonable canvas size, the use of a transparency bit instead of a channel. You still have a chance to use an animated gif that's smaller than both the webm and webp variants. Because while it still is possible to create a lossless webp file, the codec is completely different and will store data significantly different, and in the certain use cases, can be less effecient


Most video codecs have lossless modes.


How do you create a lossless video from a GIF (or a series of images)? I think I've figured out how to do it for H.264 with ffmpeg, but I don't know how to do it for H.265 or AV1.

The main problem I've been encountering is that everything seems to be based on YUV, which makes it difficult to round-trip RGB data without loss.


x264 has an RGB mode that avoids this but I don't think the resulting files would be playable in any browser


Yeah, that's the best solution I've found for truly lossless conversions, but for wide compatibility the only real choices seem to be animated image formats like GIF or APNG.

I started looking for lossless because my screen captures looked like absolute garbage even at high bit rates, but in retrospect, I bet the problem was the downscaling done by the 4:2:0 chroma profile. It might be that 4:4:4 would fix the awful appearance.


Making small gifs is an art: Dithering, color quantization, sub frames that don't move, etc. However I must agree that for most content shared online, video is more efficient.


I don’t know what Twitter does with the gifs but it freezes my old netbook when I try to play them. I can play videos from youtube but I can not play a gif on Twitter!


They convert it to video


Strongly rebuts the case of the article if truly the cause.


In case of twitter, there's an important difference in uploading video vs gif. Although a gif is converted to video, it will autoplay and loop without any user control available, just as it was a gif (sadly, you can't download/drag as a gif). If you upload as a video, if will behave like regular video


But It doesn’t explain why I don’t have the same problem playing videos on Twitter.


Auto play blocking in browsers could become an issue in future though - gifs will work, while videos will popup a permission dialog (I know muted video will work fine _now_, but who’s to say that will last? There are certainly good reasons to block even muted auto playing video)


http://www.lcdf.org/gifsicle/ https://kornel.ski/lossygif

you can also just compress user uploaded gifs serverside. but the top commenter is right, gifs are great because of they're functionality and simplicity.

the better thing would be for the w3c and browsers vendors can get their act together (spoiler: they won't) and do things like make gif20, finish svg2, implement svgfonts, implement complete css3 specs, if you want to preserve functionality and usabilty of graphic assets on the web while reducing their bandwidth.


Perhaps we could create an RFC for GIF21?

The mistake people make in trying to replace GIF is doing too much, turning it into a wholesale replacement.

Take GIF89, add intra-frame compression, lossy mode for frames, and expanded colors. If you stuffed the new format frames end the end with index numbers old clients could play the sequence at a much lower framerate without too much of a hit to file size. But you accept some further bloat as a temporary measure to push adoption. In 10 years GIF libs can stop encoding the legacy frames by default.

Don't make the mistake of supporting multiple codecs or complicating the format in other ways. That just puts you in the position of APNG or other would-be replacements: mostly ignored.


I'm still very much in the camp that moving pictures are distinct from video, and am eagerly waiting for a good replacement animated picture format before I move my website over to it.

apng could have been nice, but never took off.


>apng could have been nice, but never took off.

There's nothing stopping people from using APNG. All major browsers have been supporting animated PNGs since 2017 (which was the year when Chrome finally added support for them).


I had an issue serving videos on my site before and encounter a bug where Mobile Safari won't play the video if there's no `Accept-ranges: bytes` header.

The header is somehow removed when served from Cloudflare https://community.cloudflare.com/t/mp4-wont-load-in-safari-u...

I had to create a page rule to exclude videos from being served from Cloudflare CDN.


I think they fixed this at some point, or at least, I have dealt with the same issue at various points and at the moment my videos work fine on iOS served through Cloudflare.


Oh wow you're right. I just tried disabling the page rule, load my site on Mobile Safari private mode, and it works!

Looks like `Accept-Ranges` is not there but there's `Content-Range`. Not sure how this works exactly but really glad this is fixed :D


I mean I like GIFs, but when I'm checking specific subreddits or going over Imgur frontpage. Companies are using too many GIFs nowadays in their blogs.


I'd really rather not we go down the rabbit hole of "class"ifying websites by their method of serving animated clips. GIFs have trade-offs, but on balance they're the most useful for their purpose.


Can't edit, but if this seems non sequitur, parent originally said something along the lines of, "Websites that use GIFs seem to have low-quality content."


The .gif format is widely used due to the simplicity of implementing the specification.

Although the file size is relatively uncompressed, gif's can easily be decoded and rendered on basically any device.

Video formats which save 97% of space have much smarter compression algorithms, which are much harder to implement, which means less device support...less usage...


the videos don't play in safari, also there is no way to play them for me. They need a click handler with play().


Videos play just fine for me in Safari on MacOS.


And if you need to add a play handler, it's not a gif...


Firefox is working on making gifs respect user selected video autoplay setting and preventing to load whole file to save bandwidth: https://bugzilla.mozilla.org/show_bug.cgi?id=1631598


I think this is a better post on the subject, and offers more in depth solutions https://cloudinary.com/blog/evolution_of_img_gif_without_the...


In addition to the well made points of client software treating videos in the same was as images, server apps need to as well.

Currently there are lots of forums and other similar software that allow embedding of images (including gifs) but don't allow embedding videos.


Animated WebP is the answer instead, and now it's supported everywhere [1] except Safari. Or animated AVIF in the future.

[1] https://caniuse.com/#feat=webp


Videos are dramatically worse on mobile, especially if you want to save the GIF/image. As far as I can tell, it is impossible to save a video to an iOS device, while saving an animated GIF is easy.


4chan, 9gag, etc. already do this for years with great success.


4chan is barely usable on iOS because none of the videos are supported by Safari


Yes, I read that the web story of iOS isn't that great. :/


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 ;)


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.


The past couple decades (really! see JPEG2000!) have seen fairly regular introductions of new lossy image formats, but JPEG continues to win due to:

1. widespread support

2. "good enough" compression

Formats that compress better, like HEIC and webp, are only ~2x better, have sparse software/hardware support, and are likely to be patent-encumbered.

If I had to guess, formats that support HDR or other features haven't seen adoption due to a lack of widespread display support (in the case of HDR) and a lack of user interest.

See https://en.wikipedia.org/wiki/Comparison_of_graphics_file_fo... for a bunch of examples.


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.


iOS has been slowly making HEIF more common. It’s just that it takes a long time for the entire tooling chain to support it.


HEIF is patent-encumbered and a non-starter.


HEIF is a container format and isn’t generally considered “patent-encumbered”. HEVC (which is one of several image formats supported inside HEIF) is probably what you’re referring too.


Even Safari doesn't support HEIF though (even on iOS), so for web, it's not even there yet.


JPEG encoders got better over time.


Maybe if every second application wasn't a skinned Chrome browser we'd have 2MB to spare for a GIF.


“ A single GIF can be larger than a typical website (over 2 MB).”

Not larger than today’s websites, that’s for sure.


Any replacement for Kap on Windows? I use ScreenToGif, but maybe there's a better option.


If videos looped seamlessly I'd happily serve videos. Sadly, they do not.


They can, and they do. This article shows you an example at the end. What's the issue?


tried to drag and drop and didn't work. Also, if I save to share later, it's not going to work, and I would need to do the same things the author did to make it work. It's not guaranteed that it will work properly (with auto loop) everywhere. And if you consider browsers/extensions might block auto-playing videos in the future...

gif just works. Drag and drop anywhere, any browser, any app, and it works. (Ok, almost anywhere, but still way more accepted than video).


Sadly it would be great if it were true but the finer details are that you cannot today drag and drop a gif from a website into another one or copy it to your clipboard and paste it elsewhere on the web. Even though it’s in the W3C clipboard specs https://www.w3.org/TR/clipboard-apis/#reading-from-clipboard, Chrome doesn’t support it. I tried to implement this but it will only show one frame and convert it into a static image and drop the transparent pixels. You can save it directly to your computer though.


Video as a file usually works, it's the presentation/player part that is entirely dependent on whatever application and OS you're using to view it. Most messaging apps now support video pretty easily so there's some progress being made.


They support video, but, acting as an image?


did you know that there is loop attribute in video tag?


Video tag ≠ video file


Nothing is more infuriating than saving a 'gif' that instead gives me some obscure format none of my programs besides the browser can use. Only serve video if it's in a format as ubiquitous as Gifs.


Gifiot: A person who makes animated gifs from videos.


No. Not everything is about increasing in efficiency. GIFs are a throwback to the charm and chaos of the early days of the web, and I hope they stay part of the fabric of it long into the future.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: