Live data from Hacker News

Serve Videos Instead of GIFs

dannyguo.com

131–140 of 242 posts

Re: Serve Videos Instead of GIFs

#132
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.

Re: Serve Videos Instead of GIFs

#133
post #130
post #60

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 )

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

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

Re: Serve Videos Instead of GIFs

#134
post #60

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 )

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.

Re: Serve Videos Instead of GIFs

#135
post #130
post #60

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 )

>(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.

Re: Serve Videos Instead of GIFs

#136
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.

Re: Serve Videos Instead of GIFs

#137
post #130

Earlier quoted context omitted.

>(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.

Re: Serve Videos Instead of GIFs

#139
post #89

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.

Re: Serve Videos Instead of GIFs

#140

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 u…

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 use…

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.
Post reply on HN