Search code examples
codecvideo-encodingnvenc

NVENC SDK examples


I am trying to run the NVENC encoder SDK examples which are able to provide hardware accelerated video encoding.

I am trying to run the nvencoder sample with the dataset I found here: http://www.sunrayimage.com/download/image_examples/yuv420/tulips_yuv420_inter_planar_qcif.yuv

I ran it with the following command line:

NvEncoder.exe -i tulips_yuv420_inter_planar_qcif.yuv -o test.mp4 -size 176 144

The resulting file that is produced cannot really be played by any media player. VLC sort of loads it but does not produce any image that I was expecting.

Looking at the help message, it says:

-o <string>                  Specify output bitstream file

I wonder if something else has to be done to make sure this file is playable or perhaps I am not using this example correctly? Maybe the bitstream file is not a valid H.264 encoded file?


Solution

  • You should use -o test.h264 because it outputs a h264 bitstream.

    Use ffplay test.h264 to view it.