From 3ef643d658a647651f80c08db7c15f66734cbab1 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Wed, 22 Mar 2023 10:36:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(snap):=20=E4=BF=AE=E5=A4=8D=20rtsp=20?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E4=B8=BA=E7=A9=BA=E6=97=B6=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20mp4=20=E5=8D=8F=E8=AE=AE=E6=88=AA=E5=9B=BE=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/MediaServerServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index c45f9f0f..eab8edb3 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -547,7 +547,9 @@ public class MediaServerServiceImpl implements IMediaServerService { Map param = new HashMap<>(); param.put("api.secret",mediaServerItem.getSecret()); // -profile:v Baseline - param.put("ffmpeg.snap", "%s -rtsp_transport tcp -i %s -y -f mjpeg -t 0.001 %s"); + if (mediaServerItem.getRtspPort() != 0) { + param.put("ffmpeg.snap", "%s -rtsp_transport tcp -i %s -y -f mjpeg -t 0.001 %s"); + } param.put("hook.enable","1"); param.put("hook.on_flow_report",""); param.put("hook.on_play",String.format("%s/on_play", hookPrex));