smf 2.5 smoothStreaming TimelineMarkerReached

Apr 18, 2011 at 2:17 PM

Hi, i need help about expression encoder sp1 functionality.

I'm trying to build a player that receive scriptCommands from live smooth streaming by the encoder.

I read this about the possibility to catch this event.

Today, if the stream is Smooth, with the smf 2.5 I don't receive any scriptCommand from the encoder, but if I change stream to Wmv I receive TimelineMarkerReached event...

Can anyone help me please?

Apr 21, 2011 at 3:16 PM

You have to instruct the player to download textstream also:

try this: overrride the OnMediaOpened() method if you are extending the player or attach to the event if you are not extending
an then set the caption stream

protected override void OnMediaOpened()

            //aggancio lo stream dei dati delle captions
            this.SelectedCaptionStream = this.AvailableCaptionStreams.Count() > 0 ? this.AvailableCaptionStreams.First() : null;



Jun 27, 2011 at 1:43 PM


Does this work?  We are trying to send caption script commands through a live stream and need to pick up the events.

As far as I can see, it is only possible to send Captions through, and not custom events?

Has anyone successfully hooked into events from a live stream through the JavascriptBridge?



Jun 27, 2011 at 4:25 PM

Johann, there is a CaptionReached event in Silverlight but I see it is not exposed to js. I will create a task to expose it; for now you'd have to make the change yourself to the Silverlight source code to accomplish this. You should be able to go into the JavascriptBridge class and copy how the TimelineMarkerReached event works.


Jun 28, 2011 at 11:09 AM

Thanks Tim, I'll give this a try.  Basically, I will add a CaptionReached event to the ScriptBridge and hook into that.  Will let  you know how it goes...

Jun 28, 2011 at 12:34 PM

Hi Tim,

I've created the CaptionReached event as suggested, but I'm still having trouble. 

I've encoded a video with markers as well as captions and the code fails to fire events on both MarkerReached, as well as my new CaptionReached events.  Any other suggestions?

I see the encoder has 2 options for encoding captions, Header and Stream, which one should I use?



Jun 29, 2011 at 11:20 AM

Hi Tim, 

I've got another question; I'm encoding the video in the Encoder for IIS Smooth Streaming, using VC-1 Advanced, is this OK, or should I use H.264?

After further debugging, I've established that the video stream has no AvailableCaptionStreams through the player.  Do you think that this could be a problem with my video?  I've encoded the subtitles as Header, I've also tested with Stream to no avail.



Jun 29, 2011 at 4:20 PM

Johann, here's a good test video that you can try to make sure it is the video that is the problem and not the player:

As mentioned, you need to set the SelectedCaptionStream property to choose a caption stream.