rigaya / QSVEnc

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

Error while Encoding with QSVEncC: Invalid Image Format Descriptor when using D3D9 #181

Closed quamt closed 11 months ago

quamt commented 11 months ago

Hello @rigaya,

I'm encountering an issue while encoding a video using QSVEncC (version 7.52), Intel Arc A770 and D3D9. The encoding process fails with the following error message when using --d3d9:

Failed to create image from DX9 memory: invalid image format descriptor.
OPENCL: Failed to get OpenCL interop [out].
Break in task OPENCL: null pointer..
avout: File header not written, unexpected error!
[...]
avout: failed to write header for output file: Invalid data found when processing input

Here are the details of my system and encoding setup:

QSVEncC Version: 7.52 (r3160) OS: Windows 11 x64 (22621) [UTF-8] CPU: 13th Gen Intel Core i5-13600 [4.71GHz] (6P+8E,14C/20T) GPU: Intel Arc A770 Graphics (512EU) 300-2400MHz (31.0.101.4952) Media SDK: QuickSyncVideo (hardware encoder) FF, 1st GPU, API v1.255 Input Video Info: H.264/AVC, 1920x1080, 24000/1001 fps Encoding Settings: Various filters applied (cspconv, denoise, unsharp, etc.) Output Format: H.265/HEVC(yuv420 10bit) main10 @ Level 5 Target Usage: 1 - best Encode Mode: Constant QP (CQP) CQP Values: I:34 P:34 B:36 Scenario Info: Archive QP Limit: min: 22, max: 63 Ref Frames: 6 frames Bframes: 16 frames, B-pyramid: on Max GOP Length: 240 frames Ext. Features: WeightP WeightB GPB QPOffset pic_struct tskip ctu:64 sao:all

I've tried various troubleshooting steps but cannot resolve this issue.
This issue persists even when no filters are selected during the encoding process.

I've attempted the following troubleshooting steps to address the issue:

Checked the source video: Ensured that the source video I'm trying to encode is in a compatible format and does not have any corruption issues.

Reviewed encoding settings: I carefully reviewed them to ensure they are correctly configured.

Updated software: Verified that I am using the latest version of QSVEncC and ensured that my graphics drivers are current, as there may have been bug fixes or improvements in newer versions.

Tested with different source videos: Attempted to isolate the problem by encoding a different source video file to determine if the issue persists. This was done to help ascertain whether the problem lies with the video file or the encoding process.

Despite these troubleshooting steps, the issue still needs to be solved.

Any insights, suggestions, or guidance would be greatly appreciated.

Here is the complete cmd output:

QSVEncC (x64) 7.52 (r3160) by rigaya, Nov  4 2023 13:26:15 (VC 1937/Win)
OS             Windows 11 x64 (22621) [UTF-8]
CPU Info       13th Gen Intel Core i5-13600 [4.71GHz] (6P+8E,14C/20T) <DG2>
GPU Info       Intel Arc A770 Graphics (512EU) 300-2400MHz (31.0.101.4952)
Media SDK      QuickSyncVideo (hardware encoder) FF, 1st GPU, API v1.255
Async Depth    32 frames
Buffer Memory  d3d9, 193 work buffer
Input Info     avqsv: H.264/AVC, 1920x1080, 24000/1001 fps
VPP            cspconv(nv12 -> yv12(16bit))
               convolution3d: matrix standard, mode normal
                       threshold spatial luma 5, chroma 5, temporal luma 5, chroma 5
               smooth: quality 4, qp 16, prec auto
               denoise(knn): radius 3, strength 0.12, lerp 0.15
                              th_weight 0.01, th_lerp 0.80
               denoise(pmd): strength 80, threshold 90, apply 3, exp 1
               unsharp: radius 3, weight 1.0, threshold 15.0
               edgelevel: strength 10.0, threshold 15.0, black 1.5, white 1.5
               warpsharp: threshold 140.0, blur 3, type 0, depth 18.0, chroma 0
               curves: preset linear_contrast
               deband: mode 1, range 31, threY 12, threCb 12, threCr 12
                       ditherY 12, ditherC 12, blurFirst no, randEachFrame yes
               cspconv(yv12(16bit) -> p010)
AVSync         cfr
Output         H.265/HEVC(yuv420 10bit) main10 @ Level 5 (high tier)
               1920x1080p 1:1 23.976fps (24000/1001fps)
               avwriter: hevc, eac3 => matroska
Target usage   1 - best
Encode Mode    Constant QP (CQP)
CQP Value      I:34  P:34  B:36
Scenario Info  archive
QP Limit       min: 22, max: 63
Ref frames     6 frames
Bframes        16 frames, B-pyramid: on
Max GOP Length 240 frames
Ext. Features  WeightP WeightB GPB QPOffset pic_struct tskip ctu:64 sao:all
Failed to create image from DX9 memory: invalid image format descripter.
OPENCL: Failed to get OpenCL interop [out].
Break in task OPENCL: null pointer..
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: File header not written, unexpected error!
avout: failed to write header for output file: Invalid data found when processing input

encoded 0 frames, 0.00 fps, 0.00 kbps, 0.00 MB
encode time 0:00:01, CPULoad: 2.5%

Thank you in advance for your help!

rigaya commented 11 months ago

I'm a bit confused with this... does d3d11 also fail? I mean you want to use d3d9 because d3d11 also runs into error?

If not, please try again using d3d11 and not d3d9.

Unfortunately, d3d9 support is deprecated in oneVPL for Arc GPUs. https://github.com/oneapi-src/oneVPL#onevpl-dispatcher-behavior-when-targeting-intel-gpus

quamt commented 11 months ago

Ok. Understand. I was surprised to find out that it had been removed. The d3d11 works with no issues. I will close this now. Thank you @rigaya for your feedback.