【发布时间】:2020-11-17 20:45:54
【问题描述】:
我已经为破折号清单自动生成代码,它不是 ffmpeg,它完全自行生成清单(在我的服务器上保存为字节的视频),它可以在播放器上正常工作,但还不支持字幕, 我想允许我网站的用户添加外部字幕,我会在我的服务器上自动转换为 webvvt 并通过 http 通过 url 分发。
问题/任务是: 拥有带有 webvvt 的 url(它下面的字幕),以重写现有的 dash manifest,也就是说我想稍微改变自动生成机制,提供字幕的 url,让我的播放器也显示用户的字幕。我相信这应该很容易,只需将字幕的网址放在带有特殊标签的地方即可。
我试图找到一些关于它的信息,但没有发现任何值得关注的东西,真的我需要一些简单的 dash-manifest 示例,其中包含由 url 分发的字幕,这足以自定义我的dash 清单代码以某种方式生成。
一个例子,我有清单
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:DASH:schema:MPD:2011" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011" type="static" mediaPresentationDuration="PT5.666S" minBufferTime="PT0.5S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
<Period id="0" start="PT0S" duration="PT5.666S">
<AdaptationSet id="0" segmentAlignment="true" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
<Representation id="0" bandwidth="122768" width="252" height="144" quality="mobile" frameRate="30" codecs="avc1.64000C,mp4a.40.2" audioSamplingRate="44100" mimeType="video/mp4" startWithSAP="1">
<BaseURL>some url to video</BaseURL>
<SegmentBase indexRange="1343-1398">
<Initialization range="0-1342"/>
</SegmentBase>
</Representation>
<Representation id="1" bandwidth="359152" width="420" height="240" quality="lowest" frameRate="30" codecs="avc1.640015,mp4a.40.2" audioSamplingRate="44100" mimeType="video/mp4" startWithSAP="1">
<BaseURL>some url to video</BaseURL>
<SegmentBase indexRange="1343-1398">
<Initialization range="0-1342"/>
</SegmentBase>
</Representation>
</AdaptationSet>
</Period>
</MPD>
如何在此处输入https:www.some_site.com/sub1
【问题讨论】:
标签: video video-streaming html5-video http-live-streaming hls.js