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

Merge branch v5.0.112 into develop

1. SRT: Fix srt to rtmp crash when sps or pps empty. v5.0.112 (#3323)
2. GB28181: Fix memory overlap for small packets. v5.0.111 (#3315)
3. FLV: Support set default has_av and disable guessing. v5.0.110 (#3311)
4. FLV: Drop packet if header flag is not matched. v5.0.109 (#3306)
5. FLV: Reset has_audio or has_video if only sequence header. (#3310)
This commit is contained in:
winlin 2022-12-18 11:44:29 +08:00
commit 2f7e474853
19 changed files with 823 additions and 107 deletions

View file

@ -1450,6 +1450,36 @@ vhost http.remux.srs.com {
# Overwrite by env SRS_VHOST_HTTP_REMUX_FAST_CACHE for all vhosts.
# default: 0
fast_cache 30;
# Whether drop packet if not match header. For example, there is has_audio and has video flag in FLV header, if
# this is set to on and has_audio is false, then SRS will drop audio packets when got audio packets. Generally
# it should work, but sometimes you might need SRS to keep packets even when FLV header is set to false.
# See https://github.com/ossrs/srs/issues/939#issuecomment-1348740526
# TODO: Only support HTTP-FLV stream right now.
# Overwrite by env SRS_VHOST_HTTP_REMUX_DROP_IF_NOT_MATCH for all vhosts.
# Default: on
drop_if_not_match on;
# Whether stream has audio track, used as default value for stream metadata, for example, FLV header contains
# this flag. Sometimes you might want to force the metadata by disable guess_has_av.
# See https://github.com/ossrs/srs/issues/939#issuecomment-1351385460
# TODO: Only support HTTP-FLV stream right now.
# Overwrite by env SRS_VHOST_HTTP_REMUX_HAS_AUDIO for all vhosts.
# Default: on
has_audio on;
# Whether stream has video track, used as default value for stream metadata, for example, FLV header contains
# this flag. Sometimes you might want to force the metadata by disable guess_has_av.
# See https://github.com/ossrs/srs/issues/939#issuecomment-1351385460
# TODO: Only support HTTP-FLV stream right now.
# Overwrite by env SRS_VHOST_HTTP_REMUX_HAS_VIDEO for all vhosts.
# Default: on
has_video on;
# Whether guessing stream about audio or video track, used to generate the flags in, such as FLV header. If
# guessing, depends on sequence header and frames in gop cache, so it might be incorrect especially your stream
# is not regular. If not guessing, use the configured default value has_audio and has_video.
# See https://github.com/ossrs/srs/issues/939#issuecomment-1351385460
# TODO: Only support HTTP-FLV stream right now.
# Overwrite by env SRS_VHOST_HTTP_REMUX_GUESS_HAS_AV for all vhosts.
# Default: on
guess_has_av on;
# the stream mount for rtmp to remux to live streaming.
# typical mount to [vhost]/[app]/[stream].flv
# the variables:

View file

@ -0,0 +1,67 @@
listen 1935;
max_connections 1000;
daemon off;
srs_log_tank console;
stream_caster {
enabled on;
caster gb28181;
output rtmp://127.0.0.1/live/[stream];
listen 9000;
sip {
enabled on;
listen 5060;
timeout 2.1;
reinvite 1.2;
}
}
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
http_api {
enabled on;
listen 1985;
}
stats {
network 0;
}
rtc_server {
enabled on;
listen 8000;
candidate $CANDIDATE;
}
vhost __defaultVhost__ {
rtc {
enabled on;
rtmp_to_rtc on;
keep_bframe off;
rtc_to_rtmp on;
}
play {
atc on;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
drop_if_not_match on;
}
ingest livestream {
enabled on;
input {
type file;
url ./doc/source.200kbps.768x320.flv;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine {
enabled off;
output rtmp://127.0.0.1:[port]/live/livestream;
}
}
}