Image compression

>Opus for audio
>AV1 for video
>??? for pictures
What's the cutting edge there? I've been long bothered by that if I set 5Mpix camera shots on good quality one jpeg takes more space than Opus encoded song. Spotted also manga collection of one series size 18Gb which is disgusting. As if image compression is stuck in 90's.

Attached: free-codecs-and-containers.png (768x569, 173K)

Other urls found in this thread:

aomediacodec.github.io/av1-avif/
wyohknott.github.io/image-formats-comparison/report.html
people.xiph.org/~tdaede/av1stilldemo/
wyohknott.github.io/image-formats-comparison/#abandonned-factory&webm=s&webm=s
jpeg.org/jpegxs/
i.4cdn.org/g/1548312937811.jpg'
my.mixtape.moe/rxfouw.mp3
twitter.com/NSFWRedditImage

the future is flif

bpg is neato, but like jpeg2000 it won't be widely used.

depends on what for
pngquant is great for screenshots for text that get posted around

FLIF is currently the most efficient lossless codec and the encoder has pretty decent lossy optimization capabilities, but there's no support. BPG is the best when it comes to lossy compression, but again no support (except maybe Apple? Never bothered to check how similar HEIF and BPG really are) and since it's based on HEVC technology that's even less likely to change.

AVIF (the image format based on AV1) is also on the horizon, but right now t's nothing more than a draft.

>AVIF (the image format based on AV1) is also on the horizon, but right now t's nothing more than a draft.
It's literally an AV1 I-frame. So it's more than just a draft.

FLIF. It's more efficient than most other image formats currently available. It's lossless but can be lossy by simply chopping bytes off the end of the file. It also supports animation. It's still missing a few features which is probably why it isn't supported on most browsers and image viewers yet.

Does AV1 have HW acceleration yet?

png

Jpeg xr

HW support is guaranteed but you still have to wait for a few more years for any compatible hardware to come out.

>So it's more than just a draft.
No, it isn't.
aomediacodec.github.io/av1-avif/

not with current development speed

>It's still missing a few features which is probably why it isn't supported on most browsers and image viewers yet.
The problem is that it's missing a big player pushing it. JPEG/PNG/GIF are too popular to be replaced by a new image format simply because it's better.

>AAC
Opus has lots of weirdness and I see no reason to use it just because it wins libretards by default.
>HEVC
AV1 encoders are a joke and likely will continue to be for years, if they won't stay that way permanently like libvpx for VP9. The format has it's weirdnesses too, MPEG/VCEG would do better. Hope for VVC I guess?
>pictures
Dunno, webm seems to do well FOR LOSSLESS (which is a separate compression scheme from VP8/VP9), but I'd expect there to be room for improvement. For lossy I hope HEIF will take off, be it with HEVC or with AV1 (assuming the encoder won't blow). JPEG is really way too old and overstaying just thanks to people's inertia and freetards killing any non-free compression advances with PR campaigns and memeing, like some internet versions of soccer moms.

Freetards really irk me because while they do provide competetive impulses and come with some ideas, they also kill the competition by only "buying" their ideologically clean codecs and not caring about actual compression quality.

First phone socs with support will come in H2 2020, PC processors and GPUs in 2021 (going by what Google presented in fall).

Attached: irurururu.jpg (453x280, 55K)

>Opus has lots of weirdness
>The format has it's weirdnesses too
Can you specify weirdness?
>AV1 encoders are a joke and likely will continue to be for years
Yes, just like with any video codec before. If you want to criticize AV1 then look at hiccups surrounding the specification (e.g. changing it again to make hardware implementation easier). That's where MPEG is definitely more experienced. If freetards have proven one thing then that they CAN produce good en-/decoders. The standard behind it is often the problem.
>Dunno, webm seems to do well FOR LOSSLESS
You mean WebP? WebP is ok at doing lossy and lossless compression, but far from exceeding in either category.
>freetards killing any non-free compression advances with PR campaigns and memeing
The problem are royalties. Nobody gives a shit about the ethics of media codecs and what free software advocates say or use, it's about money. HEVC failed to properly succeed AVC, because of that fucked up royalty situation with 3 patent pools. I bet MPEG will learn from this and make VVC's licensing more straight forward again.

