您当前的位置:首页 > 计算机 > 软件应用 > 其它软件

rtmp 学习笔记

时间:12-14来源:作者:点击数:
CDSY,CDSY.XYZ

安装 ffmpeg

安装方式

对于使用dnf的系统(如Fedora):
sudo dnf install ffmpeg ffmpeg-devel

对于使用yum的系统(如CentOS 7):
sudo yum install ffmpeg ffmpeg-devel

安装完成后,你可以通过运行以下命令来验证FFmpeg是否正确安装:
ffmpeg -version

部署 rtmp 服务器

docker run -p 1935:1935 -p 8080:8080 jasonrivers/nginx-rtmp

OBS Configuration

Under broadcast settigns, set the follwing parameters:

Streaming Service: Custom

Server: rtmp://<your server ip>/live

Play Path/Stream Key: mystream

Watching the steam

In your favorite RTMP video player connect to the stream using the URL:

rtmp://<your server ip>/live/mystream
http://<your server ip>/hls/mystream.m3u8

Streaming-Example

Send a stream:

ffmpeg -i input.flv -c copy -f flv rtmp://localhost:1935/live/input
ffmpeg -i input.mpg -c copy -f mpeg rtmp://localhost:1935/live/input

Receive a stream:

ffmpeg -i rtmp://localhost:1935/live/input -c copy -f flv output
CDSY,CDSY.XYZ
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