我们可以不从hls播放列表的开头播放内容吗? [英] can we play the content not from the start in hls playlist?

查看:367
本文介绍了我们可以不从hls播放列表的开头播放内容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个hls播放列表playlist.m3u8文件,其中所有块的url都在其中.

I have a hls playlist playlist.m3u8 file where the url's of all the chunks are there.

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:10,
01-0.ts
#EXTINF:10,
01-1.ts
#EXTINF:10,
01-2.ts
#EXTINF:10,
01-3.ts
#EXTINF:10,
01-4.ts
#EXTINF:10,
01-5.ts
#EXTINF:10,
01-6.ts
#EXTINF:10,
01-7.ts

即使我将媒体序号从no更改为5,它也始终从头开始播放.无论如何,我是否可以从任何给定的点(即不总是从一开始)播放内容?请帮助我.

Even if I change the media sequence no to , say 5, it always plays from the start. Is there anyway that I can play the content from any given point i.e not always from the start ? Please help me.

推荐答案

如果要将所有片段保留在播放列表中,则可以使用可选标记#EXT-X-START:TIME-OFFSET=<seconds>.该协议的版本6中提供了该功能.

If you want to keep all the segments in the playlist you can use the optional tag #EXT-X-START:TIME-OFFSET=<seconds>. This is available in version 6 of the protocol.

来源: https://tools.ietf.org/html/draft-pantos-http-live-streaming-12#section-3.4.16

这篇关于我们可以不从hls播放列表的开头播放内容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