News for hackers. Stuff that matters.
Re:AnimGIFs need a better codec by TheZenPsycho on Saturday July 19, 2014 @08:34PM (#8059223)
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.

Re:AnimGIFs need a better codec by pornel on Saturday July 19, 2014 @08:58PM (#8059273)
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 :(

Re:AnimGIFs need a better codec by TheZenPsycho on Saturday July 19, 2014 @09:09PM (#8059291)
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.
Re:AnimGIFs need a better codec by TylerE on Saturday July 19, 2014 @08:42PM (#8059235)
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.

Re:AnimGIFs need a better codec by TheZenPsycho on Saturday July 19, 2014 @08:49PM (#8059249)
Yes. SVG works in that use case.

with animations.

it does.

I misunderstood nothing.

behold:

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

Re:AnimGIFs need a better codec by Pxtl on Sunday July 20, 2014 @12:02AM (#8059544)
"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.

Re:AnimGIFs need a better codec by TheZenPsycho on Sunday July 20, 2014 @12:28AM (#8059576)
I think I am having issues with http headers on my server, making not the best impression.
Re:AnimGIFs need a better codec by Jasper_ on Saturday July 19, 2014 @11:56PM (#8059537)
The SVG inside an <img> tag doesn't animate under Firefox for me.
Re:AnimGIFs need a better codec by Pxtl on Sunday July 20, 2014 @12:03AM (#8059545)
The video one or the css animations one?
Re:AnimGIFs need a better codec by Jasper_ on Sunday July 20, 2014 @12:27AM (#8059574)
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.
Re:AnimGIFs need a better codec by TheZenPsycho on Sunday July 20, 2014 @01:01AM (#8059621)
hmm I may have to iron out some bugs.
Re:AnimGIFs need a better codec by NVI on Saturday July 19, 2014 @10:18PM (#8059379)
https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_...

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

Re:AnimGIFs need a better codec by simoncion on Saturday July 19, 2014 @10:39PM (#8059410)
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.

Re:AnimGIFs need a better codec by xooyoozoo on Saturday July 19, 2014 @10:56PM (#8059446)
"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.
Re:AnimGIFs need a better codec by simoncion on Sunday July 20, 2014 @11:42AM (#8060567)
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...

Re:AnimGIFs need a better codec by Pxtl on Sunday July 20, 2014 @12:05AM (#8059548)
H264 is problematic because folks aren't legally allowed to support it without paying a consortium. That's a pretty big stumbling block.
Re:AnimGIFs need a better codec by ZeroGravitas on Sunday July 20, 2014 @03:43AM (#8059849)
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.

Re:AnimGIFs need a better codec by germanforblack on Saturday July 19, 2014 @08:56PM (#8059267)
You could also use <video src="/path/to/vid.mp4" muted loop autoplay>
Re:AnimGIFs need a better codec by pornel on Saturday July 19, 2014 @09:03PM (#8059279)
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.

Re:AnimGIFs need a better codec by SimeVidas on Sunday July 20, 2014 @09:04AM (#8060216)
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.

Re:AnimGIFs need a better codec by TazeTSchnitzel on Saturday July 19, 2014 @10:14PM (#8059376)
>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.

Re:AnimGIFs need a better codec by ZeroGravitas on Sunday July 20, 2014 @03:19AM (#8059812)
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?

Re:AnimGIFs need a better codec by derf_ on Sunday July 20, 2014 @06:46AM (#8060024)
> 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

Re:AnimGIFs need a better codec by est on Sunday July 20, 2014 @01:26AM (#8059658)
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.

Re:AnimGIFs need a better codec by scott_karana on Sunday July 20, 2014 @04:51AM (#8059904)
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.

Re:AnimGIFs need a better codec by Aardwolf on Sunday July 20, 2014 @05:54AM (#8059965)
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.
Re:AnimGIFs need a better codec by scott_karana on Sunday July 20, 2014 @06:41AM (#8060015)
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)

Re:AnimGIFs need a better codec by TD-Linux on Sunday July 20, 2014 @02:24PM (#8061081)
You can right click any html5 video and choose Save video as...
Re:AnimGIFs need a better codec by est on Sunday July 20, 2014 @08:27PM (#8062031)
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.

Re:AnimGIFs need a better codec by Titanbase on Sunday July 20, 2014 @12:43AM (#8059599)
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.

Re:AnimGIFs need a better codec by pornel on Sunday July 20, 2014 @12:53AM (#8059613)
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.

Re:AnimGIFs need a better codec by Titanbase on Sunday July 20, 2014 @01:10AM (#8059635)
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

Re:AnimGIFs need a better codec by pjc50 on Monday July 21, 2014 @08:34AM (#8063396)
We refused to pay the GIF royalties and we'll continue to do so for newer formats.
Re:AnimGIFs need a better codec by ajanuary on Sunday July 20, 2014 @03:53AM (#8059857)
The amount of RAM that's required to browse tumblr because of the gifs is slightly insane.
Re:AnimGIFs need a better codec by clarry on Sunday July 20, 2014 @01:13PM (#8060870)
Re:AnimGIFs need a better codec by ahoge on Saturday July 19, 2014 @09:12PM (#8059294)
Some of this is covered by the WebP FAQ:

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

Re:AnimGIFs need a better codec by jccalhoun on Sunday July 20, 2014 @08:59AM (#8060205)
"AnimGIFs?" Is this a term people really use?
Re:AnimGIFs need a better codec by SimeVidas on Sunday July 20, 2014 @09:08AM (#8060220)
I was confused about that term for a few moments. We should have a standard shorthand for animated GIF. How about aGIF or AGIF?
Re:AnimGIFs need a better codec by SquareWheel on Saturday July 19, 2014 @10:29PM (#8059392)
I would be perfectly okay with browsers dropping support for the animated gif. We've had better options for years.