silverlight multimedia

Download Silverlight Multimedia

Post on 17-May-2015




0 download

Embed Size (px)


  • 1. MultimediainSilverlight
    Carl Franklin

2. Media Features in Silverlight 3.0 / 4.0
MediaElement Overview
Third-Party Projects
Cool Demos!
Let us repair to the pub
Multimedia Overview
3. Supported Resolutions:
All up to 720/1080p
H.264 Native
WMV SMPTE VC-1 Standard
Third-party codecs
GPU Acceleration
Olympics, Sunday Night Football, DNC, Presidential Inauguration.
True HD Video
4. Adapts bitrate/quality as bandwidth/cpu changes
Quick start-up time
Minimal buffering
Uninterrupted viewing
Requires IIS 7.0 Media Services
Live Smooth Streaming (in Silverlight 4)
PVR-style access
Navigation, scrubbing
IIS Media Services :
Smooth Streaming Demo Watch it in action
Smooth Streaming
5. One-to-many video broadcasting
Silverlight 3.0
QUMU Plugin (
Free on Codeplex
Polycom Video Media Center 1000 uses it
Silverlight 4.0
Built-in. No plugin necessary.
Multicast Support
6. Write once. Run on Windows, Mac, and Linux
Store and play offline video out-of-browser
DRM for stream and content protection
Silverlight DRM
Windows Media DRM
Advertising Support
Linear pre-rolls
Non-linear tickers
Transparent overlays
General Silverlight Features
7. Expression Encoder
Convert Videos to Silverlight-compatible WMV
Create HTML/Javascript Template
Copy to web server
Rock and roll
Encoding Videos for Silverlight
8. Expression Encoder Live Encoding Feature
Select Video Source
Select Push or Pull Modes
Rock and Roll
Small potatoes doesnt scale.
Live Encoding
9. Real geeks use hardware
InLet Technologies Spinnaker
Olympics :
20 of these @ 20K each
IIS Server Farm
Camera -> Inlet -> IIS7 -> CDN
CDN = Content Delivery Network
Akamai, Limewire
Big $$
Hardware Encoding
10. MediaElement

  • Plays video or audio

Streamed or downloaded media
Video: WMV, H.264
Audio: AAC, MP3 and WMA
Add Media File to your project
Set Build Action property (of media file) to Resource

11. Scrubbing Media
Works on Downloaded or Buffering Media
Position method is writable
Position not valid until MediaOpened Fires
Downloaded media it simply changes the location
Buffering media it may cause re-buffering
NaturalDuration gives you the length of the media
Though may be invalid in some streams (e.g. Live)
Using MediaElement
thePlayer.Position = thePlayer.Position.Add(TimeSpan.FromSeconds(5));
12. Markers
Media must contain markers to work
MarkerReached Event Fired when a marker is reached
Sends a TimeMarker object as the event argument
Using MediaElement
void thePlayer_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e) {
TimelineMarker m = e.Marker;
theStatus.Text = string.Format("{0}:{1}:{2}",
m.Type, m.Text, m.Time);
13. Silver Bay Labs Development Guide Videos
Table of Contents on Left
Video on Right
Important Code in Textbox below video
Good Use of Markers
14. Play Position
No event for Position Change
Use Binding to Position Property Instead
Using MediaElement

15. Video Capture
Media Security
Whats New in Silverlight 4.0?
16. Webcam and Microphone Support
Captures a single frame, sends bitmap to callback
Sets the source of the VideoBrush using a video capture source
Webcam Sample Apps online:
Video Capture
void AsyncCaptureImage(Action Callback)
void SetSource(CaptureSource source)
17. VideoSink
Base Class for creating video capture classes
Override OnSample, convert data to your format
CaptureSource property provides a capturesource associated with your VideoSink
Use AsyncCaptureImage to capture a frame
Provides metadata for a video capture device, such as a webcam.
Webcam Sample Apps online:
Video Capture Classes
18. Video Capture Sample
if (CaptureDeviceConfiguration.AllowedDeviceAccess
|| CaptureDeviceConfiguration.RequestDeviceAccess())
VideoCaptureDevicevcd =
AudioCaptureDeviceacd =
if (null != vcd && null != acd)
cs = new CaptureSource();
cs.VideoCaptureDevice = vcd;
cs.AudioCaptureDevice = acd;

VideoBrushvideoBrush = new VideoBrush();
videoBrush.Stretch = Stretch.Uniform;
TO_FILL.Fill = videoBrush;
MessageBox.Show("Error initializing Webcam or Microphone.");
19. Protection for Content Owners
Protected content is only viewed through a secure connection
Supported Scenarios:
Rental, Subscription, Purchase
Read Output Protection policies inside PlayReady Licenses
Offline Content Protection for H.264 media through Silverlight DRM
Two methods
Windows Media DRM (WMDRM10)
PlayReady (AES)
Content Security
20. Silverlight Media Player
Silverlight Media Framework
Silverlight Hyper-Video
Augmented Reality
Third Party Goodies and the Future
21. Lightweight, enough features for most video streams
Used by Channel 9
Developed by Tim Heuer of Microsoft and MVP Joel Nuebeck


Silverlight Media Player
22. Came out of Vertigo Softwares work with Olympics and Sunday Night Football
Does all the heavy lifting
Rich multimedia control
DVR, Rewind, Alternate Language Tracks, In-stream Data Feeds, Analytics Tracking, Player Branding, Markers.
Silverlight Media Framework
23. 11-18-09
SMF Released at PDC
SMF v1.1 released
Progressive Download Added
SMF v2.0 under development
SMF Timeline
24. Timeline Markers
Progressive Download Support
Smooth Streaming Support
IIS In-Stream Data Access Framework
Out-of-Stream Data Access Framework
SMF Player 1.1 Features
25. Playlists
Manifest Marker Support
Javascript API
Closed Captioning
W3C Timed Text 1.0 DFXP Support
UI Automation
Media Plug-In Model
Logging Plug-IO
SMF 2.0 Additional Features
26. Hypertext-like features for Video
Jesse Liberty
Click or gesture while watching a video
Video pauses and you get some other information
Usually another video
Could be any kind of media
Uses the MEF framework
Video Demo:
Silverlight Hyper Video Project
27. Augmented Reality
Adding to (or augmenting) video with superimposed or embedded graphics.
SLAR Toolkit
Silverlight 4.0 Only
Webcam support via CaptureSource
Multiple Marker Detection, Custom markers
Uses the Matrix3DEx library by Rene Schulte
Adds 3D features to Silverlight
SLARToolkit Silverlight AugmentedReality Toolkit
28. Sharepoint Video Player
Embed video streams into your Sharepoint website.
xLite Player
Other Players
29. Scott Guthries Silverlight 4 Demos from PDC
Silverlight 4 Demos
Sunday Night Football
March Madness