Best Practices of Alibaba Cloud Live Broadcast to VOD

Abstract:  At the Shenzhen Yunqi Conference, which just ended not long ago, there was a live broadcast room experience project that attracted the attention of the participants. Based on video cloud technology, Yunqi Live Room has created a technology live room tailored for cloud computing practitioners, so that every guest can have an addiction to being an "Internet celebrity anchor".

foreword

At the Shenzhen Yunqi Conference, which just ended not long ago, there was a live broadcast room experience project that attracted the attention of the participants. Based on video cloud technology, Yunqi Live Room has created a technology live room tailored for cloud computing practitioners, so that every guest can have an addiction to being an "Internet celebrity anchor".

It is worth mentioning that after the broadcast of the live experience of the anchor, the live video is quickly converted into an on-demand playback, which makes the friends who have not had time to watch the live broadcast and do not miss the wonderful broadcast of the anchor. Here is an intuitive experience of the video cloud's direct-to-point capability.

Introduction

The so-called direct transfer point is the process of synchronously recording the video in the live broadcast to the on-demand system, and then performing a series of video operations such as transcoding, AI processing, and CDN acceleration.

System access

1. Activate video-on-demand service and activate the guidelines

2. Activate the live video service and activate the guidelines

3. Add straight to point recording configuration, help documentation

4. After the above preparations are completed, you can start to access (Note: Only the storage and synthesis template groups in the following documents need to be activated by contacting VOD)

Best Practices

The direct-to-point system, combined with the transcoding, cloud editing, AI processing, event notification and other functions of the VOD system, can adapt to changes in multiple scenarios. The following is an introduction to several direct-to-point solutions.

Glossary:

  • Recording and transcoding template group: At the same time when the live broadcast is recorded to VOD, VOD will use this template group to transcode the video
  • Synthesis and transcoding template group: When multiple recorded videos are automatically synthesized, VOD will use this template group to synthesize + transcode the video.
  • Storage only: After recording the live content, no subsequent operations are performed
  • Synthesis only: After synthesizing the live content, no subsequent operations are performed
  • Live recording period: The period from live recording to on-demand, such as a live broadcast of 3 hours, if you need to provide the on-demand service of the recorded content during the live broadcast, you can set the recording period to 1 hour, that is, after 1 hour of live broadcast, on-demand On-demand viewing service available for the previous hour of content

1. Live recording + automatic transcoding + CDN acceleration

直播录制后快速将录制文件进行转码和CDN加速,供用户进行点播播放,适用于大部分直播场景(不需要对内容进行二次加工)

实现流程:

1.客户进行直播推流

2.推流达到一个录制周期,则会自动将录制文件添加到点播系统

3.点播记录完成后,会生成点播系统的唯一视频ID,并将该视频信息回调给用户,即AddLiveRecordVideoComplete通知,并附带直播相关的DomainName、AppName、StreamName信息。客户收到回调后,需记录该视频信息,并以该VideoId作为索引进行后续视频状态更新

4.点播系统检测用户录制配置中的录制转码组ID(该转码组中含有具体码流转码任务),进行对应的转码操作

5.截图完成、单个码流转码完成、全部码流转码完成时,会给用户进行回调(回调顺序无时序),用户需根据回调信息中的VideoId进行视频状态更新。转码完成后,即可进行后续的播放操作(转码回调信息中含播放地址 或后续通过GetPlayInfo接又根据VideoId进行播放地址获取,该播放地址已经经过CDN加速)

二、直播录制 + 仅存储到点播 + 手动发起转码 + CDN加速

部分用户希望将直播录制的视频仅先存储到点播,且先不进行后续的转码操作,则可在新建录制配置时,将录制转码组选择为仅存储模板组(注:仅存储模板组需联系点播进行激活) 如果后续希望对视频进行转码,则可进行手动触发转码操作。同时,可配合点播云剪辑功能进行使用,效果更佳。

适用场景:

直播完成后,需要对内容进行二次加工,如体育赛事、游戏直播剪辑等,后续由用户主动发起转码和CDN加速全 流程(转码完成后点播会自动对输出文件进行CDN加速)

流程如下:

1.客户进行直播推流

2.推流达到一个录制周期,则会自动将录制文件添加到点播系统

3.点播记录完成后,会生成点播系统的唯一视频ID,并将该视频信息回调给用户,即AddLiveRecordVideoComplete通知,并附带直播相关的DomainName、AppName、StreamName信息。客户收到回调后,需记录该视频信息,并以该VideoId作为索引进行后续视频状态更新

4.点播系统检测用户录制配置中的录制转码组ID(此时为仅存储模板组),则点播系统不进行后续转码操作

5.用户对该视频手动触发转码操作(调用转码任务API),在此之前可进行云剪辑等操作

