rigaya / QSVEnc

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

VP9 Encoding issue #85

Closed draco1544 closed 2 years ago

draco1544 commented 2 years ago

I'm trying to encode in VP9 but i have this error : MFXENCODE: Failed to get required buffer size for MFXENCODE: undeveloped feature. allocD3D11: QSVAllocator: Failed CheckRequestType: undeveloped feature. AllocFrames: Failed to allocate frames for INPUT-MFXENCODE: undeveloped feature..

The log :

------------------------- System Environment -------------------------

Windows    : Windows 11 Pro
Language   : French (France)
CPU        : 12th Gen Intel(R) Core(TM) i7-12700K
GPU        : NVIDIA GeForce RTX 3080 Ti, Intel(R) UHD Graphics 770
Resolution : 1920 x 1080
DPI        : 96
Code Page  : 1252

----------------------- Media Info Source File -----------------------

C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8.mkv

General
Complete name                     : C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8.mkv
Format                            : Matroska
Format version                    : Version 4
File size                         : 8.97 GiB
Duration                          : 20 min 21 s
Overall bit rate                  : 63.1 Mb/s
Movie name                        : Mortal Engines (2018)
Writing application               : Lavf59.30.100
Writing library                   : Lavf59.30.100

Video
ID                                : 1
Format                            : HEVC
Format/Info                       : High Efficiency Video Coding
Format profile                    : Main 10@L5.1@High
HDR format                        : SMPTE ST 2086, HDR10 compatible
Codec ID                          : V_MPEGH/ISO/HEVC
Duration                          : 20 min 21 s
Bit rate                          : 61.8 Mb/s
Width                             : 3 840 pixels
Height                            : 2 160 pixels
Display aspect ratio              : 16:9
Frame rate mode                   : Constant
Frame rate                        : 23.976 (24000/1001) FPS
Color space                       : YUV
Chroma subsampling                : 4:2:0 (Type 2)
Bit depth                         : 10 bits
Bits/(Pixel*Frame)                : 0.311
Stream size                       : 8.79 GiB (98%)
Default                           : Yes
Forced                            : No
Color range                       : Limited
Color primaries                   : BT.2020
Transfer characteristics          : PQ
Matrix coefficients               : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance       : min: 0.0001 cd/m2, max: 1000 cd/m2
Maximum Content Light Level       : 1000 cd/m2
Maximum Frame-Average Light Level : 921 cd/m2

-------------------------- Demux timestamps --------------------------

mkvextract 67.0

C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\Support\MKVToolNix\mkvextract.exe --ui-language en timestamps_v2 C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8.mkv 0:C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_temp\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_timestamps.txt

Start:    12:00:27
End:      12:00:38
Duration: 00:00:10

---------------------- Indexing using ffmsindex ----------------------

C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\Plugins\Dual\ffms2\ffmsindex.exe C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8.mkv C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_temp\temp.ffindex

Writing index... done.

Start:    12:00:39
End:      12:00:42
Duration: 00:00:03

---------------------------- Configuration ----------------------------

Template                : Automatic Workflow
Video Encoder Profile   : Intel | VP9
Container/Muxer Profile : No Muxing

--------------------------- AviSynth Script ---------------------------

AddAutoloadDir("C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\FrameServer\AviSynth\plugins")
LoadPlugin("C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\Plugins\Dual\ffms2\ffms2.dll")
tcFile = "C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_temp\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_timestamps.txt" # timestamps file path
Exist(tcFile) ? FFVideoSource("C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8.mkv", cachefile="C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_temp\temp.ffindex", timecodes=tcFile) : FFVideoSource("C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8.mkv", cachefile="C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_temp\temp.ffindex")
BicubicResize(1920, 1080)

------------------------- Source Script Info -------------------------

Width     : 3840
Height    : 2160
Frames    : 29276
Time      : 20:21.053
Framerate : 23.976023 (24000/1001)
Format    : YUV420P10

------------------------- Target Script Info -------------------------

Width     : 1920
Height    : 1080
Frames    : 29276
Time      : 20:21.053
Framerate : 23.976023 (24000/1001)
Format    : YUV420P10

--------------------------- Video encoding ---------------------------

QSVEnc 7.16

C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\Encoders\QSVEnc\QSVEncC64.exe --avsdll C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\FrameServer\AviSynth\AviSynth.dll --codec vp9 --quality higher --colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --chromaloc 2 --aud --fallback-rc --vbr 1200 -i C:\Users\draco\Videos\Mortal.Engines.2018.MULTi.TRUEFRENCH.2160p.UHD.BluRay.REMUX.HDR.HEVC.TrueHD.Atmos.7.1-TOXIC-fastflix-69b8_temp\test.avs -o C:\Users\draco\Videos\test.vp9

--------------------------------------------------------------------------------
C:\Users\draco\Videos\test.vp9
--------------------------------------------------------------------------------
PG is not supported on this platform, switched to FF mode.
B frame is not supported on current platform, disabled.
B pyramid is not supported on current platform, disabled.
MFXENCODE:   Failed to get required buffer size for MFXENCODE: undeveloped feature.
allocD3D11: QSVAllocator: Failed CheckRequestType: undeveloped feature.
AllocFrames:   Failed to allocate frames for INPUT-MFXENCODE: undeveloped feature..
QSVEncC.exe finished with error!

Start:    12:04:23
End:      12:04:25
Duration: 00:00:02

General
Complete name : C:\Users\draco\Videos\test.vp9
File size     : 0.00 Byte
rigaya commented 2 years ago

VP9 hw encoding seems to not support options below.

--colormatrix bt2020nc --colorprim bt2020 --transfer smpte2084 --chromaloc 2 --aud

Please remove these options and try again.

I'll add check for them and disable it automatically when not supported in the next release.

draco1544 commented 2 years ago

I still have the issue :

QSVEnc 7.16

C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\Encoders\QSVEnc\QSVEncC64.exe --avsdll C:\Users\draco\Downloads\StaxRip-v2.13.0-x64\Apps\FrameServer\AviSynth\AviSynth.dll --codec vp9 --quality best --fallback-rc --vbr 2000 -i D:\Mortal.Engines.2018.Video_temp\Mortal.Engines.2018.Video_new.avs -o E:\Mortal.Engines.2018.Video_new.vp9

--------------------------------------------------------------------------------
E:\Mortal.Engines.2018.Video_new.vp9
--------------------------------------------------------------------------------
PG is not supported on this platform, switched to FF mode.
B frame is not supported on current platform, disabled.
B pyramid is not supported on current platform, disabled.
MFXENCODE:   Failed to get required buffer size for MFXENCODE: undeveloped feature.
allocD3D11: QSVAllocator: Failed CheckRequestType: undeveloped feature.
AllocFrames:   Failed to allocate frames for INPUT-MFXENCODE: undeveloped feature..
QSVEncC.exe finished with error!

Start:    14:50:24
End:      14:50:32
Duration: 00:00:08

General
Complete name : E:\Mortal.Engines.2018.Video_new.vp9
File size     : 0.00 Byte
rigaya commented 2 years ago

I checked further and it seems the error is caused from QSVEnc 7.08 and later which enabled Hyper Encode (as VP9 does not support).

Adding --hyper-mode off might help avoiding this issue. I'll also have next release to avoid this error.

draco1544 commented 2 years ago

Thank a lot, vp9 encoding finally working !

rigaya commented 2 years ago

QSVEnc 7.17 will no longer require --hyper-mode off to use VP9 encoding.