nginx-ispooge.conf 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. worker_processes auto;
  2. rtmp_auto_push on;
  3. events {}
  4. rtmp {
  5. server {
  6. listen 1935;
  7. #listen [::]:1935 ipv6only=on;
  8. chunk_size 4096;
  9. application studiocam {
  10. live on;
  11. record off;
  12. allow publish all;
  13. allow play all;
  14. # exec_static /usr/bin/avconv -f v4l2 -i /dev/video0 -c:v libx264 -an -f flv rtmp://127.0.0.1:1935/studiocam/live;
  15. }
  16. application hdmi {
  17. live on;
  18. record off;
  19. allow publish 192.168.2.0/24;
  20. deny publish all;
  21. # record hdmi
  22. # push 192.168.1.9:1935/ispoogemedia/hdmi;
  23. }
  24. application cam {
  25. live on;
  26. record off;
  27. allow publish 192.168.1.0/24;
  28. deny publish all;
  29. }
  30. # monitor rtmp
  31. application record {
  32. live on;
  33. allow publish 127.0.0.0/24;
  34. deny publish all;
  35. deny play all;
  36. record all;
  37. record_path /tmp/rec;
  38. record_suffix _%Y-%m-%d_%H-%M-%S.flv;
  39. record_lock on;
  40. }
  41. application hls {
  42. live on;
  43. allow publish 127.0.0.0/8;
  44. deny publish all;
  45. allow play all;
  46. # pull rtmp://127.0.0.1:1935/ispoogedaily/ispoogedaily name=ispooge_com_hls live=1 static=1;
  47. hls on;
  48. hls_path /tmp/hls/ispooge.com;
  49. hls_fragment 500ms;
  50. hls_playlist_length 3s;
  51. # hls_fragment_naming_granularity 1s;
  52. hls_continuous off;
  53. hls_nested on;
  54. hls_cleanup off;
  55. hls_fragment_naming system;
  56. hls_fragment_slicing aligned;
  57. hls_type live;
  58. }
  59. # push to monitoring, push to recording
  60. application ispoogedaily {
  61. live on;
  62. record off;
  63. allow publish 127.0.0.0/8;
  64. deny publish all;
  65. allow play all;
  66. }
  67. application ispoogedaily_local {
  68. live on;
  69. allow publish 127.0.0.0/8;
  70. allow publish 192.168.1.2;
  71. allow publish 192.168.1.3;
  72. deny publish all;
  73. deny play all;
  74. push rtmp://127.0.0.1:1935/ispoogedaily/ispoogedaily live=1;
  75. push rtmp://127.0.0.1:1935/record/ispoogedaily live=1;
  76. push rtmp://127.0.0.1:1935/hls/ispoogedaily name=ispoogedaily live=1;
  77. }
  78. # push to upstream services, including ispooge media
  79. application ispoogedaily_live {
  80. live on;
  81. allow publish 127.0.0.0/8;
  82. allow publish 192.168.1.2;
  83. allow publish 192.168.1.3;
  84. deny publish all;
  85. # deny play all;
  86. push rtmp://127.0.0.1:1935/ispoogedaily_local/ispoogedaily_live;
  87. # push rtmp://live-api.facebook.com:80/rtmp/_?ds=_;
  88. # Periscope
  89. #push rtmp://ca.pscp.tv:80/x/_;
  90. # YT LIVE
  91. push rtmp://a.rtmp.youtube.com/live2/_ live=1;
  92. # YT EVENT
  93. # push rtmp://a.rtmp.youtube.com/live2/_;
  94. }
  95. }
  96. }