直播服务器便携版.Windows+Nginx+RTMP+HLS+Dash
该软件包从 SwampApe/nginx-rtmp-1.17.10-windows 分叉而来。
这是什么?这是我的尝试,使在 MS Windows 上设置直播服务器变得尽可能简单。
首先,我们需要确保所有文件都被 Windows 解锁,这样我们才能运行它们。您可以通过右键单击可执行文件并选择属性,然后选择解锁来完成此操作。但是,有一种更快、更简单的方法来解锁某个文件夹中的所有文件。单击“开始”,开始输入:“Windows Powershell”,如果出现,请右键单击它并选择:“以管理员身份运行”。在窗口中输入类似以下内容。(在此示例中,我将 zip 文件的内容放在 C:\livestream 中。
dir C:\livestream -Recurse | Unblock-File
请动动脑筋,针对你解压文件的位置执行此操作。
在运行 nginx.exe 之前,请确保您已经查看过 conf/nginx.conf 文件。您可能需要根据您的需要或愿望编辑其中的一些内容。
每次更改配置时,您都应该使用 test-config.bat 文件查看 nginx 是否在您的配置中发现任何错误。如果没有发现错误,您可以安全地(重新)启动 Nginx。如果确实发现错误,它会向您显示错误,以便您可以轻松地更改该选项,然后再次尝试 test-config.bat。
每次更改配置文件后,您都需要重新启动 nginx.exe。配置文件在 Nginx 启动时加载,因此如果您希望它获取您编辑的更改,则必须重新启动它。首先使用 stop-nginx.bat 文件,并通过查看任务管理器 (ctrl+alt+del) 检查它是否杀死了所有 nginx 进程。如果它没有杀死所有 nginx 进程,您必须通过右键单击它们并选择“结束进程”来手动杀死它们。现在您可以再次启动 nginx.exe,您的更改将生效。
当您想要测试设置时,请确保正确设置了 OBS 或任何其他直播应用程序。直播 URL 应为:“rtmp://localhost/live”,直播密钥应为:“stream”
如果您有任何疑问,请不要来烦我。只需像其他受人尊敬的极客一样使用 Google 即可。
祝你好运,直播愉快!
Nginx: 1.17.10 RTMP Module: 1.2.1
使用的 autoconf 设置:
自动/配置
--with-cc=cl
--with-debug
--prefix=
--conf-path=conf/nginx.conf --
pid-path=logs/nginx.pid
--http-log-path=logs/access.log
--error-log-path=logs/error.log
--sbin-path=nginx.exe
--http-client-body-temp-path=temp/client_body_temp
--http-proxy-temp-path=temp/proxy_temp
--http-fastcgi-temp-path=temp/fastcgi_temp
--http-scgi-temp-path=temp/scgi_temp
--http-uwsgi-temp-path=temp/uwsgi_temp
--with-cc-opt=-DFD_SETSIZE=1024
--with-pcre=objs/lib/pcre-8.44
--with-zlib=objs/lib/zlib-1.2.11
--with-openssl=objs/lib/openssl-1.1.1d
--with-openssl-opt=no-asm
--with-http_ssl_module
--with-http_flv_module
--with-http_geoip_module
--with-http_gzip_static_module
--with-http_mp4_module
--with-http_secure_link_module
--with-http_slice_module
--with-http_v2_module
--with-mail
--with-mail_ssl_module
--with-stream
--with-stream_ssl_module
--add-module=nginx-rtmp-module \