Author Topic: configure server vps centos7 for RTMP protocol  (Read 263 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
configure server vps centos7 for RTMP protocol
« on: April 26, 2020, 06:34:36 PM »
Thanks to everyone in the forum for helping

How to configure server vps centos7 for RTMP protocol?

I already installed FFMPEG.

It is for Webcam transmission on the website Live stream format.

I've been watching this RTMP tutorial.
it's viable?
https://medium.com/vicuesoft-techblog/how-to-install-tune-nginx-with-rtmp-module-and-start-streaming-through-ffmpeg-with-quicksync-on-eff02fac3eeb

I await help ... thank you all.   ;) thankssssss
« Last Edit: April 26, 2020, 06:53:04 PM by jony »
Luis jony

Online
***
Re: configure server vps centos7 for RTMP protocol
« Reply #1 on: April 26, 2020, 08:48:43 PM »
The issue you're going to have, is the nginx. You can recompile it, but there's no guarantee it won't be overwritten.
Google Hangouts:  rcschaff82@gmail.com

Online
***
Re: configure server vps centos7 for RTMP protocol
« Reply #2 on: April 28, 2020, 03:43:19 AM »
Here's a solution for you.  Your installing NGINX, but seperate from the httpd nginx.  (You'll notice cwpsrv is actually nginx).

Steps 1 & 2
Code: [Select]
sudo yum -y groupinstall 'Development Tools'
sudo yum -y install epel-release
sudo yum install openssl-devel
sudo yum install -y pcre-devel

wget https://nginx.org/download/nginx-1.18.0.tar.gz
tar -xzvf nginx-1.18.0.tar.gz


Code: [Select]
./configure --prefix=/etc/nginxrtmp --sbin-path=/usr/sbin/nginxrtmp --modules-path=/usr/lib64/nginxrtmp/modules --conf-path=/etc/nginxrtmp/nginx.conf --error-log-path=/var/log/nginxrtmp/error.log --pid-path=/var/run/nginxrtmp.pid --lock-path=/var/run/nginxrtmp.lock --user=nginx --group=nginx --build=CentOS --builddir=nginx-1.18.0 --http-log-path=/var/log/nginxrtmp/access.log --http-client-body-temp-path=/var/cache/nginxrtmp/client_temp --http-proxy-temp-path=/var/cache/nginxrtmp/proxy_temp --http-fastcgi-temp-path=/var/cache/nginxrtmp/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginxrtmp/uwsgi_temp --http-scgi-temp-path=/var/cache/nginxrtmp/scgi_temp --with-select_module --with-poll_module --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module --with-compat --add-module=../nginx-rtmp-module --with-debug

Google Hangouts:  rcschaff82@gmail.com

Online
***
Re: configure server vps centos7 for RTMP protocol
« Reply #3 on: April 28, 2020, 03:56:05 AM »
Step 3
Code: [Select]
sudo ln -s /usr/lib64/nginxrtmp/modules /etc/nginxrtmp/modules
nano /usr/lib/systemd/system/nginxrtmp.service
Code: [Select]
[Unit]
Description=nginxrtmp - high performance web server
Documentation=https://nginx.org/en/docs/
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
Type=forking
PIDFile=/var/run/nginxrtmp.pid
ExecStartPre=/usr/sbin/nginxrtmp -t -c /etc/nginxrtmp/nginx.conf
ExecStart=/usr/sbin/nginxrtmp -c /etc/nginxrtmp/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target

systemctl enable nginxrtmp

cd /etc/nginxrtmp/
rm nginx.conf
nano nginx.conf
Code: [Select]
#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 {
    server {
        listen 1935; # Standard port
        chunk_size 8192;
        # Application configuration
        application origin_ffmpeg_1 {
            live on;
            record off;
            meta copy;
            exec ffmpeg -i rtmp://localhost:1935/origin_ffmpeg_1/$name <parameters/libs/modules> rtmp://localhost:1935/live_ffmpeg_1/$name_1;
        }
        application live_ffmpeg_1 {
            live on;
            record off;
        }
    }
}

systemctl start nginxrtmp


Now you should be able to follow the rest of the directions.  Please note in step 8, that nginx.conf is in /etc/nginxrtmp
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: configure server vps centos7 for RTMP protocol
« Reply #4 on: May 02, 2020, 07:30:03 PM »
The issue you're going to have, is the nginx. You can recompile it, but there's no guarantee it won't be overwritten.


Thank you very much .. Great friend, you here on the forum that really helps and explains very well.
You understand me. not everyone has the same experience with CWP and that’s why you explain it clearly.
May God double your life .. I don't know how to thank you for this great help .. Thank you very much .. Thank you again ..



















« Last Edit: May 02, 2020, 07:35:46 PM by jony »
Luis jony