简体   繁体   中英

Get AWS MediaLive video duration after live stream ends

I'm using AWS MediaLive & MediaStore for live streaming and I'm looking for a way to get the duration of the final video, after the live stream ends.

I'm using HLS Output group type and I'm archiving it to S3. One way I was able to do this, is to get the m3u8 file which contains all segments and sum the duration of all the segments.

Is there any better way? Maybe by using MediaPackage?

Thank you!

Using a VOD type HLS output is the best way, since the manifest of a VOD HLS rendition contains a list of all segments and the duration of each segment in the EXTINF tag. Adding EXT-X-PROGRAM-DATE-TIME tags to the manifest may also help you to determine the start time of the live event.

Any other option, such as trying to determine the start and end time based on the MediaLive channel channel start/stop, is not as accurate, since this does not take into account the fact that the source could start minutes if not hours after the channel start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM