Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Zoning Support #84

Open
tuanden0 opened this issue Oct 20, 2024 · 5 comments
Open

[FEATURE REQUEST] Zoning Support #84

tuanden0 opened this issue Oct 20, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@tuanden0
Copy link

Sometimes during encoding, certain scenes require a higher bitrate or different parameters to meet encoding needs. Similar to how x264 and x265 support the parameter (--zones). Can AV1 support this feature natively instead of requiring users to manually cut the video segments for separate processing, encoding them individually, and then merging them back together? I believe this feature would be very useful. I hope everyone will consider and support it.

@tuanden0 tuanden0 added the enhancement New feature or request label Oct 20, 2024
@vi
Copy link

vi commented Dec 25, 2024

Shouldn't --qp-file handle this (though in non-user-friendly way)?

@ItachiUchiha-IU
Copy link

I would strongly recommend using Av1an
Otherwise I think it's something u should ask to mainline

@gitoss
Copy link

gitoss commented Dec 27, 2024

I would strongly recommend using Av1an

How do you do it, is it hassle-free with av1an?

I don't see command line support for zoning in av1an, i.e. different vmaf targets or crf/qp settings for specified time or frame ranges.

I guess the segment settings av1 itsself generate could be modified, I didn' try that yet.

If it's not in av1an already, cli zoning support would certainly be a more natural feature there than in the encoder itsself.

@ItachiUchiha-IU
Copy link

ItachiUchiha-IU commented Dec 28, 2024

sorry for the strange formatting, the most I can do from phone is copy-pasting from my script

[...]
} elseif ($dozones -eq 1) {
	& "C:\av1an\av1an.exe" -i "${inputpath}\${file}" -e svt-av1 -w ${w} --set-thread-affinity ${ta&lp} -x ${x} --resume --verbose -c mkvmerge -m ${chunker} --zones "${inputpath}\${filename}.txt" -a "-c:a copy" -v "${v_settings}" -o "${outputpath}\${prefix}${filename}${extension}" --temp "${inputpath}\temp_${prefix}${filename}"
} else {
[...]

example inside the zoning file:

6066 8224 svt-av1 --crf 25 --frame-luma-bias 0
31889 34407 svt-av1 --crf 25 --frame-luma-bias 0

u can even use different av1 encoders (but iirc in the last versions it needed some fixes to not crash); any setting in the zone file will only override the same general setting; av1an can also only create a file containing all the scenes with --sc-only command

vmaf target was not working last time I checked but it's not worth it anyway;
if u work with not too low crf ranges, and u want something "similar" but based on SSIMU2 &/or XPSNR (which r what u're recommended to use instead of vmaf which is quite bad), u can use one of the script we made to automatically zone the whole files, like https://github.com/trixoniisama/auto-boost-algorithm , which trix made to be easier to use for everyone (reworking some parts from others' scripts and adding new parts) and is being updated by him and whoever wants to contribute to detect more interesting stuff and adapt the settings accordingly (detecting grain levels per scene for example)

also av1an is the only way to use 100% of your cpu and make eventual correct speed tests

@gitoss
Copy link

gitoss commented Dec 28, 2024

like https://github.com/trixoniisama/auto-boost-algorithm, which trix made to be easier to use for everyone

Thanks a lot for the insights and the link, I didn't know that script yet :-)

also av1an is the only way to use 100% of your cpu and make eventual correct speed tests

On this, I have to comment that bare SVT-AV1 saturates my 6-core Zen4 just fine, and av1an just adds uneccessary hassle and overhead - plus my system has too limited memory for further parallel encoding.

For me, the reason to use av1 is the segment vmaf target (which does work for me), but I only use this on very select encodes because of the significant overhead.

Edit: I now see svt-av1_keyframes.py made for same reason "I made this because standalone SVT-AV1 would run faster than chunked SVT-AV1 in Av1an on my 4-core system" : https://github.com/trixoniisama/scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants