Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.88 KB | None | 0 0
  1. rtmp {
  2.         server {
  3.                 listen 1935;
  4.                 chunk_size 4096;
  5.  
  6.                 application live {
  7.                         live on;
  8.                         record off;
  9.                             # No RTMP playback
  10.                         deny play all;
  11.                         push rtmp://127.0.0.1:1935/hls-live;
  12.                         push rtmp://127.0.0.1:1935/dash-live;
  13.  
  14.                         on_publish http://127.0.0.1:8090/rest/live/on_publish;
  15.                         on_publish_done http://127.0.0.1:8090/rest/live/on_publish_done ;
  16.  
  17.                 }
  18.                 application hls-live {
  19.                     live on;
  20.  
  21.                     # No RTMP playback
  22.                     deny play all;
  23.  
  24.                     # Only allow publishing from localhost
  25.                     allow publish 127.0.0.1;
  26.                     deny publish all;
  27.  
  28.                     # Package this stream as HLS
  29.                     hls on;
  30.                     hls_path /var/www/live_hls;
  31.                     hls_fragment 3;
  32.                     hls_playlist_length 60;
  33.  
  34.             # Put streams in their own subdirectory under `hls_path`
  35.                     hls_nested on;
  36.                     hls_fragment_naming system;
  37.         }
  38.                 application dash-live {
  39.                     live on;
  40.  
  41.                     # No RTMP playback
  42.                     deny play all;
  43.  
  44.                     # Only allow publishing from localhost
  45.                     allow publish 127.0.0.1;
  46.                     deny publish all;
  47.  
  48.                     # Package this stream as DASH
  49.                     dash on;
  50.                     dash_path /var/www/live_dash;
  51.                     dash_fragment 5;
  52.                     dash_playlist_length 60;
  53.  
  54.             # Put streams in their own subdirectory under `dash_path`
  55.                     dash_nested on;
  56.         }
  57.  
  58.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement