worker_processes  1;

error_log  logs/error.log debug;

events {
    worker_connections  1024;
}

rtmp {
    server {
        listen 1935;

        application live {
            live on;
        }
		
		application hls {
			live on;
			hls on;  
			hls_path temp/hls;  
			hls_fragment 8s;  
		}
    }
}

http {
    server {
        listen      8080;
		
        location / {
            root www;
        }
		
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }

        location /stat.xsl {
            root www;
        }
		
		location /hls {  
           #server hls fragments  
			types{  
				application/vnd.apple.mpegurl m3u8;  
				video/mp2t ts;  
			}  
			alias temp/hls;  
			expires -1;  
        }  

    }
}
