Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. worker_processes 1;
  2.  
  3. events {}
  4. rtmp {
  5. server {
  6. listen 1935;
  7. buflen 60s;
  8. ack_window 500000;
  9. ping 2s;
  10. ping_timeout 20s;
  11. max_streams 128;
  12.  
  13. application publisher {
  14. access_log /dev/stdout;
  15. play_restart on;
  16. live on;
  17. interleave on;
  18. meta copy;
  19. notify_method get;
  20. notify_update_timeout 10s;
  21. wait_key on;
  22. wait_video on;
  23. on_publish http://127.0.0.1/streammanager/on_publish/$PUBLISHER_HOST/1935;
  24. on_update http://127.0.0.1/streammanager/on_update/$PUBLISHER_HOST/1935;
  25. on_publish_done http://127.0.0.1/streammanager/on_publish_done/$PUBLISHER_HOST/1935;
  26. drop_idle_publisher 10s;
  27. }
  28. }
  29. }
  30.  
  31. http {
  32. server {
  33. listen 80;
  34. location /stat {
  35. rtmp_stat all;
  36. }
  37.  
  38. location /control {
  39. rtmp_control all;
  40. }
  41. location /streammanager/ {
  42. if ($arg_call = update_play) {
  43. return 200;
  44. }
  45. proxy_pass http://controller/streammanager/;
  46. }
  47. location /streammanager/on_update/ {
  48. if ($arg_call = update_play) {
  49. return 200;
  50. }
  51. proxy_pass http://always_available_controller/streammanager/on_update/;
  52. proxy_intercept_errors on;
  53. proxy_ignore_client_abort on;
  54. error_page 502 503 504 409 = 203;
  55. }
  56. }
  57.  
  58. upstream always_available_controller {
  59. server controller;
  60. server 127.0.0.1:31095 backup;
  61. }
  62. server {
  63. listen 127.0.0.1:31095;
  64. return 200;
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement