阿里云直播鉴权和直播地址算法
来源:互联网 发布:chrome收藏夹位置 mac 编辑:程序博客网 时间:2024/05/17 08:44
阿里云官方给出的文档:用户指南-直播鉴权
参数描述
要配置出正确的鉴权,需要明确以下几个参数:
推流地址
完整的推流地址,形如:
rtmp://video-center.alivecdn.com/{AppName}/{StreamName}?vhost={yourdomain}
鉴权类型
阿里云CDN 兼容并支持A、B、C三种鉴权方式,具体见URL鉴权方式。这里选择的是A类型
鉴权KEY
privatekey
字段用户可以自行设置时间戳
时间戳是指格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数
有效时间
以秒为单位的整数时间,用来控制直播推流时效
鉴权计算
用户访问加密 URL :
rtmp://video-center.alivecdn.com/{AppName}/{StreamName}?vhost={yourdomain}&auth_key={timestamp}-{rand}-{uid}-{hashvalue}
hashvalue
计算方式如下:
sstring = /{AppName}/{StreamName}-{timestamp}-{rand}-{uid}-{privatekey}
hashvalue = md5(sstring)
输入OBS中的鉴权内容如下:
url:rtmp://video-center.alivecdn.com/{AppName}
流密钥:{StreamName}?vhost={yourdomain}&auth_key={timestamp}-{rand}-{uid}-{hashvalue}
直播地址计算
rtmpPlayer = /{AppName}/{StreamName}-{timestamp}–{rand}-{uid}-{privatekey}
flvPlayer = /{AppName}/{StreamName.flv}-{timestamp}–{rand}-{uid}-{privatekey}
m3u8Player = /{AppName}/{StreamName.m3u8}-{timestamp}–{rand}-{uid}-{privatekey}
直播地址:
rtmpURL:http://{yourdomain}/{AppName}/{StreamName}?auth_key={timestamp}-{rand}-{uid}-{md5(rtmpPlayer)}
flvURL:http://{yourdomain}/{AppName}/{StreamName.flv}?auth_key={timestamp}-{rand}-{uid}-{md5(flvPlayer)}
m3u8URL:http://{yourdomain}/{AppName}/{StreamName.m3u8}?auth_key={timestamp}-{rand}-{uid}-{md5(m3u8Player)}
- 阿里云直播鉴权和直播地址算法
- 阿里云 直播实现
- 阿里云直播
- 阿里云直播
- 阿里云视频直播
- 阿里云直播
- 直播地址
- ucloud直播云接口地址
- 阿里云直播-php接口(python->php)
- 阿里云视频直播 签名机制
- 阿里云直播服务 sdk demo php
- 阿里云 实现流媒体 直播 demo
- 阿里云 实现流媒体 直播 demo
- 阿里云 实现流媒体 直播 demo
- 阿里云Android直播demo流程
- 使用阿里云实现简单的直播
- 在安卓端实现阿里云直播
- 直播
- 如何训练深度神经网络?老司机的 15 点建议
- JMeter做接口测试
- HDU 5542 The Battle of Chibi——树状数组 + dp
- source insight宏定义做为函数返回值时,函数识别错误
- css height:100%和height:auto的区别
- 阿里云直播鉴权和直播地址算法
- C++之基础知识学习笔记
- 2017最新版SCI期刊目录发布
- 算法导论 练习题 18.2-2
- Apache commons-pool对象池原理分析
- 内存分配的三种方式(读书笔记)
- 第二个小程序 十进制与十六进制的转换
- ios开发经验总结
- 我一行代码都不写实现Toolbar!你却还在封装BaseActivity?