rigaya / NVEnc

NVENCによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-17.html
Other
1.07k stars 112 forks source link

Av1 small size p-frames #544

Closed darkcity87 closed 8 months ago

darkcity87 commented 9 months ago

Excellent work i have been using it for few years many thanks. i recently switch to av1 i have few questions.

  1. on av1 encoded videos p-frames significantly smaller size than h265 is this a bug?

av1

NVEncC 7.40

C:\Portable\StaxRip-v2.28.0-x64\Apps\Encoders\NVEncC\NVEncC64.exe --avsdll C:\Portable\StaxRip-v2.28.0-x64\Apps\FrameServer\AviSynth\AviSynth.dll --vbr 0 --codec av1 --preset P7 --output-depth 10 --multipass 2pass-full --vbr-quality 32 --aq --aq-strength 15 --aq-temporal --lookahead 32 --tile-columns 1 --tile-rows 1 --colormatrix bt709 --colorprim bt709 --transfer bt709 --mv-precision q-pel -i D:\t\a\test\Video_temp\Video_newq32aq15.vpy -o D:\t\a\test\Video_temp\Video_newq32aq15_out.av1

--------------------------------------------------------------------------------
D:\t\a\test\Video_temp\Video_newq32aq15_out.av1
--------------------------------------------------------------------------------
NVEncC (x64) 7.40 (r2648) by rigaya, Dec 10 2023 04:09:22 (VC 1929/Win)
OS Version     Windows 11 x64 (22631) [UTF-8]
CPU            AMD Ryzen 7 7700 8-Core Processor [4.84GHz] (8C/16T)
GPU            #0: NVIDIA GeForce RTX 4070 (5888 cores, 2505 MHz)[PCIe4x16][546.29]
NVENC / CUDA   NVENC API 12.1, CUDA 12.3, schedule mode: auto
Input Buffers  CUDA, 44 frames
Input Info     VapourSynthMT r63(yv12)->nv12 [AVX2], 1920x1080, 24000/1001 fps
Vpp Filters    copyHtoD
               cspconv(nv12 -> p010)
Output Info    AV1 main 10bit @ Level auto
               1920x1080p 1:1 23.976fps (24000/1001fps)
Encoder Preset quality
Rate Control   VBR
Multipass      2pass-full
Bitrate        0 kbps (Max: 0 kbps)
Target Quality 32.00
Initial QP     I:20  P:23  B:25
QP range       I:0-255  P:0-255  B:0-255
QP Offset      cb:0  cr:0
VBV buf size   auto
Split Enc Mode auto
Lookahead      on, 32 frames, Adaptive I, B Insert
GOP length     240 frames
B frames       3 frames [ref mode: middle]
Ref frames     3 frames, MultiRef L0:auto L1:auto
AQ             on (spatial, temporal, strength 15)
Part size      max auto / min auto
Tile num       columns 1 / rows 1
TemporalLayers max 1
Refs           forward auto, backward auto
VUI            matrix:bt709,colorprim:bt709,transfer:bt709
Others         mv:Q-pel 
encoded 34549 frames, 236.11 fps, 5418.99 kbps, 930.87 MB
encode time 0:02:26, CPU: 0.6, GPU: 78.1, VE: 95.7, VD: 18.0, GPUClock: 2652MHz, VEClock: 1963MHz
frame type IDR   345
frame type I     345,  total size   42.84 MB
frame type P   10316,  total size   45.27 MB    <<------------<<
frame type B   23888,  total size  842.76 MB

Start:    00:17:40
End:      00:20:08
Duration: 00:02:27

h265

NVEncC 7.40

C:\Portable\StaxRip-v2.28.0-x64\Apps\Encoders\NVEncC\NVEncC64.exe --avsdll C:\Portable\StaxRip-v2.28.0-x64\Apps\FrameServer\AviSynth\AviSynth.dll --vbr 0 --codec h265 --preset P7 --output-depth 10 --multipass 2pass-full --vbr-quality 28 --aq --aq-strength 15 --aq-temporal --lookahead 32 --colormatrix bt709 --colorprim bt709 --transfer bt709 --mv-precision q-pel -i D:\t\a\test\Video_temp\Video_newhq28aq15.vpy -o D:\t\a\test\Video_temp\Video_newhq28aq15_out.h265

--------------------------------------------------------------------------------
D:\t\a\test\Video_temp\Video_newhq28aq15_out.h265
--------------------------------------------------------------------------------
NVEncC (x64) 7.40 (r2648) by rigaya, Dec 10 2023 04:09:22 (VC 1929/Win)
OS Version     Windows 11 x64 (22631) [UTF-8]
CPU            AMD Ryzen 7 7700 8-Core Processor [5.26GHz] (8C/16T)
GPU            #0: NVIDIA GeForce RTX 4070 (5888 cores, 2505 MHz)[PCIe4x16][546.29]
NVENC / CUDA   NVENC API 12.1, CUDA 12.3, schedule mode: auto
Input Buffers  CUDA, 44 frames
Input Info     VapourSynthMT r63(yv12)->nv12 [AVX2], 1920x1080, 24000/1001 fps
Vpp Filters    copyHtoD
               cspconv(nv12 -> p010)
Output Info    H.265/HEVC main10 @ Level auto
               1920x1080p 1:1 23.976fps (24000/1001fps)
Encoder Preset quality
Rate Control   VBR
Multipass      2pass-full
Bitrate        0 kbps (Max: 11520 kbps)
Target Quality 28.00
Initial QP     I:20  P:23  B:25
QP range       I:0-63  P:0-63  B:0-63
QP Offset      cb:0  cr:0
VBV buf size   auto
Split Enc Mode auto
Lookahead      on, 32 frames, Adaptive I, B Insert
GOP length     240 frames
B frames       3 frames [ref mode: middle]
Ref frames     3 frames, MultiRef L0:auto L1:auto
AQ             on (spatial, temporal, strength 15)
CU max / min   auto / auto
VUI            matrix:bt709,colorprim:bt709,transfer:bt709
Others         mv:Q-pel 
encoded 34549 frames, 135.59 fps, 5408.88 kbps, 929.13 MB
encode time 0:04:14, CPU: 0.3, GPU: 77.1, VE: 99.3, GPUClock: 2640MHz, VEClock: 1950MHz
frame type IDR   345
frame type I     345,  total size   41.18 MB
frame type P   10316,  total size  536.51 MB  <<----------<<
frame type B   23888,  total size  351.44 MB

Start:    01:46:52
End:      01:51:07
Duration: 00:04:15