6.截图完成、单个码流转码完成、全部码流转码完成时,会给用户进行回调(回调顺序无时序),用户需根据回调信息中的VideoId进行视频状态更新。转码完成后,即可进行后续的播放操作(转码回调信息中含播放地址 或后续通过GetPlayInfo接又根据VideoId进行播放地址获取,该播放地址已经经过CDN加速)

三、直播录制 + 多周期视频自动合并

部分用户希望将自己录制周期生成的多个文件(如录制周期为20分钟,一次直播1个小时,则会生成三个视频)进行 视频合成,再将合成后的视频进行处理,点播提供了自动合成的功能 可在新建直播录制配置时,将自动合成开关打开,并且配置进行合成时所使用的合成转码模板组(也可配置为仅合 成,后续由用户触发转码,与前两节所述区别相同) 点播会在用户断流超过指定时间(可由直播进行配置断流超时时间)后,进行本次直播的视频自动合成并根据转码配 置进行后续操作。

3. 1 合成 + 自动转码

适用场景:

一场直播完成后,需要对所有录制周期内的分段进行自动合并,同时发起转码等全流程。如体育赛事、教育多节授课合并等

流程如下:

1.客户进行直播推流

2.推流达到一个录制周期,则会自动将录制文件添加到点播系统

3.点播记录完成后,会生成点播系统的唯一视频ID,并将该视频信息回调给用户,即AddLiveRecordVideoComplete通知,并附带直播相关的DomainName、AppName、StreamName信息。客户收到回调后,需记录该视频信息,并以该VideoId作为索引进行后续视频状态更新。

4.客户断流超时或主动触发断流

5.点播收到直播发送的本次直播结束消息

6.点播系统检测用户录制配置中的合成配置,判断是否需要发起自动合成。如果需要,则按照录制配置中的合成转码组进行合成和转码

7.视频开始合成,点播会生成一个合成后视频的唯一视频ID,并将该视频信息回调给用户,即LiveRecordVideoComposeStart通知,并附带直播相关的DomainName、AppName、StreamName信息。客户收到回调后,需记录该视频信息,并以该VideoId作为索引进行后续视频状态更新。

8.视频源文件合成完成后,点播会将该状态回调给用户,即FileUploadComplete通知

9.截图完成、单个码流转码完成、全部码流转码完成时,会给用户进行回调(回调顺序无时序),用户需根据回调信息中的VideoId进行视频状态更新。转码完成后,即可进行后续的播放操作(转码回调信息中含播放地址或后续通过GetPlayInfo接又根据VideoId进行播放地址获取,该播放地址已经经过CDN加速)

3.3.2 合成 + 手动发起转码

可在新建直播录制配置时,将自动合成开关打开,并且配置进行合成时所使用的合成转码模板组(本情况配置成仅 合成,后续由用户触发转码)

适用场景:

一场直播完成后,需要对所有录制周期内的分段进行自动合并,合并后文件不做任何处理,由用户进行二次加工,如云剪辑等,后续再进行手动转码,如视频内嵌广告、体育赛事空挡部分内容剪切等

流程如下:

image

1.客户进行直播推流

2.推流达到一个录制周期,则会自动将录制文件添加到点播系统

3.点播记录完成后,会生成点播系统的唯一视频ID,并将该视频信息回调给用户,即 AddLiveRecordVideoComplete通知,并附带直播相关的DomainName、AppName、StreamName信息。客户收到回调后,需记录该视频信息,并以该VideoId作为索引进行后续视频状态更新

4.客户断流超时或主动触发断流

5.点播收到直播发送的本次直播结束消息

6.点播系统检测用户录制配置中的合成配置,判断是否需要发起自动合成。如果需要,则按照录制配置中的合成转码组进行合成和转码,由于本场景配置的仅合成,则点播系统不会自动发起转码

7.视频开始合成,点播会生成一个合成后视频的唯一视频ID,并将该视频信息回调给用户,即LiveRecordVideoComposeStart通知,并附带直播相关的DomainName、AppName、StreamName信息。客户收到回调后,需记录该视频信息,并以该VideoId作为索引进行后续视频状态更新

8.视频源文件合成完成后,点播会将该状态回调给用户,即FileUploadComplete通知。此时,代表本次录制合成的源文件已经处于正常就绪状态,用户可对该视频进行后续的转码触发等操作

9.用户对该视频手动触发转码操作(调用转码任务API),在此之前可进行云剪辑等操作

10.截图完成、单个码流转码完成、全部码流转码完成时,会给用户进行回调(回调顺序无时序),用户需根据回 调信息中的VideoId进行视频状态更新。转码完成后,即可进行后续的播放操作(转码回调信息中含播放地址 或后续通过GetPlayInfo接又根据VideoId进行播放地址获取,该播放地址已经经过CDN加速)

原文链接

 

阅读更多干货好文,请关注扫描以下二维码:


 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326227655&siteId=291194637