AVPlayer是否支持在单独的文本文件中提供隐藏式字幕? [英] Does AVPlayer support closed captions delivered in a separate text file?

查看:158
本文介绍了AVPlayer是否支持在单独的文本文件中提供隐藏式字幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队制作使用AVPlayer播放视频的iOS应用。我们最近被告知我们必须允许显示所有视频的隐藏字幕...但是隐藏字幕不会作为视频文件中的轨道出现(我们已经支持以这种方式出现的隐藏字幕)。相反,我们将把它们作为单独的文本文件。我已经看到了一些在SMIL中包含标题文本文件的引用,但我没有发现如何将此文本文件合并到播放体验中。有没有人对此有任何个人经验,或者知道任何有用的在线文档/教程?

My team produces iOS apps that play video using AVPlayer. We've recently been told that we MUST allow display of closed captions for all videos... but that the closed captions would not be coming as a track within the video files (we already support closed captions that come in this way). Instead, we'll be getting them as a separate text file. I've seen a couple references to including the caption text file in the SMIL, but I've found nothing about how to incorporate this text file into the playback experience. Does anyone have any personal experience with this, or know of any online documentation/tutorials that would help?

推荐答案

好的,我们有现在有一个计划,虽然它有点复杂,因为涉及DRM。简化版本是我们将按照WWDC 2012(https://developer.apple.com/videos/wwdc/2012/?id=512)中的HTTP Live Streaming中的新功能进行描述:即,创建一个引用我们的webvtt文件的播放列表,然后从主m3u8引用该播放列表。这将在iOS6中为我们提供隐藏式字幕作为字幕。

OK, we have a plan now, though it's a little complicated because DRM is involved. The simplified version is that we're going to do what's described in the What's New in HTTP Live Streaming talk from WWDC 2012 (https://developer.apple.com/videos/wwdc/2012/?id=512): namely, create a playlist that references our webvtt file(s), and then reference that playlist from the main m3u8. This will give us closed-captions-as-subtitles in iOS6.

这篇关于AVPlayer是否支持在单独的文本文件中提供隐藏式字幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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