|
|
@@ -1,5 +1,6 @@
|
|
|
package com.zhiqiyun.open.camera.rtsp;
|
|
|
|
|
|
+import cn.hutool.crypto.SecureUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.bytedeco.ffmpeg.avcodec.AVCodecParameters;
|
|
|
@@ -39,7 +40,6 @@ public class RtspPushSrs {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public static void grabberAndPush(String rtspId) throws Exception {
|
|
|
-
|
|
|
String rtspUrl = RtspTransfer.PATH_MAP.get(rtspId);
|
|
|
|
|
|
// ffmepg日志级别
|
|
|
@@ -105,7 +105,7 @@ public class RtspPushSrs {
|
|
|
log.info("视频宽度[{}],视频高度[{}],音频通道数[{}],封装格式{{}]", frameWidth, frameHeight, audioChannels, format);
|
|
|
|
|
|
// 实例化FFmpegFrameRecorder,将SRS的推送地址传入
|
|
|
- String rtmpUrl = String.format(INTRANET_SRS_PUSH_ADDRESS, rtspId);
|
|
|
+ String rtmpUrl = String.format(INTRANET_SRS_PUSH_ADDRESS, SecureUtil.md5(rtspId));
|
|
|
log.info("流媒体服务地址:{}", rtmpUrl);
|
|
|
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(rtmpUrl, frameWidth, frameHeight, audioChannels);
|
|
|
// recorder.setInterleaved(true);
|