Merge pull request #787 from xiaoQQya/wvp-28181-2.0

修复 RTSP 端口为空时使用 MP4 协议截图失败的问题
This commit is contained in:
648540858 2023-03-22 10:45:36 +08:00 committed by GitHub
commit c73fe2b0cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -547,7 +547,9 @@ public class MediaServerServiceImpl implements IMediaServerService {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("api.secret",mediaServerItem.getSecret()); // -profile:v Baseline 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.enable","1");
param.put("hook.on_flow_report",""); param.put("hook.on_flow_report","");
param.put("hook.on_play",String.format("%s/on_play", hookPrex)); param.put("hook.on_play",String.format("%s/on_play", hookPrex));