赞
踩
该版本是带rtmp模块且编译过的nginx版本,可以直接使用
下载完成后解压,解压后的目录命名为 nginx
下载完成后解压,将解压后的文件夹放入 nginx 目录下
在conf目录下,新建一个文件“nginx.conf”,内容如下
- worker_processes 1;
-
- events {
- worker_connections 1024;
- }
-
- #RTMP服务
- rtmp {
- server {
- listen 1935; #监听端口
- chunk_size 4096; #数据传输块大小
- application live{ #创建名为"live"的应用
- live on;
- }
- }
- }
-
- #HTTP服务,可以通过浏览器访问http://localhost/stat 或者 http://localhost:80/stat 查看服务器状态
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
-
- server {
- listen 80;
- server_name localhost;
-
- location /stat {
- rtmp_stat all;
- rtmp_stat_stylesheet stat.xsl;
- }
-
- location /stat.xsl {
- root ./nginx-rtmp-module-master/; #rtmp拓展包目录
- }
-
- location / {
- root html;
- index index.html index.htm;
- }
-
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
- }
-
- }

该文件主要是直播配置,录播配置、直播回放配置各有不同
在nginx目录下打开命令行界面,输入 nginx.exe -c conf\nginx.conf
启动后,可以在任务管理器中看到nginx进程
在浏览器地址栏输入 localhost/stat ,可以看到服务器状态信息
- nginx.exe -s stop //快速终止服务器,可能不保存相关信息
- nginx.exe -s quit //完整有序停止服务器,保存相关信息
- nginx.exe -s reload //重新载入Nginx,当配置信息修改,需要重新载入这些配置时使用此命令
官网下载地址:https://obsproject.com/zh-cn/download
其它下载地址:http://www.pc6.com/down.asp?id=410276
大致步骤如图所示,分为四步
软件默认有一个场景,我们可以不用再去添加,直接去步骤2添加来源即可
可以添加显示器捕获、视频捕获、音频捕获、媒体源等,此处根据需要进行选择。
本文将本地视频video.mp4作为媒体源进行推流
服务:自定义
服务器: rtmp://127.0.0.1:1935/live
串流秘钥: stream
点击开始推流按钮
打开浏览器输入 localhost/stat 可以看到推流信息
VLC下载地址:https://www.videolan.org/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。