简体   繁体   English

更改mpd段的顺序

[英]Change order of mpd segments

Is there a way to successfully change the order of the segments after their creation and the MPD? 创建段和MPD之后,是否可以成功更改段的顺序? Simply changing the order in the MPD doesn't work as the video player gets a strange behavior. 由于视频播放器会出现奇怪的行为,因此仅更改MPD中的顺序是行不通的。 I'm guessing it's something related to the segment's file internals such as the sequence number, presentation time or the initialization segment but I can't seem to figure it out. 我猜想这与段的文件内部相关,例如序列号,显示时间或初始化段,但我似乎无法弄清楚。 How do you implement the order in the player? 您如何在播放器中执行订单?

Presumably you are using a Media Source Extensions (MSE)-based client since you also asked this on the dash.js mailing list. 大概您使用的是基于媒体源扩展(MSE)的客户端,因为您也在dash.js邮件列表中询问了此问题。

For mp4, MSE defaults to 'segments' mode which means that the timestamps in the media segments are used to determine playback order, not the order in which they are appended - this is why simply reordering them in the manifest does not work, and would probably lead to buffering issues when media with the expected playback time is not available. 对于mp4,MSE默认为“段”模式,这意味着媒体段中的时间戳用于确定播放顺序,而不是附加的顺序-这就是为什么在清单中简单地对其重新排序是不起作用的原因,并且当具有预期播放时间的媒体不可用时,可能会导致缓冲问题。

It's unlikely any player does or will implement the behaviour you are looking for - the simplest way to get this working will be to repackage each media segment, essentially just adjusting the baseMediaDecodeTime to be correct for the order you are trying to achieve. 任何播放器都不太可能会或不会实现您要寻找的行为-实现此工作的最简单方法是重新包装每个媒体段,本质上只是将baseMediaDecodeTime调整为与您要达到的顺序正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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