Live to VOD
The Live to VOD feature records live streams and saves them as video-on-demand (VOD) videos in real time. It supports various operations, such as media asset management, media processing (including transcoding, content moderation, and AI-powered processing such as smart thumbnails), online editing, and CDN acceleration. This topic provides an example of an API call that uses the Python software development kit (SDK) to query a list of VOD videos generated from live stream recordings.
Initialize a client
Before you use the SDK, initialize a client. For more information, see Initialization.
Query live-to-VOD videos
You can call the ListLiveRecordVideo operation to query live-to-VOD videos.
For more information about the request and response parameters of this operation, see ListLiveRecordVideo. Sample code:
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())References
Configure Live to VOD: Describes the Live to VOD feature of ApsaraVideo VOD, including its overall architecture, benefits, and configuration methods.
Choose a Live to VOD solution: Describes three typical scenarios for Live to VOD: live recording with automatic transcoding and CDN acceleration, live recording with storage in VOD only and subsequent manual transcoding and CDN acceleration, and automatic merging of videos recorded in multiple epochs.