[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: source.webm (1.16 MB, 512x512)
1.16 MB
1.16 MB WEBM
I think I may have figured out how to fraudently pass off AVIF images as video inside a WEBM container.

ffmpeg -i 1.avif -c:v copy 1.webm & ffmpeg -i 2.avif -c:v copy 2.webm
ffmpeg -i 3.avif -c:v copy 3.webm & ffmpeg -i 4.avif -c:v copy 4.webm & ffmpeg -i 5.avif -c:v copy 5.webm
(echo file '1.webm' & echo file '2.webm' & echo file '3.webm' & echo file '4.webm' & echo file '5.webm') > filelist.txt
ffmpeg -f concat -safe 0 -i filelist.txt -c copy 12345.webm

5 pack of AVIF images (125 KB): https://files.catbox.moe/ei4qf6.zip
those 5 AVIF images converted to a fraudulent (but playable) WEBM (124 KB): https://files.catbox.moe/5r19yu.webm


There's 1 problem though, I have no idea how to reverse this process.
>>
File: 1760948451258196.jpg (21 KB, 460x460)
21 KB
21 KB JPG
>>107669807
Use case for fraudently passing off AVIF images as video inside a WEBM container?
>>
this isn't a fraud or exploit or hack you dipshit it's a design consequence of avif as a filetype that the stream is bitexact identical to an av1 keyframe containing the same rgb data.
>I have no idea how to reverse this process.
ffmpeg -i 12345.webm -c copy %d.avif
>>
File: no-good.webm (41 KB, 1056x720)
41 KB
41 KB WEBM
>>107669839
Amusingly when I try this it fails and gives me a single 124 KB animated AVIF literally named %d.avif but what I really want are my 5 separate AVIF images intact. FUCK, there has to be a way man...

https://files.catbox.moe/xiimgv.avif
>>
>>107669839
And who are you, nigga, the authority on .avif file format?
>>
>>107669850
My bad %0d. It's been a long time since I've used ffmpeg, either I forgot or the API changed.
>>
File: ohno.webm (30 KB, 1056x720)
30 KB
30 KB WEBM
>>107669901
No dice, now it's a single animated AVIF named %0d.avif

There's something wrong here, ffmpeg is holding my 5 AVIF children hostage...
>>
File: 1754929164934079.webm (203 KB, 439x371)
203 KB
203 KB WEBM
Your autism made an invalid video file. Try exporting PNG images named 1.png 2.png 3.png to an AV1 webm first. Something like

ffmpeg -framerate 1 %d.png -c:v libsvtav1 -crf 30 -g 1 -pix_fmt yuv420p autism.webm

And then

ffmpeg -i autism.webm -c copy %d.avif
>>
File: smugy_vignette.webm (1.22 MB, 960x540)
1.22 MB
1.22 MB WEBM
>>107669839
>the stream is bitexact identical to an av1 keyframe
Holy shit, that was the clue. You're a god damned genius. I figured out the other part, apparently image2 expects PNG/JPG, a proper image format but if you switch it on before the output it'll export AV1 video data anyway lol.

ffmpeg -skip_frame nokey -i in.webm -c copy -f image2 %d.avif

https://files.catbox.moe/77pw8j.zip
>>
File: huhhhhhhhhhhhhhhhh.png (282 KB, 1854x1080)
282 KB
282 KB PNG
Bad news, the colors don't match and CICP has now changed. However the good news is SSIM = 1 so the raw YUV data is in fact lossless here.

ffmpeg ignored CICP...
>>
>>107669807
Some guy ong /g/ used to post optimized jpgs/pngs as "webps" that were 1 frame webms.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.