ClosedCaptions showing twice

May 19, 2011 at 6:48 PM


For some reason in my project (SMF samples work ok) closed captions from the stream are showing twice e.g.



                   "on the left we can see..."

                   "on the left we can see..."



Here is how I include them in my XAML:


<smf_accesscontrols:CaptionsPresenter x:Name="CaptionsPresenterElement" ItemsSource="{TemplateBinding VisibleCaptions}" Grid.RowSpan="2">
      <smf_accesscontrols:CaptionBlockRegion CaptionRegion="{Binding}"/>

If i start resizing the player, I start seeng more than 2 identical strings one above another, there might be three, or four :). Never saw that before.


Thank you in advance.

May 24, 2011 at 3:48 PM

I'm seeing the same issue, did you have any luck fixing this?

Also captions seems rather small.

- Loke

May 27, 2011 at 6:15 PM

Unfortunately no, I hope Tim will help us all :)

Jul 18, 2011 at 4:47 PM


Was wondering if there is any update regarding this issue?

Thank you.

Jul 18, 2011 at 4:55 PM

I found and fixed a bug the other day resulting in captions showing up twice. The problem seemed to occur for live streaming with IsStartPositionOffset=false but could conceivably impact other scenarios. Here's the fix if you want to try it out on the source code yourself. Note: this will be available in the next update.

In the TimedText plugin, in TimeCode.cs, in the addition operator:


        /// <summary>

        /// Adds two specified TimeCode instances.

        /// </summary>

        /// <param name="t1">The first TimeCode.</param>

        /// <param name="t2">The second TimeCode.</param>

        /// <returns>A TimeCode whose value is the sum of the values of t1 and t2.</returns>

        public static TimeCode operator +(TimeCode t1, TimeCode t2)


            // FIX: TimeCode loses precision if we use frames instead of seconds

            var t3 = new TimeCode(t1.AbsoluteTime.TimeAsDouble + t2.AbsoluteTime.TimeAsDouble, t1.FrameRate);            

            //ulong frames = t1.TotalFrames + t2.TotalFrames;

            //var t3 = TimeCode.FromFrames(frames, t1.FrameRate);


            return t3;


Jul 18, 2011 at 4:57 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jul 18, 2011 at 5:18 PM

Wow. That did the trick. Thank you very much!