1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Live: Limit cached max frames by gop_cache_max_frames (#3236)

* add gop_cache_max_frames

* Live: Limit cached max frames by gop_cache_max_frames. v5.0.93

Co-authored-by: wanglei <wanglei@unicloud.com>
Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
stone 2022-11-22 12:31:45 +08:00 committed by GitHub
parent 4ada0bc629
commit ec76512e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 75 additions and 7 deletions

View file

@ -1096,6 +1096,12 @@ vhost play.srs.com {
# Overwrite by env SRS_VHOST_PLAY_GOP_CACHE for all vhosts.
# default: on
gop_cache off;
# Limit the max frames in gop cache. It might cause OOM if video stream has no IDR frame, so we limit to N
# frames by default.
# default: 250
gop_cache_max_frames 250;
# the max live queue length in seconds.
# if the messages in the queue exceed the max length,
# drop the old whole gop.

View file

@ -36,4 +36,8 @@ vhost __defaultVhost__ {
# @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
rtc_to_rtmp off;
}
play{
gop_cache_max_frames 250;
}
}