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

FLV: Support set default has_av and disable guessing. v5.0.110 (#3311)

* FLV: Support set default has_av and disable guessing. v5.0.110

1. Support config default has_audio and has_video.
2. Support disable guessing has_audio or has_video.

* FLV: Reset to false if start to guess has_av.

* FLV: Add regression test for FLV header av metadata.
This commit is contained in:
Winlin 2022-12-17 14:51:48 +08:00 committed by GitHub
parent 4551200e95
commit a36cb57949
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 624 additions and 84 deletions

View file

@ -1453,9 +1453,33 @@ vhost http.remux.srs.com {
# 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
# 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: