Thread 105989788 - /g/ [Archived: 80 hours ago]

Anonymous
7/22/2025, 7:37:49 PM No.105989788
images (1)
images (1)
md5: 1cea36e83de63c1af464a079c73c2e0e🔍
Can the now popular VP9 video hardware decoder be tricked into decoding an "image"?

All this "Webp bad!" talk recently has me curious about something. Since the slop image codec is based on the VP8 video codec, wouldn't it then be possible to also punk out another format like this using VP9? Webp 2 seems to point to this but apparently it's an abandoned project.

https://chromium.googlesource.com/codecs/libwebp2/

Anyway how could this work? I doubt it's as simple as

ffmpeg in.png c:v libvpx-vp9 out.webm
Replies: >>105989798 >>105990258 >>105990327
Anonymous
7/22/2025, 7:38:37 PM No.105989798
>>105989788 (OP)
>I doubt it's as simple as
well? have you fucking tried?
Replies: >>105989824
Anonymous
7/22/2025, 7:41:07 PM No.105989824
1752471932483712
1752471932483712
md5: d5f3dc29ed2f3c4809697f4ab59a62b8🔍
>>105989798
Yes and my CPU gets raped to smithereens so obviously there's a lot missing into this hack. I want the VP9 hardware decoder to do the decoding not the CPU. Obviously the thing is expecting video not a fucking image so something must be done to trick it...
Replies: >>105990472
Anonymous
7/22/2025, 7:49:24 PM No.105989915
1749764110711816
1749764110711816
md5: a80882348f3d6543f8e65b720812ef4f🔍
I'm gonna try this, convert the image into a webp file and then use that as the input...
Anonymous
7/22/2025, 7:53:41 PM No.105989960
whatdyousay
whatdyousay
md5: 93ad262bded10ecf3645a2e518a12b32🔍
FUCK. Didn't work.

