我需要获取 livestream.com 帐户的 RTSP 流。我正在阅读 livestream.com 的一些 API 文档,但他们有一个新网站 (new.livestream.com),我找不到任何关于该网站的 API 文档。有人知道新的 livestream.com 网站是否有 API 可以让我获得 RTSP 流吗?提前致谢。
最佳答案
我知道这有点老了,但我问的是同样的问题,我是这样做的:
我找到了这个 URL/API 调用,用于新的直播,以获取事件流的详细信息
http://new.livestream.com/api/accounts/[account_id]/events/[event_id]/viewing_info
这会为您提供一个 JSON 响应,其中包含该事件的流的详细信息,包括 RTSP 流的 URL (streamInfo -> rtsp_url)
请务必在播放直播事件之前调用它,因为 URL 会不时更改(我认为他们使用某种负载平衡/CDN 网络或其他东西)并且您每次都应该获得最新的 URL。
顺便说一句:要获取 [account_id] 和 [event_id],只需查看 new.livestream.com 中某个事件的 URL,这些 URL 类似于
- http://new.livestream.com/accounts/ [account_id]/events/[event_id]
- [account_id]和[event_id]都是数字
或
- http://new.livestream.com/ [account_id]/events/[event_id]
- [account_id] 是一个名字(如 'tedx'),[event_id] 是所有数字
或
- http://new.livestream.com/ [account_id]/[event_id]
- [account_id] 和 [event_id] 都是名字(如“tedx/WallStreet”)
另外,我不确定这是否是一个公共(public) API,但它现在可以使用。
关于api - new.livestream.com API获取RTSP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16816652/