FFMPEG -- avcodec_encode_video2

int ret = avcodec_encode_video2(pCodecCtx, &pkt, pFrame, &got_picture);

编码一帧视频。即将AVFrame(存储YUV像素数据)编码为AVPacket(存储H.264等格式的码流数据)。
成功时返回0,失败时返回负错误代码 失败时返回错误返回码

猜你喜欢

转载自blog.csdn.net/hwx802746/article/details/113744460