alexheretic / ab-av1

AV1 re-encoding using ffmpeg, svt-av1 & vmaf.
MIT License
483 stars 30 forks source link

Please increase support for QSVEncC64? #144

Closed henanzheng closed 2 months ago

henanzheng commented 1 year ago

QSVEncC64 is rigaya's work, widely supported, provides more parameters than ffmpeg's qsv, a very prominent place: hardware decoding + hardware encoding in the case of quality assurance, resolution 1080, three times faster than ffmpeg's qsv encoding and nvenc encoding, other resolutions are also much faster, worthy of support, simple encoding is as follows:

QSVEncC64.exe --avhw -i in.mp4 --avsync forcecfr -c hevc --icq 24 --profile main10 --output-depth 10 --quality best --vpp-detail-enhance 25 --sao none --audio-codec aac --audio-bitrate 96 -o out.mp4

Thank you

henanzheng commented 1 year ago

At 1080 resolution, HEVC transcoding speed can reach around 280fps, while FFMPEG's is usually around 100fps.

henanzheng commented 1 year ago

Forgot to mention, the graphics card is Intel's A380.

henanzheng commented 1 year ago

1111

alexheretic commented 1 year ago

Hello, it's possible to support something other than ffmpeg but it is more difficult. An alternative investigation would be finding out why ffmepg is slower for this.

As I don't have any intel hardware this isn't something I can move forward myself.

henanzheng commented 1 year ago

Sorry for not replying in time.

The reason why QSVEnc hardware decoding + hardware encoding is faster, here may be a clue:

https://github.com/rigaya/QSVEnc/blob/master/QSVEncC_Options.en.md#options-for-frame-buffer

FFMPEG's hardware decoding scheme may be different and the documentation is not detailed.

Sorry to confuse you.

mr44er commented 1 year ago

I know nothing about QSV/Intel, but I remember from tests on Radeon VCE that decoding and encoding had to be specified to target the GPU. Otherwise only the encoding will be done in hardware, decoding with ffmpeg defaults to software and it will show "native".

Does this help? ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -i $input -vf 'format=nv12|vaapi,hwupload' -c:v hevc_vaapi -qp 28 -sn outputqp28.mkv

This gives on top the possibility to split the load over two GPUs, for example decoding on older, slower GPU and encoding on newer, faster GPU. I don't know if mixing would work...don't have a test bench right now.

alexheretic commented 2 months ago

I'll close this since I can see no way forward myself. Please reopen with a clear course of action or further ideas.