Skip to main content

Microsoft Silverlight

Answered Question Is LTC Timecode recognised by SL?RSS Feed

(0)

NVTDigital
NVTDigital

Member

Member

0 points

2 Posts

Is LTC Timecode recognised by SL?

 Hello,

Can anyone tell me if LTC timecode retrieved from a source is recognized in Silverlight? We offer digital conversion for archiving and a lot of our timecode is pulled from an LTC source on one of the audio channels from a tape source. What I'm looking for, is to have a video file that was encoded from a tape source, that would be a 3 minute clip that would show the actual embedded timecode (H:M:S:F), and not the clip length. Did all this make sence? Any help would be greatly appreciated. Thanks!

-Carson

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24939 points

2,425 Posts

Microsoft
Answered Question

Re: Is LTC Timecode recognised by SL?

 Hi Carson,

My understanding of your issue is that you want to display the video on a certain position.  If I have misunderstood you, please feel free to let me know.  

Actually, we can show the video at a certain position by setting MediaElement's position property.

 MediaElement.Position(TimeSpan);

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

NVTDigital
NVTDigital

Member

Member

0 points

2 Posts

Re: Is LTC Timecode recognised by SL?

NVTDigital:

 Hello,

Can anyone tell me if LTC timecode retrieved from a source is recognized in Silverlight? We offer digital conversion for archiving and a lot of our timecode is pulled from an LTC source on one of the audio channels from a tape source. What I'm looking for, is to have a video file that was encoded from a tape source, that would be a 3 minute clip that would show the actual embedded timecode (H:M:S:F), and not the clip length. Did all this make sence? Any help would be greatly appreciated. Thanks!

-Carson

 

 I guess I didn't understand what Silverlight was at first. I think I may be referring to the VC-1 codec that Silverlight uses. So my question should have been:

Does the VC-1 Codec support an embedded SMPTE time code?

I apologize for the confusion that I may have caused with my original question.

JohnDeutscher
JohnDeut...

Member

Member

26 points

8 Posts

Re: Is LTC Timecode recognised by SL?

 VC-1 format can store a Data Unit Extension that contains the SMPTE timecode.  Details on that are in the Format SDK.

Unfortunately you cant do anything with that Data Unit Extension in the Silverlight 2.0's MediaElement.

However, 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 included in the Expression Encoder 2 SP1 player templates. The major limitation is that this does not exactly work if you have a file that contains timecode breaks. It has to be continuous timecode.  Although you could embed markers in your file that tell a custom player that a timecode breka has been hit and that you need to begin calculating the timecode from a given offset.

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 a lot 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.

JohnDeutscher
JohnDeut...

Member

Member

26 points

8 Posts

Answered Question

Re: Is LTC Timecode recognised by SL?

Adding link to blog post on this subject:

http://blog.johndeutscher.com/2009/02/18/smpte-12m-timecode-support-for-silverlight/

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities