I have been playing around with the cudaencode example included in the 3.2 SDK. It takes a YUV (uncompressed video) file as input and writes out a raw H.264 stream (or can be VC1 also). The work is performed by the “NVEncodeFrame” function that is part of the Encoder API. The program takes a FILE object (stdio.h) as the output to where the result of the encoding (the compressed H.264 video) is written. Now I want to stream the video, as it is being encoded, into the network (say, using a simple TCP/UDP client).
My specific questions are:
Is there a way to tell NVEncodeFrame to flush the compressed video regularly (say, every few encoded GOPs)
Is there someway to have NVEncodeFrame write to a network socket stream instead of a FILE object?
Thanks in advance!