全部产品
Search
文档中心

视频点播:直播转点播

更新时间:Jul 31, 2023

本篇文档提供了Python SDK视频直播转点播模块,查询直转点视频列表功能的API调用示例。

初始化客户端

使用前请先初始化客户端,请参见初始化

查询直转点视频列表

调用ListLiveRecordVideo接口,完成查询直转点视频列表功能。

接口参数和返回字段请参见ListLiveRecordVideo。调用示例如下:

from aliyunsdkvod.request.v20170321 import ListLiveRecordVideoRequest
def list_live_record_video(clt):
    request = ListLiveRecordVideoRequest.ListLiveRecordVideoRequest()
    request.set_StartTime("2018-04-24T03:21:04Z")
    request.set_EndTime("2018-05-21T03:21:44Z")
    request.set_StreamName("testStream****")
    request.set_DomainName("example.aliyundoc.com")
    request.set_AppName("testApp****")

    request.set_accept_format('JSON')
    response = json.loads(clt.do_action_with_exception(request))
    return response

try:
    videoList = list_live_record_video(clt)
    print(json.dumps(videoList, ensure_ascii=False, indent=4))

except Exception as e:
    print(e)
    print(traceback.format_exc())