git clone https://github.com/ossrs/srs &&
cd srs/trunk
編譯:
./configure --with-hds&& make
修改配置conf/srs.conf,在 defaultVhost 添加如下配置
vhost __defaultVhost__ {
hds {
# whether hds enabled
# default: off
enabled on;
# the hds fragment in seconds.
# default: 10
hds_fragment 10;
# the hds window in seconds, erase the segment when exceed the window.
# default: 60
hds_window 60;
# the path to store the hds files.
# default: ./objs/nginx/html
hds_path ./objs/nginx/html;
}
}