Wowza Community

Multiple subtitles (captions)

Hi i’m using wowza streaming engine version 4.8.26+4
i have a vod (video on demand) and two srt files (english, arabic)
i’ve done setup smil files.

it’s possible vod in wowza streaming engine to multiple subtitles?
there is any solution?

I believe the multiple languages must be in a single file, such as TTML where you can specify the language. In this case, your smil would include something like this:

		<textstream src="foobar.ttml" system-language="fra,jpn,eng">
			<param name="iswowzacaptionstream" value="true" />
		</textstream>

Scott Kellicker

hi scott thanks for your reply,

how to create correct ttml file?
this is my ttml script but it doesn’t work in player to select caption.

<?xml version="1.0" encoding="utf-8"?>
<tt xmlns="http://www.w3.org/2006/10/ttaf1" xmlns:ttp="http://www.w3.org/2006/10/ttaf1#parameter" ttp:timeBase="media" xmlns:tts="http://www.w3.org/2006/10/ttaf1#style" xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata">
<head>
    <metadata>
        <ttm:title>games_7_text</ttm:title>
    </metadata>
<styling>
    <style id="s0" tts:backgroundColor="black" tts:fontStyle="normal" tts:fontSize="16" tts:fontFamily="sansSerif" tts:color="white" />
</styling>
</head>
<body tts:textAlign="center" style="s0">
<div xml:lang="eng">
    <p begin="00:00:03.680" id="p0" end="00:00:04.480">one man</p>
    <p begin="00:00:04.480" id="p1" end="00:00:05.280">on a motorcycle</p>
    <p begin="00:00:05.280" id="p2" end="00:00:06.880">around the world</p>
    <p begin="00:00:06.880" id="p3" end="00:00:08.480">in</p>
    <p begin="00:00:08.480" id="p4" end="00:00:12.480">A Quest for Gameplay</p>
    <p begin="00:00:13.000" id="p5" end="00:00:14.800">Hello I'm Tim Hull.</p>
    <p begin="00:00:15.000" id="p6" end="00:00:18.000">I believe the games we play<br />are a fundamental building block</p>
    <p begin="00:00:18.040" id="p7" end="00:00:19.600">of our civilization.</p>
    <p begin="00:00:19.960" id="p8" end="00:00:23.160">I've set out on a global journey<br />that is my personal mission</p>
    <p begin="00:00:23.200" id="p9" end="00:00:25.920">to seek out, uncover, observe</p>
    <p begin="00:00:25.960" id="p10" end="00:00:27.280">and play games.</p>
    <p begin="00:00:27.800" id="p11" end="00:00:32.280">I'm searching for games that tell<br />us about our history culture and psyche.</p>
    <p begin="00:00:33.200" id="p12" end="00:00:38.000">During my journey I'll reveal stories<br />of the greatest games ever conceived</p>
    <p begin="00:00:38.040" id="p13" end="00:00:39.600">and why they are still with us today.</p>
    <p begin="00:00:40.200" id="p14" end="00:00:44.040">From the school playground<br />to the home console I will learn firsthand</p>
    <p begin="00:00:44.080" id="p15" end="00:00:47.200">what makes a great game,<br />why games are good for us</p>
    <p begin="00:00:47.240" id="p16" end="00:00:49.040">and what they tell us about ourselves</p>
    <p begin="00:00:49.240" id="p17" end="00:00:51.800">as well as being lots of fun.</p>
