Hacker News new | ask | show | jobs
by sillycon-valley 1989 days ago
Also, AVIF has support for live photos and animations.

WebP afaik has a more limited feature set.

3 comments

Does it auto-play? Can it replace gif?
Any muted video can already auto play, irrespective of format.
This is not true. Firefox readily supports blocking all video autoplay (Permissions → Autoplay has three choices: Allow Audio and Video; Block Audio; Block Audio and Video), which I gladly use. And I really wish animated images were treated the same, because it’s a bug that they’re not, but a well-entrenched one that’s nigh-impossible to fix.
Idk, as a user blocking all autoplay sounds great to me.
Thatʾs what I said. I was correcting the parent comment that said that you couldnʾt block autoplay of muted videos. I block all video autoplay, and wish I could block animated image autoplay also.
This is the default, but some media sites have made autoplay videos _the_ next-gen whole page popups, so I gladly switched to block all. It also saves a lot of bandwidth.
Maybe this is a stupid request, but I'd like <img> (or maybe the newer <picture> tag) to take a video but with autoplay=true, loop=true, muted=true and controls=false when given a video source
Safari already supports playing MP4 in <img> tags [1]. I think that's how "animated GIF" type of animations should be handled in the Web.

It's silly that there are video formats with excellent compression but image formats want to reinvent it (such as animated PNG, animated WebP, animated AVIF...). It just adds extra complexity to image formats.

[1] https://developer.apple.com/documentation/webkit/delivering_...

Ah, that seems exactly like I was asking for, unfortunately in the 3 years since Safari added it, I can't find much pick up on it. I found this on Chromium but with not much progress. It seems their code path doesn't quite let img decode a video, I assumed it would be as easy as creating a fake <video muted loop autoplay> but it's probably much more messy.

https://bugs.chromium.org/p/chromium/issues/detail?id=791658

It's the other way around for "animated AVIF". It's 2 generations better than H.264 used in MP4, and (basically) not patent-encumbered.
Right but you can't put videos in an img tag so they can't really replace GIFs. E.g. in GitHub issues you still are forced to use GIF.
GitHub issues let you attach videos since last month: https://github.blog/changelog/2020-12-16-video-upload-public...
OMG finally! I've been waiting for years.
Nor in documents : many PDF readers (including browsers ??) don't seem to be able to read MP4 in PDFs, EPUB doesn't support MP4, and MHTML has been discontinued for some weird reason (at least Libre Office displays MP4 in ODT just fine, but it has other issues). Maybe this is due to the patents in MP4 ? And GIF is supported but is just too big.
You bet. I've played around with AVIFS and it can autoplay and loop. I made gif2avif.com for fun, but I can't promise that it will work well.
I still use JPEG because I've seen iPhones in the wild that didn't support my WEBP graphics.

Thanks Apple for being behind the times.

This should actually finally be fixed as iOS 14 rolls out, of course there's still IE ...

https://css-tricks.com/webp-image-support-coming-to-ios-14/ https://caniuse.com/?search=webp

Internet Explorer is officially unsupported by Microsoft. Nobody should write anything new with support for IE.
Microsoft claims otherwise: https://docs.microsoft.com/en-us/lifecycle/faq/internet-expl...

_Internet Explorer is a component of the Windows operating system and follows the Lifecycle Policy for the product on which it is installed._

Some of their sites are like Office365 will drop support, but only on 2021-08-17.

So after several years of ignoring a better file format apple will start supporting it when it's already being deprecated by an even better format?
WebP was a bad idea so it's good to not support it. It was released years too early, since they started the incompatible VP9/10 right after.
Erm. What kind of logic is that? Are you from a parallel universe where time machines exist?
They should not have released it without a much longer open comment period, if they expected anyone else to implement it. VP8 had barely just come out of hiding from a private company and hadn't been reviewed.

I have known the author of WebP (he previously worked on XviD) and I'm pretty sure it was his pet project.

By the way, doesn't Windows still open WebP in a browser rather than in a picture viewer?
The Windows "Photos" app doesn't support webp, at least not without an extension, so it doesn't associate the file extension with the app. Chrome can display these photos, so it registers the webp file extension.
That's it - webp isn't treated as a first-class picture file format even on Windows. You can hardly expect Apple being more progressive this way.
Or https://sourceforge.net/projects/jpegview/ - slightly less (yet sufficiently) powerful but looks better.
And 10-bit color.
Only 10bpc, no provision for better, like PQ ?