Advertisement
Guest User

Nginx Conf Majow

a guest
Apr 21st, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. #user nobody;
  2. worker_processes 1;
  3.  
  4. error_log logs/error.log debug;
  5. error_log logs/error.log notice;
  6. error_log logs/error.log info;
  7. pid logs/nginx.pid;
  8.  
  9.  
  10. events {
  11. worker_connections 1024;
  12. }
  13.  
  14. http {
  15. include mime.types;
  16. default_type application/octet-stream;
  17.  
  18. sendfile on;
  19. keepalive_timeout 65;
  20.  
  21. server {
  22. listen 8080;
  23. server_name localhost;
  24.  
  25. # rtmp stat
  26. location /stat {
  27. rtmp_stat all;
  28. rtmp_stat_stylesheet stat.xsl;
  29. }
  30. location /stat.xsl {
  31. # you can move stat.xsl to a different location
  32. root html;
  33. }
  34.  
  35. # rtmp control
  36. location /control {
  37. rtmp_control all;
  38. }
  39.  
  40. error_page 500 502 503 504 /50x.html;
  41. location = /50x.html {
  42. root html;
  43. }
  44. }
  45. }
  46.  
  47. rtmp {
  48. server {
  49. listen 1935;
  50. chunk_size 8192;
  51.  
  52. application live {
  53. live on;
  54. record off;
  55.  
  56. allow publish 127.0.0.1;
  57. deny publish all;
  58.  
  59. push rtmp://localhost/youtube/${name};
  60.  
  61. exec ffmpeg -i rtmp://localhost/$app/$name -c:v libx264 -preset veryfast -c:a copy
  62. -b:v 3700k
  63. -bufsize 3700k
  64. -maxrate 3700k
  65. -s 1280x720 -r 60
  66. -f flv rtmp://localhost/twitch/$name;
  67.  
  68. push rtmp://localhost/dailymotion/${name};
  69. push rtmp://localhost/hitbox/${name};
  70. }
  71.  
  72. application youtube {
  73. live on;
  74. record off;
  75.  
  76. allow publish 127.0.0.1;
  77. deny publish all;
  78.  
  79. push rtmp://b.rtmp.youtube.com/live2?backup=1/[[live-event-key-for-test-purposes]];
  80. }
  81.  
  82. #application youtube {
  83. # live on;
  84. # record off;
  85. #
  86. # allow publish 127.0.0.1;
  87. # deny publish all;
  88. #
  89. # push rtmp://b.rtmp.youtube.com/live2?backup=1/[[xxxx-xxxx-xxxx-xxxx]];
  90. #}
  91.  
  92. application twitch {
  93. live on;
  94. record off;
  95.  
  96. allow publish 127.0.0.1;
  97. deny publish all;
  98.  
  99. push rtmp://live-gig.twitch.tv/app/live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
  100. }
  101.  
  102. application hitbox {
  103. live on;
  104. record off;
  105.  
  106. allow publish 127.0.0.1;
  107. deny publish all;
  108.  
  109. push rtmp://live.gru.hitbox.tv/push/majow?key=xxxxxxx;
  110. }
  111. }
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement