Live data from Hacker News

Serve Videos Instead of GIFs

dannyguo.com

191–200 of 242 posts

Re: Serve Videos Instead of GIFs

#191
post #185
post #100

Earlier quoted context omitted.

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.

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.

Re: Serve Videos Instead of GIFs

#192
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…

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

Re: Serve Videos Instead of GIFs

#193
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 )

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

Re: Serve Videos Instead of GIFs

#194
post #192

Earlier quoted context omitted.

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…

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

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.

Re: Serve Videos Instead of GIFs

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

Re: Serve Videos Instead of GIFs

#196
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)

Re: Serve Videos Instead of GIFs

#197

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

Re: Serve Videos Instead of GIFs

#198
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 )

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.

Re: Serve Videos Instead of GIFs

#199
post #85

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.

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.

Re: Serve Videos Instead of GIFs

#200

Earlier quoted context omitted.

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.

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