's'
This commit is contained in:
17
obs.bat
Normal file
17
obs.bat
Normal file
@@ -0,0 +1,17 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user