Marker and subtitle is not working

Topics: Windows 8 Xaml
Sep 6, 2012 at 9:27 AM

Hi all,

 

I am working with Player Framework 1.4, Adaptive Streaming Plugin 1.4, Timed Text Plugin 1.4 and Microsoft Smooth Streaming Client SDK Beta 2 for Windows 8 1.0. I tried to play an adaptive smooth streaming with multiple audio and embedded subtitle. Audio selection is works fine, but embedded Subtitle is simple not working. After manifest loading AvailableCaptions and SelectedCaptions properties are empty. The mainfest is good, because this function is works fine under silverlight.

Have you get any idea?

 

I tried to add subtitle as a timeline marker as well, but markes are simply not appears.

My xaml code:

<mmppf:MediaPlayer x:Name="player">

           <mmppf:MediaPlayer.Plugins>

               <adaptive:AdaptivePlugin />

               <text:CaptionsPlugin />

           </mmppf:MediaPlayer.Plugins>

       </mmppf:MediaPlayer>

My C# code:

player.Source = new Uri("http://MyDomain/MyMovie.ism/Manifest");

          

           player.Markers.Add(

               new Windows.UI.Xaml.Media.TimelineMarker()

               {

                   Type = "DefaultCaptionMarkerType",

                   Text = "Hello World",

                   Time = TimeSpan.FromSeconds(2)

               }

           );

          

           player.Markers.Add(

               new Windows.UI.Xaml.Media.TimelineMarker()

               {

                   Text = "Hello World",

                   Time = TimeSpan.FromSeconds(2.5)

               }

           );

 

           player.Markers.Add(

               new TimelineMarker()

               {

                   Time = TimeSpan.FromSeconds(startPosition),

                  Text = "Hello World",

                   Type = "SHOW|"

               }

           );

 

           player.Markers.Add(

               new TimelineMarker()

               {

                   Time = TimeSpan.FromSeconds(endPosition),

                   Type = "HIDE"

               }

           );

 

           player.Play();

 

Please help me to solve this problem!

Coordinator
Sep 6, 2012 at 6:09 PM

The TimedText/Captions plugin shipped with the player framework is used to download TTML/DXFP files, parse and render them. To show simple plain text captions like you are trying to do here requires that you either create your own plugin (or use the sample that we provide). Fortunately, this is not as hard as it might sound, download the source zip and check out the project: Microsoft.PlayerFramework.Xaml.CaptionMarkers. There's also a sample page (CaptionsPage.xaml) that demonstrates how to create markers that the plugin will use.

Hopefully this will help get you going,

Tim

Sep 7, 2012 at 8:00 AM

Hi Tim,

Dxfp file is fine for me, however my ism file contains, where the dxfp located.

Here is my ism. Highlighted the subtitle part with red:

<?xml version="1.0" encoding="utf-16"?>
<!--Created with Expression Encoder version 4.0.1628.0-->
<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
  <head>
    <meta
      name="clientManifestRelativePath"
      content="ElephantsDream.ismc" />
    <metadata
      id="meta-rdf">
      <rdf:RDF xmlns:dcterms="http://purl.org/dc/terms/" xmlns:iisms="http://schemas.microsoft.com/iis/media/v4#" xmlns:wm="http://schemas.microsoft.com/windowsmedia/v11/attributes#" xmlns:ee="http://schemas.microsoft.com/expression/encoder/v4#" xmlns:eecustom="http://schemas.microsoft.com/expression/encoder/v4/custom#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
        <ee:MediaItem
          rdf:about="guid:6ef823ca-e2a3-4bfe-8283-1f638bf363f3">
          <ee:ID>6ef823ca-e2a3-4bfe-8283-1f638bf363f3</ee:ID>
          <ee:HasAttachedImages>False</ee:HasAttachedImages>
          <ee:HasCaptions>False</ee:HasCaptions>
          <ee:HasAudio>True</ee:HasAudio>
          <ee:HasImage>False</ee:HasImage>
          <ee:HasVideo>True</ee:HasVideo>
          <ee:IsProtected>False</ee:IsProtected>
          <ee:IsVBR>False</ee:IsVBR>
          <ee:Streams>9</ee:Streams>
          <ee:Duration>00:10:53.7916667</ee:Duration>
        </ee:MediaItem>
      </rdf:RDF>
    </metadata>
  </head>
  <body>
    <switch>
      <video
        src="ElephantsDream_2962.ismv"
        systemBitrate="2962000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_2056.ismv"
        systemBitrate="2056000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_1427.ismv"
        systemBitrate="1427000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_991.ismv"
        systemBitrate="991000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_688.ismv"
        systemBitrate="688000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_477.ismv"
        systemBitrate="477000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_331.ismv"
        systemBitrate="331000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
      <video
        src="ElephantsDream_230.ismv"
        systemBitrate="230000">
        <param
          name="trackID"
          value="2"
          valuetype="data" />
        <param
          name="trackName"
          value="video"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </video>
       <audio
        src="ElephantsDream_Spanish_230.ismv"
        systemBitrate="96000">
        <param
          name="trackID"
          value="1"
          valuetype="data" />
        <param
          name="trackName"
          value="audio_es"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </audio>
       <audio
        src="ElephantsDream_Commentary_230.ismv"
        systemBitrate="96000">
        <param
          name="trackID"
          value="1"
          valuetype="data" />
        <param
          name="trackName"
          value="audio_director"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </audio>
      <audio
        src="ElephantsDream_2962.ismv"
        systemBitrate="160000">
        <param
          name="trackID"
          value="1"
          valuetype="data" />
        <param
          name="trackName"
          value="audio_eng"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </audio>
       <textstream
        src="Elephants_Dream.dfxp.ismt"
        systemBitrate="465"
        systemLanguage="eng">
        <param
          name="trackID"
          value="1"
          valuetype="data" />
        <param
          name="trackName"
          value="textstream_eng"
          valuetype="data" />
        <param
          name="timeScale"
          value="10000000"
          valuetype="data" />
      </textstream>
    </switch>
  </body>
</smil>

 

Is there any way to pass this info to the player? I cvan not find this in your example code.

 

Tamás

Coordinator
Sep 16, 2012 at 4:28 PM

Tamas, the smooth streaming SDK currently does not support ismt tracks so there is no way at the moment for the player framework to retrieve this data.

Oct 8, 2012 at 1:53 PM

Tim,

do you know when this function will be available for MMPPF Windows 8? We are interested to show captions from smooth streaming textstream....

Thanks,

Nicolas