diff --git a/recorder.go b/recorder.go index d5ffd35..b954b75 100644 --- a/recorder.go +++ b/recorder.go @@ -80,7 +80,7 @@ func (rm *RecorderManager) StopAll() { // // Each segment is exactly 5 minutes. Gaps between segments are ~1-2s // (FFmpeg restart overhead). The -t 300 flag bounds the segment by input -// duration, while -rw_timeout makes ffmpeg exit (rather than hang) when the +// duration, while -timeout makes ffmpeg exit (rather than hang) when the // RTSP stream stalls, so the retry loop below can reconnect. func (rm *RecorderManager) startRecorder(cam CameraConfig) { rtspURL := cam.RTSPMain @@ -131,7 +131,7 @@ func (rm *RecorderManager) startRecorder(cam CameraConfig) { cmd := exec.Command("ffmpeg", "-hide_banner", "-loglevel", "error", "-rtsp_transport", "tcp", - "-rw_timeout", "10000000", // 10s socket I/O timeout — exit on stalled stream + "-timeout", "10000000", // 10s socket I/O timeout — exit on stalled stream "-i", rtspURL, "-an", // drop audio (pcm_mulaw not supported in MP4) "-c:v", "copy", // stream-copy video: zero transcoding, near-zero CPU