AMP - Closed Captions

Document created by Herberth Alvarado Employee on Apr 13, 2016Last modified by Herberth Alvarado Employee on Jan 26, 2017
Version 21Show Document
  • View in full screen mode

Maintainer: Herberth Alvarado

This document is part of Adaptive Media Player Web User Guide

 

AMP supports several caption formats, including VOD/DFXP, Live 708/608 (the-basics-of-608-vs-708-captions/), Live Cue Point, Embedded, Multilanguage, VOD SRT, Live/VOD SubPly, Webvtt (which is the recommended format for coverage across all browsers). Below you can find links to functional samples (AMP Premier 2.47.0.0009) and snippets of caption configurations.

 

 

 

 

Configuration

First you need to enable the captions in the json configuration.

 

Enable captions

captioning : {

                    enabled : true

              },

 

Then indicate the type of caption

Caption type: VOD via DFXP

track : [{

             kind : "captions",

             type : "application/ttml+xml",

             srclang : "en",

             src : "captioning.xml"

      }]

 

The config var will look something like:

var config = {

                   autoplay : false,

                   media : {

                                   title : "DFXP Caption Sample",

                                   poster : '../resources/images/space_alone.jpg',

                                   source : [{

                                   src : "rtmp://cp67126.edgefcs.net/ondemand/mediapm/osmf/content/test/akamai_10_year_f8_512K",

                                   type : "video/f4m"

                   }, {

                                   src : "http://multiplatform-f.akamaihd.net/i/multi/april11/hdworld/hdworld_,512x288_450_b,640x360_700_b,768x432_1000_b,1024x576_1400_m,1280x720_1900_m,1280x720_2500_m,1280x720_3500_m,.mp4.csmil/master.m3u8",

                                   type : "application/x-mpegURL"

                   }],

                   track : [{

                                   kind : "captions",

                                   type : "application/ttml+xml",

                                   srclang : "en",

                                   src : "captioning.xml"

                   }]

                   },

                   captioning : {

                                   enabled : true

                   }

};

Sample: AMP Premier - Samples - Captioning

 

Support table of captions formats

 

Type of Stream
Flash Mode
HTML5 mode
LIVE608, 708, On Cue Point608, 708, On Cue Point
VODDFXP, SRT, Webvtt (version 50+)Webvtt, DFXP, SRT

 

Samples

For the rest of the caption types, the section that changes is the "track" section.

 

Live via OnCaptionInfo/708

track : [{

              kind : "captions",

              type : "text/cea-708",

              srclang : "en",

              src : ""

}]

Sample: AMP - Samples - Live Captioning 708

 

For AMP versions before V4.46.0.0001, the type should be:

type : "live-oncaptioninfo",

Old version sample: AMP - Samples - Live Captioning 708

 

 

Live via OnCuePoint

track : [{

              kind : "captions",

              type : "live-oncuepoint",

              srclang : "en",

              src : ""

}]

Sample: AMP Premier - Samples - Live Captioning Cue Point

 

Embedded

track : [{

              kind : "captions",

              type : "embedded",

              srclang : "en",

              src : ""

}]

Sample: AMP Premier - Samples - Embedded Captions

 

Multi language

track : [{

              kind : "captions",

              type : "application/ttml+xml",

              srclang : "en",

              src : "English_track.xml"

}, {

              kind : "captions",

              type : "application/ttml+xml",

              srclang : "de",

              src : "German_track.xml"

}]

Sample: AMP Premier - Samples - Captioning Multi-Language

 

VOD SRT

track : [{

              kind : "captions",

              type : "application/x-subrip",

              srclang : "en",

              src : "captioning-srt.srt"

}]

Sample: AMP Premier - Samples - Captioning

 

Webvtt (recommended format for coverage across all browsers)

track : [{

              kind : "captions",

              type : "text/vtt",

              srclang : "en",

              src : "captioning.vtt"

}]

Sample: AMP - Samples - Captioning WebVTT

 

SubPly needs some  additional information in the "captioning" section.

SubPly Live

track : [{

              kind : "captions",

              type : "live-subply",

              srclang : "en",

              src : "amazon_plymedia_cc_stream1"

            }]},

captioning : {

              enabled : true,

              flash : {

              subply : {

                            timeMethod : "encoder",

                            plugin : "http://static.plymedia.com/players/default/livesynccaptionsviewer"

              }

}},

Sample: AMP Premier - Samples - Live Captioning Subply

 

SubPly VOD

track : [{

              kind : "captions",

              type : "live-subply",

              srclang : "en",

              src : "1cac71e7-4106-421b-9b49-c9b96a5518a6"

            }]},

captioning : {

              enabled : true,

              flash : {

                            subply : {

                            timeMethod : "stream",

                            plugin : "http://static.plymedia.com/players/default/plyviewer?skin=submenu-topleft"

              }

}},

Sample: AMP Premier - Samples - VOD Captioning Subply

 

 

Feeds

In case you want to use feeds, we have the following examples:

 

AMP Premier - Samples - Feed Based Captioning

AMP Premier - Samples - Captioning Multi-Language: Feed

 

More info

For more info on the DFXP spec, see http://www.w3.org/TR/2006/CR-ttaf1-dfxp-20061116/

https://www.abercap.com/blog/2009/06/18/the-basics-of-608-vs-708-captions/

 

This document is part of Adaptive Media Player Web User Guide

Attachments

    Outcomes