安装方式
对于使用dnf的系统(如Fedora):
sudo dnf install ffmpeg ffmpeg-devel
对于使用yum的系统(如CentOS 7):
sudo yum install ffmpeg ffmpeg-devel
安装完成后,你可以通过运行以下命令来验证FFmpeg是否正确安装:
ffmpeg -version
docker run -p 1935:1935 -p 8080:8080 jasonrivers/nginx-rtmp
Under broadcast settigns, set the follwing parameters:
Streaming Service: Custom
Server: rtmp://<your server ip>/live
Play Path/Stream Key: mystream
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
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
