rigaya / QSVEnc

QSVによる高速エンコードの性能実験
http://rigaya34589.blog135.fc2.com/blog-category-10.html
Other
313 stars 28 forks source link

[oneVPL] Speed issue ? #130

Closed MarcoRavich closed 1 year ago

MarcoRavich commented 1 year ago

Hi there, as always thanks for your precious (voluntary) work !

In order to archive our (~ 3 hours) 8 x 1080p AVC @ 100Mbps live streaming footage av files, we choosed to reencode them into a more rasonable HEVC-10bit @ ICQ 14 (~ 1/4 of source files' bitrate).

We of course wanted to use QSVEnc (+ FastFlix) but the performance-gap with Handbrake is huge:

handbrake_qsv

How can they squeeze so mutch speed from oneVPL ?

Can you suggest us a competitive - for both speed and quality - command line to exploit QSVEnc better ?

Thanks in advace.

EDIT note: our encoding rig is Intel i5-12600 / Z690 (no discrete GPU) based workstation

rigaya commented 1 year ago

I think Handbrake might be using Fixed Function mode (or Low power mode) as default.

You can use --fixed-func to get performance near that (although default mode has more better quality).

x64\QSVEncC64.exe -i sample_movie_1080p.mp4 -o F:\temp\test.mp4 -c hevc --output-depth 10 --fixed-func --icq 14

--------------------------------------------------------------------------------
F:\temp\test.mp4
--------------------------------------------------------------------------------
Error (clGetDeviceIDsFromD3D11KHR): device not found.
cop.SingleSeiNalUnit value changed off -> auto by driver
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 7.36 (r3033) by rigaya, Mar 29 2023 18:34:58 (VC 1935/Win)
OS             Windows 11 x64 (22621) [UTF-8]
CPU Info       12th Gen Intel Core i9-12900K [5.11GHz] (8P+8E,16C/24T) <AlderlakeS>
GPU Info       Intel UHD Graphics 770 (32EU) 300-1550MHz [125W] (31.0.101.4146)
Media SDK      QuickSyncVideo (hardware encoder) FF, 3rd GPU, API v2.08
Async Depth    3 frames
Hyper Mode     off
Buffer Memory  d3d11, 37 work buffer
Input Info     avqsv: H.264/AVC, 1920x1080, 30000/1001 fps
VPP            ColorFmtConvertion: nv12 -> p010
AVSync         cfr
Output         HEVC(yuv420 10bit) main10 @ Level 4 (high tier)
               1920x1080p 1:1 29.970fps (30000/1001fps)
               avwriter: hevc => mp4
Target usage   4 - balanced
Encode Mode    ICQ (Intelligent Const. Quality)
ICQ Quality    14
QP Limit       min: 22, max: 63
Ref frames     3 frames
Bframes        3 frames, B-pyramid: on
Max GOP Length 300 frames
Ext. Features  WeightP WeightB GPB tskip ctu:64 sao:all

encoded 5203 frames, 410.59 fps, 30729.29 kbps, 635.96 MB
encode time 0:00:12, CPU: 0.6%, GPU: 15.6%, VD: 93.4%
frame type IDR   18
frame type I     18,  total size   10.40 MB
frame type P   1301,  total size  381.09 MB
frame type B   3884,  total size  244.47 MB
MarcoRavich commented 1 year ago

You're right, it works now.

Can we use laicq mode too with --fixed-func parameter ?

bavdevc commented 1 year ago

Can we use laicq mode too with --fixed-func parameter ?

I couldn't find a good documentation (and onevpl spec is really impressive) what features are supported by low-power/fixed-function mode on Intel CPU/GPU and which software version is needed - I was looking at the source of intel media-driver and onevpl stuff and found some clues

rigaya commented 1 year ago

laicq mode cannot be used for --fixed-func, seems to be hardware (or driver) limitation.

Features supported for normal (PG) mode and fixed-func (FF) mode can be checked with QSVEncC64 --check-features for each codec, not all seems to be detected correct but mostly is fine.

Example: https://github.com/rigaya/QSVEnc/blob/master/GPUFeatures/QSVEnc_ADL_i9_12900K_Win.txt

"H.264 PG" for H.264 normal mode, and "H.264 FF" for fixed-func mode, and so on.

rigaya commented 1 year ago

I'll close this issue as the question has been answered and solved.