CAF接收器:字幕的位置 [英] CAF Receiver: Positioning of subtitles

查看:84
本文介绍了CAF接收器:字幕的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个自定义CAF接收器,用于播放使用Widewine加密的MPEG-DASH内容。我的内容在清单中还嵌入了TTML字幕,可以动态更改。



播放加密的内容就像一种魅力-甚至比V2接收器还好。我什至可以在不同的字幕之间进行选择。



但是,字幕的位置很远。它们不在播放器中居中,有时在提示的中间被切断(请参见我的附件图像。)



我可以告诉我们CAF接收器据我所知,使用的shaka-player本身负责字幕的解析-



ttml示例:

 < tt xmlns = http:// www。 w3.org/ns/ttml 
xmlns:tt = http://www.w3.org/ns/ttml
xmlns:ttm = http://www.w3.org/ ns / ttml#metadata
xmlns:tts = http://www.w3.org/ns/ttml#styling
xmlns:ttp = http://www.w3.org/ ns / ttml#parameter
xmlns:ebutts = urn:ebu:tt:style xmlns:ebuttm = urn:ebu:tt:metadata
xml:lang = ttp:timeBase = 媒体>
< head>
<元数据>
< ebuttm:documentMetadata>
< ebuttm:conformsToStandard> urn:ebu:tt:distribution:2014-01< / ebuttm:conformsToStandard>
< / ebuttm:documentMetadata>
< / metadata>
< styling>
< style xml:id = Style0_0 tts:fontFamily = proportionalSansSerif tts:backgroundColor =#00000099 tts:color =#FFFF00 tts:fontSize = 100% tts:lineHeight =正常的提示:linePadding = 0.5c />
< style xml:id = textAlignment_0 tts:textAlign = center />
< / styling>
< layout>
< region xml:id = Region tts:origin = 10%10% tts:extent = 80%80% tts:displayAlign = after />
< / layout>
< / head>
< body>
< div>
< p region = Region style = textAlignment_0 begin = 114:24:22.120 end = 114:24:24.120 xml:id = sub_0>
< span style = Style0_0>戴斯·希恩·格伦德(&s; span>
< br /> < / span>
< span style = Style0_0> aus dem Spiel des Seins so ergeben。
< / p>
< / div>
< / body>
< / tt>


解决方案

原来是与使用Chrome的shaka播放器中的VTTRegion,已在v2.2.9和v2.3.0中修复。 CAF接收器当前加载v2.2.1。



https://github.com/google/shaka-player/issues/1188



直到Google更新CAF接收器以使用更新的版本的播放器,您要么必须忍受放错位置的字幕,要么进行破解以覆盖接收器上加载的播放器版本。


I've created a custom CAF receiver for playing back MPEG-DASH content which is encrypted using Widewine. My content also has TTML subtitles embedded in the manifest which can be changed dynamically.

Playing my encrypted content works like a charm - even better than on the V2 receiver. I can even select between my different subtitles.

However, the positioning of the subtitles is way off. They aren't centered in they player and sometimes they're cut off in the middle of a cue (see my attached image).

I can tell that the CAF Receiver uses the shaka-player which, from what I can tell, handles parsing of subtitles itself - https://github.com/google/shaka-player/tree/master/lib/text

As far as I can tell from the CAF receiver documentation, there's no way of manipulating the positioning of the subtitles on the receiver. They aren't added to the DOM or anything, so you can't hack it with css. Only thing you can do is set a TextTrackStyle on the TextTracksManager, which only allows setting colors and the like. You have no option to do textAlignor similar.

My questions:

  • Is this a known bug in the CAF Receiver/shaka-player?
  • Has anyone else had a similar problem? If so, did you manage to fix it?

Any help is greatly appreciated!

Example 1

ttml example:

    <tt xmlns="http://www.w3.org/ns/ttml" 
    xmlns:tt="http://www.w3.org/ns/ttml" 
    xmlns:ttm="http://www.w3.org/ns/ttml#metadata" 
    xmlns:tts="http://www.w3.org/ns/ttml#styling" 
    xmlns:ttp="http://www.w3.org/ns/ttml#parameter" 
    xmlns:ebutts="urn:ebu:tt:style" xmlns:ebuttm="urn:ebu:tt:metadata" 
    xml:lang="" ttp:timeBase="media">
    <head>
    <metadata>
      <ebuttm:documentMetadata>
        <ebuttm:conformsToStandard>urn:ebu:tt:distribution:2014-01</ebuttm:conformsToStandard>
      </ebuttm:documentMetadata>
    </metadata>
    <styling>
      <style xml:id="Style0_0" tts:fontFamily="proportionalSansSerif" tts:backgroundColor="#00000099" tts:color="#FFFF00" tts:fontSize="100%" tts:lineHeight="normal" ebutts:linePadding="0.5c" />
      <style xml:id="textAlignment_0" tts:textAlign="center" />
    </styling>
    <layout>
      <region xml:id="Region" tts:origin="10% 10%" tts:extent="80% 80%" tts:displayAlign="after" />
    </layout>
  </head>
  <body>
    <div>
      <p region="Region" style="textAlignment_0" begin="114:24:22.120" end="114:24:24.120" xml:id="sub_0">
        <span style="Style0_0">Das hat sich im Grunde</span>
        <br />
        <span style="Style0_0">aus dem Spiel des Seins so ergeben.</span>
      </p>
    </div>
  </body>
</tt>

解决方案

Turns out this is a bug related to the usage of VTTRegion in the shaka-player on Chrome, which has been fixed in v2.2.9 and v2.3.0. The CAF receiver currently loads v2.2.1.

https://github.com/google/shaka-player/issues/1188

Until Google updates the CAF receiver to use a newer version of the player, you'll either have to live with the misplaced subtitles or do a hack to override what version of the player is loaded on the receiver.

这篇关于CAF接收器:字幕的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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