Skip to main content

Microsoft Silverlight

Timecode supportRSS Feed

(1)

s3ncha
s3ncha

Member

Member

4 points

3 Posts

Timecode support

Hi All,

Is there way to query current timecode (and navigate to) of the media that is being played in MediaElement?

It's working great in embedded Windows Media Player  (using controls.currentPositionTimecode  property) and the lack of this feature is the only thing that stops us from using SilverLight in our solution. 

If it's not supported at the moment, is there chance that this will be added soon?

Many thanks,

S3ncha

halabala
halabala

Member

Member

4 points

2 Posts

Re: Timecode support

Dear Development Team,


Could you answer on this question? Timecode (reading and seeking) is necessary feature for my team too.

Thank you for help

mseredynski
mseredynski

Member

Member

8 points

7 Posts

Re: Re: Timecode support

Timecode support is something that we would really love to see in the 1.0 version of Silverlight.

s3ncha
s3ncha

Member

Member

4 points

3 Posts

Re: Timecode support

Please, can anyone answer on this question?  Does dev. team read this forum at all?

 

Thanks!

slyi
slyi

Participant

Participant

824 points

254 Posts

Re: Timecode support

Whats wrong with position ? http://msdn2.microsoft.com/en-us/library/bb188473.aspx

s3ncha
s3ncha

Member

Member

4 points

3 Posts

Re: Timecode support

Do you suggest to divide number of second by 25 for pal or  25.99 for ntsc?  This would give me approximate timecode, not frame accurate timecode.

Guys seriously can we get an answer on this please? In your Interactive Media Manager (  https://www.microsoft.com/resources/mediaandentertainment/solutions_imm_sharepointplayer.mspx ) I can see you have timecode display. Is that done through TimeSpan approximation or is it an undocumented feature to give MS advantage over guys like us? :)  No offence. Not 100% sure if it's done with Silverlight though Big Smile

m3taverse
m3taverse

Member

Member

186 points

88 Posts

Re: Timecode support

I'm not from MS so don't consider this the definitive answer, but this is what I think based on information available so far.

I do not personally have experience with the Windows Media timecode functionality, so I am not exactly sure how this is implemented in Windows Media. But as embedding it in the header seems to make little sense, and Windows Media Encoder supports adding timecode data to live streams (realtime), it would appear that timecode data is a closer relative of the script stream technology than of the marker techology. Markers being in the header by definition, and script commands having their own synchronized stream in the asf/wmv container.

Silverlight 1.0 beta only supports metadata that is available in the header of the file, it has no support for scripts streams, and I would think no support for timecodes by extension. The only thing the SL team have said about supporting the script stream is that they will consider usage scenarios. So no commitment on supporting this in the future, which I think pretty much rules out support for it in 1.0.

halabala
halabala

Member

Member

4 points

2 Posts

Re: Timecode support

To MS Team: Could you answer the question.

lewalpert
lewalpert

Member

Member

6 points

4 Posts

Re: Timecode support

Did you ever get an answer about Silverlight supporting timecode?

JohnDeutscher
JohnDeut...

Member

Member

26 points

8 Posts

Re: Timecode support

Sorry I am way late to this thread! 

I have your answer.  You can do SMPTE timecode with Silverlight, but currently not in the way the old WMP.ocx would allow you to navigate based on the embeded per-frame Data Unit Extension that is in the Format SDK. 

However for IMM we wrote a helper class that looks like a TimeSpan, but actually contains all of the conversion functions for the various SMPTE 12M format timecodes. You can easily convert the TimeSpan object that is reported back from Silverlight's MediaElement to SMPTE 12M timecode using a class that I wrote that is now included in the Expression Encoder 2 SP1 player templates. 

If you have Expression Encoder 2.0 SP1 installed. Go to this location to see the Timecode class.

C:\Program Files (x86)\Microsoft Expression\Encoder 2\Templates\en\SL2Standard\Source\MediaPlayer\TimeCode.cs

This is a Stuct that works just like a TimeSpan in .NET.  You pass it the TotalSeconds from the CurrentPosition timespan of the MediaElement and the SMPTE 12M framerate that you want calculated (say for example SMPTE 29.97 Drop Frame), and the Struct will give you back a valid SMPTE timecode string. 

You can also use it in reverse. Pass it a time and framerate that you want to go to, and get back the Absolute time in seconds, then set the current position to that.

If you wanted, you could even build a nice little SMPTE timecode calculator using this class.  I have built a Silverlight based Rough Cut Editor with this code as well.

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities