diff --git a/v2/internal/source/stream.go b/v2/internal/source/stream.go index 0961086..1f97ce2 100644 --- a/v2/internal/source/stream.go +++ b/v2/internal/source/stream.go @@ -278,9 +278,11 @@ func appendInputOptions(args []string, config Config) []string { if transport == "tcp" || transport == "udp" { args = append(args, "-rtsp_transport", transport) } - if config.Timeout > 0 { - args = append(args, "-rw_timeout", strconv.FormatInt(config.Timeout.Microseconds(), 10)) - } + // NOTE: the RTSP socket-timeout option is build-specific (`-stimeout` on + // ffmpeg < 7.0, `-timeout` on >= 5.1) and `-rw_timeout` is rejected by the + // RTSP demuxer ("Option rw_timeout not found"). We omit it for portability; + // a dead TCP connection still ends the decode and triggers reconnect. A + // version-matched timeout can be reintroduced once the ffmpeg build is known. if config.LowLatency { args = append(args, "-fflags", "nobuffer", "-flags", "low_delay") }