Failed to initialize encoder: ABI version mismatch
[vost#0:0/libvpx-vp9 @ 0x7d8a897780] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
Anonymous
7/22/2025, 8:16:58 PM No.105990241
1_L64kghIljb9ihN7LVP2sJA
1_L64kghIljb9ihN7LVP2sJA
md5: ae73f92724eada8d50a04a1d1c79270b🔍
An image that looks like a regular VP9 video that's decoded by hardware decoders instead of the CPU. Maybe there's some kind of minimum duration expected by the hardware decoder????
Anonymous
7/22/2025, 8:18:22 PM No.105990258
>>105989788 (OP)
Av1 and AVIF killed this
Replies: >>105990287
Anonymous
7/22/2025, 8:20:33 PM No.105990287
>>105990258
Yes but this shit hole of a website doesn't support anything good so we have to hack it like sharty did.
Anonymous
7/22/2025, 8:23:53 PM No.105990327
1753205869361726_1frame_thumb.jpg
1753205869361726_1frame_thumb.jpg
md5: edaea19878c4d71edb17ef8fe34a9594🔍
>>105989788 (OP)
You mean like this? This is all old stuff.
Replies: >>105990354 >>105996762
Anonymous
7/22/2025, 8:26:08 PM No.105990354
funny-meme-about-how-flies-mess-up-your-sleeping
funny-meme-about-how-flies-mess-up-your-sleeping
md5: a536e176b902a9e194adc316fb27c08c🔍
>>105990327
This doesn't play at all. We have to bullshit the VP9 hardware decoder into thinking it's decoding actual legitimate video somehow.
Replies: >>105990474
Anonymous
7/22/2025, 8:26:29 PM No.105990363
You know you can create video files that are 1-frame in length and endlessly loop. Right?
Replies: >>105990392
Anonymous
7/22/2025, 8:29:30 PM No.105990392
nigger_alarm
nigger_alarm
md5: 26bebc074fda3f4d6a6b40ef772566fc🔍
>>105990363
Yes but they rape the CPU so it's not bullshitting the hardware VP9 decoder "enough".

My best guess so far is the input image MUST be a lossy .webp file because this is in fact a hacked VP8 video stream. BUTT it's not being hardware decoded...
Anonymous
7/22/2025, 8:37:31 PM No.105990472
goofy-goober-horny-spongebob
goofy-goober-horny-spongebob
md5: 6e7bf65b8288724f064bb163f5c20601🔍
Here's a quality 100 Webp of >>105989824

https://files.catbox.moe/wvhrx3.webp

Now it just needs to somehow become a "valid" VP9 video stream for the hardware decoder somehow.

BUTT HOW DOE...
Anonymous
7/22/2025, 8:37:47 PM No.105990474
1753205869361726_1frame_thumb.jpg
1753205869361726_1frame_thumb.jpg
md5: 7cf58206573068ffdc1f91e8370477e0🔍
>>105990354
That's cus your hw decoder sucks and lacks support for 12-bit. Anyway, your research is useless as all of this has been superseded by avif as already mentioned.
Replies: >>105990564
Anonymous
7/22/2025, 8:44:36 PM No.105990564
>>105990474
Nope, this is still not it. CPU goes into overrdrive. A 2 minute duration SHOULD be bullshitting the hardware decoder but yet it's still not enough...
Anonymous
7/22/2025, 8:52:58 PM No.105990663
Euthanasia_Coaster_705x510
Euthanasia_Coaster_705x510
md5: 365cdf8fcb4cfa2b483dceb51487bfae🔍
Maybe the hardware decoder just doesn't like iterating through a single video frame over and over again. I looked up online and I found this, maybe this is the key?

https://ottverse.com/how-to-loop-videos-using-ffmpeg-step-by-step-tutorial/
Anonymous
7/22/2025, 9:08:10 PM No.105990877
out_thumb.jpg
out_thumb.jpg
md5: adf765c5d289908e8d572c415da90e36🔍
I think I got it, setting the stream loop to 1 and framerate to 1 at the beginning seems to bullshit the hardware decoder enough.

ffmpeg -framerate 1 -stream_loop 1 -i in.webp -c:v libvpx-vp9 -y out.webm

4chan only allows 2048x2048 video res max which is a huge shame since VP9 hardware decoders support 4096x2048, right?

So again this only seems to work if you open your image in something like GIMP and save it to a 100 quality .webp file first FYI.
Anonymous
7/22/2025, 9:21:48 PM No.105991024
in
in
md5: 8e6c226720a78ba1405042ca4cb13db3🔍
Here's a 2048 x 2048 crop of this nasa image:
https://upload.wikimedia.org/wikipedia/commons/9/91/Bruce_McCandless_II_during_EVA_in_1984.jpg

Saved as a 100 quality Webp file:
https://files.catbox.moe/d70lo0.webp
Anonymous
7/22/2025, 9:33:52 PM No.105991153
out_thumb.jpg
out_thumb.jpg
md5: 5a53afc5003bd85839bc5233219636a8🔍
When I calculate the SSIM compared to the massively bloated JPG of 3.6 MB I get 0.98 SSIM. A high quality score is 0.99 SSIm or greater so default VP9 settings aren't the best, tuning that will be next.

ffmpeg.exe -i out.webm -i in.jpg -lavfi ssim=stats_file=ssim_logfile.txt -f null -
Anonymous
7/22/2025, 9:59:17 PM No.105991414
Trip on daiz
Anonymous
7/22/2025, 10:02:47 PM No.105991455
out2_thumb.jpg
out2_thumb.jpg
md5: bb8e07d8e328ed7840c71f73446655f6🔍
Getting a quality setting to stick seems to be very tricky but I think I managed to force it to stay consistent for images. With a q? min/max + crf value of 5, it produces 0.99 SSIM against the quality 100 .webp input file. VP9 webm file size is roughly 30% smaller than the webp so that aligns with compression efficiency gains expectations as well.

Anyway here's the new webp to vp9 webm conversion params that also focus on the best quality possible and not just the default "good" quality.

ffmpeg -framerate 1 -stream_loop 1 -i in.webp -c:v libvpx-vp9 -quality best -crf 5 -qmin 5 -qmax 5 -y out.webm
Anonymous
7/22/2025, 10:30:27 PM No.105991684
in
in
md5: 1aea41352b010b4aae2b460fd4dcaca7🔍
One more image before I go find something to eat but yeah pretty cool that if your autism so desired it, it is possible to get highly compressed images on 4chan that are also VP9 hardware decoded through this somewhat convoluted process.

https://files.catbox.moe/03940h.webp
Anonymous
7/22/2025, 10:31:36 PM No.105991698
out_thumb.jpg
out_thumb.jpg
md5: b12c57c2595a3fbb3e0e2fc2cbeedbd9🔍
It's interesting to note that converting an image into a "video" doesn't affect black and white images. Only color images are actually affected.
Anonymous
7/23/2025, 12:53:50 AM No.105993162
confused-no
confused-no
md5: 63e14601f9db67847e4943831781e949🔍
So why doesn't using a normal image format like PNG work? I tried to make one and it won't even play on my phone.
Anonymous
7/23/2025, 2:47:26 AM No.105994065
in
in
md5: 4f3879cec07b9debab8fbb9ad15b411f🔍
I wonder if transparency works, VP9 supports yuva420p (but not yuva444p sadly).
Replies: >>105998064
Anonymous
7/23/2025, 2:48:31 AM No.105994070
out_thumb.jpg
out_thumb.jpg
md5: 4db3ed5af8388a29c76d6bf6cff8d80d🔍
test
Anonymous
7/23/2025, 2:52:17 AM No.105994103
out_thumb.jpg
out_thumb.jpg
md5: fa292999f4ac3e2e15c33b0ac463f679🔍
test2 with -auto-alt-ref 0
Replies: >>105998064
Anonymous
7/23/2025, 3:02:38 AM No.105994191
out_thumb.jpg
out_thumb.jpg
md5: fbd32a1e90ac0b71ca5d2aae307f2943🔍
test3 with the old vp8 encoder + -auto-alt-ref 0
Replies: >>105998064
Anonymous
7/23/2025, 7:16:46 AM No.105995806
sweet-dreams-are-made-of-this_thumb.jpg
sweet-dreams-are-made-of-this_thumb.jpg
md5: 8e91f9d31e5e08c4a854afedff27245c🔍
>alpha mode 1 missing from 4chan webm after upload
Hmm so it seems 4chan strips the transparency metadata from webms you upload here. That fucking blows, this bullshit thread could have been exponentially more useful otherwise. On a related note it seems that ffmpeg supports webp natively now so all of this can be done through 1 line, like this:

for %f in (*.png) do ffmpeg -i "%f" -quality 100 "%~nf.webp" & ffmpeg -framerate 1 -stream_loop 1 -i "%~nf.webp" -c:v libvpx-vp9 -quality best -crf 10 -qmin 10 -qmax 10 "%~nf.webm"

I'm not sure what resolution would be ideal but I'll try to stick with 720p since that seems like the minimum resolution VP9 was intended for and fits nicely on a 1080p display. Also crf 5 seems kinda overkill imho, I don't notice a huge improvement over crf 10 so I'll be using the latter.
Replies: >>105998064
Anonymous
7/23/2025, 9:48:16 AM No.105996586
j_thumb.jpg
j_thumb.jpg
md5: ef747d610eb3707805a73db66cca0464🔍
Man, this isn't going to be anywhere near as fun because webp transparency is disabled.
Anonymous
7/23/2025, 10:19:24 AM No.105996762
>>105990327
This would cut down on the phoneposters shitting up our boards with twitter screenshots. I wouldn't mind desu.
Anonymous
7/23/2025, 11:33:43 AM No.105997167
OP how many stimulants have you consumed today?
Replies: >>105999296
Anonymous
7/23/2025, 2:09:19 PM No.105998064
>>105994065
>>105994103
>>105994191
>>105995806
Fucking stupid newfag
Replies: >>105999339
Anonymous
7/23/2025, 4:44:12 PM No.105999296
>>105997167
Tell that to the dev team that won't allow for better image formats. This is a solution to that problem.
Anonymous
7/23/2025, 4:49:24 PM No.105999339
1749053295719402_thumb.jpg
1749053295719402_thumb.jpg
md5: 043ab3f3048cf2e15ecad5cddb6d8e25🔍
>>105998064
I still don't get why they decided to remove it. Does Jay™ really have that much say in the tech stuff?
Replies: >>105999899
Anonymous
7/23/2025, 5:54:17 PM No.105999899
>>105999339
People were hiding pizza in the metadata. 4chinz started scrubbing it all over 3 years ago. Go back.
Anonymous
7/23/2025, 6:25:49 PM No.106000168
bleh_thumb.jpg
bleh_thumb.jpg
md5: 9a6ed871384bec705c587ef97bdb5a13🔍