Design in Motion: Video Production Workflow


Published on

Creating high quality video is a combination of art and science. Learn the tips from the pros on how to optimize video compression to deliver the best quality at the smallest sizes with Expression Media Encoder, a feature of Microsoft Expression Media.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Design in Motion: Video Production Workflow

  1. 1. Ben Waggoner Technical Evangelist, Core Media Processing Technologies Microsoft Corporation
  2. 2. Video and audio in WPF/E Best practices for processing video and audio Best practices for Windows Media encoding for WPF/E Using the Expression Media Encoder
  3. 3. It's just Windows Media! Huge library of existing content already compatible Existing URLs from Windows Media Services still work Already supported by many hosting companies Lots of tools available for different markets Video codec; Windows Media Video 7/8/9 and 9 Advanced Profile Audio codec: Windows Media Audio quot;Standardquot; Not Pro, Voice, or Lossless in this version
  4. 4. FLV v. WMV
  5. 5. Higher quality video and audio Fewer bits needed for same quality Much faster encoding 3x faster for optimum quality on 4-core workstation 15x faster with Tarari card for hardware acceleration Much better TCO for video hosting Many more streams off a 2K3 Server than Flash server Cheaper per GB charges from hosting providers Mature live streaming/encoding tools
  6. 6. Capture Getting the content in higher quality Preprocessing Optimizing the content for the codec itself
  7. 7. Capture native bitstream or uncompressed DV, DVCPRO HD as native bitstream Other formats as uncompressed Don’t use DV bridge for analog-digital conversion DV codec throws out a lot of image data, especially color Access earliest generation dub as possible Most VHS tapes didn’t get posted on VHS! Ripping from DVD also sub-optimal Best to grab digital export from NLE
  8. 8. Everything we do to the video and audio between the source and the codec The biggest single factor in good-looking WPF/E video The best the codec can do is give back what you gave it For challenging projets, I spend ~80% of my keyboard- and-mouse time on preprocessing Once the codec settings are nailed, you're good to go.
  9. 9. WPF/E uses progressive video For 60i/50i, deinterlace to progressive For video telecined from film, use inverse telecine to restore 24p If it’s progressive, leave it alone! <example slide>
  10. 10. Video monitors don’t go to edges Computers do Crop edge blanking Asymmetric okay to cut out noise For low rez, crop to safe area Crop letterboxing as well If going to 16x16 resolution, can crop to final aspect ratio For mixed video/computer playback, matte out noise in blanking
  11. 11. Brightness and Contrast Computers have broader range — use it Blacks should look identical to RGB=0,0,0 in browser Noise Reduction Make image easier for compressor Remove grain Smooth sharp edges
  12. 12. After The Settings
  13. 13. Make loudest point of audio as loud as system beep -3 dB / 90% Not compressor/limiter - no change in dynamic range
  14. 14. Progressive versus Streaming Data Rates Frame Size Frame Rate Audio Settings Advanced Registry Key settings
  15. 15. Two legitimate modes of delivering web video Need to know which one will be used before encoding Progressive should use 2-pass VBR Streaming should use 2-pass CBR
  16. 16. Off a web server E.g., IIS in Windows 2003 Server Most efficient with Variable Bit Rate (VBR) encoding Random access in part of stream already downloaded Great for movie trailers
  17. 17. Files fromWindows Media Services Included in Windows 2003 Server Needs Constant Bit Rate (CBR) encoding Offers random access throughout stream Reduces need for local caching (big for mobile devices) Great for movies
  18. 18. We measure rates in power-of-ten numbers K=1000, not 1024 M=1000000, not 1048576 Streaming Need more sustained bandwidth to user more than data rate Progressive A slower connection means user waits longer for playback But can use high bitrates for short clips
  19. 19. WPF/E wants square pixel video So need to convert to aspect ratio Example DV is 720x480 4:3 content becomes 640:480 16:9 content becomes 832x480 Depends somewhat on data rate 200-500 Kbps: 320x240 or 432x240 1-2 Mbps: 640x480 or 832x240
  20. 20. 1-pass versus 2-pass 1-pass reads the source in and encodes out at the same time 2-pass does analysis pass first, calculating optimal bit-budget 2-pass is always better if you've got the time And it’s not 2x slower – the analysis pass runs quite a bit faster CBR versus VBR Constant Bitrate Optimum for streaming – quality varies, bitrate constant Variable Bitrate Optimum for progressive download – varies bitrate, quality constant
  21. 21. Use frame rate that’s an integer division of source 59.94 to: 59.94, 29.97, 15, 10, 7.5, 6, 5 50 to: 50, 25, 12.5, 10, 5 24 to: 24, 12, 8, 6 For anything over 200 Kbps, can use full frame rate of source
  22. 22. New compression tool targeting .WMV for WPF/E Bunded with Expression Media Product Accessible to both designers and video professionals Offline and Live Encoding But there's no secret sauce – you're welcome to use any WMV encoding tool with WPF/E
  23. 23. The codec has a bunch of registry key setting to further optimize encoding I fear regedit – you can use ―WMV9 PowerToy‖ Lots more options than I’ll discuss today Link to full documentation at end Tools will be integrating these controls later this year
  24. 24.
  25. 25. Current codec can use up to four threads for encoding Big speed improvement with multiple cores Auto picks number of threads available Sees HyperThreading (Pentium 4) as 2 processors But HT is less of a gain with compression than additional core Want to have at least 64 pixels high per thread <128 height: 1-thread <256 height (so 320x240): 2-threads 256+ height: 4-threads
  26. 26. Motion Estimation copies moving elements between frames Much more efficient to encode ―motion vector‖ than second copy of element Using a larger Motion Search range Provides better efficiency with faster motion Slows encoding Can reduce efficiency with slower motion
  27. 27. Available Options: Macroblock-adaptive 128 pixels horizontally, 64 pixels vertically (default) 256 pixels horizontally, 128 pixels vertically 1024 pixels horizontally, 256 pixels vertically 2056 pixels horizontally, 512 pixels vertically Each progressive option slowest encoding by ~2x Macroblock-adaptive slightly faster than 1024x256 Use Macroblock Adaptive for non-realtime encoding
  28. 28. Finds where color changes but B&W channel doesn’t Quality improvements 5-20% (most with colorful content) Crowd shots, motion graphics helped in particular Modes: Macroblock-adaptive with nearest integer chroma (fast, good) Macroblock-adaptive with true chroma (speed/quality mix) Luma only (default) Luma with nearest-integer chroma Luma with true chroma (best, slowest)
  29. 29. Number of bi-directional (B-Frames) between I-Frames and P-Frames B-Frames based off previous and next frame B-Frames typically fewer bits for same quality No frames are based on B-frame Don’t insert I-frame for flashes if they land on a B-frame So dynamically insert B-frames when there are flashes! Big win for gunfights and discos 1 B-frame optimal for most web encoding
  30. 30. Smooths out hard edge blocking artifacts ―In-loop‖ - used as prediction for future frames Only blurs content where an artifact would appear Much less noticeable at higher resolutions Softness better if alternative is artifacts Increased CPU decoder requirements somewhat
  31. 31. Softens edges where motion vectors overlap Softens image somewhat But reduces artifacts Recommendation On if you see artifacts Otherwise Off Also increases decoder complexity some
  32. 32. Denoises image before calculating motion vectors Keeps grain/noise from ―swirling‖ Helps low-bitrate encodes But can leave ―trails‖ Recommendation Only use with grainy source, and QA carefully
  33. 33. Simple noise reduction filter Helps when the source is noisy Not as good as offline noise reducers Recommendation Good for realtime encoding in low light But better to not have noisy source…
  34. 34. Blanks Line 21, other noise around edge of frame Handy for real-time encoding of analog sources Only use if source has edge noise
  35. 35. Specifies up to 16 frames forward for analysis Only needed in 1-pass encoding Used to detect scene changes, flash frames Big improvement for 1-pass CBR encodes Can dynamically insert B-frames with flashes Default is Off (Does not look ahead) Adds to latency for live encoding ~½ second for Lookahead=15 @ 29.97 fps Slightly slows encoding as Lookahead increases
  36. 36. ―Differential Quantization‖ Different macroblocks are compressed different amounts Compress gradients less, to reduce banding Recommendation I and P frames Using on B-frames wastes bits that will be discarded Lots of levels available ―Regular‖ good default with most content
  37. 37. Like DQuant, optimizes bits based on image Used in addition to DQuant Adaptive Dead Zone 1 good default for film content Experiment carefully with other kinds of sources
  38. 38. Highest quality encoding and reasonable performance Up to 4x slower than default settings Encoder complexity = 4/80 (second slowest) Motion Search Level = macroblock adaptive true chroma Motion Search Range = macroblock adaptive Motion Match Method = Adaptive SAD/Hadamard DQuant = Regular Perceptual Option = Adaptive Dead Zone 1 for film Force LoopFilter = On
  39. 39. Optimized for reliable real-time encoding Remember dual-duals are almost 4x faster than single core Motion Search Range = Biggest that doesn’t drop frames Motion Search Level = Luma + integer chroma NumBFrames = 1 Force LoopFilter = 1 (on) Dquant Option = Regular Perceptual Option = Adaptive Dead Zone 1 for film Lookahead = 16 (Max – most important single option)
  40. 40. 2-day instructor-led training in over 20 US cities Tools and Technologies Used Expression Blend and Expression Design NET Framework 3.0, Windows Presentation Foundation, XAML Visual Studio 2005 Target Audience User interface designers with advanced experience with Flash or Director. Understanding of Visual Studio 2005 or programming skills is not required. Prerequisites Does not require prior experience using Expression Blend or Windows Presentation Foundation. We recommend: Building an understanding of .NET Framework 3.0 Download Expression Blend Get inspired! Learn More:
  41. 41. Me: My blog: My class at Stanford
  42. 42. © 2007 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.