本文介绍了nvEncodeApp成功制作但正在运行:CNVEncoder.cpp:1282 code = 15处的NVENC错误(使用了无效的结构版本).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功制作了nvEncodeApp,但是运行它时,我的输出是这样

I make nvEncodeApp successfully but when I run it my output is like this

./nvEncoder -infile=HeavyHandIdiot.3sec.yuv -outfile=outh.264 -width=1080 -height=1080
> NVEncode configuration parameters for Encoder[0]
> GPU Device ID             = 0
> Input File                = HeavyHandIdiot.3sec.yuv
> Output File               = outh.264
> Frames [000--01]          = 0 frames
> Multi-View Codec          = No
> Width,Height              = [1080,1080]
> Video Output Codec        = 4 - H.264 Codec
> Average Bitrate           = 0 (bps/sec)
> Peak Bitrate              = 0 (bps/sec)
> BufferSize                = 0
> Rate Control Mode         = 2 - CBR (Constant Bitrate)
> Frame Rate (Num/Denom)    = (30000/1001) 29.9700 fps
> GOP Length                = 30
> Set Initial RC      QP    = 0
> Initial RC QP (I,P,B)     = I(0), P(0), B(0)
> Number of B Frames        = 0
> Display Aspect Ratio X    = 1080
> Display Aspect Ratio Y    = 1080
> Number of B-Frames        = 0
> QP (All Frames)           = 26
> QP (I-Frames)             = 25
> QP (P-Frames)             = 28
> QP (B-Frames)             = 31
> Hiearchical P-Frames      = 0
> Hiearchical B-Frames      = 0
> SVC Temporal Scalability  = 0
> Number of Temporal Layers = 0
> Outband SPSPPS            = 0
> Video codec profile       = 100
> Stereo 3D Mode            = 0
> Stereo 3D Enable          = No
> Number slices per Frame   = 1
> Encoder Preset            = 3 - ;
> YUV Input Format          = NV12 (Semi-Planar UV Interleaved) Pitch Linear
> NVENC API Interface       = 2 - CUDA
> Map Resource API Demo     = No
> Dynamic Resolution Change = 0
> Dynamic Bitrate Change    = 0
Input Filesize: 236390400 bytes
Input Filename: HeavyHandIdiot.3sec.yuv
Auto-Detected (nvAppEncoderParams.endFrame = 135 frames)


>> GetNumberEncoders() has detected 8 CUDA capable GPU device(s) <<
  [ GPU #0 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #1 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #2 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #3 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #4 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #5 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #6 - < GRID K1 > has Compute SM 3.0, NVENC Available ]
  [ GPU #7 - < GRID K1 > has Compute SM 3.0, NVENC Available ]

>> InitCUDA() has detected 8 CUDA capable GPU device(s)<<
  [ GPU #0 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #1 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #2 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #3 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #4 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #5 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #6 - < GRID K1 > has Compute SM 3.0, Available NVENC ]
  [ GPU #7 - < GRID K1 > has Compute SM 3.0, Available NVENC ]

>> Select GPU #0 - < GRID K1 > supports SM 3.0 and NVENC
NVENC error at src/CNVEncoder.cpp:1282 code=15(NVENC indicates that an invalid struct version was used by the client) "nvStatus"

所以,我得到这个错误:

SO, I get this error :

这是第1282行,在CNVEncoder之后,nvStatus是NVENCSTATUS结构:

and this is line 1282 and after in CNVEncoder and nvStatus is a NVENCSTATUS struct :

checkNVENCErrors(nvStatus);

    if (nvStatus == NV_ENC_SUCCESS)
    {
        return S_OK;
    }

什么是NVENCSTATUS结构?我怎么能找到那个?

What is NVENCSTATUS struct ? how can I find that ?

推荐答案

这是一个已知问题,并且已在最新的NVENC软件包中进行了更新.

This is a known issue and has been updated in the newest NVENC package.

使用示例随附的nvidia驱动程序,那么您就不会遇到这个问题.

Use the nvidia driver that comes with the samples then you shouldn't have this problem.

这篇关于nvEncodeApp成功制作但正在运行:CNVEncoder.cpp:1282 code = 15处的NVENC错误(使用了无效的结构版本).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-18 09:30