Hi All,

I am writing an application which will decode the video alone from an avi
file (XVID video + mpga audio) and reencode the video to an avi file (video
in MPEG4 format + no audio). I am encoding in constant quality mode. I have
set the encoder gop size as 12 and no B-frames.

I am wrapped the whole process in a sequence like, decode one frame video ->
encode that video in mpeg4 format. Since i set the encoder gop size as 12, I
expect the 1st encoded frame type as I-frame, next following 11 frames as
P-frames and 13th frame as I-frame and the routine continues...

But actually the encoder behaviour is different. It resets the gop structure
after 9th frame, and from there it follows the gop structure. For example,
it encodes the first frame as I-frame and then instead of 13th frame, it
encodes 10th frame as I-frame and from there it continues the gop structure.

I am not able to understand why its resetting the gop structure. Is there
any other settings that i missed? Kindly guide me to solve the problem.

While debugging the problem, I observed that the decoded 9th frame is
an I-frame and after that the encoder resets the gop structure from 10th
frame i.e it encodes the 10th frame as I-frame instead of the 13th frame. Is
there any codec context structure sharing problem?

Thanks & Regards,
Srinivasan.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to