Hacker News new | past | comments | ask | show | jobs | submit login
AnimGIFs need a better codec (pornel.net)
77 points by robin_reala on July 19, 2014 | hide | past | favorite | 39 comments



as I've commented before, SVG fits pretty much all those criteria:

- works inside an <img> tag

- works in background: url()

- supports both smil animation and css animation

- supported back to IE10 (with css animations)

- plays automatically in a loop with no play controls

- can embed jpegs, pngs, videos as videostrips or diff images

- can apply alpha transparency via a mask operation

- flexible enough to apply a wide variety of compression techniques including multiple update regions (where gif only supports one rect per frame)

- Controllable via javascript (as long as you trade off putting it in an img tag and use an object tag instead)

previous comments here: https://news.ycombinator.com/item?id=8038838

all that's missing is widely available software to author SVG animations.


A major use-case is to efficiently play a clip from a video camera, so purely vector animation or a sequence of frames from still images isn't good enough.

I've tested an SVG with an <svg:video> element (http://www.w3.org/TR/SVGTiny12/multimedia.html#restrictedVid...), but unfortunately it doesn't seem to be supported anywhere.

I've also tested an SVG playing video via HTML in a <foreignObject>. In Firefox it does play when the SVG is opened as a standalone file, but not when embedded in <img src>. So close :(


sequence of still images from jpeg frames is still an improvement over gif for that usecase. Plus, all the same optimisations (and more) that have been available to gif for that use case are also available to SVG. Just not in any authoring software.


This, imo, represents a fundamental misunderstanding of the typical use case.

If posting the image on a typical forum requires more than some sort of [img]http://foohost.com/23452t23t.baz[/img] it's a non-starter.


Yes. SVG works in that use case.

with animations.

it does.

I misunderstood nothing.

behold:

http://www.zenpsycho.com/squirrelrun.html


"svg with css animations img tag " and the object tag ones are the only SVG-based ones that worked for me.

Still, that's awesome. Need a simple "animated gif to animated jpeg (svg)" converter tool.


I think I am having issues with http headers on my server, making not the best impression.


The SVG inside an <img> tag doesn't animate under Firefox for me.


The video one or the css animations one?


The video one doesn't seem to load for me. The CSS animation one works fine when I view it alone, but isn't animated when embedded in the web page.


hmm I may have to iron out some bugs.


https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_...

There isn’t a single video format that is supported by all major browsers.


Moot decided on webm for 4chan's anigif replacement. If more websites do the same, MSFT and Apple will have their decision made for them.

We need to stop caring about the opinions of companies who aren't interested in helping The Web.


"Helping The Web" in this case would be choosing the video format with the broadest support base... which in this case is H264. The only holdouts are Opera and a couple variants of Firefox. As a bonus, you'd get hardware acceleration in almost all mobile devices and a good chunk of the desktop market.


Every time I've read the paperwork that came with a device that was able to create H.264 files, the words in the paperwork prohibited me from creating H.264 files with that device and using those files for commercial use. If I wished to use those H.264 files in a commercial setting, I was required to make a separate agreement with MPEG LA.

VP8 has no such restrictions. Google has said on multiple occasions that VP9's licensing will be the same as VP8's. The VP8 and VP9 codec software is released under a BSD license. The VP8 format specification released under a perpetual, irrevocable royalty-free license. [0] Despite VP8 and VP9's marginal inferiority to H.264 [1], they should be the default video format on The Web.

WRT hardware acceleration, the Nexus 5 has hardware assist for encoding and decoding VP8 [2]. Several Smart TV's decode VP9. [3] Given that manufacturers won't have to kowtow to MPEG-LA, the number of devices with hardware assist for VP8 and/or VP9 will continue to grow.

[0] http://www.webmproject.org/license/additional/

[1] http://carlodaffara.conecta.it/?p=420

[2] https://plus.google.com/+WebRTCorg/posts/VXXwACq3wv6

[3] https://en.wikipedia.org/wiki/List_of_4K_monitors,_TVs_and_p...


H264 is problematic because folks aren't legally allowed to support it without paying a consortium. That's a pretty big stumbling block.


We could have had the royalty free H.264 baseline we were originally promised if people didn't keep doing the web-tech equivalent of negotiating with terrorists.

