mirror of
https://github.com/sebseb7/pilivestreamingtools.git
synced 2025-12-13 13:52:27 +00:00
nginx rtmp
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FFmpeg
|
||||||
|
nginx-1.18.0
|
||||||
|
nginx-rtmp-module
|
||||||
|
|
||||||
21
build-nginx-rtmp.sh
Executable file
21
build-nginx-rtmp.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
sudo apt-get install zlib1g-dev libssl-dev
|
||||||
|
|
||||||
|
git clone -b master --single-branch --depth 1 https://github.com/arut/nginx-rtmp-module.git
|
||||||
|
cd nginx-rtmp-module
|
||||||
|
wget https://patch-diff.githubusercontent.com/raw/arut/nginx-rtmp-module/pull/1450.diff
|
||||||
|
cat 1450.diff | patch -p1
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
wget -4 http://nginx.org/download/nginx-1.18.0.tar.gz
|
||||||
|
tar -xzf nginx-1.18.0.tar.gz
|
||||||
|
rm nginx-1.18.0.tar.gz
|
||||||
|
cd nginx-1.18.0
|
||||||
|
./configure --with-http_v2_module --with-http_ssl_module --without-http_fastcgi_module --without-http_rewrite_module --without-http_scgi_module --without-http_uwsgi_module --add-module=../nginx-rtmp-module
|
||||||
|
make -j4
|
||||||
|
sudo make install
|
||||||
|
cd ..
|
||||||
|
sudo cp nginx.conf /usr/local/nginx/conf
|
||||||
|
sudo cp nginx.service /lib/systemd/system
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable nginx
|
||||||
|
sudo systemctl start nginx
|
||||||
2
misc.sh
Executable file
2
misc.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
raspi-config nonint do_memory_split 256
|
||||||
|
#raspi-config noint enable_overlayfs
|
||||||
26
nginx.conf
Normal file
26
nginx.conf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
#user nobody;
|
||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
#error_log logs/error.log;
|
||||||
|
#error_log logs/error.log notice;
|
||||||
|
#error_log logs/error.log info;
|
||||||
|
|
||||||
|
#pid logs/nginx.pid;
|
||||||
|
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
rtmp {
|
||||||
|
access_log off;
|
||||||
|
server {
|
||||||
|
listen 1935;
|
||||||
|
application feed {
|
||||||
|
live on;
|
||||||
|
meta copy;
|
||||||
|
drop_idle_publisher 4s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
nginx.service
Normal file
16
nginx.service
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=The NGINX HTTP and reverse proxy server
|
||||||
|
After=syslog.target network-online.target remote-fs.target nss-lookup.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/usr/local/nginx/logs/nginx.pid
|
||||||
|
ExecStartPre=/usr/local/nginx/sbin/nginx -t
|
||||||
|
ExecStart=/usr/local/nginx/sbin/nginx
|
||||||
|
ExecReload=/usr/local/nginx/sbin/nginx -s reload
|
||||||
|
ExecStop=/bin/kill -s QUIT $MAINPID
|
||||||
|
PrivateTmp=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user