Skip to main content
Home Forums Silverlight Design Video and Media Is LTC Timecode recognised by SL?
4 replies. Latest Post by JohnDeutscher on February 18, 2009.
(0)
NVTDigital
Member
0 points
2 Posts
12-12-2008 6:22 PM |
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...
All-Star
24939 points
2,425 Posts
12-15-2008 5:34 AM |
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
01-13-2009 5:37 PM |
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.
JohnDeut...
26 points
8 Posts
02-18-2009 5:30 PM |
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.
02-18-2009 6:46 PM |
Adding link to blog post on this subject:
http://blog.johndeutscher.com/2009/02/18/smpte-12m-timecode-support-for-silverlight/