Files
rtsp-video-analysis-system/bin/start-rtsp-server.sh
Joshi 3c3f2fe25b feat(video): 添加视频分析配置和RTSP服务器启动脚本
- 在application.yml中添加视频分析相关配置项,包括AI检测开关、RTSP连接参数
- 新增detection-config.json模型配置文件,支持YOLO目标检测模型
- 优化RTSP流媒体传输配置,添加TCP/UDP传输协议支持和超时重试机制
-修复模型配置文件路径问题,从/resources/models/调整为/libs/models/
- 更新JavaCV和OpenCV依赖版本,提升视频处理性能
- 添加Windows和Linux平台的RTSP测试服务器启动脚本
- 默认关闭AI检测功能,避免启动时出现错误- 增强RTSP连接稳定性,添加更多兼容性选项
2025-09-27 18:52:40 +08:00

24 lines
712 B
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo "启动RTSP测试服务器..."
echo
# 检查FFmpeg是否安装
if ! command -v ffmpeg &> /dev/null; then
echo "错误: FFmpeg未安装请先安装FFmpeg"
echo "Ubuntu/Debian: sudo apt install ffmpeg"
echo "CentOS/RHEL: sudo yum install ffmpeg"
exit 1
fi
# 视频文件路径
VIDEO_FILE="test.mp4"
# 如果没有测试视频,创建一个测试模式
if [ ! -f "$VIDEO_FILE" ]; then
echo "创建测试视频流..."
ffmpeg -f lavfi -i testsrc=duration=3600:size=640x480:rate=25 -c:v libx264 -preset ultrafast -f rtsp rtsp://localhost:8554/11
else
echo "使用视频文件: $VIDEO_FILE"
ffmpeg -re -i "$VIDEO_FILE" -c copy -f rtsp rtsp://localhost:8554/11
fi