Serve Videos Instead of GIFs
dannyguo.com
dannyguo.com
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.
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.
But the metric is bad.
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 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.
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.
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.
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.
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.
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`)
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.
Shaking my head as to why this format has any support at all.
Until webp works everywhere then the web shouldn't be polluted with this proprietary Google Chrome image format.
I often trip on that, was similarity with AVI accidental or intentional..?
What does that mean?
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.
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.
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.
> 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.)
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.
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.
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).
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...)
A sufficiently large quantitative change becomes a qualitative one. This is one of those times.
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)
I even have the privacy settings set to strict, which usually breaks things.
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.
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.
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.
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://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.
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.
>he’s saying that videos are solving the problems of over sized gifs
And they have been for the past 25 years.
The full git gist (not mine): https://gist.github.com/ingramchen/e2af352bf8b40bb88890fba4f...
> 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.
That would be correct if GIF stood for "Gerbil Interchange Format" rather than "Graphics Interchange Format".
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...
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!
Exactly like the well known Joint Potatographic Experts Group, yeah? I guess it's time to start saying JayFeg.
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.
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.
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".
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.
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.
Too bad that would break Youtube, so Chrome will never deliver 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.
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.
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.
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
not copy the url, paste in a terminal for curl or wget to download it, then copy the video..
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.
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".
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.
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...
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.
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.
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.
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.
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 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.
- 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.
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.
Huh? What browser are you using, that's not normally true.
You can even stream live content via gif. http://gifsockets.twolfson.com/
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.
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.
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.
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).
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.
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
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...
Currently there are lots of forums and other similar software that allow embedding of images (including gifs) but don't allow embedding videos.
(Just to close the loop, you can use a shovel to do carpentry, but a hammer would be much better.)
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.
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.
Not larger than today’s websites, that’s for sure.
gif just works. Drag and drop anywhere, any browser, any app, and it works. (Ok, almost anywhere, but still way more accepted than video).