Oh, right, I meant webp, didn't pay attention there.
>Can you specify weirdness?
There is that mandatory resampling for CD audio, but there are other things. For example they now changed the specification and there are multiple incompatible ways to decode a legit Opus file. The guy maintaining support in FFmpeg seems to dislike it more and more. It's a "just works but better don't look at details" sort of format.

>FLIF is currently the most efficient lossless codec
Was it? Perhaps it depends on the content you use but ehm... hcg pics from eroges compress way better than png and even j2000 with lossless webp.

Attached: Don't worry everyone, the perimeter is clean.png (640x480, 315K)

>Perhaps it depends on the content you use
Well, actually I know one category where FLIF absolutely shits the bed. Digital text on a single colored background. Optimized PNG is about half the size of optimized FLIF in such a case.
>hcg pics from eroges compress way better than png and even j2000 with lossless webp.
What encoding settings? Also is your pic supposed to be such a case?

MKV is a container....

Attached: 1548219511236.jpg (1826x1795, 191K)

I used maxed webp (lossless) settings either through cwebp or xnview MP versus max PNG+pngquant and lura jpeg2000 encoder in xnview.

I guess the art style changes a lot though.

Attached: 71dbaf1bb4cbf5d00725f041e832bf158354ccdf.png (800x600, 584K)

Different amounts of sharp edges, gradient and more complex textures.
PNG would probably win on older stuff that was more like pixel art and could have dithering and just 256 colors.

Attached: ad7375d4a55dbbf72155911e2a7b972d.png (1280x720, 1.53M)

Isn't that a bit unfair since pngquant uses lossy optimization? Also were these images already optimized via pngquant?
Nevertheless here are my results.

Versions:
PNG (optimization): ECT Version 0.8.2
WebP: cwebp Version 1.0.0
FLIF: FLIF Version 0.3

Commands:
PNG (optimization): ect -9 --strict
WebP: cwebp -z 9 -o
FLIF*: flif -E -I/-N

* The best result after looping through -E{0,5,10,20,30,60,80,100} (for both -I and -N) was used.

Results:
1st image:
PNG: 230,696 bytes
WebP: 186,662 bytes
FLIF: 149,336 bytes

2nd image:
PNG: 581,118 bytes
WebP: 434,594 bytes
FLIF: 433,512 bytes

3rd image:
PNG: 1,166,849 bytes
WebP: 906,698 bytes
FLIF: 856,741 bytes

Oh sorry, another blooper. I meant pngout (lossless optimizer).

Those are nice results btw, forgot to say.
Does -z 9 imply -m 6 ? (I used that back when I ran these experiments, 1-2 years back).

...

Yes. -z 9 is equivalent to -m 6 -q 100 -lossless

Same is the old maximum compression settings I used then. I should have a look at it too, one of these days. Even has support in XnView.
Though lately I started to be more intrested in lossy formats. We really need something "x264 good" to save large sets of images efficiently, at transparent quality level.

>the future is flif
dead on arrival; the guy needs to stand down and join the ranks of xiph
>AV1 for video
and there's your answer; avif for image

>We really need something "x264 good" to save large sets of images efficiently, at transparent quality level.
You might want to take a look at wyohknott.github.io/image-formats-comparison/report.html
Just be wary of all the results were the command took y4m files as input (e.g. aomenc).

OK FOR FUCK'S SAKE

people.xiph.org/~tdaede/av1stilldemo/

THIS IS NOT THE COMPARISON I'VE SEEN

There was a better one, comparing different releases of AVIF and also FLIF and BPG on the same set of pictures. It also had its sizes mentioned

I know this has been posted in AV1 threads for a year now. But I can't find it. Where is it!?

Save as bmp and 7zip it.

Do you by any chance mean ?

