Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Basically: GIFs autoplay on people's Tumblr dashboards, proper video formats don't, and that's pretty much all people are trying to achieve in the first place.

If we just had some sort of file-extension/media-type (.webg, maybe?) that signalled to a browser "I'm a video container, but treat me like a gif, by defaulting to autoplaying, looping, and muting me", we'd replace gifs instantly.



I don't think the current popularity of GIF compared to HTML5 <video> is really because of autoplay (since <video> can do that too, and loop too).

The big advantage of GIF is that it works in an <img> tag just like any other image, so you don't need a website to explicitly support it.

Another advantage, I think, is that GIFs are guaranteed not to play sound, which is great when browsing say imgur.com or pr0gramm.com at work (edit: of well, I had missed the "muting me" part of your comment, so let's just say that we agree that it's an important component).


Video can be muted with the tag itself. The only advantage of GIF is like you said - you can use it in any place where images are supported (forums and etc.) and video is not. On the sites where you have control over the tags GIFs are counterproductive. For example they are way bigger for the same length of video.


From a user point of view, you can be sure that a site with pictures, including GIFs, won't play sound, that's what I meant.

On the other hand, users don't have to know whether the HTML they are served have <video>s or <img>s, so this could all be done behind the scenes, I guess.


Yeah, and very much so in email. <video> gets stripped in most web email clients. However, you can embed gifs and they work great. I made a fun service: flukyGifs - gifs that change every time you visit it (based on keywords). Add a fun one to your email signature, and there's something to look forward to every time someone opens your email! Here's a link http://flukygif.herokuapp.com


Video doesn't autoplay on iOS devices, while GIFs will playback for a few iterations automatically, last I checked.


Video tag autoplays on any site where you have control over HTML. For example on Blogger. Can't say anything about Tumblr - never used it.

You don't need any special containers. Just use video tag properly, it covers all that functionality since the beginning:

https://developer.mozilla.org/docs/Web/HTML/Element/video

Something like <video src="..." loop="true" autoplay="true" muted="true".../>

Muting can also be simply achieved by making audio empty in the video if you need to.


Yes, that's why I mentioned Tumblr in particular. Tumblr is an example of a website where people write HTML, yet don't control the HTML that displays to others.

On sites where you control the HTML, like Wordpress, you can do whatever you like. Use <video> tags if you know them. Likewise, on sites where you don't write HTML (e.g. Facebook, as another poster mentioned), <video> tags are fine--because people don't have to know about them, so it's all just handled in the background when you drop a video on the page.

But there are these in-between web services where HTML is used, usually as one method of several, to get rich text from people, and then presented in an aggregate view (think of any traditional threaded forum.)

Because people can do some pretty nasty things when you inject their HTML directly into your pages, you have to filter that HTML to remove bad behavior. And usually <video> is one of the first to go--not because it's particularly bad (though getting people to autoload huge videos can be used as a DDoS attack in some instances) but because these filters are usually whitelist-based, and haven't been updated since <video> became a thing.


Also, video tags only play in full-screen on iPhones, which is pretty unacceptable for the type of use people have in blogs.


Gif is also a non-lossy format (albeit with a limited palette). Pretty much all video codecs are lossy. What will really replace GIF is animated PNG.


This is irrelevant. You don't want a lossless format for web video - the size is too excessive.


You want a video format for web video. You want a lossless format for web animation, which is what GIFs should be used for in the first place, not for lossily converted videos.


It'd also have to be compatible with all browsers (including primitive versions of IE) to cover the other reason people use gifs.


Primitive versions of IEs can be ignored. Worrying about support for old IE is counterproductive.


Please, tell that to some of my clients.


IE costs extra, IE < 8.0 or whatever doubly so ;)


Whose employees probably shouldn't be visiting Tumblr in work browsers, and work time, anyway.


Facebook does this for videos uploaded to its services (Facebook, Instagram) and shared on feeds. It works quite well there.


I only noticed this yesterday. They even mute the sound by default so it's not really intrusive. Hopefully people move away from gifs soon, even if it means autoplay videos everywhere.




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

Search: