IDRフレームの最大間隔。
大きい値の方がbitが節約できるので品質が向上するが、シークの精密さと引き換えになる。
MPEG-1/2/4とは違って、H.264はkeyintを大きくしてもDCT driftで苦しむ事が無い。
最大GOP(Group Of Pictures)サイズ。新しいIDRが強制挿入され、次のGOPが始まる前に連続するフレーム数の上限を指定する。XviDの "Maximum I-frame Interval" に相当するだろう。経験的に10秒分のフレーム数を指定してシーク単位にする人が多い。PAL @ 25 fps なら --keyint 250、NTSC @ 23.976 fps ならちょっと丸めて --keyint 240だ。一般的にGOPは--keyintの指定値を超えない限りは場面転換で始まる。だからこのスイッチを弄る価値があるのは、映像に場面転換や大き な変化が無いなが~い素材だけだ(AMVではそういうのはまず無い)。
*AMV:アニメ・ミュージック・ビデオ。全体的にこのガイドアニメ寄り。
http://aflux.deltaanime.net/Zero1/MP4/x264.html#frame-type-options
--keyint
Usage: --keyint <integer> (default=250)
This is the maximum GOP (Group Of Pictures) value. It controls the maximum number of frames allowed before a new IDR frame is forced and starts a new GOP. The equivalent to this that you would find in XviD would be "Maximum I-frame Interval". As a rule of thumb people tend to set this at 10 seconds worth of frames to aid seeking. For PAL @ 25 fps it would be --keyint 250, or for NTSC @ 23.976 fps we would just round up and use --keyint 240. A new GOP will usually begin at a scene change, unless the --keyint value is exceeded, so this only really applies for sources with long durations without a scene change or significant change in the image (which will almost never happen in an AMV).
keyint:
keyintはシーク(*早送りや巻き戻し*)のやり易さと符号化効率の取引です。他の目的はありません。デフォルトの keyintは250にセットされています。25fps素材では、これで10秒以下の精度でシークできるようになります。5秒精度のシークが重要と考えるなら、keyint=125。ビットレートあたりの品質は僅かに落ちます。重要なのは画質だけで、シークなど気にしないなら、もっと大きな値にできます(値を大きくすればするほど、効果は漸減します。無視できるほど小さく、あるいは0にもなり得ます。)それでも、ビデオストリームにシーンチェンジがある限り、そこがシークポイントになります。
keyint is solely for trading off file seekability against coding efficiency. By default, keyint is set to 250. In 25fps material, this guarantees the ability to seek to within 10 seconds precision. If you think it would be important and useful to be able to seek within 5 seconds of precision, set keyint=125; this will hurt quality/bitrate slightly. If you care only about quality and not about seekability, you can set it to much higher values (understanding that there are diminishing returns which may become vanishingly low, or even zero). The video stream will still have seekable points as long as there are some scene changes.