使用nginx搭建rtmp推流服务器
发布日期:2021-05-10 08:49:28 浏览次数:27 分类:精选文章

本文共 2177 字,大约阅读时间需要 7 分钟。

���������������������������������RTMP���������������������������������������������

������������������������������

������������������gcc���������������

sudo apt install gcc gcc-c++

���������������������������������������������

������������������PCRE���

���������������PCRE���

wget https://ftp.pcre.org/pub/pcre/pcre-8.10.tar.gz
tar -zxf pcre-8.10.tar.gz
./configure
make install

���������PCRE������������������������������������

������������������ZLIB���

���������������ZLIB���

wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.11.tar.gz
tar -zxf zlib-1.2.11.tar.gz
./configure
make install

������������������RTMP���������

������OpenSSL������������������1.1.1���

wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1-pre9.tar.gz
tar -zxf OpenSSL_1_1_1-pre9.tar.gz
./config --prefix=/root/usr/local/openssl-OpenSSL_1_1_1-pre9
make install

������������Nginx������������

wget https://github.com/nginx/nginx/archive/release-1.15.3.tar.gz
tar -zxf release-1.15.3.tar.gz
./auto/configure --add-module=/root/usr/local/nginx-rtmp-module-1.2.1 --with-openssl=/root/usr/local/openssl-OpenSSL_1_1_1-pre9
make
make install

������������������Nginx

������������������������������������

cp /root/work/nginx/nginx-rtmp-module-1.2.1/test/nginx.conf /usr/local/nginx/conf/

������nginx.conf���������RTMP���������������������������������URL���Secret���

���������������������������������

������������������������������

ps aux | grep nginx

������FFmpeg���������������

ffmpeg -re -i cqz.mp4 -vcodec libx264 -acodec aac -f flv rtmp://47.106.15.76:1935/myapp/

������������������������������1935���������������

���������������������������������

���������������������������������������������������������VLC������������������������������rtmpPush���������VLC������������

������

  • ������������RTMP������������������������Python���������
openssl genrsa -out rsa_private.pem -aes256 -days 1024
  • ������Nginx������������������������������������������������������

������������������������������������������������RTMP������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

上一篇:FFmpeg4.2.2最新版本编译、RTMP编译
下一篇:YuvImage源码分析以及使用

发表评论

最新留言

不错!
[***.144.177.141]2025年04月01日 02时40分29秒