nvEncodeApp successfully make but in running it :

2019-08-03 20:22发布

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 :

NVENC error at src/CNVEncoder.cpp:1282 code=15(NVENC indicates that an invalid struct version was used by the client) "nvStatus"

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;
    }

What is NVENCSTATUS struct ? how can I find that ?

2条回答
\"骚年 ilove
2楼-- · 2019-08-03 20:53

when you comment the 1208 line and after that compiling it the problem is solved and u can run the sample without any problem , but I don't now how can I overcome this error without commenting it.

  //  checkNVENCErrors(nvStatus);

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

I just did it

查看更多
\"骚年 ilove
3楼-- · 2019-08-03 21:04

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

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

查看更多
登录 后发表回答