[Libav-user] avcodec_receive_packet output for every input frame

Vittalprasad vittalprasad.br at gmail.com
Thu Apr 5 12:02:33 EEST 2018

 At the beginning of encoding, the H264 Encoder is accepting multiple input
frames without returning a encoded stream, in my case it is accepting  58
input frames.

what changes are required  at encoder side to get output frame for every
input frame, i.e o/p frame for i/p frame iteration?

below is encoder code.
ret = avcodec_send_frame(c_enc, frame);
        if (ret < 0)
                fprintf(stderr, "Error sending a frame for encoding\n");
 while (1) {
 ret = avcodec_receive_packet(c_enc, pkt);
        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
     ///dump encoded packet in to file

Thanks & Regards
Vittal Prasad B R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180405/c9188cb6/attachment.html>

More information about the Libav-user mailing list