- yum -y install pcre-devel openssl openssl-devel
- wget https://github.com/arut/nginx-rtmp-module/archive/refs/heads/master.zip
- wget http://nginx.org/download/nginx-1.20.1.tar.gz
- 在Nginx目录
./configure --add-module=/root/nginx-rtmp-module-master --with-http_ssl_module --with-debug
make
sudo make install - /usr/local/nginx/conf
在nginx.conf中增加:
rtmp_auto_push on;
rtmp {
server {
listen 1935;
application test {
live on;
}
}
}
- vlc
rtmp:// ip:1935/test - ffmpeg -re -i trailer.mp4 -c copy -f flv rtmp://ip:1935/test