调整推流参数, 提高视频流畅度

This commit is contained in:
haotian 2025-10-01 16:02:44 +08:00
parent ba9463ba2c
commit 58a7562c3f
2 changed files with 3 additions and 3 deletions

View File

@ -58,8 +58,8 @@ stream:
rtmp_url: "rtsp://127.0.0.1/live/video6"
ffmpeg:
fps: 25 # 推流帧率
video_bitrate: "2000k" # 码率
fps: 10 # 推流帧率
video_bitrate: "1000k" # 码率
preset: "ultrafast" # 编码速度
tune: "zerolatency" # 低延迟优化
pixel_format: "yuv420p"

View File

@ -213,7 +213,7 @@ class FaceRecognitionSystem:
# '-preset', ffmpeg_config['preset'], # 编码预设
'-tune', ffmpeg_config['tune'], # 编码调优
'-b:v', ffmpeg_config['video_bitrate'], # 视频码率
# '-r', str(ffmpeg_config['fps']), # 输出帧率
'-r', str(ffmpeg_config['fps']), # 输出帧率
'-g', str(ffmpeg_config['fps'] * 2), # GOP大小(2秒)
]