rigaya / VCEEnc

VCEによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-12.html
Other
235 stars 23 forks source link

Some parameters having defaults differing from AMF docs and missing options to toggle them? #112

Open DimkaTsv opened 3 weeks ago

DimkaTsv commented 3 weeks ago

Used command: C:\Users\-----\Videos\test sample>C:\Users\DimkaTsv\Desktop\Utilites\VCE_Encoder\VCEEncC_x64\\VCEEncC64.exe -i "C:\Users\-----\Videos\test sample\out420.mkv" -o "out420_processed.mkv" --codec av1 --preset slower --vbr 35000 --audio-copy

Unexpected result:

--------------------------------------------------------------------------------
out420_processed.mkv
--------------------------------------------------------------------------------
VCEEnc (x64) 8.23 (r1710) by rigaya, Jul 18 2024 12:57:57 (VC 1940/Win)
OS:            Windows 11 x64 (22631) [UTF-8]
CPU:           AMD Ryzen 7 5800X3D 8-Core Processor [4.45GHz] (8C/16T)
GPU:           AMD Radeon RX 7800 XT [32.0.11037.4004]
AMF:           Runtime 1.4.34 / SDK 1.4.34
Input Info:    avsw: libdav1d(yv12)->nv12 [AVX2], 1512x614, 30/1 fps
Output:        AV1  main @ Level 5.2
               1512x614p 0:0 30.000fps (30/1fps)
               avwriter: av1 => matroska
Quality:       slower
VBR:           35000 kbps
Max bitrate:   52500 kbps
QP:            Min: 1:1, Max: 255:255
VBV Bufsize:   35000 kb
Pre Analysis:  off
Ref frames:    2 frames
LTR frames:    0 frames
Motion Est:    full-pel
Tiles:         1
GOP Len:       300 frames
Temporal Lyrs: 1
ScreenContent: on,palette-mode off, force-integer-mv off
Others:        skipframe:on deblock aq:off cdef:on cdf-update:on cdf-frame-end-update:on

encoded 160 frames, 170.03 fps, 798.85 kbps, 0.51 MB
encode time 0:00:00, CPULoad: 0.4%
frame type IDR   1
frame type I     1,  total size  0.05 MB
frame type P   159,  total size  0.46 MB

Potential issues:

--screen-content is enabled by default for AV1 specifically. And yet, palette-mode and force-integer-mv are both disabled at the same time. [I assume it should be disabled by default, same as for other encoders?]

--cdf-update is enabled by default and cannot be disabled due to lack of the flag (or boolean value) [In AMF documentation disabled by default]

--cdf-frame-end-update is enabled by default and cannot be disabled due to the lack of flag (or boolean value) [In AMF documentation disabled by default... Which is kinda funny, as value to enable it is called AMF_VIDEO_ENCODER_AV1_CDF_FRAME_END_UPDATE_MODE_ENABLE_DEFAULT, but it is NOT actual default]

Also, how do b-frames related options interact with AV1? Afaik, AV1 does not use I:P:B frame division. And based on quick testing, while VCEEnc parses your inputs and even warns you if --bframes>3, these options had no effect on output.


Now for other options. I recently noticed that AMF docs say that temporal layers are also available for HEVC. Is there reason why VCEEnc only applies them for AV1 only? Granted i don'tsee those parameters in TranscodeHW, so maybe they are related to something else?

https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/doc/AMF_Video_Encode_HEVC_API.md#227-svc-properties [AMF_VIDEO_ENCODER_HEVC_MAX_NUM_TEMPORAL_LAYERS Values: 1 … Maximum number of temporal layers supported] [AMF_VIDEO_ENCODER_HEVC_NUM_TEMPORAL_LAYERS Values: 1 … Maximum number of temporal layers supported]