Presentation is loading. Please wait.

Presentation is loading. Please wait.

Encoding Audio & Video for the Web Presented by William Haun

Similar presentations

Presentation on theme: "Encoding Audio & Video for the Web Presented by William Haun"— Presentation transcript:

1 Encoding Audio & Video for the Web Presented by William Haun

2 Outline Understanding Bit Rates Tips for Encoding Audio Tips for Encoding Video Production and Post-Production Tips 2

3 Understanding Bit Rates What is Bit Rate? Recommended Bit Rates CBR vs. VBR One-pass vs. Two-pass 3

4 Understanding Bit Rates What is Bit Rate (transfer rate)? The number of bits transferred each second Usually measured in kilobits per second (kbps) Most encoders have you specify a bit rate for your file, then the rest of the settings affect the quality Bit rate (kbps) ٭ length (sec) ÷ 8 ÷ 1024 = total size of file (MB) Dont forget that video files have a video bit rate & audio bit rate that combine to create the total bit rate. 4

5 Understanding Bit Rates Recommended Bit Rates Dial-Up Progressive Download: 56-110kbps Streaming: 38kbps DSL Progressive Download: 350-512kbps Streaming: never over 350kbps Cable Progressive Download: 512kbps – 2mbps Streaming: never over 512kbps 5

6 Understanding Bit Rates Constant Bit Rate vs. Variable Bit Rate -Constant Bit Rate (CBR) never fluctuates -Variable Bit Rate (VBR) allocates more bits per second to the more complex parts of audio/video but keeps an overall average for the whole file 6

7 Understanding Bit Rates Constant Bit Rate vs. Variable Bit Rate -VBR should always be used with download & progressive download media -VBR often cant be used with real-time encoding -VBR with streaming should only be used if a peak bit rate has been set 7

8 Understanding Bit Rates One-Pass vs. Two-Pass Most encoding software lets you specify whether you want it to pass over the media file once or twice while encoding. Two-pass takes longer to encode but provides a higher quality encoded file. It especially improves the quality of VBR encoded files. Two-pass cannot be used with real-time encoding. 8

9 Tips for Encoding Audio Channels (Stereo vs. Mono) Sample Rates Choosing an Audio Codec 9

10 Tips for Encoding Audio Channels (Stereo vs. Mono) -The average users computer speakers are not high-quality and not positioned to take advantage of stereo sound (the user may also not have speakers plugged in correctly) -Dropping a channel cuts the file size in half You can take advantage of that reduction to have higher quality mono sound -Always convert audio for the web to mono unless the stereo effect is so important you can sacrifice quality and/or file size 10

11 Tips for Encoding Audio Sample Rate -Sample rate is one of the key contributing factors to audio file size -Sample rates are measured in hertz and define how many samples are recorded per second -More samples per second equates to higher fidelity 11

12 Tips for Encoding Audio Sample Rate -CD quality is 44.1khz FM radio is around 15khz -22khz is a perfectly acceptable rate for music online Down sampling from 44khz to 22khz cuts file size in half -Audio that is primarily speech can be dropped significantly – even as low a 8khz 12

13 Tips for Encoding Audio Choosing an Audio Codec -You cant go wrong with MP3, everything supports it -MP4 is slowly becoming the new standard, it has a much better compression ratio -WMA is another alternative with a great compression ratio but is mostly limited to Windows Media Player 13

14 Tips for Encoding Video Frame Rate Frame Size (Resolution) Key Frames Image Quality (Video Smoothness vs. Sharpness) Multiple bit rate streaming (also called intelligent streaming) 14

15 Tips for Encoding Video Frame Rate -NTSC video (TV standard) is 30 frames per second (fps) -The average human eye can only process 20-22fps -Dropping the frame rate of video for the web from 30 to 20 means 1/3 less file size -Video without much motion can be dropped to 15fps (i.e. footage filmed on tripod, person talking) -Stick with frame rates divisible by 5 or 6 (10,12,15,18,20,24,30) 15

16 Tips for Encoding Video Frame Size (Resolution) 320x240 is the most common size on the web Recommended frame sizes: -High Bandwidth: 400x300 or 480x360 -Low Bandwidth: 240x180 -Dial-up: 180x120 (pretty much worthless) -Download for DVD/TV: 640x480 Make sure you dont change the aspect ratio (it will stretch or squash your image) 16

17 Tips for Encoding Video Frame Size (Resolution) -T he larger the frame size, the more noticeable low frame rates will be -Crop widescreen bars They are a waste of bits 17 640x270 640x480

