srini vasan wrote:
> After debugging the problem for a while, I think, I almost found the
> reason for this behavior. I found that my decoded video frame (YUV
> data) has full black video for first 10 frames. The actual proper
> video data starts from 11th frame. So the mpeg4 encoder resets the gop
> structure from 11th frame i.e., encoding 11th frame as I-frame and
> next 11 frames as P-frames like tat...
>
> I guess, instead of predicting the actual video frame from a full
> Black video, the encoder resets the GOP structure and consider the
> first proper video frame as I-frame. Please correct me if i am wrong.
>
> Is there any option to disable this auto GOP reset?
IIUC you want to disable the scene change detection and adaptive GOP
scheme ?
The CODEC_FLAG2_STRICT_GOP option might be relevant.
#define CODEC_FLAG2_STRICT_GOP [...] ///< Strictly enforce GOP size.
libavcodec/options.c:
{"sgop", "strictly enforce gop size", 0, FF_OPT_TYPE_CONST,
CODEC_FLAG2_STRICT_GOP, INT_MIN, INT_MAX, V|E, "flags2"}
http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/mpegvideo__enc_8c-source.html#l01112
--
Regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user