by Uncorrelated · 2y ago · 0 comments
This one has a section on animation and cinemagraphs, saying that video formats like AV1 and HEVC are better suited, which makes sense. Here's my somewhat off-topic question: is there a video format that requires support for looping, like GIFs? GIF is a pretty shoddy format for video compared to a modern video codec, but if a GIF loops, you can expect it to loop seamlessly in any decent viewer.
With videos it seems you have to hope that the video player has an option to loop, and oftentimes there's a brief delay at the end of the video before playback resumes at the beginning. It would be nice if there were a video format that included seamless looping as part of the spec -- but as far as I can tell, there isn't one. Why not? Is it just assumed that anyone who wants looping video will configure their player to do it?
But we shouldn't be using animated GIFs in 2024.
The valid replacement for the animated GIF is an animated lossless compressed WebP. File sizes are are much more controlled and there is no generational loss when it propagates the internets as viral loop (if we all settled on it and did not recompress it in a lossy format).
Of course, not every video player supports them well. Which is kinda understandable, I can see how expecting 30 frames per second from a 30fps video would make things a lot simpler, and work right 99.9% of the time.
<video playsinline muted loop> should be nearly as reliable as a GIF in that regard.
The one exception that I've found is that some devices will prevent videos from autoplaying if the user has their battery-saver on, leading to some frustrating bug reports.
HEVC does not have such a flag. Quite unfortunate
> Most browsers now recognize and support NAB, though it is not strictly part of the GIF89a specification.
So I guess the players for the new video codecs could do something similar and agree on some metadata to be used for the same purpose?
The “NAB” was introduced in Netscape Navigator 2.0, 50 million years ago.
The phrasing with “most browsers” and “now” is a bit weird, on part of whoever wrote that part of the Wikipedia article.
Every major browser that I know of has supported animated gifs since forever.
Any browser that doesn’t is probably either a non-graphical browser in the first place, or one that has like five people using it.
As for your question about video looping: Nothing prevents that, although I don't know of a container format that has a flag to indicate that it should be looped. Players could eliminate the delay on looping by caching the first few frames.