1

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

./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" 

所以,我得到这个错误:

src/CNVEncoder.cpp 处的 NVENC 错误:1282 代码=15(NVENC 表示客户端使用了无效的结构版本)“nvStatus”

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

checkNVENCErrors(nvStatus);

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

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

4

2 回答 2

0

当您评论 1208 行并在编译后问题已解决,您可以毫无问题地运行示例,但我现在不知道如何在不评论的情况下克服此错误。

  //  checkNVENCErrors(nvStatus);

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

我刚刚做完

于 2013-07-18T06:25:59.787 回答
0

这是一个已知问题,已在最新的 NVENC 包中更新。

使用示例随附的 nvidia 驱动程序,那么您应该不会遇到此问题。

于 2013-08-22T07:52:00.877 回答