From aa10f0ebe16bca9845fd4e42b412cf7208e01127 Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Mon, 3 Aug 2026 12:35:16 +0800 Subject: [PATCH] =?UTF-8?q?chore(server):=20=E5=B1=8F=E8=94=BD=20HLS=20RTM?= =?UTF-8?q?P=20=E6=8E=A8=E6=B5=81=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 由于当前环境未配置 RTMP 服务器,当 ffmpeg 尝试推送音频流到 127.0.0.1:1935 时会一直报错 `Connection refused` 从而导致控制台刷屏。 现将该错误日志注释屏蔽,使控制台保持清爽。 --- CloudServer/server.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CloudServer/server.js b/CloudServer/server.js index 18bad8c..c938c71 100644 --- a/CloudServer/server.js +++ b/CloudServer/server.js @@ -1524,7 +1524,8 @@ function runFfmpegRtmpPush(streamName, seq) { state.currentProcess = null; if (code !== 0) { state.lastError = (stderr || `ffmpeg exited with code ${code}`).trim(); - log('ERROR', `HLS push failed for ${streamName}: ${state.lastError}`); + // Suppress HLS push failed logs + // log('ERROR', `HLS push failed for ${streamName}: ${state.lastError}`); } try { fs.unlinkSync(tmpAacPath); } catch {} resolve(); @@ -1584,7 +1585,8 @@ function runFfmpegRtmpPush(streamName, seq) { state.currentProcess = null; if (code !== 0) { state.lastError = (stderr || `ffmpeg exited with code ${code}`).trim(); - log('ERROR', `HLS push failed for ${streamName}: ${state.lastError}`); + // Suppress HLS push failed logs + // log('ERROR', `HLS push failed for ${streamName}: ${state.lastError}`); } try { fs.unlinkSync(listPath); } catch {} resolve();