
OHIO umigalaxy
I noticed this place supports AV1, hope it's cool if I crosspost from 4chan's /g/ board. I present you a script that targets SSIM, only 1 input video file per folder though.1 problem: AV1 cheats in SSIM. It intelligently preserves the structure of video but destroys fine detail. However these disable SSIM cheating:@echo off & mkdir temp :loop set /p crf="CRF? (30-50 reccomended): " for %%f in (*.mkv, *.mp4, *.mov) do ( ffmpeg -i "%%f" -c:v libsvtav1 ^ -crf %crf% -preset 4 -pix_fmt yuv420p10le -svtav1-params ^ keyint=2s:lookahead=120:tune=0:enable-variance-boost=1:variance-boost-strength=3:variance-octile=4 ^ -c:a libopus -b:a 64k -y "%%f_CRF-%crf%_AV1.webm" echo: & echo SSIM result: ffmpeg -hide_banner -loglevel error -i "%%f" -c:v libx264 -pix_fmt yuv420p10le ^ -preset ultrafast -crf 0 -y temp/temp_source_2_10b.mkv ffmpeg -hide_banner -i "%%f_CRF-%crf%_AV1.webm" -i temp/temp_source_2_10b.mkv ^ -lavfi ssim -f null - 2>&1 | findstr "[Parsed_ssim" echo: ) goto looptune=0Prioritizes perceptual/visual qualityenable-variance-boost=1allocates more bits to low-contrast areas (such as skin, clouds, or foggy scenes) that typically suffer from blurring and artifacting in fixed-quantization encoding.variance-boost-strength=3Applies medium strength variance boost, enough to improve quality but not bloat bitrate.variance-octile=4Applies medium strength for the new 8x8 variance algorithm, which is used for adaptive quantization.
All of these not only give you better/accurate SSIM scores but allow AV1 to create subjectively medium to high quality AV1 encodes, not just compete in objective metric pissing contests.
4chan thread now live
https://boards.4chan.org/g/thread/108817526

Now comes the hard part: What SSIM score should a "high quality" and "medium quality" video have? At launch AV1 prioritized low quality at very low bitrates. With new parameters that's not the case anymore.
Thus my OP image to get a rough idea because we do have 2 data points universally agreed upon:
- CRF 18-20 x264 encodes are the golden standard for visually lossless video. 99% of people cannot tell the original and lossy video apart. 0.99 SSIM common here.
- x264 encodes using a CRF above 30 look like ass, no reputable encoding group has ever actively advocated for anyone to use an x264 CRF above 30.
Ignoring the difficult case x264 results, the average SSIM for a CRF 30 x264 encode is about 0.97 SSIM so I think this should be labeled as "medium quality".
High quality is going to be somewhere between CRF 30 and 18, (30+18)/2= CRF 24. I don't know if it subjectively fits well but for testing purposes today I'll assume 0.98 SSIM is "high quality".
Of course this thread wouldn't be complete without video encodes so I've thought of a fun little scavenger hunt, on /wsg/ there's an abundance of Dalits uploading bloated H.264 MP4 videos.
So if you want, help me find them, they'll usually have stupid high bitrates of 2-4 Mbps despite being lowres. Then my script can be used to find a high quality 0.98 SSIM encode from that.
Here's the first Dalit H264 encode: 7.3 Mbps for 720p 60 FPS https://i.4cdn.org/wsg/1778442803409857.mp4
Webm related 0.98 SSIM AV1 rip: 1.1 Mbps with CRF 60 + Preset 4 used or ~85% smaller filesize
BTW I forgot to mention that x264 and SVT-AV1 CRF scales are completely incompatible with each other, so keep that in mind.

second Dalit H264 encode: 2.8 Mbps for 960x540 30 fps https://i.4cdn.org/wsg/1778696897044673.mp4
Webm related 0.98 SSIM AV1 rip: 1.6 Mbps with CRF 40 + Preset 4 (~43% smaller)

Third Dalit H264 encode: 1.2 Mbps for 576x1024 30 fps https://i.4cdn.org/wsg/1778058134624195.mp4
Webm related 0.98 SSIM AV1 rip: 0.5 Mbps with CRF 60 + Preset 4 (~58% smaller)

Fourth Dalit H264 encode: 1.3 Mbps for 1280x720 24 fps https://i.4cdn.org/wsg/1777449505767485.mp4
Webm related 0.99 SSIM AV1 rip: 0.3 Mbps with CRF 55 + Preset 4 (~77% smaller)
Some stuff from the 4chan thread I want to summarize here:
- my OP pic shows x264 CRF to SSIM because AV1 counterparts don't match. Due to legal reasons they can't.
- Original H.264 gets converted to x264 lossless 10-bit to avoid problems wit user encode errors.
- Don't blindly trust objective metrics like SSIM, they're imperfect. Tune 0/variance boost in AV1 mimics x264 output.
- Because AV1 is capable of high quality compression, some H.264 encodes can be compressed with AV1 now.

Fifth Dalit H264 encode: 0.6 Mbps for 852x480 24 fps https://i.4cdn.org/wsg/1778215818966147.mp4
Webm related 0.99 SSIM AV1 rip: 0.35 Mbps with CRF 55 + Preset 4 (~42% smaller)

Sixth Dalit H264 encode: 1.1 Mbps for 942x720 30 fps https://i.4cdn.org/wsg/1777594847738622.mp4
Webm related 0.99 SSIM AV1 rip: 0.5 Mbps with CRF 60 + Preset 4 (~55% smaller)