[XviD-devel] How to encode the bitstream with const key-interval

Christoph Lampert chl at math.uni-bonn.de
Tue Oct 21 09:20:45 CEST 2003


On Tue, 21 Oct 2003, yixian  wang wrote:
> Dear Sir/Madam:
> 
>    I want to use xvid encoder to encode the bitstream with const
> key-interval and the decoder can access the bitstream randomly.
>   
>    I think it is important in broadcast system.In mpeg4 standard, the
> Group_of_VideoObjectPlane can do this work.
> 
>   In XVID_ENC_PARAM structure, I only find the max_key_interval ,
> which is the maximum value of frames between two keyframes.
> 
>  How can i encode the bitstream with const key-interval with the GOV
> head.

1)As default, XVID sets keyframes dynamically. When there is a
scenechange, XVID sets a keyframe there, because not using a keyframe
could cost even more bits. So in fact, these scene-change keyframes are
"for free". 
I don't see a reason to disable this for broadcasting. If you set
max_key_nterval to the GOP size you want, you will get even more keyframes
than required for random acces.


2) If you really have to have th keyframes at certain positions and not
just anywhere in dense enough distribution, you have to use "intra" field
of XVID_ENC_FRAME

There you can force any frame to be

P-VOP ( intra==0)
I-VOP (intra==1)
B-VOP (intra==2)
automactic (intra==-1)

you'll have to take care yourself which frametype to use when in your mail
encoding loop.

gruel





More information about the XviD-devel mailing list