Why BPG will replace GIFs and more
eek.ro
eek.ro
https://en.wikipedia.org/wiki/Better_Portable_Graphics#Paten...
Currently the members seem to be working on converging VP10, Daala and Thor tech in the video realm but I'd guess images might be on their radar too.
And I dont know of any popular project that uses MPL apart from Mozilla Firefox.
Eigen (perhaps not "popular" unless you're interested in doing linear algebra with C++.. :-/ )?
Surely there are others as well..
If you want a weak copyleft license, IMHO MPL-2.0 is about the best available at the moment, and relatively easy to follow.
Really? The BPG is WAY worse, IMHO. It's immediately apparent. I noticed it with my eyes before I parsed the text.
If you let it run for awhile it eventually decodes.
I let it run past the "do you want to kill it" dialog for about 45 seconds more, then it hard crashed the tab.
We're essentially converting from one frequency-domain format to another in order to accommodate an entirely new inter-frame compression format. There definitely needs to be a frequency-domain to spatial-domain conversion, which that, in itself, is lossy, then it goes back to frequency-domain when re-encoding.
Give OP a break.
To your excellent point about MP4 to BPG conversion, I'd say that OP should have used (did they? I don't know) the source material to avoid a "copy of a copy."
Granted, the Author should have been clearer about it, but BPG's is not mean to replace MP4 even though he juxtaposed them, it's about BPG's potential replacement for GIF.
FLIF on the other hand is lossless, so the image would be truly identical (pixel for pixel). However the filesize will likely be much larger, as MP4 is a very good at lossy compression. What BPG is doing is better performed by HTML5 video formats that already exist due to hardware acceleration support for H.264 and better memory management for video. Also there are patent issues with BPG due to it being based on HEVC.
FLIF is patent free, making it the more likely candidate for mass adoption. It's animation, like APNG is lossless and supports full 24-bit transparency (versus GIF's 8-bit). However the filesize for FLIF is considerably smaller than APNG, even when crushing it with algorithms like Zopfli. Still though, for full frame video, you'll have a better time with MP4, though FLIF will be better quality, it will only be marginal and not likely noticeable in most cases.
What is interesting is the responsive aspect of FLIF. If you encoded an HD video, but only display it on a page at a lower resolution, it will only download the minimum amount of data required to display the image up to that resolution. So it could technically require a lot less bandwidth from a server compared to MP4 if the user doesn't fullscreen the video. But this is more to do with implementation than with formats. YouTube does this same idea, though with a completely different style of execution, in which they only give the the quality for the resolution you are playing it at.
2) The reference implementation will most likely change to a more permissive license, cf https://github.com/FLIF-hub/FLIF/issues/192
3) If digital cameras would use FLIF, they would probably need to implement a simplified encoder in hardware, e.g. one that uses a hardcoded (set of) MANIAC tree(s) and only uses a subset of the available encoding options. Otherwise it will be too slow.
For lossy movies, actual video codecs are best, since they're designed for that. BPG is essentially HEVC (a great but patent-encumbered video codec) so it should be good at lossy movies -- it will be worse on line-art animations with hard edges like e.g. cartoons, or animations with transparency.
You could just truncate the file at x% and get lossy encoding that way.
However, truncated FLIF files will (probably) never achieve the same quality/size ratio as dedicated lossy methods that can produce a completely different file for each quality setting.
So at the moment I still see an important use case for lossy methods. However, in the future, I can imagine that people will start to demand/expect lossless encoding, to avoid generation loss and to get the most out of their display hardware. E.g. higher bit depths are becoming a thing, while the JPEG/WebP color space (YCbCr) is effectively less than 22 bits per pixel (roughly speaking, red and blue are only 7-bit), and chroma subsampling makes this even worse. Also what's the use of ever higher display resolutions if most of those pixels are only displaying compression artifacts or blur? Lossy formats like JPEG/WebP/BPG/JP2/JXR are good at medium-quality, but if you use them at a near-lossless quality setting (e.g. 99 or 100 for JPEG), they often produce bigger files than lossless formats.
Meanwhile, the range of display sizes is getting larger: while in the past, we had a range from say 13" monitors to 21" monitors, now we have a range from 1.5" smart watches to huge 100" smart TVs. I do think that in order to avoid huge amounts of rescaling/transcoding, we need image/video formats that are "responsive by design", like JPEG2000 and FLIF (and progressive JPEG to some extent).
Writing out the detailed spec is going to take some effort.
Encoding those 369 PNG files to a LOSSLESS BPG animation (using bpgenc 0.9.6 with options -lossless -a) produces a .bpg file of about 50MB.
Encoding them to APNG (using apngasm 2.7) results in a 57MB animated PNG file.
The corresponding progressive FLIF animation is 20 MB.
Obviously it is not a good idea to losslessly encode lossy images/movies, as a lot of bytes are wasted on encoding compression artifacts.
https://en.wikipedia.org/wiki/APNG should be a better alternative for GIF-like images (including transparency and low bit depth), and MP4 + H.265 should be the alternative for movie-like content. For most platforms, you might even get decoding support in hardware, so performance and battery life shouldn't be anything but better vs this.
H.264/H.265 are good for both Gif-like and movie-like content. Bandwidth isn't cheap. Although APNG has inter-frame compression, it is nowhere near as sophisticated as H.265 let alone H.264.
If I want animation, why would I use a format that puts a burden on users, when alternatives already exist?
Don't get me wrong, I totally acknowledge that we still have the issue of mp4 files not autoplaying on mobile browsers. However, once that is solved, I would avoid APNG and Gif, in favour of said video format.
Here's hoping that one day, BPG is adopted widely, so that I can forgo mp4 and APNG/Gif entirely for use cases that cover short animations for aesthetic reasons.
Albeit, I do admit, for the time being, I will resort to using mp4 and OGG on the desktop browser, and either a static image or APNG on the mobile browser.
edit: some clarification
I'm not sure that meme generators have royalties very high on their list of concerns, the big hosts that host a lot of them might have some concerns about it though.
At this point, a newer webP based off the newer VP10 might be the only realistic PNG, GIF, and JPEG replacement but it doesn't exist yet.
For H.265, both need to pay royalties, which depend on the business model. The licensing terms are pretty much totally unsuited for usage as a still image format. And yes, there are multiple pools and you have to pay all of them.
http://www.mpegla.com/main/programs/AVC/Documents/avcweb.pdf
H.264 is similar for the MPEG pool:
http://www.mpegla.com/main/programs/HEVC/Documents/HEVCweb.p...
[1]: http://xooyoozoo.github.io/yolo-octo-bugfixes/#production&bp...
Separately, though, take a look at other features of the image: the beams running lengthwise down the shell, specifically the ones on the top left of the image. The BPG version makes them look niceeeeee and crisp, whereas the WebP version looks very bad.
Other places where I think the BPG compression looks noticeably better: her uniform (right sleeve, right leg, etc), the rivets along the top edge of the platform she's standing on, where she's grabbing that power tool.
One thing I noticed in the BPG version is that some gradient areas have more visual banding compared to the WebP version.
Are there trust issues with allowing third-party MP4 embeds into user-submitted content such as forums/hosted blogs? Do we need a "no sound"/"max file size" attribute on the video tag?
Hence why there is a push for alternatives to Gif/APNG and mp4/webm. We want a video-like animation, that plays on page load.
Now, the real question is, why don't mp4s play when we hit play?
I can only speculate, but I think it's because mp4s are streamable media, where a troll can simply decide to keep streaming mp4s and drain the user's bandwidth. (Never mind the fact that it is also a problem with Gifs.)
Not all of us want that. In fact many of us would rather decide for ourselves whether or not to play an animation, sound or not.
Like no shit? It's not natively supported in browsers, and OP makes a call for everyone to push browsers to natively support it.
I mean like, geez, I want a proper video-like playback format (e.g. 24+ frames per second) at a smaller file size, so that I can view videos on my mobile phone.
Gif lags on mobile internet, and MP4 requires that we explicitly hit the play button on mobile browsers.
So either we adopt a format like BPG, or adopt another format based on h.264/h.265/VP8/VP9/Theora but for the sole purpose of being a Gif-like animation.
If we rejected every feature that began as mere half-baked polyfills, we wouldn't have the web that we have today.
Here's just a few examples:
- images for rounded corners
- Gif/Flash/JavaScript for animations
- Cookies for storage
- Flash for browser-based webcam calls, etc.Wouldn't the more obvious choice be simply adding an option in browsers to not require hitting the play button (perhaps for MP4 that has no sound)?
Even with browser support for BPG, MP4 has the huge advantage of hardware acceleration in almost all modern devices[1].
[1] In theory, BPG may be able to take advantage of similar hardware acceleration, but why not just fix the user experience around an existing format rather than implement yet another format?
It's a bit ironic that the autoplay functionality of BPG is touted by some as a major advantage, yet the only reason it autoplays is because it currently has to be implemented in Javascript (bypassing the normal push-to-play behavior of web video).
If the people pushing for native BPG browser support get their way, the most likely outcome will be BPG implemented with the same push-to-play UX as any other kind of web video.
They do, in Firefox! http://kb.mozillazine.org/Firefox_:_Tips_:_Animated_Images
(I know this is really late, but HN has been really aggressive about "submitting too fast" lately, and a half hour's wait didn't convince it to let me try again.)
This is basically what Imgur did with GIFV (http://blog.imgur.com/2014/10/09/introducing-gifv), I think.
Were this fifteen years ago, I'd recommend that the makers of this format create a proper plugin to handle this format in the interim, but because browser makers are terrified of extra functionality, especially on mobiles, we can't do that anymore.
Tried to just view the BPG alone by right clicking and "view image". it just gave a static png though. Amusingly the URL of the static picture is amazingly long (at least thousands of bytes) and does nasty things to my computer when I tried to copy it.
Edit: It actually appears to be the images encoded since it starts with "data:image/png;base64"
its a serious question, in 2 years HVEC decoders will be in all hardware. Which means fast, energy efficient decoders on virtually all platforms.
Having a seperate codec, which is basically a less capable version of an industry standard, whats the point? (ignoring the still images part for a second.)
The BPG standard[1] says P-slices are used, but not B-slices...
[1] sec 3.3 http://bellard.org/bpg/bpg_spec.txt
I welcome an image format alternative to webm.
It seems like a great replacement for animated GIFs.
So, basically, it was rejected due to a pissing contest on the least important part of the specification.
But libpng provides callback methods for "unknown" chucks, so the application can read and handle them. So it's possible to process APNG with libpng.
Q @ anyone whom chimes in: what format(s) do sites use for silent, live-action backgrounds to make their websites and apps seem friendlier?
View source, CTRL-F and...
https://eek.ro/assets/bpg/ambition.bpg
Kind of inconvenient. Not to mention it's a blank white empty space in Firefox, and probably anywhere else not currently supporting the format.
On the other hand, mp3 found its way into common parlance just fine, despite being decidedly unpronounceable as a word, so who knows.
Irony of course being the eternal debate over how to actually pronounce GIF: http://howtoreallypronouncegif.com/ ;-)
HEVC Advance now changes an additional 50M/year to the 25M/year with MPEG-LA.
nough said, I'm sold!
>unresponsive script
>[continue execution] [stop]
If we rejected every feature that began as mere polyfills, we wouldn't have the web that we have today.
Here's just a few examples: we would need images for rounded corners, Gif/Flash/JavaScript for animations, Cookies for storage, Flash for browser-based webcam calls, etc.
So BPG (or others) could replace GIF for the way GIF is commonly used today, rather than a direct 1:1 drop in replacement in all scenarios. If you really need lossless then continue to use GIF, support isn't going away soon, but for small soundless animations, a better alternative may be welcomed.
PS - The statement "The author clearly doesn't know what they're talking about." is inflammatory and needless. The author never said anything either way about lossless/lossy.
[0] https://www.w3.org/Graphics/GIF/spec-gif89a.txt
> Animation - The Graphics Interchange Format is not intended as a platform for animation, even though it can be done in a limited way.
So yeah, GIF wasn't intended for this use case. But that's the use case it has right now.
Go back 20 years, and "GIF" means a 256-color losslessly compressed image, occasionally animated. Today, "GIF" nearly always means a short looping video with horrible compression.
Practically speaking, today, "GIF replacement" means doing a better job for short, looping videos, because that's all GIF has left at this point.
As long as Chrome/Webkit doesn't support APNG, there's no ubiquitous format that directly replaces GIF.
>Today, "GIF" nearly always means a short looping video with horrible compression.
To me, GIF means an image format. The fact that many people misuse the terminology doesn't mean we should propagate it. Instead, people should be educated on the difference between lossy video formats and image formats that support animation, and which is preferable for various sorts of media. Articles like the OP only confuse the issue further. As someone who has authored animation-editing software (Animstack script for GIMP), it's a major pain in the ass to explain these misconceptions to users. The least we can do is to use correct terminology, and educate people at every opportunity.
That's a fun trick, to quote one sentence and disagree with it in a way that is already covered by the following sentence stating there is an exception.
Do you find this helps further the conversation?
Both GIF and APNG support:
- palettes
- transparency
- different delay per frame
- combine/replace disposal mode per frame
Generic video formats don't generally support these.
We already have 'short video clip' formats that are better than gif.