From 82a426ef4996321b57e2fe000a5c0f352ab8917a Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Tue, 22 Aug 2023 15:08:55 +0500 Subject: [PATCH] h264 keyframe fix to keep desired hls segment length --- rtmp/flv/writer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rtmp/flv/writer.go b/rtmp/flv/writer.go index 67c79bb..cfe5beb 100644 --- a/rtmp/flv/writer.go +++ b/rtmp/flv/writer.go @@ -23,6 +23,7 @@ func NewFLVWriter(stream_key string) (*FLVWriter, error) { "-c:a", "aac", "-c:v", "h264", "-b:v", "1M", + "-g", "30", "-hls_time", "6", "-hls_list_size", "4", "-hls_base_url", "/vid/" + stream_key + "/",