JPEG vs. JpegXL vs. AVIF

256x192 image targeting ~1500 bytes

Show thread
Michal boosted

"We all know that the best programming language in the world is Qbasic 4.5. It's where many of us learned. It's what hooked me as a tender fellow."

submitted by LostWithInsanity

It turns out selecting AOM codec for AVIF allows to use some "secret" flags [1], which can bring the AVIF size down to 500 bytes.

Obviously the image is unusable, but allows size-for-size comparisons


Show thread

I've been doing some vs. low bitrate comparison (to save space for low-bandwidth image transmission).

When setting AVIF to "worst quantizer", that's when JpegXL just starts to heat up. E.g. sample original 56KB JPEG compresses (lowest quality) to 5KB on AVIF vs. just 1.7KB on JpegXL (the image looks like rubbish but that's not the point in this exercise, it still looks waaaay better than JPG).

I need to explore the parameter space, it can't be that AVIF "can't compress" better...

Having watched too many Corridor Crew videos, when watching "The Gray Man" I could clearly see when the VFX team ran out of time/budget during the tram scene in Prague.

Looking at my wife I was like: "You could clearly see that, right?!" Her response: "See what?"

I've been movie spoiled beyond repair...

Michal boosted

Make your web page look like your favorite operating system (NES, DOS, Win98, WinXP, Win7, ...) with a bit of CSS

The absurdities of low-cost hardware. I just realized that while the TL-WR841N has "300Mbps" Wifi, it connects to LAN only with 10/100 Mbps.

What year is this? Where's my gigabit LAN?

Show thread

Updates turn Windows into an unusable piece of molasses. Literally unusable...

Show thread

Fuck you Windows. I turned you on only because my incompetent goverment does not know about other operating systems.

*Not* to watch the updates grind the computer to a halt and into a slow like molasses boot loop.

"Oh, the user decided to turn us on, better download all the *precious* updates now before he turns us offs again."


Thank you, Reddit question poster, for actually getting back a year later *with an answer that works*!

(Android picture in picture video jumping off screen when you try to move it)

Solution: restart phone in safe mode (TIL that this is a thing!), disable PiP in Youtube app, restart normally, reenable PiP.

Michal boosted
I'm just gonna ramble about codecs for a bit.

Codecs like H.264, AAC, PNG, JPEG, GIF, and even MP3, MPEG-2, and AC-3 are never going to go away. They're going to be with us forever.

Plenty of codecs have come and gone a la RealVideo (.rm), WMA, WMV, FPS1, H.263, DivX/Xvid/MPEG-4 Part 2, VP6, RealAudio (.ra), etc.

Then there are codecs that were pretty much dead on arrival like FLIF.

The image format wars are so fucking fucked right now. On the Chrome (and Firefox because they have no significant market share anymore so they just have to follow whatever Google decides) side you have WebP (AVIF is also starting to gain some traction) and on the Apple/Safari side you have JPEG2000. Safari has enough market share that CDNs will encode JPEG2000 images just for Safari.

The best solution is JPEG XL. However, adoption isn't looking so good.

It looks like AVIF has won the image format wars.

Well, it certainly could have been worse.

I also just found out about Google's Lyra speech codec:

And Microsoft's new speech codec, Satin:

Those are both really cool!

It makes me wonder what could be possible as we get more powerful NPUs and TPUs. Would be neat to use a neutral net to encode video. I guess it is already kind of possible. You could use a neutral net to examine a video and dynamically adjust the encoding parameters on the fly to get the best possible quality.

Actually, I wonder if that's what NVEC2 is doing. Once NVIDIA added tensor cores we got NVENC2. Encoding speed was almost halved compared to previous generations but the quality dramatically went up. At content delivery bitrates like 720p 30FPS at constrained VBR of 3.5 Mbps it'll deliver a higher quality video than x264 on the placebo preset. I bet that's what they're doing. Well, at least it's part of what they're doing. Would be nice to have an open source implementation tho.

Speaking of new possibilities for video encoding, I wonder if VVC/H.266 will learn their lesson from HEVC/H.265 licensing fiasco. Even if licensing is exactly the same as AVC/H.264 I wonder if the industry will adopt it the same as they did with AVC/H.264 or if they'll just embrace royalty free codecs like AV1 because they don't want the possibility of having to deal with all of that shit again with the next generation.

I mean, it seems the industry got burned pretty badly from the HEVC/H.265 licensing mess. I think they've kind of screwed themselves. The industry seems to be embracing royalty free codecs. You needn't look any further than Opus to see that. xHE-AAC outperforms Opus. Especially at very low bitrates. However, the industry sees Opus as good enough and it has received wide adoption while xHE-AAC has revived very limited adoption. And now for speech we apparently have neural net codecs that are royalty free and can work at absurdly low bitrates.

So, even though VVC/H.266 outperforms AV1 I could see the industry saying, "that's cool but this is good enough. We're not doing that again. We'll be making our next codec ourselves to."

I think our future is going to be filled with royalty free codecs that are standard and widely supported.

Thank you for reading my blog post.
Michal boosted

Periodic reminder why I don't watch "TV".

I just turned it on and browsed trough 10 cartoon channels to find *something* for the little one. *All* of them currently had adverts running.

TIL that GNU parallel is >14,000 lines of Perl.

$ file /usr/bin/parallel
/usr/bin/parallel: Perl script text executable
$ wc -l /usr/bin/parallel

Through a simple script we can find that over 1900-2100 there's 730 such dates:

for day=1,365.25*200 do
local time = os.time{year=1900, month=1, day=day}
local d ='*t', time)
if d.year//100 + d.year%100 + d.month + == 68 then
print('%Y-%m-%d', time))

Joining these dates back to Wikipedia for "interesting events" is left as an exercise to the reader (as is reimplementing in other languages).

Show thread

Interesting date math coincidence I've seen on the net:

WWI started 1914-07-28 : 19 + 14 + 7 +28 = 68
WWII started 1939-09-01 : 19 + 39 + 9 + 1 = 68
Ukraine invasion started 2022-02-24: 20 + 22 + 2 + 24 = 68.

“I've come up with a set of rules that describe our reactions to technologies:

1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.

2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.

3. Anything invented after you're thirty-five is against the natural order of things.”

― Douglas Adams, The Salmon of Doubt

Show older

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!