codexual

Untitled

May 8th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. #user www-data;
  2. worker_processes 1;
  3. #pid /run/nginx.pid;
  4. #include /etc/nginx/modules-enabled/*.conf;
  5.  
  6. events {
  7. worker_connections 768;
  8. # multi_accept on;
  9. }
  10.  
  11. http {
  12. include mime.types;
  13. default_type application/octet-stream;
  14. ignore_invalid_headers on;
  15.  
  16. server {
  17. listen 80;
  18. server_name localhost;
  19.  
  20. # This URL provides RTMP statistics in XML
  21. location /stat {
  22. if ($request_method = "GET") {
  23. add_header "Access-Control-Allow-Origin" *;
  24. }
  25.  
  26. rtmp_stat all;
  27.  
  28. # Use this stylesheet to view XML as web page
  29. # in browser
  30. rtmp_stat_stylesheet /stat.xsl;
  31. }
  32.  
  33. location /stat.xsl {
  34. # XML stylesheet to view RTMP stats.
  35. # Copy stat.xsl wherever you want
  36. # and put the full directory path here
  37. # root /path/to/stat.xsl/;
  38. root "C:/nginx";
  39.  
  40. }
  41.  
  42. location /control {
  43. rtmp_control all;
  44. }
  45. }
  46. }
  47.  
  48. rtmp {
  49. server {
  50. listen 1935;
  51. ping 30s;
  52. notify_method get;
  53. chunk_size 8192;
  54. ack_window 8192;
  55. buflen 5s;
  56. # chunk_size 8192; // default
  57.  
  58. # Stream to "rtmp://IPHERE/camera1/live".
  59. application camera1 {
  60. live on;
  61. wait_video on;
  62. wait_key on;
  63. sync 300ms;
  64. exec_options on;
  65. publish_notify on;
  66. play_restart on;
  67. drop_idle_publisher 6s;
  68. idle_streams off;
  69. }
  70. }
  71. server {
  72. listen 1936;
  73. ping 30s;
  74. notify_method get;
  75. chunk_size 4096;
  76. ack_window 8192;
  77. buflen 5s;
  78. # chunk_size 8192; // default
  79.  
  80. # Stream to "rtmp://IPHERE/camera2/live".
  81. application camera2 {
  82. live on;
  83. wait_video on;
  84. wait_key on;
  85. sync 300ms;
  86. exec_options on;
  87. publish_notify on;
  88. play_restart on;
  89. drop_idle_publisher 6s;
  90. idle_streams off;
  91. }
  92. }
  93. }
Add Comment
Please, Sign In to add comment