18 Tips for Encoding Video Frame Size (Resolution) -If you are encoding NTSC footage be sure to de-interlace the footage if your final size is over 240px high 18

19 Tips for Encoding Video Frame Size (Resolution) -Crop overscan when digitizing footage from tape (especially VHS) 19

20 Tips for Encoding Video Key Frames -A key frame is a point in encoded video where the data for the entire frame is transmitted, rather than just the changes. 20

21 Tips for Encoding Video Key Frames -More key frames means sharper image but costs more bandwidth and may cause overall degradation of quality -Less key frames means smoother video, too few gives underwater look (see YouTube) 21

22 Tips for Encoding Video Key Frames -Pay attention to setting values in your encoding software Sometimes you set X key frames per second other times it is key frame every X frames -If a auto key frame on scene change option is available ALWAYS check it -Key frames also become the seek points in a video 22

23 Tips for Encoding Video Image Quality (Smoothness vs. Sharpness) -Some codecs let you set a quality/smoothness setting -Choosing smoothness over quality means the encoder will not drop any frames to preserve the smoothest motion but will lower the quality of the image in order to do so -Choosing quality over smoothness will drop frames to preserver the quality of the image -Choose sharper (higher quality) for content without much detail and motion -Choose smoother for high motion or a lot of detail 23

24 Tips for Encoding Video Multiple Bit Rate Streaming Uses a single file to deliver a video file to the user that is appropriate for his bandwidth Windows Media calls it Intelligent Streaming and packages several different bit rate versions into one file The Windows Media Server then automatically determines which version to stream to the user based on its calculation of what his bandwidth is (there is debate over how well this actually works) 24

25 Tips for Encoding Video Multiple Bit Rate Streaming QuickTime requires you to encode the different bit rate versions, then use MakeRef tool to create a reference movie for them. Their QuickTime player then chooses which version to stream to them based on their QuickTime player settings. Some encoders have the MakeRef functionality built-in (Cleaner, Wirecast) 25

26 Tips for Encoding Video Multiple Bit Rate Streaming Flash Media Server has built-in functionality that will drop frames on-the-fly from the video if a users bandwidth cant handle it True multiple bit rate streaming with FMS is more complicated. Like QuickTime, you must encoded the different bit rate versions. Then a bandwidth detection movie needs to be run by the video player and then player must be programmed to determine which video to stream from an array of videos 26

27 Tips for Encoding Video Multiple Bit Rate Streaming The SMIL XML standard also has a mechanism for delivering multiple bit rate files. SMIL can be used with all four of the most common media players. FLV & SMIL example: htm?context=LiveDocs_Parts&file=00003646.html htm?context=LiveDocs_Parts&file=00003646.html 27

28 Production and Post-Production Tips Tripod, Tripod, Tripod! Video shot on a tripod provides the encoder with frames that dont change as much. The encoder can then dedicate bits to important motion within the frame. Even the steadiest handheld footage makes every single frame different from its preceding one. The encoder then has a harder time determining what is frame movement and what is in-frame motion. 28

29 Production and Post-Production Tips Minimize In-Frame Motion 29 Codecs will use the most bits on the portions of the frame that change Help the codec out by keeping motion to a minimum Avoid motion backdrops Avoid patterned clothes on subjects (a small move shifts the whole pattern)

30 Production and Post-Production Tips Avoid Fades & Fancy Transitions Fades (dissolves) and animation transitions make more pixels change from frame to frame. The encoder will do one of the following: With CBR your dissolves will just look terrible With VBR it will focus its bits on making your dissolves look nice and your actual contents quality will be compressed 30

31 Production and Post-Production Tips Avoid Fades & Fancy Transitions 31

32 Production and Post-Production Tips Use a Noise Reduction Filter Some encoders offer the option to perform noise reduction before encoding. This will clean up grain and noise in the original footage that may confuse the encoder and cause it to waste bits. Noise reduction is very useful with digital video footage shot in low-light situations Noise reduction significantly increases the encoding time Overuse can cause the image to loose too much detail 32

33 Production and Post-Production Tips Shoot & Edit a Cut Specifically for Web When recording a production for distribution on tape, DVD, and the web consider creating a web version. For live events shoot from one angle on a tripod. In post-production remove transitions and stick to straight cuts. 33

34 Resources Windows Media Resources Free Windows Media Encoder 9 Windows Media Knowledge Center QuickTime Resources Quicktime Developer Connection Quicktime Developer Tools - Flash Video Resources Compare Flash Video Encoders & Settings - Article on choosing your Encoder app Flash Video Developer Center - 34

Download ppt "Encoding Audio & Video for the Web Presented by William Haun"

Similar presentations

Ads by Google