{"id":1098,"date":"2019-05-16T17:54:43","date_gmt":"2019-05-16T14:54:43","guid":{"rendered":"https:\/\/artem.services\/?p=1098"},"modified":"2019-12-01T00:45:32","modified_gmt":"2019-11-30T21:45:32","slug":"nginx-rtmp-module","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1098","title":{"rendered":"Nginx RTMP module"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-1041\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/04\/Nginx-logo.png\" alt=\"\" width=\"1280\" height=\"270\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/04\/Nginx-logo.png 1280w, https:\/\/artem.services\/wp-content\/uploads\/2019\/04\/Nginx-logo-300x63.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2019\/04\/Nginx-logo-768x162.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2019\/04\/Nginx-logo-1024x216.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2019\/04\/Nginx-logo-954x201.png 954w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438 <strong>Nginx<\/strong>&#39;\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c <strong>RTPM<\/strong> \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <strong>Ubuntu<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0438\u0445:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt update\r\napt upgrade -y\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt install unzip build-essential libpcre3 libpcre3-dev openssl libssl-dev zlib1g zlib1g-dev libxslt-dev libgd-dev libgeoip-dev\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u043d\u043e\u0434\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c <strong>Nginx<\/strong> \u0441 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nnginx -V\r\nnginx version: nginx\/1.14.0 (Ubuntu)\r\nbuilt with OpenSSL 1.1.0g  2 Nov 2017\r\nTLS SNI support enabled\r\nconfigure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=\/usr\/share\/nginx --conf-path=\/etc\/nginx\/nginx.conf --http-log-path=\/var\/log\/nginx\/access.log --error-log-path=\/var\/log\/nginx\/error.log --lock-path=\/var\/lock\/nginx.lock --pid-path=\/run\/nginx.pid --modules-path=\/usr\/lib\/nginx\/modules --http-client-body-temp-path=\/var\/lib\/nginx\/body --http-fastcgi-temp-path=\/var\/lib\/nginx\/fastcgi --http-proxy-temp-path=\/var\/lib\/nginx\/proxy --http-scgi-temp-path=\/var\/lib\/nginx\/scgi --http-uwsgi-temp-path=\/var\/lib\/nginx\/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u043e\u0434 \u0440\u0443\u043a\u043e\u0439 <strong>Nginx<\/strong>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0438\u0436\u0435.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmkdir \/tmp\/hls\r\ncd \/tmp\/hls\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwget https:\/\/codeload.github.com\/arut\/nginx-rtmp-module\/zip\/master\r\nunzip master\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c <strong>Nginx<\/strong> (\u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <strong>Nginx<\/strong>&#39;\u0430)<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwget http:\/\/nginx.org\/download\/nginx-1.16.0.tar.gz\r\ntar -xf tar -xf nginx-1.16.0.tar.gz\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 <strong>Nginx<\/strong>&#39;\u0430:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd nginx-1.16.0\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 &quot;<strong>&#8212;add-module=\/tmp\/hls\/nginx-rtmp-module-master<\/strong>&quot; \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c &quot;<strong>configure<\/strong>&quot;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n.\/configure --prefix=\/etc\/nginx --sbin-path=\/usr\/sbin\/nginx --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=\/usr\/share\/nginx --conf-path=\/etc\/nginx\/nginx.conf --http-log-path=\/var\/log\/nginx\/access.log --error-log-path=\/var\/log\/nginx\/error.log --lock-path=\/var\/lock\/nginx.lock --pid-path=\/run\/nginx.pid --modules-path=\/usr\/lib\/nginx\/modules --http-client-body-temp-path=\/var\/lib\/nginx\/body --http-fastcgi-temp-path=\/var\/lib\/nginx\/fastcgi --http-proxy-temp-path=\/var\/lib\/nginx\/proxy --http-scgi-temp-path=\/var\/lib\/nginx\/scgi --http-uwsgi-temp-path=\/var\/lib\/nginx\/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module --add-module=\/tmp\/hls\/nginx-rtmp-module-master\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmake\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>\u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 &quot;<strong>make -j 4<\/strong>&quot;, \u0433\u0434\u0435 <strong>4<\/strong> &#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/tmp\/hls\/nginx-rtmp-module-master\/ngx_rtmp_stat_module.c: In function \u2018ngx_rtmp_stat_handler\u2019:\r\n\/tmp\/hls\/nginx-rtmp-module-master\/ngx_rtmp_stat_module.c:771:67: error: macro &quot;__DATE__&quot; might prevent reproducible builds [-Werror=date-time]\r\n     NGX_RTMP_STAT_L(&quot;&lt;built&gt;&quot; __DATE__ &quot; &quot; __TIME__ &quot;&lt;\/built&gt;\\r\\n&quot;);\r\n                                                                   ^\r\n\/tmp\/hls\/nginx-rtmp-module-master\/ngx_rtmp_stat_module.c:771:67: error: macro &quot;__TIME__&quot; might prevent reproducible builds [-Werror=date-time]\r\ncc1: all warnings being treated as errors\r\nobjs\/Makefile:1743: recipe for target 'objs\/addon\/nginx-rtmp-module-master\/ngx_rtmp_stat_module.o' failed\r\nmake[1]: *** [objs\/addon\/nginx-rtmp-module-master\/ngx_rtmp_stat_module.o] Error 1\r\nmake[1]: Leaving directory '\/tmp\/hls\/nginx-1.16.0'\r\nMakefile:8: recipe for target 'build' failed\r\nmake: *** [build] Error 2\r\n<\/pre>\n<p>\u0422\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430: &quot;<strong>-Wdate-time<\/strong>&quot; \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 &quot;<strong>&#8212;with-cc-opt=<\/strong>&quot; \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c &quot;<strong>make<\/strong>&quot;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u0442\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmake install\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncat &lt;&lt;EOF &gt;\/lib\/systemd\/system\/nginx.service\r\n# Stop dance for nginx\r\n# =======================\r\n#\r\n# ExecStop sends SIGSTOP (graceful stop) to the nginx process.\r\n# If, after 5s (--retry QUIT\/5) nginx is still running, systemd takes control\r\n# and sends SIGTERM (fast shutdown) to the main process.\r\n# After another 5s (TimeoutStopSec=5), and if nginx is alive, systemd sends\r\n# SIGKILL to all the remaining processes in the process group (KillMode=mixed).\r\n#\r\n# nginx signals reference doc:\r\n# http:\/\/nginx.org\/en\/docs\/control.html\r\n#\r\n[Unit]\r\nDescription=A high performance web server and a reverse proxy server\r\nDocumentation=man:nginx(8)\r\nAfter=network.target\r\n\r\n[Service]\r\nType=forking\r\nPIDFile=\/run\/nginx.pid\r\nExecStartPre=\/usr\/sbin\/nginx -t -q -g 'daemon on; master_process on;'\r\nExecStart=\/usr\/sbin\/nginx -g 'daemon on; master_process on;'\r\nExecReload=\/usr\/sbin\/nginx -g 'daemon on; master_process on;' -s reload\r\nExecStop=-\/sbin\/start-stop-daemon --quiet --stop --retry QUIT\/5 --pidfile \/run\/nginx.pid\r\nTimeoutStopSec=5\r\nKillMode=mixed\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\nEOF\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nadduser --system --no-create-home --user-group -s \/sbin\/nologin nginx\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>\u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c &quot;<strong>nobody<\/strong>&quot; \u0432 &quot;<strong>nginx.conf<\/strong>&quot;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <strong>Nginx<\/strong> \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsystemctl enable nginx\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsystemctl start nginx\r\nsystemctl status nginx\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u0430:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\napt install ffmpeg rtmpdump\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <strong>Nginx<\/strong>&#39;\u0430:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvim \/etc\/nginx\/nginx.conf\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0418 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u043b\u043e\u043a\u0430 &quot;<strong>http<\/strong>&quot; \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nrtmp {\r\n    server {\r\n        listen 1935;\r\n        application live {\r\n            live on;\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0418 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e <strong>Nginx<\/strong>&#39;\u0430.<\/p>\n<p>&nbsp;<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0442\u0440\u0438\u043c\u0438\u0442\u044c \u0441 \u043c\u0430\u043a\u0430 \u043d\u0430 <strong>Nginx<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nbrew install ffmpeg\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nffmpeg -f avfoundation -list_devices true -i &quot;&quot;\r\n\r\n[AVFoundation input device @ 0x7fc2eacc9d00] AVFoundation video devices:\r\n[AVFoundation input device @ 0x7fc2eacc9d00] [0] FaceTime HD Camera\r\n[AVFoundation input device @ 0x7fc2eacc9d00] [1] Capture screen 0\r\n[AVFoundation input device @ 0x7fc2eacc9d00] AVFoundation audio devices:\r\n[AVFoundation input device @ 0x7fc2eacc9d00] [0] Built-in Microphone\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nffmpeg -f avfoundation -framerate 30 -i &quot;0&quot; out.mpg\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0435\u0431\u043a\u0430\u043c\u0435\u0440\u0435<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043a, \u0442\u043e \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &quot;<strong>out.mpg<\/strong>&quot;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0442\u0440\u0438\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nffmpeg -f avfoundation -r 30 -i &quot;0:0&quot; -deinterlace -vcodec libx264 -pix_fmt yuv420p -preset medium -g 60 -b:v 2500k -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k -f flv rtmp:\/\/1.2.3.4\/live\/stream\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0430 -i &quot;0:0&quot; \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0432\u0443\u043a \u0441 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 -i &quot;0&quot;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><strong>1.2.3.4<\/strong> &#8212; <strong>IP<\/strong> \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 <strong>DNS<\/strong> \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 <strong>Nginx<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <strong>VLC<\/strong> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c &quot;<strong>File<\/strong>&quot; -&gt; &quot;<strong>Open network<\/strong>&quot; \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448 <strong>URL<\/strong>:<\/p>\n<pre>rtmp:\/\/1.2.3.4\/live\/stream<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043d\u0430 <strong>Nginx<\/strong> \u0441\u0435\u0440\u0432\u0435\u0440\u0435 <strong>TCP<\/strong> \u043f\u043e\u0440\u0442 <strong>1935<\/strong>.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &nbsp; \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u043a\u0438 Nginx&#39;\u0430 \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c RTPM \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Ubuntu &nbsp; \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0438\u0445: &nbsp; \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438: &nbsp; \u0421\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u043d\u043e\u0434\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Nginx \u0441 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[831,10,1181,6],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1098"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1098"}],"version-history":[{"count":4,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1098\/revisions"}],"predecessor-version":[{"id":1496,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1098\/revisions\/1496"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}