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

Add Hardware Encoder Support #808

Open
SebastianGode opened this issue Jan 26, 2024 · 4 comments
Open

Add Hardware Encoder Support #808

SebastianGode opened this issue Jan 26, 2024 · 4 comments

Comments

@SebastianGode
Copy link

Would be great to be able to use the Target Quality mode from av1an together with Hardware Encoders like NVEnc, QSV and co.

Rigaya has direct binaries for the encoder for NVEnc, QSVEnc, VCEEnc so it should work pretty much the same as with SvtAv1EncApp and co.

And yes, I know that hardware encoders are less efficient, but for huge batch conversions just CPU encoding is too slow for me.

@mikesulsenti
Copy link

The point of Av1an seems to be to split up and chunk videos for multi-threading CPU encodes to do them faster. What is the point of having Av1an handle hardware encoders that can encode AV1 at 150-250 fps already?

@SebastianGode
Copy link
Author

SebastianGode commented Jan 26, 2024

Just with plain ffmpeg or the actual binary it's impossible to do scene based encoding based on VMAF.
You would need to split it in the scenes manually, do the probes manually and then set the correct crf (or equivalent) rate factor for that scene.

Av1an already has all of that implement. Not only that, but the scene splitting and analysis also needs to run on the CPU and is multithreaded here.

Yes for hardware encoders you want a larger minimum chunk size but in theory it should work fine as well. Although of course you will need to limit the parallel encode threads to one or two depending on the hardware encoders.

If you argue like that you can also say that Av1an should not have implemented SVT-AV1 support as it also doesn't benefit from Av1an on most consumer CPU with default settings as it can scale pretty well across many threads.

@mikesulsenti
Copy link

That last point is silly because SVT-AV1 doesn't really scale past a 12 core CPU so any high end ryzen, any threadripper, EPYC, or modern Xeon wouldn't be utilized. This was the point of Av1an.

Hardware encoding should only be utilized for live streams. Besides VMAF being outdated and obsolete as a metric, if you care about hitting high quality, you're not using a hardware encoder.

To top it off, each GPU encoder setup is different, not just APIs, but how many encoder engines exist, how many streams are allowed. How much VRAM is there to decode and encode that amount.

A lot of stuff has to be put into this for benefiting a niche use case that seems fruitless.

@Bl4cKn1gh7
Copy link

I've also been of the opinion that av1an should add Rigaya's hardware encoders to av1an for target quality encoding. They'd be able to leverage av1an's framework quite well regardless of them being inferior to software encoding.

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

No branches or pull requests

3 participants