Files
gitlab-instance-0a899031_do…/obs.bat
2026-03-28 02:39:29 -05:00

18 lines
678 B
Batchfile
Raw 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.
@echo off
setlocal EnableDelayedExpansion
REM Windows从本机 SRS 拉 SRT 并用 ffplay 播放(需已安装 ffmpeg 且 ffplay 在 PATH
REM 下方 SRS_SRT_URL 里的端口是 SRS 的 SRT 端口,与 Web 控制台端口config\runtime.env无关。
if not defined SRS_SRT_URL (
set "SRS_SRT_URL=srt://127.0.0.1:10080?streamid=#!::r=live/livestream,m=request^&latency=10"
)
where ffplay >nul 2>&1
if errorlevel 1 (
echo ffplay not found. Install ffmpeg and add to PATH.
exit /b 1
)
ffplay -nostats -hide_banner -fflags nobuffer -flags low_delay -framedrop -probesize 32 -analyzeduration 0 -sync ext -infbuf -vf "setpts=PTS-STARTPTS" "%SRS_SRT_URL%"
endlocal