From 46067dec8f10a431863847e6299b7dcb0dbe49d6 Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Sun, 11 Feb 2024 15:01:27 +0300 Subject: [PATCH] Use half GOP size in h264 --- pkg/encoder/h264/x264.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/encoder/h264/x264.go b/pkg/encoder/h264/x264.go index 74b805c4..6ca1f3aa 100644 --- a/pkg/encoder/h264/x264.go +++ b/pkg/encoder/h264/x264.go @@ -91,6 +91,7 @@ func NewEncoder(w, h int, th int, opts *Options) (encoder *H264, err error) { param.i_width = C.int(w) param.i_height = C.int(h) param.i_log_level = C.int(opts.LogLevel) + param.i_keyint_max = 120 param.i_sync_lookahead = 0 param.i_threads = C.int(th) if th != 1 {