</div>
<div xml:lang="fra">
    <p begin="00:00:03.680" id="p0" end="00:00:04.480">Un homme</p>
    <p begin="00:00:04.480" id="p1" end="00:00:05.280">sur une moto</p>
    <p begin="00:00:05.280" id="p2" end="00:00:06.880">autour du monde</p>
    <p begin="00:00:06.880" id="p3" end="00:00:08.480">en</p>
    <p begin="00:00:08.480" id="p4" end="00:00:13.000">quête de jeux</p>
    <p begin="00:00:13.000" id="p5" end="00:00:15.000">Bonjour. Je suis Tim Hull.</p>
    <p begin="00:00:15.000" id="p6" end="00:00:18.040">Je crois que les jeux auxquels<br />nous jouons sont un pilier fondamental</p>
    <p begin="00:00:18.040" id="p7" end="00:00:19.960">de notre civilisation.</p>
    <p begin="00:00:19.960" id="p8" end="00:00:23.200">Je me suis lancé dans un voyage<br />global qui est ma mission personnelle</p>
    <p begin="00:00:23.200" id="p9" end="00:00:25.960">pour rechercher, découvrir, observer</p>
    <p begin="00:00:25.960" id="p10" end="00:00:27.800">et jouer.</p>
    <p begin="00:00:27.800" id="p11" end="00:00:33.200">Je suis à la recherche de jeux qui nous<br />racontent de notre histoire, culture et psyché.</p>
    <p begin="00:00:33.200" id="p12" end="00:00:38.040">Pendant mon voyage je dévoilerai<br />les plus grands jeux que l’homme ait conçu</p>
    <p begin="00:00:38.040" id="p13" end="00:00:40.200">et de pourquoi ils perdurent jusqu’à ce jour.</p>
    <p begin="00:00:40.200" id="p14" end="00:00:44.080">De la cour de récréation à la console informatique,<br />je vais apprendre de première main</p>
    <p begin="00:00:44.080" id="p15" end="00:00:47.240">ce qui fait un grand jeu,<br />pourquoi les jeux nous font du bien</p>
    <p begin="00:00:47.240" id="p16" end="00:00:49.240">et ce qu’ils nous révèlent de nous-mêmes,</p>
    <p begin="00:00:49.240" id="p17" end="00:00:51.800">tout en étant super amusants.</p>
</div>
</body>
</tt>

it is correct?

I just set this up with your TTML file and the TTML file seems fine.

In the Application.xml (sorry I’m not a big UI user), ensure the following is set under TimedText. I’m unsure if captionLanguages is needed

    <TimedText>
      <VODTimedTextProviders>vodcaptionproviderttml</VODTimedTextProviders>

      <Properties>
        <Property>
          <Name>captionLanguages</Name>
          <Value>eng,fra</Value>
          <Type>String</Type>
        </Property>
        <Property>
          <Name>vodCaptionsEnabled</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
        </Property>
        <Property>
          <Name>cupertinoVODCaptionsUseWebVTT</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
        </Property>

      </Properties>
    </TimedText>

I was then able to see the captions either using a smil file or just querying the VOD:

curl http://localhost:1935/vod/sample.mp4/playlist.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",FORCED=NO,AUTOSELECT=YES,URI="subtitlelist_leng_w318454684.m3u8",LANGUAGE="eng"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French",FORCED=NO,AUTOSELECT=YES,URI="subtitlelist_lfra_w318454684.m3u8",LANGUAGE="fra"
#EXT-X-STREAM-INF:BANDWIDTH=868638,CODECS="avc1.42c015,mp4a.40.2",RESOLUTION=512x288,SUBTITLES="subs"
chunklist_w318454684.m3u8

curl http://localhost:1935/vod/smil:captions2.smil/playlist.m3u8
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="French",FORCED=NO,AUTOSELECT=YES,URI="subtitlelist_lfra_w1908177015_b300000_cfc2FtcGxlLnR0bWw=.m3u8",LANGUAGE="fra"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="English",FORCED=NO,AUTOSELECT=YES,URI="subtitlelist_leng_w1908177015_b300000_cfc2FtcGxlLnR0bWw=.m3u8",LANGUAGE="eng"
#EXT-X-STREAM-INF:BANDWIDTH=300000,CODECS="avc1.42001e,mp4a.40.2",RESOLUTION=424x240,SUBTITLES="subs"
chunklist_w1908177015_b300000_cfc2FtcGxlLnR0bWw=.m3u8

Big thanks scott… :+1: :+1:

I tried to set up property like you mentions it.
And now close caption work properly like what i want.

And the my home work now is convert from srt file to ttml file cause from content provider just have SRT file hahhahaha

Cool – I’m glad that helped.

The are are a lot of tools for SRT to TTML conversion, but I’m not aware of which ones are good