Second thing I noticed is that flushing is broken for v4l2m2m encoders. > avcodec_send_frame(enc_ctx, NULL); should return AVERROR_EOF instead of continuing with an empty AVPacket with size=0. Hope we can get this fixed. Roland