If you really want to use their tech on the web, stop letting them dictate terms.


You could also use <video src="/path/to/vid.mp4" muted loop autoplay>


That's what sites do currently, but it's still not quite there yet, because it requires special markup and doesn't loop when you share the URL directly (I hope the latter can be fixed easily: https://bugzilla.mozilla.org/show_bug.cgi?id=1041238 https://code.google.com/p/chromium/issues/detail?id=395413).

Annoyingly GIF isn't supported as a source in <video> either, which adds extra complexity when you want to provide a proper fallback.


I don’t think the markup for `<video autoplay muted loop>` is an issue. These attributes exist for this use case.

That being said, video in CSS background is a legit feature request.


>doesn't loop when you share the URL directly

You can deal with that server-side by checking referrers and other headers and serving HTML.


This is one side if it, 4chan's webm is another, various 3rd party hosts, shims and polyfills are in between.

I'd like to see Mozilla and Google capitalize on this to help spread royalty free codecs

How does webm decoded in JavaScript compare with a gif for video? Is there a subset (beyond removing all audio) that could speed thinks up?


> How does webm decoded in JavaScript compare with a gif for video? Is there a subset (beyond removing all audio) that could speed thinks up?

https://wiki.xiph.org/Ogv.js


What's real need to be fixed is how to provide an easy copy-pastable way of viral spreading like GIF.

GIF is popular simply because people can copy it around by 2 clicks. Copying video files is PITA because bullshits like region restrictions, CDN providers, dynamic URLs, etc.


That just the thing, though; video file formats do not intrinsically have any of those limitations, which is exactly why he wrote this article: it's a false dichotomy.

Files are just files, and video ones are typically smaller.

Imagine, if you will, a GouTube where animated GIFs were rigorously checked against existing copyrighted material, removed by DMCA requests, hosted around the world. How would it be mechanically different than Youtube, except for changes surrounding the Flash player?

Thusly, imagine Tumblr hosting WebM/H264 files instead of (or in addition to) GIFs. Mechanically identical.


On a GIF, you can right click and "save as". So a first step would be to have all browser makers allow this for video files too.


When using the <video> element, you can do exactly that. So we'd probably be in good shape. :)

(At least in Firefox, Chrome, and Safari. Try it out: http://www.w3.org/2010/05/video/mediaevents.html)


You can right click any html5 video and choose Save video as...


Still, you can't do this

http://www.cnet.com/how-to/an-imessage-prank-every-iphone-ow...

There are so many exceptions when saving a video, like you got only a chunk of a video because video files are segmented in m3u list, or stupid auto-throttling algorithms, or dumb-ass resolution auto-switching.


I don't have a problem with AnimGIFs. They work fine for their intended purpose.

Interesting side note: I worked at Jasc Software 20 years ago in technical support, helping people with Paint Shop Pro 7 and Animation Shop.

Animation Shop still works great for creating AnimGIFs and PSP7 still works great for a complete 'vector+bitmap' graphics app. It's impressive that some software is so resilient.


If by intended purpose you mean animations like smileys, then yeah, it's OK.

But if you look at imgur.com or Tumblr you'll find GIF is used mostly for video clips and this results in multi-megabyte files with dreadful quality, e.g. http://ministryofgifs.org/

gfycat typically reports 15:1 compression improvement when converting to WebM.


Yeah, sometimes video formats are better, but for some purposes AnimGIFs are fine.

How difficult it seems to pick a default codec for the web+mobile web?

EDIT: Looks like everyone is concerned with it being open source, but they don't want to pay for it? Or they can pay for it and get a commercial license. Either way, you should be forced to pay! XD


We refused to pay the GIF royalties and we'll continue to do so for newer formats.


The amount of RAM that's required to browse tumblr because of the gifs is slightly insane.



Some of this is covered by the WebP FAQ:

https://developers.google.com/speed/webp/faq


"AnimGIFs?" Is this a term people really use?


I was confused about that term for a few moments. We should have a standard shorthand for animated GIF. How about aGIF or AGIF?


I would be perfectly okay with browsers dropping support for the animated gif. We've had better options for years.




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

Search: