Advertisement
Guest User

conf

a guest
Feb 17th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.79 KB | None | 0 0
  1. user root;
  2. worker_processes 1;
  3.  
  4. #error_log logs/error.log;
  5. #error_log logs/error.log notice;
  6. #error_log logs/error.log info;
  7.  
  8. #pid logs/nginx.pid;
  9.  
  10.  
  11. events {
  12. worker_connections 1024;
  13. }
  14.  
  15.  
  16. http {
  17. include mime.types;
  18. default_type application/octet-stream;
  19.  
  20. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  21. # '$status $body_bytes_sent "$http_referer" '
  22. # '"$http_user_agent" "$http_x_forwarded_for"';
  23.  
  24. #access_log logs/access.log main;
  25.  
  26. sendfile on;
  27. #tcp_nopush on;
  28.  
  29. #keepalive_timeout 0;
  30. keepalive_timeout 65;
  31.  
  32. #gzip on;
  33.  
  34. server {
  35. listen 80;
  36. server_name localhost;
  37.  
  38. #charset koi8-r;
  39.  
  40. #access_log logs/host.access.log main;
  41.  
  42. location / {
  43. root html;
  44. index index.html index.htm;
  45. }
  46.  
  47. #error_page 404 /404.html;
  48.  
  49. # redirect server error pages to the static page /50x.html
  50. #
  51. error_page 500 502 503 504 /50x.html;
  52. location = /50x.html {
  53. root html;
  54. }
  55.  
  56. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  57. #
  58. #location ~ \.php$ {
  59. # proxy_pass http://127.0.0.1;
  60. #}
  61.  
  62. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  63. #
  64. #location ~ \.php$ {
  65. # root html;
  66. # fastcgi_pass 127.0.0.1:9000;
  67. # fastcgi_index index.php;
  68. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  69. # include fastcgi_params;
  70. #}
  71.  
  72. # deny access to .htaccess files, if Apache's document root
  73. # concurs with nginx's one
  74. #
  75. #location ~ /\.ht {
  76. # deny all;
  77. #}
  78. }
  79.  
  80.  
  81. # another virtual host using mix of IP-, name-, and port-based configuration
  82. #
  83. #server {
  84. # listen 8000;
  85. # listen somename:8080;
  86. # server_name somename alias another.alias;
  87.  
  88. # location / {
  89. # root html;
  90. # index index.html index.htm;
  91. # }
  92. #}
  93.  
  94.  
  95. # HTTPS server
  96. #
  97. #server {
  98. # listen 443 ssl;
  99. # server_name localhost;
  100.  
  101. # ssl_certificate cert.pem;
  102. # ssl_certificate_key cert.key;
  103.  
  104. # ssl_session_cache shared:SSL:1m;
  105. # ssl_session_timeout 5m;
  106.  
  107. # ssl_ciphers HIGH:!aNULL:!MD5;
  108. # ssl_prefer_server_ciphers on;
  109.  
  110. # location / {
  111. # root html;
  112. # index index.html index.htm;
  113. # }
  114. #}
  115. }
  116. rtmp {
  117. server {
  118. listen 1935;
  119. chunk_size 4000; # max size 16777215
  120. .
  121. ## Uncomment in case of frequent disconnections
  122. ## PacKoMMEHTuPyu ECJlu O6C 4ACTO OTKJll04AETC9\
  123. ping 1m;
  124. ping_timeout 10s;
  125. drop_idle_publisher 10s;
  126. .
  127. application receiver
  128. {
  129. live on;
  130. meta copy;
  131. ...................
  132. # This sends stream to transcoder
  133. push rtmp://localhost/transcoder/;
  134. .
  135. # Add source streams here you don't want to transcode
  136. .
  137. # Twitch source
  138. # push rtmp://live-fra.twitch.tv/app/************************;
  139. .
  140. # Youtube source
  141. # push rtmp://b.rtmp.youtube.com:1935/live2/************************;
  142. }
  143. .
  144. .
  145. application transcoder
  146. {
  147. live on;
  148. meta copy;
  149. .
  150. # 1080 all sites
  151. exec_push ffmpeg -i rtmp://localhost/transcoder/
  152. .
  153. -b:v 6000k
  154. -minrate 5500k
  155. -maxrate 6500k
  156. -bufsize 7000k
  157. .
  158. -vcodec libx264
  159. -preset faster
  160. -s 1920x1080
  161. -sws_flags bicubic
  162. .
  163. # -vf unsharp=3:3:1.5 # Video sharpening
  164. .
  165. -r 60
  166. -x264-params nal-hrd=cbr:force-cfr=1:keyint=120
  167. .
  168. -acodec aac
  169. -ab 160k
  170. -strict -2
  171. .
  172. -f flv rtmp://localhost/transcoded-1080/
  173. .
  174. # -loglevel verbose
  175. # 2>>/home/sneakyjoe/ffmpeg-log.txt
  176. ;
  177. .
  178. # 560 periscope
  179. # exec ffmpeg -i rtmp://localhost/transcoder/
  180. .
  181. # -b:v 740k
  182. # -minrate 600k
  183. # -maxrate 800k
  184. # -bufsize 800k
  185. .
  186. # -vcodec libx264
  187. # -preset fast
  188. # -s 960x540
  189. # -sws_flags lanczos
  190. .
  191. # -r 30
  192. # -x264-params nal-hrd=cbr:force-cfr=1:keyint=60
  193. .
  194. # -acodec aac
  195. # -ab 90k
  196. # -strict -2
  197. .
  198. # -f flv rtmp://localhost/transcoded-560/;
  199. }
  200. .
  201. application transcoded-1080
  202. {
  203. live on;
  204. meta copy;
  205.  
  206. # Twitch transcoded
  207. push rtmp://live-fra.twitch.tv/app/live_39201175_Y6fMKfuE7oLrqlSnKnasxoq2xrDyj3;
  208.  
  209. # youtube transcoded
  210. # push rtmp://b.rtmp.youtube.com:1935/live2/************************;
  211.  
  212. # Restream.io transcoded
  213. # push rtmp://eu-east.restream.io/live/************************;
  214.  
  215. # dailymotion transcoded
  216. # push rtmp://publish.dailymotion.com/publish-dm/************************;
  217.  
  218. # Cybergame transcoded
  219. # push rtmp://premium.cybergame.tv:1953/************************;
  220.  
  221. # GoodGame transcoded
  222. # push rtmp://msk.goodgame.ru:1940/live/************************;
  223.  
  224. # Mixer (beam.pro) transcoded
  225. # push rtmp://ingest-fra.mixer.com:1935/beam/************************;
  226.  
  227. ## This block will save your transcoded stream to record_path. Remember to create ~/RECS and do "chmod
  228. # recorder myrec
  229. # {
  230. # record all;
  231. # record_path /home/sneakyjoe/RECS; #Change sneakyjoe with your username
  232. # record_suffix _%Y.%m.%d___%H-%M___1080.flv;
  233. # }
  234.  
  235. }
  236. }
  237. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement