Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Encoding Video for Microsoft Silverlight

3,617 views

Published on

Learn how to optimize your video encoding quality regardless or the specific distribution and infrastucture approaches you use. Detailed scenarios will cover optimizing video encoding quality for progressive download, streaming, self-hosting, Windows Live Silverlight Streaming, and third-party content delivery networks (CDNs).

  • Be the first to comment

Encoding Video for Microsoft Silverlight

  1. 1. Topics Delivery mechanisms for Silverlight video Hands-on Encoding with Expression Encoder Best practices for encoding for Silverlight Goals Deliver content with compelling quality Maximize ROI for encoding and delivery
  2. 2. Two most-common audio/video delivery mechanisms... Progressive Streaming Download Simple send-and-forget HTTP Dynamically managed transfer delivery of an audio/video file of audio/video content received that starts to play after a few in real-time without caching seconds of downloading to disk Scenario: Delivering to mobile Scenario: Adding simple media devices and broadcasting live delivery to existing web servers events
  3. 3. HTTP Progressive Download Get abc.wmv 200 OK abc.wmv
  4. 4. Pros Easy management and configuration Low server resource usage Supports Secure Socket Layer (SSL) Works with standard firewalls, caches, proxies Cons No Live Broadcast No Advanced FF/RW Long buffering when data rate higher than connection speed
  5. 5. Streaming Describe abc.wmv abc.wmv Header Response Header Header SSS Setup abc.wmv Stream 2 & 3 123 Setup Response Play abc.wmv Play Response S2: sample3 … sample2… sample1 S3: sample3 … sample2… sample1
  6. 6. Pros Many basic and advanced media features Bandwidth optimization Enables live broadcasting Cons Requires separate management infrastructure Can’t deliver content encoded at a higher bitrate than connection speed
  7. 7. Enterprises WMS IIS On-demand training (e.g. compliance) X X Live executive broadcast (e.g. Town Hall) X Programmed broadcast (e.g. CorpTV) X Product promotion on corporate Web site X X Internet (usually with ads) WMS IIS Social networking videos X X Movie trailers X X News & Entertainment clips X X Music & movie services (subscription/PPV) X X Pre-programmed Internet Radio/TV X X Radio + television rebroadcasts X X Live Webcasts X
  8. 8. Media delivery on top of Server 2008’s IIS 7 Bit Rate Throttling Web Server Playlist (see Ed Maia’s session) Adds basic streaming advantages to traditional progressive download Available as a free download from www.iis.net
  9. 9. Outsource the media distribution Silverlight.Live.com Content Delivery Networks (CDNs) For most content delivered to the public Do it yourself with Windows Server 2008 Using IIS 7 + IIS 7 Media Pack Using Windows Media Services 2008 Very popular for internal enterprise LAN/WAN Use origin server internally that pushes to CDN
  10. 10. Windows Media 9 in 2003 defined platform Most mature, media platform available Scales from phones to HD Silverlight is the future of WMV on the web
  11. 11. Mature live streaming/encoding tools Up to broadcast-grade rackmount systems Already capable of HD streaming today Big ecosystem of encoding tools WMV encoding out of the box in nearly all compression products Integration into major editing platforms Can ingest and edit in variety of NLE tools Lossless editing and insertion into files
  12. 12. Great quality and efficiency Video and audio Better decode performance Up to 2x pixels/second of H.264 That means better battery life as well Large existing libraries of content
  13. 13. It's just Windows Media! Most existing files, URLs, and servers work Media features baked into runtime No dependency on OS codecs Video codecs WMV 7/8/9 and 9 Advanced Profile Audio codec Windows Media Audio in Silverlight 1.0 Windows Media Audio Pro new in Silverlight 2 Offers 2x compression efficiency for 32-96 Kbps MP3 files also supported
  14. 14. …for designers Deliver the vision Quickly, and with a lowered aspirin budget …for developers Programmable object model for automation Adaptive preprocessing automatically optimizes for video format …for the business Faster encoding (up to 4x faster than 1.0) Lower bandwidth costs for same quality level Greater operator productivity
  15. 15. Basic-encoding is super-simple Source is automatically recognized Output profiles adapt to source No need to do any customization to get good results with most content But there’s always tweaking for that last 10%…
  16. 16. Silverlight provide a great HD experience Tweaking setting can provide optimal results Can trade off time for quality/efficiency Better quality for given playback machine Lower bandwidth costs VBR encoding maximizes bang for the bit for downloads
  17. 17. Silverlight can provide rich presentations Chapters with links and icons Subtitles VC-1 is great for delivering screen content Actually better than old Screen codec for Vista Silverlight Streaming a simple, powerful delivery platform Just keep content under 1400 Kbps peak
  18. 18. Topics Capturing Preprocessing Encoding Advanced codec settings Goal Improved quality Improved compression efficiency Better quality at same data rate Same quality at lower data rate Optimize cost per minute of video
  19. 19. Better end user experience Bad video is fatiguing Bad audio is extremely fatiguing Fatigued customers leave sooner Reduced bandwidth cost Can deliver optimal experience with fewer bits So lower cost per view Increased audience size Lower data rates means more users can experience the content
  20. 20. Capture native bitstream or uncompressed DV, DVCPRO HD as native bitstream Other formats as uncompressed Access earliest generation possible Most VHS tapes didn’t get posted on VHS! Ripping from DVD also sub-optimal Avoid analog to DV bridges Digital export from NLE works great
  21. 21. Everything we do to the video and audio between the source and the codec Biggest single factor in good-looking video Best a codec can do is match the source For challenging projets, I spend ~80% of my keyboard-and-mouse time on preprocessing
  22. 22. Video monitors don’t go to edges Computers do Crop edge blanking For <320x240, can crop to safe area Crop letterboxing out as well Silverlight is excellent at black rectangles
  23. 23. Makes image proper size and shape Correct for 16:9 and non-square source Web video doesn’t need to be 4:3 Match aspect ratio of cropped source 4:3 720x480 to quarter size: Right: 320x240 Wrong: 360x240 16:9 720x480 to quarter size: Right: 432x240 Wrong: 360x240
  24. 24. 4:3 720x480 4:3 square pixel (Mis) Corrected to 16:9 Corrected to 4:3
  25. 25. 16:9 720x480 16:9 square pixel (Mis) Corrected to 4:3 Corrected to 16:9
  26. 26. Nearest Neighbor Horrible blocky quality – don’t use it! Bilinear Fast, decent for 50-100% change in size Bicubic Good quality, appropriate default Lanczos Slightly sharper than Bicubic for downscale Super Sampling Best results for upscale
  27. 27. Silverlight uses progressive video For 60i/50i, deinterlace to progressive For video telecined from film, use inverse telecine to restore 24p Look for repeating pattern of three progressive and two interlaced frames If it’s progressive, leave it alone! Expression Encoder Auto Pixel Adaptive normally best quality And will turn itself off for most progressive sources Bob modes are faster but lower quality
  28. 28. Features from the VC-1 Encoder SDK Most users can use Presets for overall quality/speed balance But advanced modes for enterprising compressionists Advanced Modes can Tune encoding for special case content Screen recordings, animation, film grain Improve compression efficiency Trade off more encoding time for bandwidth savings
  29. 29. CBR Varies quality to keep bitrate constant Single-pass encode in EEv2 Gives a flat bitrate without bitrate spikes Required for streaming Also use when performance limits bitrate Peak Limited VBR 2-pass encode (only increases time 10-40%) Varies bitrate to keep quality constant Saves on file size for progressive download
  30. 30. 0-5 value for speed and precision of encode Each level about half speed of previous But improves quality and efficiency Complexity 3 a good default Higher doesn’t improve quality much Lower hurts quality quite a lot Complexity 4 fine for high value content Live adjusts complexity to match hardwware ROI tradeoff between encode time and delivery cost
  31. 31. Adaptive Deadzone Emphasizes preserving “coarse” textures like film grain at expense of smooth regions Recommendation: Use “Conservative” with grainy content Off with clean content Dquant (Differential Quantization) Different blocks compressed different levels Recommendation Off for most content (most efficient) Try I + P good for very smooth images (underwater) I-Frame DQuant great for screen recordings
  32. 32. B-Frames B-Frames need fewer bits for same quality Improves quality for flash/strobe frames Recommendations 1 B-frame optimal for most video/film source 2 B-frames useful for cel and CGI animation 4 B-frames great for screen recordings Other options as default for normal use Scene Change Detection: On Adaptive GOP: On Closed GOP: Off
  33. 33. Chroma Search Finds changes in color when brightness fixed Especially for motion graphics, animation Recommendation Adaptive or Full True for highest quality Match Method SAD is fast, Hadamard slow, sometimes better Recommendation: Adaptive for best quality Search Range Higher is slower, but finds faster motion Recommendation: Macroblock Adaptive
  34. 34. Loop Filter Adaptively Reduces blockiness Recommendation: On Overlap Filter Smooths image to reduce blockiness Recommendation: On if visible artifacts Denoise Recommendation: On if noisy source Edge Noise Removal Recommendation: Crop edge noise instead
  35. 35. Finds where color changes but brightness doesn’t Quality improvements with colorful content Crowd shots, motion graphics in particular Modes: Luma only (default) Adaptive Integer chroma (fast and useful) Adaptive True chroma (good quality/speed mix) Full Integer chroma Full True Chroma (best, slowest)
  36. 36. Ben.Waggoner@microsoft.com www.on10.net/blogs/benwagg
  37. 37. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

×