25 ms·
Why BPG will replace GIFs and more
- xutopia 11y agoThe quality between the two formats is stunning... BPG version looks blurry compared to the mp4 version.
- jeffbr13 11y agoAuthor says that the BPG version is re-encoded from the MP4, so lower quality is to be expected. Looking at the linked comparison tool[1], it seems that while BPG and WebP both have fewer artefacts than JPEG at a given file-size, BPG seems to achieve this with waaaay too much smoothing. Seriously, check out the engineer's eyelids in [1]. [1]: http://xooyoozoo.github.io/yolo-octo-bugfixes/#production&bpg=s&webp=s http://xooyoozoo.github.io/yolo-octo-bugfixes/#production&bp...
- tobz 11y agoI take your comment to mean that you find the BPG version of that engineer picture -- being "overly smoothed" -- to be unrealistic, comparatively. I think the face, as a whole, looks crisper. Even though the sharpness isn't there, the lack of visible artifacts just looks plain better. This reminds me, weirdly, of seeing video through an old television. The resolution is poor, but it's not poor in a way where I think the image is fake. Things still look real. 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.
- deleted 11y ago[deleted]
- tux3 11y agoNote that BPG is based on HEVC still frames, and may be more patent-emcubered than current alternatives. https://en.wikipedia.org/wiki/Better_Portable_Graphics#Patents https://en.wikipedia.org/wiki/Better_Portable_Graphics#Paten...
- Ace17 11y agoWhy not another BPG-like based on VP9, then?
- IshKebab 11y agoThat's basically what WebP is.
- JoshTriplett 11y agoAs far as I know, WebP still uses VP8, not VP9.
- TD-Linux 11y agoWhich is a shame, because it could have big a big leap over JPEG instead of a sidegrade if they had waited a bit.
- ZeroGravitas 11y agoI think one based on VP10 is a possibility, since the Alliance for Open Media now includes all major browser makers except Apple, and a bunch of big websites. 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.
- fnordfnordfnord 11y agoLooks like FLIF can do animations as well. http://flif.info/animation.html http://flif.info/animation.html
- 11y ago
- Grue3 11y agoHow can a lossy format replace a lossless format? The author clearly doesn't know what they're talking about.
- Someone1234 11y agoBecause the internet doesn't need a HUGE lossless animated image format. What it needs is something GIF-like (animated images with no sound) that works universally, is smaller, and doesn't consume too much battery on mobile devices. 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.
- mikeash 11y agoGIF is extremely lossy for this use case since they can't do 24-bit color. In addition to being unnecessarily gigantic, animated GIFs also look terrible for just about anything that isn't pixel art. GIF itself is a lossless format, but when you use it for stuff like this the whole process is super lossy.
- Grue3 11y agoPerhaps GIF wasn't intended for this use case? Oh right, it wasn't. There are plenty of video formats that are. That doesn't make them "GIF replacement".
- Gankro 11y agoWhether GIF was intended for this usecase or not (it wasn't, the GIF spec specifically calls it out as a bad idea [0]), it's overwhelmingly what it's used for in practice. Therefore anything that can displace GIF in this space is a replacement. [0] https://www.w3.org/Graphics/GIF/spec-gif89a.txt 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.
- mdjt 11y agoI had to reload the page four times to get the BPG to load correctly. No thank you, sir.
- jedberg 11y agoWow, this throws me back to the early 90s, when we would basically have the same discussions about JPEG vs GIF. At the time most graphics programs could open a GIF you downloaded with your modem, but if you wanted to view a JPEG you had to jump out to a separate program, and everyone said that as soon as there was native JPEG support no one would use GIF anymore.
- mikeash 11y agoIf people said that then they were silly, because JPEG and GIF solve different problems. JPEG didn't displace GIF because JPEG doesn't actually do a good job of compressing the images that GIF is good at compressing. Note that once a format came along that was good at those, namely PNG, it did displace GIF pretty much entirely for the still-image use case.
- jobu 11y agoDoes anyone know why the APNG format was rejected by the PNG group? (https://en.wikipedia.org/wiki/APNG https://en.wikipedia.org/wiki/APNG) It seems like a great replacement for animated GIFs.
- jcranmer 11y agoAPNG was rejected primarily because it used image/png when it was clearly a video, and the WG felt that images shouldn't handle video. When video/png was offered instead, Mozilla rejected that because it felt backwards compatibility was more important. So, basically, it was rejected due to a pissing contest on the least important part of the specification.
- maxst 11y agolibpng is a reference implementation of the PNG format. They don't have to support every third-party extension. 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.
- eeeeeeeeeeeee 11y ago
- izzydata 11y agoI don't care about the quality difference. You can just increase the bitrate and not re-encode from a lossy format to solve most of that problem. I welcome an image format alternative to webm.
- kjsthree 11y agoHow does this compare to FLIF? The responsive features of FLIF seem fantastic. http://flif.info/ http://flif.info/
- nikolay 11y agoWow! This is amazing!
- rightnow 11y agoLooks great!
- jaredcheeda 11y agoIn the part where it says "Spot the difference" and everyone says "The BPG one looks worse". That's because BPG, even in "lossless" mode... is lossy. So you're taking a video with H.264 compression artifacts and recompressing it with HEVC artifacts. The quality can only go down. 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.
- 11y ago
- shanselman 11y agoIt says "Spot the differences? :) There’s none." Really? The BPG is WAY worse, IMHO. It's immediately apparent. I noticed it with my eyes before I parsed the text.
- dsp1234 11y agoI don't even get to spot the difference. For some reason on my box chrome pegs the cpu at 25% for about 30 seconds then asks me to kill the page. Stripping out the alternate format, the other one plays instantly and with minimal cpu usage.
- sandyarmstrong 11y agoRead further down: "Current example is around 8-10s" If you let it run for awhile it eventually decodes.
- salehenrahman 11y agoMP4 to BPG conversion. What else did you expect? 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.
- shanselman 11y ago
- stonogo 11y agoHundreds of millions of devices support GIF and JPEG and will never support patent-encumbered processing-intensive newcomers.
- dorfsmay 11y ago> By Fabrice Bellard nough said, I'm sold!
- diego_moita 11y agoMe too. That guy is smart.
- web007 11y agoImplementing an image format via JS is cool, but I'm not sure what the use-case is for this format that isn't already covered (and supported in browsers) by other formats. https://en.wikipedia.org/wiki/APNG 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.
- salehenrahman 11y ago> [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. 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
- talideon 11y agoCan H.264/H.265 do that in a lossless fashion?
- salehenrahman 11y agoNo, hence, Gif/APNG are good for lossless animations. But for sites like imgur that host animations, I would like it if their gifv format (pretty much mp4/webm) played immediately on my mobile, without it having to be a gif file.
- slyall 11y agoI found the BPG was stuttering. 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"
- martinko 11y agoInteresting to note that the MP4 stops playing when off-screen, while BPG does not. Also, I too find the BPG quality worse.
- 1ris 11y agoAnd here is why it wont: >unresponsive script >[continue execution] [stop]
- salehenrahman 11y agoUhmm... OP is demonstrating an example using a JavaScript-based polyfill. 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.
- kalleboo 11y agoWhy can't we just use MP4? Add an inline JavaScript decoder for Mobile Safari, and then at least all the other browsers get instant hardware decoding. 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?
- salehenrahman 11y agoVideos--more specifically mp4 videos--can be embedded into web pages. They just don't autoplay on mobile browsers. 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.)
- tallanvor 11y ago> We want a video-like animation, that plays on page load. 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.
- ucho 11y agoGIF sites are moving to GIFV that is just a video file, it looks like there is no real need for any new format.
- ss64 11y agoI just get an 'unresponsive script' error from line 95 of https://eek.ro/assets/js/bpgdec8a.js https://eek.ro/assets/js/bpgdec8a.js
- deleted 11y ago[deleted]
- Eekz 11y agoYou need to 8 seconds for the BPG to load, the web page is completelt unresponsive until it loads :(
- salehenrahman 11y agoHalf the comments are pointing out that BPG is implemented in JavaScript. 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.
- salehenrahman 11y agoAnd also, I might point out, from an earlier comment that I posted; the BPG decoder is merely a polyfill. 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.
- dperfect 11y ago> Gif lags on mobile internet, and MP4 requires that we explicitly hit the play button on mobile browsers. 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?
- CaptSpify 11y agoHonestly, I view the need to hit the play button as the right user-experience. Sure, a user-defined option to turn that off would be cool, but I'd never use it. I wish GIFs had that option as well, actually
- 11y ago
- northisup 11y agoyou can't pronounce BPG like GIF, so I can't see a future for it.
- davnicwil 11y agoCan't tell how serious you're being, but there's definitely something to that! 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/ http://howtoreallypronouncegif.com/ ;-)
- fnordfnordfnord 11y agoNobody pronounces GIF correctly anyway.
- err4nt 11y agoBee-Peg
- aargh_aargh 11y agobee-pee-...jay?
- qwertyuiop924 11y agoThis looks cool, but seems to have too many issues for me to go all in right now.
- Paul_S 11y agoI just get a blank frame on up to date FF. Chrome grinds to a halt.
- KaiserPro 11y agoBPG is basically HVEC, so why not just use HVEC? 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.)
- beefman 11y agoHEVC, yes. But is a BPG animation the same as an HEVC video, or is it a sequence of BPG frames? The BPG standard[1] says P-slices are used, but not B-slices... [1] sec 3.3 http://bellard.org/bpg/bpg_spec.txt http://bellard.org/bpg/bpg_spec.txt
- KaiserPro 11y agoright, how is that useful? thats my point, how does that give you something more useful than HVEC it's self.
- th-ai 11y agoAnyone else try drag/drop BPG? Didn't work for me. GIF thrives despite flaws because works everywhere, easy to use, remix, and above all: easy to share.
- beefman 11y agoHow do the new lossy video formats work for looped videos? It looks like gifv has been accepted by r/perfectLoops...[1] Do HEVC etc require the last frame of a video to be a keyframe? Are predicted frames specified at the same quality level as keyframes? [1] http://www.reddit.com/r/perfectLoops http://www.reddit.com/r/perfectLoops
- ourcat 11y agoWouldn't something like a looping MJPEG do the trick too? It's just effectively a 'flickbook' of JPEGs.
- _asdf_asdf 11y agoRight-click save as... oh. Not so much. View source, CTRL-F and... https://eek.ro/assets/bpg/ambition.bpg 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.
- err4nt 11y agoSome would call inability to save a feature, like copy protection by accident
- dberg 11y agoanyone else misread this as BGP by accident ?
- xupybd 11y agoIf there is one thing history has taught us, it's that it's not always the technically best solution that wins in the long run.
- ranrub 11y agoWe ran FLIF and BPG on 200,000 random images - FLIF won http://cloudinary.com/blog/flif_the_new_lossless_image_format_that_outperforms_png_webp_and_bpg http://cloudinary.com/blog/flif_the_new_lossless_image_forma...
- ksec 11y agoIf only we could get away from the patent issues. HEVC Advance now changes an additional 50M/year to the 25M/year with MPEG-LA.