[x264-devel] Fixed GOP, keyint and keyint-min

Lars Kiesow lkiesow at uos.de
Tue Aug 29 11:50:35 CEST 2017


Hi,
for x264, it seems to me like the only thing preventing this is the
clipping of keyint-min.

The attached oneline patch (attachment or [1]) would already do the
trick and allow such settings. It would also move to a more expected
behavior according to the docs since the current clipping is afaik not
documented at all.

I did some tests with this patch applied and it seems to work just
fine. Would it make sense to apply this to the official x264?

Regards,
Lars

[1] https://github.com/lkiesow/x264/commit/a5db22c93e224d05e6246dfa99e48ec264c3d7d9


On Mon, 28 Aug 2017 10:21:25 -0700
Tom Vaughan <tom.vaughan at multicorewareinc.com> wrote:

> We looked into this, and we concluded that scene detection is useful
> even for fixed GOP length encoding.  When the encoder detects scene
> changes in the lookahead, it can better understand where
> inter-prediction will work, and where it won't work (so it can avoid
> wasting time searching for inter-prediction modes that won't work).
> It can also insert a non-IDR I frame at the start of the new scene,
> if that turns out to be more efficient than using a P frame (because
> the first frame at the start of a new scene is unlikely to find lower
> rdcost inter-prediction references to a previous frame, and a P frame
> that contains mostly I blocks compresses less efficiently than an I
> frame).
> 
> We changed this behavior in x265.  So for x265, if you want fixed GOP
> lengths, you can just set max-keyint = keyint.  Scenecut is
> independent, and it's on by default.
> 
> -----Original Message-----
> From: x264-devel [mailto:x264-devel-bounces at videolan.org] On Behalf Of
> BugMaster
> Sent: Wednesday, August 23, 2017 12:18 PM
> To: Mailing list for x264 developers
> Subject: Re: [x264-devel] Fixed GOP, keyint and keyint-min
> 
> On Wed, 23 Aug 2017 21:08:14 +0200, Lars Kiesow wrote:
> > Hi everyone,
> > today we had some discussion about forcing a fixed GOP size using
> > x264 with scenecut enabled to get additional I-frames. E.g. having
> > an IDR frame exactly every 50 frames with some additional non-IDR
> > I-frames in between if scenecut detects that having one would make
> > sense.  
> 
> > ...  
> 
> Hi. There is no point in having fixed GOP with scenecut enabled i.e.
> if you want fixed GOP you SHOULD disable scenecut. If you don't need
> really fixed GOP (usually less than 100 frames) but only some sync
> points between different encodeds of same video (say every 1000
> frames) than you better use forced frame types (i.e. qpfile way of
> x264 cli).
> 
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> https://mailman.videolan.org/listinfo/x264-devel
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> https://mailman.videolan.org/listinfo/x264-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-Fixed-GOP-Size-Using-Keyint-Min-Max.patch
Type: text/x-patch
Size: 1292 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20170829/b2bcdf4a/attachment.bin>


More information about the x264-devel mailing list