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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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`).
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.
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 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.
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.
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.
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.
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)
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.
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.
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".
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.
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.
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.
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]
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.
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.
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.
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).
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.
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!
> 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.
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
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.
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!
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
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)
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.
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.
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.
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.
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...
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.
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.
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.
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.
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.
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.
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.
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.