In my experience, for eroge artwork FLIF > lossless WebP >>> PNG. For example.
$ du -b rin_input.png
484684 rin_input.png
$ cwebp -preset drawing -m 6 -lossless rin_input.png -o rin.webp
$ flif -E 100 rin_input.png rin.flif
$ oxipng -o 6 -Z rin_input.png --out rin.png
$ du -b rin.* | sort
362405 rin.flif
388164 rin.webp
462403 rin.png
Someone do lossless JPEG2000. I don't have an encoder.

Attached: rin_input.png (800x600, 473K)

Here's the corresponding comparison screen
wyohknott.github.io/image-formats-comparison/#abandonned-factory&webm=s&webm=s

>wyohknott.github.io/image-formats-comparison/#abandonned-factory&webm=s&webm=s
I'm legally blind and thank you

Unironically Google squoosh

Something more old school with a limited palette. The settings are the same.
$ du -b sos* | sort
33891 sos.flif
34670 sos.webp
36121 sos.png
38939 sos_input.png

Attached: sos_input.png (640x480, 38K)

BPG uses H.265/HEVC techniques for compressing still images, and BPG users are exposed to the same patent risks HEVC users are exposed to.

Can you name what non-free compression advances freetards have killed with PR campaigns and memeing?

How long until 4chin adopts avif?

Attached: HehHehHeh.gif (200x110, 580K)

2037

.jp2 support when? What other image boards/uploading sites support .jp2?

What's the point, unless you're running a board for CT scans? Nobody uses JPEG2k outside of a few specialty applications. Firefox supports WebP natively now, and the future is FLIF and/or AVIF.

They opposed inclusion of proprietary formats into browsers even when it was viably for example via extensions or third-party builds like VLC does it to get around patents.

So we can't have HEVC in browsers (though maybe it works on phones, dunno), JPEG-XR, JPEG2000, H.264 was unavailable in the time when it was most needed (and the theora and later vp8 pushing shit cost us several years of flash usage).

It is true that the MPEG development has also been hurt by the crazy licensing ideas of some of those undermining patent holders, but if the future video standards suck, it will also be the fault of free codecs drawing interest away from them.

Ideological freetards developers also only submit their ideas to the "unencumbered/libre/whatever/royalty free" stuff and keep them out of the pool of techniques that could be used for a better alternative. Mixing those and techniques where there are sane/fair licensing payments a la H.264 could bring a better overall compression technology, so this really hinders technological advancement.

>.jp2 support when?
2137

>Ideological freetards developers also only submit their ideas to the "unencumbered/libre/whatever/royalty free" stuff and keep them out of the pool of techniques that could be used for a better alternative. Mixing those and techniques where there are sane/fair licensing payments a la H.264 could bring a better overall compression technology, so this really hinders technological advancement.
Let me get this straight. Freetards are the bad guys because they only contribute to free standards, but it's ok for MPEG to patent their technologies as long as it's not overdone?

Why not? There is a practical barrier for inclusion of a royalty-requiring feature in a royalty-free standard, so if your stance is that not even a small payments are acceptable (which IS somehwat extremistic), you get what you wanted.

But such barrier is not there in the royalty-accepting world of MEPG/VCEG codec design. Ideally we would get all the best usable ideas integrated there, so that we get a better technology. Because frankly, most of the world has no problem with a format not being completely ideologically pure.
See: VLC

>Opus for audio
>AV1 for video
hw acceleration for older devices?

jpeg xs>>>>>>>> every meme posted up to this post

xs? don't you mean XL?

