Closed ItachiUchiha-IU closed 2 months ago
Hi,
Thanks so much for your detailed issue report! For now, we're likely going to wait until we see a response from mainline SVT-AV1 on this & take some kind of action depending on how they proceed. In the meantime, it may be helpful to provide the exact settings you used & with which tool (FFmpeg, SvtAv1EncApp, etc) to both this issue & mainline's issue report to make troubleshooting easier. I hope this gets resolved, for both of our sakes!
Thank you for the fast reply! I absolutely agree, it rly should be something the mainline guys fix themselves, and I rly hope they do, avoiding you guys any trouble/work (in case you decide to look into it yourselves if they don't).
The issue appears to be caused directly by temporal filtering, so it should happen with any kind of settings combination or tool. In short, from my perspective, whenever tf is enabled, the issue occurs, no matter the settings/tools.
I tested (on Windows) with crf 7, 11 and 12 with the following tools and settings:
Av1an + SvtAv1EncApp (SVT-AV1-PSY v2.0.0-9-gc76ddcfd and SVT-AV1-PSY v2.1.0)
& "C:\av1an\av1an.exe" -i "${inputpath}$file" -e svt-av1 -w 6 --resume --verbose -c mkvmerge -m lsmash --zones "${inputpath}zones ep1 crf12.txt" -a "-c:a copy" -v "--crf 7 --preset 2 --film-grain-denoise 0 --film-grain 6 --tune 3 --aq-mode 2 --variance-octile 6 --variance-boost-strength 2 --sharpness 3 --keyint 240 --input-depth 10 --color-primaries 1 --transfer-characteristics 1 --matrix-coefficients 1" -o "${outputpath}$prefix$filename$extension" --temp "${inputpath}temp_$filename"
Other Settings tested: tune0, tune1, overlays ON/OFF, restoration ON/OFF, cdef ON/OFF
Tested also with completely clean and default settings, same issue
SVT-AV1-PSY v2.0.0-9-gc76ddcfd (without Av1an)
--crf 7 --preset 2 --tune 2 --aq-mode 2
ffmpeg with mainline SVT-AV1 v2.1
ffmpeg -i "$file" -map 0:v:0 -map 0:a? -map 0:s? -map 0:d? -map 0:t? -c:v libsvtav1 -preset 1 -svtav1-params "crf=7:tune=0:film-grain-denoise=0:film-grain=6" -pix_fmt yuv420p10le -c:a libopus -b:a 128k -c:s copy "output\$prefix$filename.$extension"
Other Settings tested: tune1, overlays ON/OFF, restoration ON/OFF, cdef ON/OFF
I updated the manline's issue report too. Thank you again!
I think this issue is out of scope for our project, so for now I'll tentatively close this. If you're experiencing the same issue, please see the mainline bug report
I think the same, as I realized that the whole tf matter is way bigger than what it seemed at first: it would require a complete or at least "partial" (probably very big part) rework of it (if Im not wrong interpreting how it works).
Btw I was testing the new tf-strength setting just in these days (as I sadly couldnt before) and I can say that being able to adjust the strength of the tf is already a good solution to mitigate the problem on keyframes and the few following frames sometimes affected. Furthermore, it allows even more tuning, thus allowing even more control on the final result of the encode and not resulting in the user having to completely disable the tf (which was the worse option, as it made the file substantially bigger in size and worse in visual quality often without even normalizing the bitrate, at least at the lower crf ranges that I use and test).
So yeah, with the addition of tf-strength I would say anyway that the specific bug on the tf can now be considered unimportant (especially for the psy project) as tf-strength substantially did the trick in improving the tuning and usage of the tf !
Personally I think it could be useful to mainline too (at least as partial workaround to the real problem), so idk if u guys want to propose it in the mainline bug report or as merge request or somewhere else or if u're simply not interested. In case u want to do it, I just advise to propose it with strength 3 as default instead of 1 as I was said that's the strength that tf had before the addition of the strength, thus getting the same file as before if Im correct.
As always, thanks for all your work, I rly appreciate it.
Another potential related addition might be a separate tf-strength-keyframes setting, or simply a ratio to turn tf way down on keyframes.
I just made an issue report on the gitlab of the mainline version of svt-av1, as this issue is present in all versions of both mainline and psy (SVT-AV1-PSY v2.0.0-9-gc76ddcfd, SVT-AV1-PSY v2.1.0 etc.). I'm reporting this to you guys too as you may be more interested in this, as you're way more attentive to quality than the mainline. But if this issue is something that the mainline should fix, then take this just as information. Here's the link to the issue report: Bug on keyframes with tf enabled
The issue is as stated in the title: with tf enabled, the keyframes are bugged. In most cases the picture is completely washed of all the details, and this continues in the following 4~12 frames, then it reached the best quality that remains until the next keyframe. In other cases there are huge artifacts, and this gets completely fixed in the exact following frame.
I made some comparison to make it easy to see: https://slow.pics/c/3gUTULwA
As you can see in the 4th image, when enabling tf, there's a gigantic artifact on the right (the place is completely random, I've found one right in the middle of the frame), which, as said, gets fixed completely in the following frame.
In pictures 1,2,3 you can see the 'details washing', but in this case it takes 4, 8 or 12 frames to fix the image (I'm not sure if it's comprehensible what i just wrote, so I'll rewrite it as a spoken commentary from what I can see looking at the video frame by frame: looking at the keyframe, it's easily noticeable how the keyframe lacks in details, but then, at the 4th or 8th or 12th frame after the keyframe the image suddently becomes way more detailed, and then it retains that level of details until a new keyframe comes).
The clips are downloadable from the gitlab post, otherwise here I repost the links that download the files uploaded on gitlab: direct download from gitlab - orig_cut1_Shigatsu_e01.mkv direct download from gitlab - orig_cut2_Shigatsu_e01.mkv
Notes: I tried changing several multiple settings (tune, mode, overlays, restoration, cdef etc) but nothing seems to fix this issue.
I conclude saying my huge thanks for all your work, as the psy version is rly something admirable.