SRS部署环境之HDS(HTTP Dynamic Streaming)

1 篇文章 0 订阅

SRS部署环境之HDS(HTTP Dynamic Streaming)

  • 拉取gitbub源码:
    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;
    }
}
  • 运行srs可执行程序
    ./objs/srs -c conf/srs.conf
  • 用推流工具推流,推流地址如下:
    ffmpeg -re -i ss.flv -acodec copy -vcodec copy -f  flv "rtmp://127.0.0.1:1935/live/livestream"
  • 在播放器播放器地址,添加播放地址,然后点击播放即可看到效果。
    http://127.0.0.1:8080/live/livestream.f4m
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值