{"id":77,"date":"2020-03-09T20:19:57","date_gmt":"2020-03-10T02:19:57","guid":{"rendered":"http:\/\/www.9487484.com\/?p=77"},"modified":"2020-03-09T20:35:38","modified_gmt":"2020-03-10T02:35:38","slug":"how-to-make-your-own-multistream-vps","status":"publish","type":"post","link":"https:\/\/www.9487484.com\/?p=77","title":{"rendered":"How to make your own multistream rtmp server on ubuntu 18"},"content":{"rendered":"<p>sudo apt update &amp;&amp; apt upgrade -y<\/p>\n<p>sudo apt-get dist-upgrade<\/p>\n<p>sudo apt install nginx-full libnginx-mod-rtmp<\/p>\n<p>sudo nano \/etc\/nginx\/nginx.conf<\/p>\n<p>And add the following lines at the end of the configuration file:<\/p>\n<pre class=\"bbCodeCode\" dir=\"ltr\" data-xf-init=\"code-block\" data-lang=\"\"><code>rtmp {\r\n        server {\r\n                listen 1935;\r\n                chunk_size 4096;\r\n\r\n                application live {\r\n                        live on;\r\n                        record off;\r\n                        #push facebook\r\n                        push rtmp:\/\/127.0.0.1:19350\/rtmp\/your stream key here;\r\n                        #push twitch\r\n                        push rtmp:\/\/live-cdg.twitch.tv\/app\/your stream key here;\r\n                        \r\n                }\r\n        }\r\n}<\/code><\/pre>\n<p>Now let&#8217;s setup stunnel<\/p>\n<p>apt install stunnel4<\/p>\n<p>sudo nano \/etc\/stunnel\/stunnel.conf<\/p>\n<pre class=\"highlight plaintext\"><code>setuid = stunnel4\r\nsetgid = stunnel4\r\npid=\/tmp\/stunnel.pid\r\noutput = \/var\/log\/stunnel4\/stunnel.log\r\ninclude = \/etc\/stunnel\/conf.d<\/code><\/pre>\n<p>sudo nano \/etc\/default\/stunnel4<\/p>\n<pre>ENABLE=1<\/pre>\n<p>sudo mkdir \/etc\/stunnel\/conf.d\/<\/p>\n<p>sudo nano \/etc\/stunnel\/conf.d\/fb.conf<\/p>\n<pre class=\"highlight plaintext\"><code>[fb-live]\r\nclient = yes\r\naccept = 127.0.0.1:19350\r\nconnect = live-api-s.facebook.com:443\r\nverifyChain = no<\/code><\/pre>\n<p>systemctl restart stunnel<\/p>\n<p>systemctl restart nginx.service<\/p>\n<p>if you get an error run<\/p>\n<p>nginx -t -c \/etc\/nginx\/nginx.conf<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sudo apt update &amp;&amp; apt upgrade -y sudo apt-get dist-upgrade sudo apt install nginx-full libnginx-mod-rtmp sudo nano \/etc\/nginx\/nginx.conf And add the following lines at the end of the configuration file: rtmp { server { listen 1935; chunk_size 4096; application live { live on; record off; #push facebook push rtmp:\/\/127.0.0.1:19350\/rtmp\/your stream key here; #push twitch push &hellip; <a href=\"https:\/\/www.9487484.com\/?p=77\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to make your own multistream rtmp server on ubuntu 18&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[15,13,14,17,11,12,16,10],"_links":{"self":[{"href":"https:\/\/www.9487484.com\/index.php?rest_route=\/wp\/v2\/posts\/77"}],"collection":[{"href":"https:\/\/www.9487484.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.9487484.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.9487484.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.9487484.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=77"}],"version-history":[{"count":3,"href":"https:\/\/www.9487484.com\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":83,"href":"https:\/\/www.9487484.com\/index.php?rest_route=\/wp\/v2\/posts\/77\/revisions\/83"}],"wp:attachment":[{"href":"https:\/\/www.9487484.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.9487484.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.9487484.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}