0


重磅:SRS 5.0正式支持Windows平台和安装引导程式

SRS 支持Windows

SRS 5.0.89+正式支持Windows,基于Cygwin64平台,支持代码编译,以及流水线,每个5.0的版本都会提供安装包。

编译代码

如果你需要自己从代码编译Windows版本的SRS,请先安装Cygwin64[1]。

另外,还需要安装工具gcc-g++ make automake patch pkg-config tcl cmake,可以参考流水线说明[2]。

安装好环境后,在Cygwin终端中执行命令:

git checkout develop
./configure
make

这样就可以编译出Windows版本的SRS了,可执行文件在./objs/srs.exe,其他使用说明参考Getting Started[3]。

从二进制文件安装

从5.0.89之后,SRS 5.0每个版本release[4],都会附带Windows的安装包。你可以下载后,快速安装和使用SRS。

下面是一些安装包的链接,注意你应该用最新版本,而不是使用某个固定版本release[5]:

• 最新版本下载[6]

• SRS-Windows-x86_64-5.0.89-setup.exe[7]

• SRS-Windows-x86_64-5.0.19-setup.exe[8]

Note: SRS 5.0.89+之后,使用流水线构建Windows安装包,GitHub Actions自动生成。

安装后,使用管理员权限启动SRS:

使用FFmpeg或OBS推流到SRS:

ffmpeg -re -i ~/srs/doc/source.flv -c copy -f flv rtmp://win11/live/livestream

使用VLC或srs-player[9]播放流:

基本上SRS现有的功能都能用,比如RTMP, HTTP-FLV, HLS, WebRTC, HTTP-API, Prometheus Exporter等等。

从NSIS打包

如果你需要自己修改代码并打包,可以使用NSIS[10],在Cygwin终端中执行命令:

"/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" \
    /DSRS_VERSION=$(./objs/srs -v 2>&1) \
    /DCYGWIN_DIR="C:\cygwin64" \
    packaging/nsis/srs.nsi

已知问题

• Cygwin: Build with SRT is ok, but crash when running. #3251[11]

• Cygwin: Support address sanitizer for windows. #3252[12]

• Cygwin: ST stuck when working in multiple threads mode. #3253[13]

• Cygwin: Support iocp and windows native build. #3256[14]

• Cygwin: Build srtp with openssl fail for no srtp_aes_icm_ctx_t #3254[15]

链接

ST supports windows: https://github.com/ossrs/state-threads/issues/20

Commits about SRS Windows: https://github.com/ossrs/srs-windows/issues/2

Windows docker also works for SRS, however, srs.exe is more popular for windows developers.

引用链接
[1] Cygwin64:
https://cygwin.com/install.html

[2] 说明:
https://github.com/cygwin/cygwin-install-action#parameters

[3] Getting Started:
./getting-started.md
[4] release:
https://github.com/ossrs/srs/releases

[5] release:
https://github.com/ossrs/srs/releases

[6] 最新版本下载:
https://github.com/ossrs/srs/releases

[7] SRS-Windows-x86_64-5.0.89-setup.exe:
https://github.com/ossrs/srs/releases/tag/v5.0.89

[8] SRS-Windows-x86_64-5.0.19-setup.exe:
https://github.com/ossrs/srs/releases/tag/v5.0.19

[9] srs-player:
http://win11:8080/

[10] NSIS:
https://nsis.sourceforge.io/Download

[11] Cygwin: Build with SRT is ok, but crash when running. #3251:
https://github.com/ossrs/srs/issues/3251

[12] Cygwin: Support address sanitizer for windows. #3252:
https://github.com/ossrs/srs/issues/3252 [13] Cygwin: ST stuck when working in multiple threads mode. #3253:
https://github.com/ossrs/srs/issues/3253

[14] Cygwin: Support iocp and windows native build. #3256:
https://github.com/ossrs/srs/issues/3256 [15] Cygwin: Build srtp with openssl fail for no srtp_aes_icm_ctx_t #3254:
https://github.com/ossrs/srs/issues/3254

作者:赵文杰

原文链接:
https://mp.weixin.qq.com/s?__biz=MzA4NTQ3MzQ5OA==&mid=2649005647&idx=1&sn=0bceba60d5270479bab12b1d5ccc1d54&chksm=87c75ffab0b0d6ec2d428856c8761a5ebee799a8c5205d521c538195dbefcc9b673266e8182f&mpshare=1&scene=23&srcid=021792kH971FSrTrUPKExYXD&sharer_sharetime=1676614148369&sharer_shareid=a96e9b09ebf11547090dd99009e597bb#rd

标签: git linux 运维

本文转载自: https://blog.csdn.net/Atoops/article/details/129101723
版权归原作者 程序媛小西 所有, 如有侵权,请联系我们删除。

“重磅:SRS 5.0正式支持Windows平台和安装引导程式”的评论:

还没有评论