阿里雲直播服務端API的坑。
阿新 • • 發佈:2019-01-25
使用ffmpeg 推流過程中,想通過 Aliyun 的 live API來確定流是否線上。但是當流還在推送的情況下,API返回的列表中還是有可能不包含正在推送的流的,雖然這種情形出現的機率不高。有時候推送一個90分鐘的流一次都不出現,但也有的時候能出現好多次。
[2018-07-24 12:15:55][DEBUG] getPseudoLiveInfoAction
[2018-07-24 12:15:56][INFO] {"TotalPage":1,"TotalNum":1,"PageSize":2000,"RequestId":"5C91CC7C-3A9E-4B9F-B23E-E02D59F88ED7","PageNum":1,"OnlineInfo":{"LiveStreamOnlineInfo":[{"Transcoded":"no","PublishTime":"2018-07-24T04:09:02Z","StreamName":"live_010_ 007","PublishUrl":"rtmp:\/\/live.test200.com\/hqgc\/live_010_007","DomainName":"live.test200.com","AppName":"hqgc","PublishType":"center","PublishDomain":"live.test200.com"}]}}
[2018-07-24 12:15:56][INFO] [{"Transcoded":"no","PublishTime":"2018-07-24T04:09:02Z","StreamName":"live_010_007","PublishUrl":"rtmp:\/\/live.test200.com\/hqgc\/live_010_ 007","DomainName":"live.test200.com","AppName":"hqgc","PublishType":"center","PublishDomain":"live.test200.com"}]
[2018-07-24 12:15:56][DEBUG] getPseudoLiveInfoOutput
[2018-07-24 12:15:59][DEBUG] getPseudoLiveInfoAction
[2018-07-24 12:16:00][INFO] {"TotalPage":0,"TotalNum":0,"PageSize":2000,"RequestId":"84CEDC8C-C5A7-4347-B012-CC13C3224C16","PageNum":1,"OnlineInfo":{"LiveStreamOnlineInfo":[]}}
[2018-07-24 12:16:00 ][INFO] []
[2018-07-24 12:16:00][DEBUG] getPseudoLiveInfoOutput
[2018-07-24 12:17:09][DEBUG] getPseudoLiveInfoAction
[2018-07-24 12:17:09][INFO] {"TotalPage":1,"TotalNum":1,"PageSize":2000,"RequestId":"CBDC1279-16B1-4232-BF30-8B4E90502AF2","PageNum":1,"OnlineInfo":{"LiveStreamOnlineInfo":[{"Transcoded":"no","PublishTime":"2018-07-24T04:09:02Z","StreamName":"live_010_007","PublishUrl":"rtmp:\/\/live.test200.com\/hqgc\/live_010_007","DomainName":"live.test200.com","AppName":"hqgc","PublishType":"center","PublishDomain":"live.test200.com"}]}}
[2018-07-24 12:17:09][INFO] [{"Transcoded":"no","PublishTime":"2018-07-24T04:09:02Z","StreamName":"live_010_007","PublishUrl":"rtmp:\/\/live.test200.com\/hqgc\/live_010_007","DomainName":"live.test200.com","AppName":"hqgc","PublishType":"center","PublishDomain":"live.test200.com"}]
[2018-07-24 12:17:09][DEBUG] getPseudoLiveInfoOutput