Think a step further, user. Free standards initially arose because of legal disputes over patent encumbered standards.
Who ensures that MPEG keeps the licensing fees on a sane level, when they have no competition (and they wouldn't if everybody invests their technologies in the same idea pool)?

The idea of free standards in this day and age is far beyond ideological purity. Do you really think AOM has so many members because those companies are interested in ethic technology?

Nah, I think there was always a hardlining core. The freetards campaigned with the same strength against AVC as they did against HEVC. It's not economical or practical stance, it's pure ideology or even partisanship, you could say. Complete with FUD and fanboy behavior.

It is just that when the terms actually became bad, lots of industry players joined them.

>The freetards campaigned with the same strength against AVC as they did against HEVC.
But AVC still managed to gain massive popularity. So either the resistance wasn't as strong as with HEVC or there were other more important factors that made HEVC fail.
>It is just that when the terms actually became bad, lots of industry players joined them.
Exactly. So who killed HEVC if not those who riled up the industry players?

nope, av1 will take over for images as well since everything can hardware decode it.

I wish I was there

>But AVC still managed to gain massive popularity.
codec freetards opposed h.264 in html5 for how long, 5 years? They only capitulated because it became de-facto standard through flash plugin in that time.
It was pretty much a case of being dragged there kicking and screaming.

>Exactly. So who killed HEVC if not those who riled up the industry players?
Point is, for the zealots that was just an excuse that makes them seem more reasonable htan they really are.
If the terms were like with AVC, they would ridicule and FUD them with the same strength, more or less.
(I have been following this space from 2008 so I think I have a very good idea.)

MP3

Attached: mp3_vs_jpeg.png (1024x512, 335K)

bump

They would throw things on you, naturally, and then beat you with those bamboo training swords.

so is weebm
in fact, webm is just mkv with a flag saying it's webm

>AV1 for video
no. not this decade, anyway. too slow.

no

>Yes, just like with any video codec before
VP9 encoders were initially slow and it is still slow today. It's slow but usable. Note the word "slow". AV1 encoders on the other hand are not slow, they are far worse, it's not like waiting for paint to dry, it's more like standing on a beach mid-summer and waiting for snow. Snow will come but it will take a very long time. To put it in simple terms: I don't care that much if it takes three hours to encode VP9 and just two and half to encode the same in similar quality as HEVC. HEVC is faster but it's kind of the same ball-park. Encoding the same video as AV1 with current encoders would probably take a week. We're not talking twice as long or done the next day. This is why AV1 is, to me, not an alternative. It's fair to call it a joke at this stage.

lol looks like analog video

how?

Attached: 1326319499779.jpg (252x252, 6K)

I use webp for my fapcomics on my Android tablet. Hoping AVIF takes off.

HEIF is the new image standard, Supported by both iOS and Android

Bump

>He doesn't know about the supreme piece of Belgian engineering that is jpeg-xs
Come on now
jpeg.org/jpegxs/

>It's fair to call it a joke at this stage.
It's fair to call it a new codec at that stage. It's like saying that HEVC is a joke because it takes so much longer to encode than AVC (which it still does after years of encoder development; it was far worse in the beginning). There's more complexity to it and guess what: It's not going to get better. Each new video codec will be more complex, aimed at even newer hardware.
>I don't care that much if it takes three hours to encode VP9 and just two and half to encode the same in similar quality as HEVC.
But it doesn't. Since libvpx still can't into proper multithreading, you're often talking about a massive difference in encoding time.

just convert image to opus

ffmpeg -i 'i.4cdn.org/g/1548312937811.jpg' -pix_fmt yuv420p -f rawvideo - | ffmpeg -ar 44100 -ac 2 -f u8 -i - -c:a libmp3lame -q:a 2 -y /tmp/out.mp3
my.mixtape.moe/rxfouw.mp3
ffmpeg -i /tmp/out.mp3 -f u8 - | ffmpeg -pix_fmt yuv420p -s 252:252 -f rawvideo -i - -y /tmp/out.png

Attached: out.png (252x252, 125K)

> What's the cutting edge there?
MP3/FLAC for audio
H.264 for video
JPEG/PNG for pictures

Why don't you just relax and enjoy your life? It works, it's supported anywhere and what else would you possibly need.

Is there an alternative to gif that supports odd dimensions?

This. Beats all other formats, and does so rapidly. A PNG I spend a bit of time searching for the approximate ideal scanline filters, and quite a bit of time generating the smallest deflate stream, is rapidly beaten by flif. Deflate just cannot technically compete most of the time.