Home
Video Encoding Cookbook and Profile Guidelines for the Adobe
Contents
1. L z 79 Ta ce o o lt lt L T O aa cA m X Y a O me 7 2 gt gt S 4 ie an LL E i A 16 WIDTH Figure 44 4 3 aspect ratio active video frame conversion to 16 9 aspect ratio full frame video k FULL VIDEO FRAME _ x SQUEEZED TE O m a gt ED oF WIDTH Figure 45 Anamorphed 16 9 aspect ratio active video frame conversion to 16 9 aspect ratio full frame video Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 39 FULL VIDEO FRAME LLI S BLACK BARS TOP lt ad T O ACTIVE VIDEO FRAME m AVFy 90 O 1 85 1 I gt l LL BLACK BARS BOTTOM 16 WIDTH 1 85 1 aspect ratio active video frame conversion to 16 9 aspect ratio full frame video k FULL VIDEO FRAME L BLACK BARS L a T O ACTIVE VIDEO FRAME m A AVFy 90 2 0 1 I gt a BLACK BARS BOTTOM a am 16 WIDTH 2 0 1 aspect ratio active video frame conversion to 16 9 aspect ratio full frame video Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 40 k FULL VIDEO FRAME BLACK BARS TOP y BLACK BARS BOTTOM b WIDTH FULL VIDEO FRAME Figure 48 2 35 1 aspect ratio active video frame conversion to 16 9 aspect ratio full frame video Video Encoding Cookbook and Profile Guidelines for the Adobe
2. Variant where Black Bars are inserted at the time of display and or playback k FULLVIDEO FRAME 2 35 1 to 16 9 Conversion Sample Implementation N Say gt ia FULL VIDEO FRAME FULL VIDEO FRAM E ____ __ Figure 56 2 35 1 to 16 9 FULL VIDEO FRAME T BLACK BARS f 7 T ki di LL Lh ae 9 1 a 9B 1 Se A gt gt J am ra T BE m I 235 R i BLACK BARS 16 WIDTH ENCODED pe DISPLAYED FULL VIDEO FRAME gt FULL VIDEO FRAME T BLACK BARS TOP 2 3 Sw u uw p I Q Ql Me OG a a iis gt S 5 J J f 4 7 Lh s i L Anamorphic Video Transformation In an effort to optimize various resources to produce the best experience one of the decisions that comes up often is to use anamorphic video resizing in order to gain additional bits per pixel Frequently this anamorphic sizing technique is used to reduce bandwidth requirements Typically the savings in such cases is as much as 25 However when making a decision whether or not to use anamorphic size the considerations must be kept in mind e Maintain constant height ex 1920x1080 source gt 1440x1080 encode gt 1920x1080 display Use highest quality scaler Applicable only to 16 9 content Do not do anamorphing for interlaced content p
3. Observe 3 digit frame numbers in video editor or similar software tool for example adequate 60 FPS 3232 to 24p 111 correction results in regular increment of visible frame number by one By checking the appearance of white Clock Dots correct results in regular motion pattern without frozen double or missing images Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 25 Audio Video Synchronization CNT Dynamic Test AV Sync Test Figure 32 Depiction of video component of dynamic test pattern for audio video synchronization verification Colored arrows depicting direction are not part of the test pattern and are superimposed for explanation purposes only Technical Specification Measurable AV Sync Range 30s AV Sync Measurement Accuracy 1 ms Timeline Grid Display 2x 5x 100 ms Clock Rotation 10 frames 36 degree per frame Clock rotating blue dot serves to check motion continuity and smoothness i e lack of any drop freeze disturbances which may affect the measurement results See CNT Test Audio Element for use case details Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 26 CNT Test Audio Element White Video Frames 1 ms gap between flash period 1000 ms two White Frames oWel 4 L 00 L N SO awedl4 S0 Analog Scope Audio Pulse 1 ms Audio Burst 30 ms Figure 33 Audio component of AV sync
4. 1 256x144 300 64 364 2 512x288 600 64 664 3 768x432 1000 64 1064 4 768x432 1700 64 1764 5 1280x720 2500 64 2564 6 1280x720 3500 64 3564 Table 6 Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size 1 192x144 300 64 364 2 384x288 600 64 664 3 576x432 1000 64 1064 4 576x432 1700 64 1764 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 3 Variant 4 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband Stream Picture Size 1 256x144 300 64 364 2 512x288 600 64 664 3 768x432 1000 64 1064 4 768x432 1700 64 1764 5 1280x720 2500 64 2564 6 1280x720 3500 64 3564 7 1920x1080 5500 64 5564 8 1920x1080 8000 64 8064 Table 7 Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size 1 192x144 300 64 364 2 384x288 600 64 664 3 576x432 1000 64 1064 4 576x432 1700 64 1764 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 4 Variant 5 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size 1 256x144 300 64 364 2 512x288 600 64 664 3 512x288 1000 64 1064 4 512x288 1700 64 1764 5 1280x720 2500 64 2564 6 1280x720 3500 64 3564 Table 8 Stream Picture Size
5. Captive runtime bundles Android and desktop If you want to remove the need for your end users to download the AIR runtime in circumstances where they don t already have it installed as with native applications AIR 3 lets you bundle the AIR runtime right in with your application Note AIR has always used a captive runtime approach on iOS although the mechanism is a bit different Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform Assumptions Technical staff using this document is skilled in video coding technology field e Quality control tools viewing and listening conditions are tested and calibrated as described in this docu ment using recommended test patterns and equipment Coded content is destined for appropriate compatible software and or hardware decoders Coding software and hardware in use is functioning as stated Coding software and hardware support at least some of the following coding elements mentioned through out this document Image Formats Sizes 128x96 to 1920x1088 Frame Rates 23 976 24 25 29 97 30 50 59 94 60 fps or fraction thereof Aspect Ratio 1 33 1 78 1 78 AN 1 85 2 35 including Letterbox and Pillarbox variants Color Space YUV 16 235 Color Matrix 601 or 709 Video Sampling Structure 4 2 0 H 264 Codec Parameter Set Coding Levels Baseline Main High Coding Profiles 1 through 4 2 At least one of the mixing formats F4V MP4 MOV At leas
6. HE MADIRD TITT il Ae ANN i Figure 9 Above is a depiction of portion of Tri band combination from dynamic test pattern series ST by VideoQ What is seen here is a correct scaling setting causing no visible beat waves on both horizontal and vertical Tri band Patterns Frame Rate Transformation Frame rate conversion can also be altered during processing without operator knowledge If your input is 30 FPS and your output is 30 FPS the system architecture may force you to transform it in the interim format for speed of processing e g hybrid software hardware software etc to 60 FPS sometimes without operator being informed 30 FPS in gt 60 FPS processing time gt 30 FPS out Bitrate Transformation Bitrate can also be a factor that gets compromised For example the transcoding profile specifies 18Mbps output but the encoder may decide to treat it as 6 and pad the rest for speed of processing or any other reasons while outputting the result at 1BMbps 18Mbps set gt 6Mbps at processing time gt 18Mbps out Cascaded Codecs According to some broadcasters the typical amount of cascaded codecs in today s modern production ranges up to five The cumulative effect of this in transcoding operations is similar to the language translation of an Original text through several interim languages and then back to original text Imagine a translation of an article written in English as it passes through inter
7. strategically placed in more detailed or complex picture areas where the viewer is least likely to notice it Reference Materials Advanced video coding for generic audiovisual services ITU T Recommendation H 264 March 2005 MPEG 4 AVC H 264 video codec comparison CS MSU Graphics amp Media Lab Video Group December 2005 Web http www compression ru video index htm Bovik A Handbook of Image and Video Processing San Diego CA Academic Press 2000 Footen J and Faust J The Service Oriented Media Enterprise Burlington MA Elseiver Inc 2008 Hanzo L P Cherriman P and J Streit Video Compression and Communications 2nd Ed West Sussex UK John Wiley amp Sons Ltd 2007 Keith J Video Demystified Burlington MA Elseiver Inc 2009 Kovalick A Video Systems in an IT Environment 2nd Ed Burlington MA Elseiver Inc 2009 Larson L R Costantini Flash Video for Professionals Indianapolis IN Wiley Publishing 2007 Lee J B amp Kalva H The VC 1 and H 264 Video Compression Standards for Broadband Video Services New York NY Springer 2009 Poynton C Digital Video and HDTV Algorithms and Interfaces San Francisco CA Morgan Kaufman Publishers 2003 Rahul Vanam Eve A Riskin and Richard E Ladner H 264 MPEG 4 AVC Encoder Parameter Selection Algorithms for Complexity Distortion Tradeoff University of Washington Department of Electrical Engineering Department of Computer Sciences and Enginee
8. Figure 21 Zoomed in cut out of sections from ST test depicting the use of 4 3 Frame Aspect Ratio Crop Marker and example of use of correct crop setting Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 19 Wrong 4 3 Crop Figure 22 Zoomed in cut out of sections from ST test depicting the use of 4 3 Frame Aspect Ratio Crop Markers and example of use of incorrect crop setting 720 and 1080 scan line patterns are designed for measurement in 16 9 format as well as in 4 3 14 9 and 2 35 1 frame formats Cross shaped Frame Format Markers indicates precise crop area for each corresponding frame format The following are the most popular scale and crop modes 4 3 crop is used to display 16 9 content on legacy standard definition television sets smaller web sites or in page video segments 14 9 is a compromise non letterboxed mode used in simulcast broadcasting to present 16 9 content on 4 3 and 16 9 screens 2 35 1 is used to show letterboxed cinemascope movies on 16 9 screens Radial Plates Usage I WA Original Size dot by dot Figure 23 Zoomed in cut out of sections from ST test depicting the use of radial plates in original size and no scaling is observed Color lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Full contrast of fine details in all directions is seen without any issues inhibited
9. http wiki multimedia cx index php title QuickTime_container edts http www adobe com go fms_tools Table 3 A collection of MP4 related links Encoding Variants Broadband VOD The following are some of the use cases for encoding and packaging content for users with broadband connections on desktop computers The same principles are applicable to mobile set top boxes netbooks and tablets by using appropriate coding parameter sets for each The following diagram shows the importance of maintaining the same GOP structure i e fixed size and closed GOP frame rate and clip segment duration with each version of multibitrate content encoded from a common source Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 71 r eere PerrereepeePsBpeBresresPees Peepe ss Peeri 2 Seconds GOP at 24 FPS Fixed Size Closed GOP j CLOSED GROUP OF PICTURES GOP O o gt BAC ar A V Stream 1 D gt TATE 4 CLOSED GROUP OF PICTURES GOP ea Video 512x288 ms o gt We o gt ICES Cen j CLOSED GROUP OF PICTURES GOP A o gt Me N LOSED GROUP OF PI RE P Vid 768x432 ms o gt AT j CLOSED GROUP OF PICTURES GOP e p gt Video 1280x720 mms o gt Me j CLOSED GROUP OF PICTURES GOP O ae Video 1280x720 ms gt META lt FIXED DURATION SEGMENT gt Fig
10. 2 0 L R St 2 0 L R St 2 0 L R St Variant 6 AUDIO VIDEO Combined Bitrate A Stream V Stream 1 364 1 3 1064 3 4 1764 4 oc o 6 3564 CEN c a 8 8064 8 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 86 Variant 7 Variant 7 incorporates encoding best practices for smooth switching among bitrates for use in desktop environment This variant details recommended encoding parameters grouped into five target groups with various frame sizes and bitrates The first group 256x144 192x144 is targeted to reach low bandwidth end client most likely with in page use The second 512x288 384x288 and third 768x432 576x432 groups aimed to reach low high to medium low range bandwidth end client with in page use and full screen use The fourth group 1280x1080 is aimed to medium high bandwidth end client with in page and full screen use The fifth group 1920x1080 is aimed to high bandwidth end client with full screen use Variant 7 VIDEO Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant H 264 Advanced VIDEO Basic Bitrate GOP IDR Ref Frms SR wtP wtB 8x8 Trsfm Picture Size ST Bitrate 1 IP 256x144 Scomieee 150 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 256x144 SaS P 250 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3
11. 6 IP FS 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 Picture Aspect Ratio 4 3 matched to 16 9 picture height Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant H 264 Advanced VIDEO Basic Bitrate Stream PM Picture Size ST Bitrate B FDM GOP Size GOP IDR SR wtP wtB 8x8 Trsfm 1 IP 192x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 384x288 SaS P 500 CBR 2pass H 264 CAVLC M 3 1 1 I Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 384x288 SaS P 1000 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 384x288 SaS P 1700 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 Variant 5 AUDIO Variant 5 AUDIO VIDEO Combined Bitrate Stream Encode Mode Bitrate SR kHz A Stream V Stream 1 HEAAC v 2 Yes No 64 44 1 16 2 0 L R Mn 1 364 1 2 HEAACv 2 Yes No 64 44 1 16 2 0 L R St 2 564 3 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 3 1064 3 4 HEAAC v 2 Yes No 64 441 16 2 0 L R St 4 1764 K 5 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 5 2564 5 6 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 6 3564 6 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 84 Variant 6 Variant 6 incorporates encoding best practices for
12. It enables application level multicast delivery which allows one to many broadcasts over UDP enabled networks without taxing the network infrastructure Flash Media Enterprise Server 4 5 supports enhanced P2P performance with RTMFP Groups For additional details and comparison of delivery methods refer to Video Learning Guide for Flash Progressive and streaming video on the Adobe Developer Connection http www adobe com devnet flash learning_guide video part02 html progressive Adobe Flash Player 10 x and later Adobe Flash Player 10 was introduced in beta form in October 2008 It featured many new media related capabilities including e Speex audio codec Real Time Media Flow Protocol RTMFP Dynamic sound generation Dynamic Streaming Flash Media Server 3 5 or later required The most important features relating to video include support for an additional audio codec Speex which is optimized for voice encoding support for the new RTMFP delivery protocol which enables peer to peer communication in Flash Player and Dynamic Streaming which along with Flash Media Server 3 5 and later enables bandwidth detection on the client switching between streams of various bitrates depending on the client s connection speed and processing power ensuring the best possible playback experience Hardware acceleration was also enhanced in Flash Player 10 which improved full screen video playback performance Encoding and player consid
13. Note that Color Space Conversion such as 16 235 lt gt 0 255 YUV lt gt RGB and or 601 lt gt 709 may cause significant YRGB YUV level errors By checking the appearance of black and white PLUGEs and superPLUGEs components Figures 10 and 11 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 14 Black PLUGE amp SuperPLUGE Usage Te amg Brightness Y Offset is too low AERE sung Both central super black vertical band and central small square are almost the same brightness as big black square Clipped sector with no shades of gray is much more than 180 degrees Brightness is too high Clipped sector with no shades of gray is much less than 180 degrees Both central super black vertical band and central small square are clearly visible Brightness is correct The super black vertical band is almost the Conicalgrayscaleis clipped same brightness as big black square exactly half circle 180 degrees no odes rere sei Wali Central small square is clearly visible Figure 11 Depiction of black PLUGE amp SuperPLUGE elements from static test pattern of YRGB range and gradation linearity check Colored lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only White PLUGE amp SuperPLUGE Usage Coarse Tuning Fine Tuning Contrast Gain is too low Clipped sector with no shades of gray is much less tha
14. Situation 3 Overall gain is too low resulting in no clip but loudness is too low i e safe mode and not fully utilizing system s potential Figure 4 CL Oo Figure 2 Example of reference audio levels Frequency 1KHz Levels Range 18 dBfs to 0 dBfs Step Increment 1dB Also and example of correctly leveled audio processing cL Oo I i Li i om Figure 3 Example of audio levels from source being too high once processed resulting in clipping This figure illustrates a situation where audio was clipped by one operator when it reached 0 dBfs and then subsequently adjusted to 6 dBfs by another operator Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White F Lal i om Ln i i Lia LF I m g Lal Figure 4 Example of audio levels from the source being too low once processed resulting in clipping This figure illustrates a situation where audio was clipped when it reached 0 dBfs Notice that audio until 6 dBfs is fine and might remain fine unless a frequency of 6 dBfs to 0 dBfs is reached Color Transformation If your input is in the YUV color matrix domain and your output is in the YUV color matrix domain it is possible to set up the transcoder to achieve the output through conversion to RGB color matrix domain YUV in gt RGB at processing time gt YUV out and then back to YUV color matrix domain while modifying video levels scheme 16 235 g
15. clearly visible in reference Figure 5 Hence the clipping of white and black occurs If further transformations take place the entire color scheme will deteriorate significantly resulting in irreversible reduction of picture quality Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 11 You will never have a second chance to do the first compression right popular slogan Size Transformation As demonstrated in the previous example the encoding software may choose without informing the operator to scale the source from 1080 on input to 720 for processing and scaling back to 1080 for final output 1080 in gt 720 at processing time gt 1080 out Figures 7 and 8 Figure 8 Above is a depiction of portion of the Tri band combination from dynamic test pattern series ST by VideoQ What is seen here is unnecessary scaling causing beat waves on both horizontal and vertical Tri band Patterns similar to the process described in example 3 where internal processing is scaled to lower resolution and then scaled back up This scaling process 1080 to 720 back to 1080 makes picture softer unnecessarily While the human eye can forego that on soft pictures the complex synthetic patterns will not be as forgiving and will reveal such transformation at glance Even highest quality 10 15 taps scaler will not keep Tri band Patterns unchanged if video is scaled down E il 1 HAIN Ere
16. 1 6 IP FS 1280x720 SaS P 2000 EER pa H 264 CAVLC H 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 7 IP FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 8 IP FS 1280x720 SaS P 3000 CBR 2pass H 264 CAVLC H 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 9 IP FS 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 10 IP FS 1280x720 SaS P 4000 CBR 2pass H 264 CAVLC H 4 1 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 11 FS 1920x1080 SaS P 5000 CBR 2pass H 264 CAVLC H 4 2 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 12 FS 1920x1080 SaS P 6000 CBR 2pass H 264 CAVLC H 4 2 0 I Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 13 FS 1920x1080 SaS P 8000 CBR 2pass H 264 CAVLC H 4 2 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 Picture Aspect Ratio 4 3 matched to 16 9 picture height Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant VIDEO Basic H 264 Advanced Bitrate Stream PM Picture Size ST Bitrate BFDM GOP Size GOP IDR SR wtP wtB 8x8 Trsfm 1 IP 192x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 384x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 384x288 SaS P 900 CBR 2pass H 264
17. 1800 kbps 1280x720p 1800 kbps 5 1280x720p 2400 kbps 1280x720p 2400 kbps 6 1280x720p 3500 kbps 1280x720p 3500 kbps Note Same videos for regular and full screen mode due to developer narrow knowledge of how to limit the bitrates during playback Not typically recommended because using bitrates 4 thru 6 in regular mode adds performance and bandwidth overhead and doesn t increase the quality Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 66 B Limit the bitrate in regular mode 1 512x288p 400 kbps 512x288p 400 kbps 2 512x288p 800 kbps 512x288p 800 kbps 3 512x288p 1200 kbps 512x288p 1200 kbps 4 1280x720p 1800 kbps 5 1280x720p 2400 kbps 6 1280x720p 3500 kbps Note Video will never upgrade to 720p resolution in regular mode and full screen will have no limit Repurposing of 480p resolution in full screen mode avoids double encodes of same bitrates in the hope that transitions between bitrate 3 and 4 will be limited The only drawback of this selection is frame drops between bitrates 3 and 4 This is a more commonly used example C Dedicated bitrates for each video window view 1 288p 400 kbps 720p 400 kbps 2 288p 800 kbps 720p 800 kbps 3 88p 1200 kbps 720p 1200 kbps 4 720p 1800 kbps 5 720p 2400 kbps 6 720p 3500 kbps Note 720p fullscreen mode will have an additional version of bitrates 1 thru 3 in 720p adding 50 more encoding This is
18. 64 Yes Yes Yes Yes 1 4Pel 1 Picture Aspect Ratio 4 3 matched to 16 9 picture height Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant H 264 Advanced VIDEO Basic Bitrate Stream PM Picture Size ST Bitrate BFDM GOP Size GOP IDR SR wtP wtB 8x8 Trsfm 1 IP 192x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 384x288 SaS P 500 CBR 2pass H 264 CAVLC M 3 1 1 I Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 576x432 SaS P 1000 CBR 2pass H 264 CAVLC M 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 576x432 SaS P 1700 CBR 2pass H 264 CAVLC M 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 Variant 3 AUDIO Variant 3 AUDIO VIDEO Combined Bitrate SR kHz A Stream V Stream 1 HEAACv 2 Yes No 64 44 1 16 2 0 L R St 2 HEAACV 2 Yes No 64 441 16 2 0 L R St 2 564 2 3 HEAACv 2 Yes No 64 44 1 16 2 0 L R St 3 1064 3 4 HEAACv 2 Yes No 64 44 1 16 2 0 L R St 4 1764 4 6 HEAACv 2 Yes No 64 44 1 16 2 0 L R St 6 3564 6 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 81 Variant 4 Variant 4 incorporates encoding best practices for smooth switching among bitrates for use in desktop environment This variant details recommended encoding parameters grouped into five target groups with various frame sizes and bitrates The
19. 9 1280x720 3500 64 3564 10 1920x1080 4200 64 4264 11 1920x1080 5300 64 5364 Table 10 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 7 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 75 Detailed AAC AVC Audio Video Settings The following key defines the abbreviations found in the charts for Variants 1 7 41D 30 SaS FR GT KI GOP Size ST p CA ECM Pr Lv IDR Frq SS wt P wtB 8x8 Trsfm DBLK ME Ref Frms B Frm PM FS IP SR BFDM H 4 2 M 4 2 Same as Source Frame Rate in Frames per Second GOP Type Keyframe Interval GOP Size Scan Type Progressive Scan Type Context Adaptive Enthropy Coding Mode H 264 Profile and Level Instantaneous Decode Refresh Frequency I frame picture frequency Search Shape Weighted P picture mode Weighted B picture mode 8x8 Transform Deblocking Filter On Motion Estimation Subpixel Mode Reference Frames Number of B frames Player Mode Full Screen In page e g regular mode Search Range B Frame Direct Mode prediction mode Temporal High Profile at Level 4 2 Main Profile at Level 4 2 SR KHz BpS HEAAC v2 SBR PS Ch AUDIO Sample Rate in Kilohertz Bits per Sample High Efficiency Advanced Audio Coding version 2 Spectral Band Replication Parametric Stereo Number of Channels Video E
20. Adobe Flash Platform White Paper 69 process of back and forth requests may cause re buffering This is especially true if the user is watching video randomly or in small segments instead of the entire video from start to finish as it never caches in its entirety Therefore always encoding or muxing files with the moov atom at the beginning is recommended to avoid re buffering caused by moov atom location Issues with edts atom handling An edts atom contained in the trak atom of a moov atom located within an MP4 container hierarchy is responsible for tracking times and durations of the media Flash Player architecture is designed to ignore the existence of an edts atom however an edts atom containing invalid or broken data may interfere with smooth and stable switching of HTTP packaged streams Therefore it is important to repair or remove an invalid edts atom prior to packaging the file for HTTP Dynamic Streaming The broken edts atom can be eliminated from a file using tools such as FLVcheck for file conformance MP4creator for structure analysis and AtomicParsley for removal of metadata see Figures 3 and 4 The AtomicParsley command responsible for removing atoms is represented in the following string AtomicParsley exe filename mp4 manualAtomRemove moov trak edts manualAtomRemove moov 2 trak edts overWrite Here filename mp4 is the name of the file being processed and manualAtomRemove is a command that ini
21. CAVLC M 3 2 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 576x432 SaS P 1200 CBR 2pass H 264 CAVLC M 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP 576x432 SaS P 1500 CBR 2pass H 264 CAVLC M 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 79 Variant 2 AUDIO SR kHz 1 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 2 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 3 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 4 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 5 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 6 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 7 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 8 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 9 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 10 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 11 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 12 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 13 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St Variant 2 AUDIO VIDEO Combined Bitrate A Stream V Stream 1 364 1 CE c 3 964 3 5 1564 5 6 2064 6 7 2564 7 8 3064 8 9 3564 9 10 4064 10 EO o ce 12 6064 12 13 8064 13 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 80 Variant 3 Variant 3 incorporates encoding best practices for smooth switching among bitrates for use in desktop environment This variant details recommended encoding parameter
22. FY AlmostHorizontal Burst IIL 05 F Verto urs til POEL ALLE EEE 0 4 FY Almost Horizontal Burst 0 5 FY Horizontal Burst 0 4 FY Almost Vertical Burst HAT 4 _ 0 4 FY Almost Vertical Burst Figures 14 15 Illustrating cut out section from ST test depicting the use of Tri band patterns There are two groups of bursts with frequencies proportional to luma pixels rate FY full length horizontal and full height vertical bursts bands each consisting of maximum luminance frequency of exactly 0 5 FY in the middle with slightly oblique bands of 0 4 FY surrounding the middle burst The central 0 5 FY bands are especially sensitive to any errors in pixels clock e g when analog interfaces such as VGA YPrPb are involved mapping or scaling Two other bands allow differentiation between horizontal and vertical distortions thru the whole picture area from the left picture edge to the right picture edge and from top to bottom Vertical and almost vertical burst lines test horizontal frequencies whilst horizontal and almost horizontal lines test vertical frequencies Tri band Combination Burst Pattern Usage No Scaling s oitti nie WAH AT A i _ AAA li Figure 16 Zoomed in cut out of section from ST test depicting the use of Tri band patterns and example of correct setting with no scaling or high quality scaling There are no visible beat waves on both horizontal and vertical Tri band pa
23. Flash Platform White Paper 83 Variant 5 Variant 5 incorporates encoding best practices for smooth switching among bitrates for use in desktop environment This variant details recommended encoding parameters grouped into three target groups with various frame sizes and bitrates The first group 256x144 192x144 is targeted to reach low bandwidth end client most likely with in page use The second group 512x288 384x288 aimed to reach medium range bandwidth end client with in page use and full screen use e The third group 1280x720 is aimed to medium high bandwidth end client with in page and full screen use Variant 5 VIDEO Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant VIDEO Basic Bitrate H 264 Advanced Picture Size ST Bitrate BFDM GOP Size GOP IDR IDR Frq Ref Frms SR wtP wtB 8x8 Trsfm 1 IP 256x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 512x288 SaS P nom EROS H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP FS 512x288 SaS P 1000 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP FS 512x288 SaS P 1700 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1
24. Input source T 7 Output Group Codec Profiler De E 2 MPEG 4 Processor Muxer Audio Codec Coding Engine l reo Plug ins Pre Processing Plug ins 0O As input for further DRC AVC H 264 Video Coding Engine A From other processing by a processes coder pass through Interlaced wl Deinterlacing Scaling Scaled y 7 zeur ce p Process Process output Filter input Filter Processing Figure 37 An example of in line scaling with transcoding as implemented in Digital Rapids StreamZ software Charts on the following pages list commonly used aspect ratios with both width pixels and height lines divisible by 16 by 8 and by 4 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 32 Best performance Good performance Worst performance 1 33 1 known as 4 3 Figure 38 Picture above depicts video frame adhering to 1 33 1 4 3 picture aspect ratio where picture aspect ratio does not change from source state to encode state to display state source Artbeats The following is the table of various frame sizes that are adhering to 4 3 1 333 picture aspect ratio that is divisible by 16 8 and 4 64 x 48 32 x 24 832 x 624 112 x 84 624 x 468 1184 x 888 128 x 96 64 x 48 864 x 648 128 x 96 640 x 480 1104 x 828 192 x 144 96x 72 896 x 672 144 x 108 6
25. Profile Guidelines for the Adobe Flash Platform White Paper 37 Format Conversion to 16 9 Aspect Ratio The ongoing trend in picture formats is to use a wide aspect ratio One of the common selections for online delivery is 16 9 The following guides were designed to help conform various common picture aspect ratios to 16 9 aspect ratio The table that follows allows for black bar allocation for proper format retention and corresponding pixel count for black bar padding and active video frame size should the coding processing software require manual entry The process of adding black bars and conforming the source media to 16 9 video frame sizes can be done either in the coding process end or on the player end However it may not be an efficient use of resources to apply the padding on the player side Depending on the process and the quality of scaler involved in the transcoding process adding black bars on the encoding end may produce better results Whichever process you choose the following guides will reduce your time and effort in deciding on sizes and their corresponding parameters for conforming media to 16 9 picture aspect ratio k FULL VIDEO FRAME OISH LH FULL VIDEO FRAME 16 WIDTH Figure 43 Unconverted full active video frame 16 9 aspect ratio full frame video Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 38 k FULL VIDEO FRAME
26. T i 5 Z FULL VIDEO FRAME BLACK BARS 44 16 9 Conversion Table Reference Diagram __FULL VIDEO FRAME k FULL VIDEO FRAME k FULL VIDEO FRAME if L L Z S S u Ww ig gt gt gt a a 3 5 5 5 L L L I 16 4 p 16 p 16 lt q INGESTED gt lt ENCODED gt lt DISPLAYED 16 9 Conversion Sample Implementation ___________FULL VIDEO FRAME FULL VIDEO FRAME FULL VIDEO FRAME a F K ij F lt EE a T x F ar y uw ui uw z 9 oe amp 9 gt gt gt a a 5 5 5 x x im L iE if 5 16 le 16 16 Figure 51 16 9 Native 2 0 1 to 16 9 Conversion Table Reference Diagram k FULL VIDEO FRAME Variant where Black Bars are inserted at the time of display and or playback Figure 52 2 0 1 to 16 9 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper k FULL VIDEO FRAME ___ ii ee H B L N d z z z S u Lh o O O m 1 e w a gt gt gt J o a 2 0 gt a 2 0 D l WIDTH l lt INGESTED gt lt ENCODED gt lt DISPLAYED 2 0 1 to 16 9 Conversion Sample Implementation FULL
27. be streamed using the Real Time Media Protocol RTMP via Flash Communication Server In 2003 Flash Player 7 added support for loading external video files in the FLV file format Sorenson Spark Nellymoser These first videos in Flash Player 6 and 7 used the Sorenson Spark video codec H 263 video standard This codec is still used today for compression of webcam capture within the Flash Player The audio codec used with Spark is Nellymoser On2 VP6 MP3 Flash Player 8 and later added support for the On2 VP6 video codec which is generally used with the MP3 codec for audio VP6 provided higher quality compression than Spark but is more complex to decode especially on older computers It also supports alpha channels which enables video shot on a blue screen or green screen to be layered on top of other content On2 VP6 S Because VP6 tends to be processor intensive to decode Flash Player 9 update 3 version 9 0 115 0 introduced support for a simplified version VP6 S This codec is targeted for older computers with slower processors improving playback performance of high quality video Audio for VP6 S is generally MP3 H 264 MPEG 4 Part 10 AAC HE Flash Player 9 update 3 version 9 0 115 0 also introduced support for the open source H 264 codec and a new container format F4V The standard supported is MPEG 4 Part 10 This codec can also be processor intensive to decode but offers better quality at lower bitrates AAC HE a new audio c
28. in Flash Player 9 and later by using the fullScreenSourceRect to define the source area and switching the displayState to fullScreen Hardware scaling will be used in full screen mode if supported by the user s video card if it is not supported or disabled by the user the original software rendered full screen mode will be displayed Best practices for optimum performance using this approach include Match the video object movie size when setting fullScreenSourceRect Avoid scaling the video if unavoidable use an even divisor of original size e g 14 or 2x Disable smoothing and deblocking No overlays or objects below the video object Version 9 0 28 0 or later of Flash Player must be installed to support full screen mode and 9 0 115 0 or later for hardware scaled full screen mode For more details about implementing full screen playback in Flash Player 9 or later refer to Exploring Full Screen Mode in Flash Player 9 at the Adobe Developer Connection http www adobe com devnet flashplayer articles full_screen_mode html Scaling Video Controls In most cases the video controls will also be scaled when switching to full screen mode which can result in fuzzy or pixelated controls There are three approaches to full screen scaling that depending on the use case can minimize this issue These are presented in order from slowest to fastest playback performance Software scaled video with smoothing is a common ap
29. in a specific type of container one that follows the MPEG 4 Part 12 ISO IEC 14496 12 specification Stream packaging is the process of making a multiplexed media file Also known as muxing this procedure combines multiple elements that enable control of the distribution delivery process into a single file Some of these elements are represented in self contained atoms An atom is a basic data unit that contains a header and a data field The header contains referencing Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 67 metadata that describes how to find process and access the contents of the data field which may include but is not limited to the following components Video frames Audio samples Interleaving AV data Captioning data Chapter index e Title Poster User data Various technical metadata such as Codec Time scale Version Preferred playback rate Preferred playback volume Movie Duration g Etc m Oo AA ZT W In an MPEG 4 compliant container every movie contains a moov atom also referred to as a movie atom Normally a movie atom contains a movie header atom an mvhd atom that defines the time scale and duration information for the entire movie as well as its display characteristics The movie atom also contains one track atom a trak atom for each track in the movie Each track atom contains one or more media atoms an mdia atom alon
30. minimizing the chance of inadvertent clipping during the remaining encoding processes In summary it is recommended that the 16 235 color scheme be kept for as long as possible throughout the entire duration of transcoding processing workflow Scaling Cropping and Sharpness ST Static Test Image Scaling Cropping and Sharpness Check Corner Radial Plates Vertical Ruler Large 0 8 H Circle and Diamond Lines aimed at testing Vertical Frequency Bursts aimed at testing picture geometry geometry amp sharpness Single white pixel Horizontal Ruler Edge Markers Horizontal Frequency Bursts Aspect Ratio 7 Crop Markers 5 Green 10 Magenta 15 Brown Crop Markers Large Radial Plate Digital Sharpness Test 2D Sharpness Test 2 pixels wide Needles Central area Y Outer area UV Figure 13 Static Test pattern Black lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 16 How to Use This Test General Use Note This test can inserted as a frame into a media file for transcoding and or as a live signal input through the use of special external devices Scaling and sharpness is paired because of scaling sharpness loses its integrity When scaling is compromised sharpness is compromised as well Horizontal and Vertical Tri band Combination Burst Patterns dH _ 0 4
31. px O O O O Top 0 0 0 21 px 60 px 131 px 0 0 0 20 px 56 px 123 px 0 0 0 17 px 48 px 105 px 0 0 0 14 px 40 px 88 px 0 0 0 22 px 32 px 70 px Bottom 0 0 0 21 px 60 px 131 px 0 0 0 20 px 56 px 123 px 0 0 0 17 px 48 px 105 px 0 0 0 14 px 40 px 88 px 0 0 0 22 px 32 px 70 px Full Width Full Height Vv 4 Vv Anamorphic Width Full Height 16 9 Full Video Frame Width 1920 px 1920 px 1920 px 1920 px 1920 px 1920 px 1792 px 1792 px 1792 px 1792 px 1792 px 1792 px 1536 px 1536 px 1536 px 1536 px 1536 px 1536 px 1280 px 1280 px 1280 px 1280 px 1280 px 1280 px 1024 px 1024 px 1024 px 1024 px 1024 px 1024 px Height 1080 px 1080 px 1080 px 1080 px 1080 px 1080 px 1008 px 1008 px 1008 px 1008 px 1008 px 1008 px 864 px 864 px 864 px 864 px 864 px 864 px 720 px 720 px 720 px 720 px 720 px 720 px 576 px 576 px 576 px 576 px 576 px 576 px 42 Aspect Ratio Conversion Active Video Frame Black Bars 16 9 Full Video Frame Aspect Ratio AVFx AVFy Right Left Top Bottom Width Height 1 333 1 4 3 576 px 432 px 96 px 96 px 0 0 gt 768 px 432 px 1 333 1 16 9 AN 576 px 432 px 0 0 0 0 gt 768 px 432 px 1 7777 1 16 9 768 px 432 px 0 0 0 0 gt 768 px 432 px 1 85 1 768 px 416 px 0 0 8 px 8 px gt 768 px 432 px 2 0 1 768 px 384 px 0 0 24 px 24 px gt 768 px 432 px 2 35 1
32. such as MP4creator mp4creator sourceforge net or AtomicParsley atomicparsley sourceforge net enable you to analyze the location of the moov atom in your encoded files Figures 1 and 2 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 68 typ 12 Oxc hdr 6 Box Property a oy 4641 3 See Box Type Typ Fos 0x0 majorBrand mp4e JE minorversion 0 Ox000000010 mdat 817066 Oxc77aa hdr 16 compatibleBrandsCount 1 0x00000001 mooyv atom is placed at the beginning of the file when use streaming mode progressive download or fast start is enabled Figure 1 Analysis of a video file in AtomicParsley showing the atom located at the beginning of the file structure compatiblebrandsLount 1 O x00000001 Atoms Dump oo ityp 12 Dc hdr 8 Value mdat 817745 0sc7a5 1 hdr 16 Box Type Thyp ACA 21 hd E Sennen Fos Use Ad rmajorbrand mp4 minot ersiori 0 000000000 moow atom is placed at the end ofthe file when use streaming mode progressive download or ast stat is disabled Figure 2 Analysis of a video file in AtomicParsley showing the atom located at the end of the file structure Some tools enable relocation of the moov atom to the beginning of the file s structure through post processing of the compressed MPEG 4 mp4 file One such tool is MP4creator mentioned earlier and another is MP4
33. the ideal configuration with the best possible transition and performance characteristics Although it s possible to switch between different video resolutions in FP 10 0 however you might experience a small video pause or audio pop FP 10 1 removed this limitation therefore approach C is the recommended approach for FP 10 0 if the quality of the transition is most important Audio Settings For optimal performance and quality of service the following recommendations should be heeded when encoding content for multibitrate switching Encoded audio must maintain a fixed bitrate across all encoded files HE AAC v2 is the recommended codec MP4 Considerations Preparing video files for playback on the Flash Platform is a relatively straightforward process One detail that is often perplexing however is the moov atom also referred to as the movie atom An atom is a self contained data unit that contains information about the video file The moov atom defines the time scale duration display characteristics of the movie as well as sub atoms containing information for each track in the movie The optimal location of the moov atom will change depending on the selected delivery method This section delves into the details around the moov atom what data it contains and how to move the moov atom to the proper location for your delivery method MP4 Stream Packaging For Flash to be able to play back an MP4 file it must be packaged
34. the next fixed keyframe point suffers However allowing the encoder to generate a keyframe at a scene cut frequently results in every bitrate selecting exactly at the same keyframe point because the scene cut detector is typically triggered at exactly the same point When this happens keyframe alignment takes place Since it is an unpredictable behavior that is triggered by quality and consistency of the logic that drives the encoder it sometimes does not place keyframes in same place but in our experience it usually does Even if there isn t an alignment for every keyframe the video quality is better The greater risk of course is if something happens with scene cut detection that creates future misalignment or if the file format has problems with it such as in the following scenarios Some encoders allow setting a fixed keyframe interval and allow scene cut detection This means that even if a scene cut fires a keyframe just before that interval yet another keyframe is generated right at that point This ensures that you ll have alignment at least at the fixed keyframe interval point which is sufficient but not best a GOP Size GOP size determined by scene detection b IDR Control Variable IDR placement enabled with gop idr_period period see above Some encoders allow setting a maximum keyframe interval and allowing scene cut detection This means that if a scene cut fires a keyframe then the next keyframe will happen
35. the target size does not conform to 16 divisibility it is suggested to add black bars horizontal or pillar bars vertical also known as blanking space to conform Maintain the original aspect ratio If switching the display between frame sizes to accommodate different target audiences i e enabling full screen playback adjusting video size to enable smoother playback for those with poor network connec tions avoid scaling the video down instead scale up Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 30 For example if you decide that encoding one video size e g 1280x720 and then use this same file for smaller display sizes e g 256x144 or 768x432 you would do your viewer a disservice by engaging unnecessary bandwidth and system resources while causing deterioration of video quality When using video with a larger frame size than the intended frame size several performance issues can occur The player will engage more CPU resources to maintain scaling of the content into the designated frame size The player will maintain the higher bitrate of the larger frame size while trying to scale down thus unneces sarily burdening the client CPU and bandwidth Even though scaling down may seem like a reasonable approach to accommodating different clients while using the single highest frame size for all lower screen sizes the general client performance impact can be devastating taking up as muc
36. to a little less than one half the new higher rate So increasing the keyframe rate reduces the quality due to scarcity of bit resources for a given bitrate For instance at 100 kbps doubling the keyframe rate or reducing keyframe interval by half for example if taking from interval of 10 seconds to 5 seconds amounts to reducing the quality by half In other words going from 1 to 2 second keyframe interval will mean that almost 2x the bitrate is available for quality improvement and going from a 2 to a 3 second keyframe interval gives another 50 and so on Progressive Frame Rate 1 2 3 4 5 6 7 8 9 10 Frequency source amp output 60Hz 60fps 60 120 180 240 300 360 420 480 540 600 59 94Hz 59 94fps 60 120 180 240 300 360 420 480 540 600 60 1 001 30Hz 30fps 30 60 90 120 150 180 210 240 270 300 29 97Hz 29 97fps 30 60 90 120 150 180 210 240 270 300 30 1 001 25Hz 25fps 25 50 75 100 125 150 175 200 225 250 24Hz 24fps 24 48 72 96 120 144 168 192 216 240 23 976Hz 23 976fps 24 48 72 96 120 144 168 192 216 240 24 1 001 in frames Keyframe position relative to frame rate and interval Table 2 Note Keyframe Distance in frames Progressive Frame Rate Frequency Interval in seconds Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 63 Switching Network Conditions If the reason for bitrate switching is network conditions which is typically the case this increases the risk of under
37. video will start to skip frames all together An example of such behavior can be seen in live video encoding when the audio is turned off and on frequently for some reason or the volume is too low for a quality decode to take place Another example would be a case where the video has paused due to audio silence or drop out In this case the viewer would observe a fast forward effect to the next logical stop or keyframe The desktop audio clock is the most stable inexpensive consistent and reliable clock to reference time scale against Most modern desktop systems have hardware audio decoders built in and therefore are able to decode audio reliably which is why Adobe chose audio to be the reference clock carrier for video and audio However when audio cannot be reliably decoded by the built in audio decoder the video suffers as well So it is vital that the audio source and encoded output is good quality regardless of the intended bitrate Stream Packaging Delivering Video You can use two different methods to deliver video through Adobe Media Player progressive download or streaming Regardless of the method you choose the experience for viewers is very similar Your choice depends on your budget and the level of protection your content requires Progressive Download Progressive download downloads and stores video on the viewer s computer A short period of time is required to buffer and cache the beginning of the media file before it sta
38. 1 3 IP 384x288 SaS P 450 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 384x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP 384x288 SaS P 800 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 6 IP 384x288 SaS P 1200 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 p 8x8 64 Yes Yes No Yes 1 4Pel 1 7 IP 576x432 SaS P 1400 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 87 Variant 7 AUDIO Stream Encode Mode Bitrate SR kHz 1 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 2 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 3 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 4 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 5 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 6 HEAAC v 2 Yes No 64 eee 16 2 0 L R St 7 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 8 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 9 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 10 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 11 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St i HEAAC v 2 Yes No 64 44 1 16 2 0 L R St Variant 7 AUDIO VIDEO Combined Bitrate A Stream V Stream 1 214 1 2 314 2 Es en 4 664 4 5 864 5 6 1264 6 3o iea vi 8 1764 8 9 2564 9 10 3564 10 uao a u 12 5364 12 Video Encoding Cookbook
39. 1 192x144 300 64 364 2 384x288 600 64 664 3 384x288 1000 64 1064 4 384x288 1700 64 1764 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 5 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper Variant 6 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size Stream Picture Size 1 256x144 300 64 364 1 192x144 300 64 364 2 512x288 600 64 664 2 384x288 600 64 664 3 512x288 1000 64 1064 3 384x288 1000 64 1064 4 512x288 1700 64 1764 4 384x288 1700 64 1764 5 1280x720 2500 64 2564 6 1280x720 3500 64 3564 7 1920x1080 5500 64 5664 8 1920x1080 8000 64 8064 Table 9 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 6 Variant 7 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size 1 256x144 150 64 214 1 192x144 150 64 214 2 256x144 250 64 314 2 192x144 250 64 314 3 512x288 450 64 514 3 384x288 450 64 514 4 512x288 600 64 664 4 384x288 600 64 664 5 512x288 800 64 864 5 384x288 800 64 864 5 512x288 1200 64 1264 6 384x288 1200 64 1264 6 768x432 1400 64 1464 7 576x432 1400 64 1464 7 1280x720 1700 64 1764 8 1280x720 2500 64 2564
40. 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 7 FS 1920x1080 SaS P 5500 CBR 2pass H 264 CAVLC H 4 2 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 8 FS 1920x1080 SaS P 8000 CBR 2pass H 264 CAVLC H 4 2 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 Picture Aspect Ratio 4 3 matched to 16 9 picture height Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant H 264 Advanced VIDEO Basic Bitrate Stream PM Picture Size ST Bitrate BFDM GOP Size GOP IDR IDR Frq Ref Frms SR wtP wtB 8x8 Trsfm 1 IP 192x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 384x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 384x288 SaS P 1000 _CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 384x288 SaS P 1700 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 85 Variant 6 AUDIO HEAAC v 2 HEAAC v 2 HEAAC v 2 HEAAC v 2 HEAAC v 2 HEAAC v 2 HEAAC v 2 HEAAC v 2 Yes Yes SR kHz 44 1 44 1 44 1 44 1 44 1 I lt i 44 1 44 1 16 16 16 16 16 16 16 16 2 0 L R Mn 2 0 L R St 2 0 L R St 2 0 L R St 2 0 L R St
41. 164 544 x 408 1056 x 792 1568 x 1176 560 x 420 1072 x 804 1584 x 1188 576 x 432 1088 x 816 1600 x 1200 592 x 444 1152 x 864 608 x 456 1168 x 876 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 33 1 78 1 known as 16 9 Figure 39 Picture above depicts video frame adhering to 1 78 1 16 9 picture aspect ratio where picture aspect ratio does not change from source state to encode state to display state source Artbeats The following is the table of various frame sizes that are adhering to 1 78 1 picture aspect ratio that is divisible by 16 8 and 4 256 x 144 512 x 288 768 x 432 1024 x 576 1280 x 720 1536 x 864 1792 x 1008 2048 x 1152 Best performance Good performance Worst performance Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 128 x 72 256 x 144 384 x 216 512 x 288 640 x 360 768 x 432 896 x 504 1024 x 576 1152 x 648 1280 x 720 1408 x 792 1536 x 864 1664 x 936 1792 x 1008 1920 x 1080 2048 x 1152 64x36 128x72 192x108 256x144 320x180 384x216 448x252 512x288 576x324 640x360 704x396 768x432 832x468 896x504 960x540 1024x576 1088x612 1152x648 1216x684 1280x720 1344x756 1408x792 1472x828 1536x864 1600x900 1664x936 1728x972 1792x1008 1856x1044 1920x1080 1984x1116 2048x1152 2112x1188 34 Best performance Good performance Worst performance Best performance Good performance Wors
42. 1ms accuracy For large errors more than 500ms also check the relative timeline positions of the AV components for a longer period of time 5 sec to 60 sec in the AV Sync Test Sequence Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White F 28 Improving Overall Video Quality Achieving the highest possible video quality within set target parameters is the goal of any encoding project This section will begin by grouping key elements of the encoding process and explain their impact on production of high quality video assets Then the impact of these key elements on the playback experience will be discussed Key considerations and affected areas Video Video bitrate allocation Denoising degraining deblocking and similar preprocessing operations Deinterlacing including inverse telecine Frame rate conversion Video frame size scaling including aspect ratio conversion Color space and levels scheme transformation Audio Audio bitrate allocation Levels normalization Channel remapping and downmixing Sampling rate and bitrate rate conversion Stream packaging Stream bitrate budget allocation Audio Video synchronization Keyframe alignment e Playback capability of a client system Video Market trends in general According to data published by Akamai in the report for Quarter 2 of 2011 the US average broadband connection was 5 8Mbps with broadband adoption of 80
43. 56 x 492 1120 x 840 256 x 192 128 x 96 928 x 696 160 x 120 672 x 504 1136 x 852 320 x 240 160 x 120 960 x 720 176 x 132 688 x 516 1200 x 900 384 x 288 192 x 144 992 x 744 192 x 144 704 x 528 1216 x 912 448 x 336 224 x 168 1024 x 768 208 x 156 720 x 540 1232 x 924 512 x 384 256 x 192 1056 x 792 224 x 168 736 x 552 1248 x 936 576 x 432 288 x 216 1088 x 816 240 x 180 752 x 564 1264 x 948 640 x 480 320 x 240 1120 x 840 256 x 192 768 x 576 1280 x 960 704 x 528 352 x 264 1152 x 864 272 x 204 784 x 588 1296 x 972 768 x 576 384 x 288 1184 x 888 288 x216 800 x 600 1312 x 984 832 x 624 416 x 312 1216x912 304 x 228 816 x 612 1328 x 996 896 x 672 448 x 336 1248 x 936 320 x 240 832 x 624 1344 x 1008 960 x 720 480 x 360 1280 x 960 336 x 252 848 x 636 1360 x 1020 1024 x 768 512 x 384 1312 x 984 352 x 264 864 x 648 1376 x 1032 1088 x 816 544 x 408 1344 x 1008 368 x 276 880 x 660 1392 x 1044 1152 x 864 576 x 432 1376 x 1032 384 x 288 896 x 672 1408 x 1056 1216 x 912 608 x 456 1408 x 1056 400 x 300 912 x 684 1424 x 1068 1280 x 960 640 x 480 1440 x 1080 416 x 312 928 x 696 1440 x 1080 1344 x 1008 672 x 504 1472 x 1104 432 x 324 944 x 708 1456 x 1092 1408 x 1056 704 x 528 1504 x 1128 448 x 336 960 x 720 1472 x 1104 1472 x 1104 736 x 552 1536 x 1152 464 x 348 976 x 732 1488 x 1116 1536 x 1152 768 x 576 1568 x 1176 480 x 360 992 x 744 1504 x 1128 1600 x 1200 800 x 600 1600 x 1200 496 x 372 1008 x 756 1520 x 1140 512 x 384 1024 x 768 1536 x 1152 528 x 396 1040 x 780 1552 x 1
44. 768 px 326 px 0 0 63 px 63 px gt 768 px 432 px 1 333 1 4 3 384 px 288 px 64 px 64 px 0 0 gt 512 px 288 px 1 333 1 16 9 AN 384 px 288 px 0 0 0 0 gt 512 px 288 px 1 7777 1 16 9 512 px 288 px 0 0 0 0 gt 512 px 288 px 1 85 1 512 px 276 px 0 0 6 px 6 px gt 512 px 288 px 2 0 1 512 px 256 px 0 0 16 px 16 px gt 512 px 288 px 2 35 1 512 px 218 px 0 0 35 px 35 px gt 512 px 288 px 1 333 1 4 3 192 px 144 px 32 px 32 px 0 0 gt 256 px 144 px 1 333 1 16 9 AN 192 px 144 px 0 0 0 0 gt 256 px 144 px 1 7777 1 16 9 256 px 144 px 0 0 0 0 gt 256 px 144 px 1 85 1 256 px 138 px 0 0 3 px 3 px gt 256 px 144 px 2 0 1 256 px 128 px 0 0 8 px 8 px gt 256 px 144 px 2 35 1 256 px 108 px 0 0 18 px 18 px gt 256 px 144 px Pillarbox Partial Width Full Height Full Width Full Height Letterbox Full Width Partial Height Anamorphic Width Full Height Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 43 Example implementations of aspect ratio conversion To assist in visualization the following figures graphically illustrate the aspect ratio conversion outlined in the preceding table 4 3 to 16 9 Conversion Table Reference Diagram Variant where Black Bars are inserted at the time of transcoding or encoding k FULL VIDEO FRAME FULL VIDEO FRAME k FULL VIDEO FRAME J z zE 7 z jom TE x a gfe 2s gt 9 Q a
45. Additionally they saw high broadband adoption above 5Mbps of 42 up 38 from the same quarter in 2010 These details and other relevant information can be found in these documents Adoption Trends Report http www akamai com dvS and State of the Internet White paper http www akamai com stateoftheinternet Video Bitrate Allocation Bitrate calculation is one of the critical parts of the encoding process It determines the how much data can be packed into the specific stream and what kind of quality factor can be created as a result Denoising Degraining Deblocking Preprocessing Operations Film grain can add a lot of unnecessary artifacts during the encoding process Grain is seen as part of the picture so the encoder will have a hard time distinguishing it from the picture itself Film grain and noise can eat up a large amount of your bitrate in the encoding process as the grain pattern changes completely from frame to frame Degrain and denoise filters can be applied to eliminate graininess in a video Deinterlacing Content When content is produced for broadcast interlacing is used to improve motion fidelity and reduce required bandwidth to push through the highest possible picture quality to the display device This is a standard technique in broadcast in web video it is not deinterlaced or progressive video is used for web delivery Computer monitors are not designed to display interlaced content so interlacing is unnecessary
46. Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 512x288 ee p 450 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP FS 512x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP FS 512x288 SaS P 800 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 6 IP FS 512x288 SaS P 1200 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 7 IP FS 768x432 SaS P 1400 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 8 PFS 1280x720 SaS P 1700 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 9 IP FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 10 IP FS 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 11 FS 1920x1080 SaS P 4200 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 12 FS 1920x1080 SaS P 5300 CBR 2pass H 264 CAVLC H 4 2 1 1 Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 Container Stream X GOP IDR Ref Frms SR wtP wtB 8x8 Trsfm 1 IP 192x144 SaS P 150 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 p IP 192x144 SaS P 250 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel
47. Cnn Ecce 1280x720 SaS P 1500 ER H 264 CAVLC H 4 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 7 FS 1280x720 SaS P 2000 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 8 FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 9 FS 1280x720 SaS P 3000 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 10 FS 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 11 FS 1920x1080 SaS P 4000 CBR 2pass H 264 CAVLC H 4 2 2 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 12 FS 1920x1080 SaS P 5000 CBR 2pass H 264 CAVLC H 4 2 2 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 13 FS 1920x1080 SaS P 6000 CBR 2pass H 264 CAVLC H 4 2 2 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 Picture Aspect Ratio 4 3 matched to 16 9 picture height Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant VIDEO Basic Bitrate H 264 Advanced Stream Picture Size Bitrate GOP Size GOP IDR IDRFrq Ref Frms 8x8 Trsfm 1 IP 384x288 SaS P 300 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 384x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 384x288 SaS P 900 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes No Y
48. Faststart http www datagoround com lab The best way to handle the moov atom location however is to set it during the compression and muxing portion of the encoding process This minimizes the probability of the moov atom inadvertently being placed at the end Importance of moov atom location As mentioned earlier positioning the moov atom at the beginning of the file structure expedites the playback experience and access to the data payload for decoding and presentation by the client player This is especially true for progressive delivery where the moov atom data must be received before playback will begin However another vital reason for having the moov atom at the beginning relates to the file server and CDN relationship in RTMP streaming When the user requests a video asset via RTMP Flash Media Server checks for availability of the asset on the local cache If FMS does not locate the asset locally it then requests it via a local service while leveraging HTTP cache hierarchy This is a crucial point initially Flash Media Server requests a range at the beginning of the file to get the table of contents If FMS sees that the metadata is stored at the end of the file it then requests a range at the end of the file where metadata is stored and then it requests the file from the beginning again Since range requests are not cacheable and because they can overlap this Video Encoding Cookbook and Profile Guidelines for the
49. Flash Platform White Paper 41 Aspect Ratio Conversion Active Video Frame Aspect Ratio AVFX 1920x1080 1088 FullHD 1 333 1 4 3 1440 px 1 333 1 16 9 AN 1440 px 1 7777 1 16 9 1920 px 1 85 1 1920 px 2 0 1 1920 px 2 35 1 1920 px 1792x1008 1 333 1 4 3 1344 px 1 333 1 16 9 AN 1344 px 1 7777 1 16 9 1792 px 1 85 1 1792 px 2 0 1 1792 px 2 35 1 1792 px 1536x864 1 333 1 4 3 1152 px 1 333 1 16 9 AN 1152 px 1 7777 1 16 9 1536 px 1 85 1 1536 px 2 0 1 1536 px 2 351 1536px 1280x720 720p 1 333 1 4 3 960 px 1 333 1 16 9 AN 960 px 1 7777 1 16 9 1280 px L651 1280 px 2071 1280 px 2 39 1 1280 px 1024x576 1 333 1 4 3 768 px 1 333 1 16 9 AN 768 px 1 7777 1 16 9 1024 px 1 85 1 1024 px 2 01 1024 px 2 35 1 1024 px Legend AVFy 1080 px 1080 px 1080 px 1038 px 960 px 818 px 1008 px 1008 px 1008 px 968 px 896 px 762 px 864 px 864 px 864 px 830 px 768 px 654 px 720 px 720 px 720 px 692 px 640 px 544 px 576 px 576 px 576 px 554 px 512 px 436 px Pillarbox Partial Width Full Height Letterbox Full Width Partial Height Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper Black Bars Right 224 px 0 0 0 0 0 224 px 0 O O O Oo 192 px 0 O O O O 160 px O O O O 128 px 0 O O O eee Left 224 px 0 0 0 0 0 224 px 0 0 0 0 0 192 px O O O O 160 px O O O O 128
50. G video Digital video A bit stream that includes video audio or data It represents the preliminary stage of the Packetized Elementary Stream PES Electronic Industries Alliance A point in the bit stream that offers random access The process by which DCT cooefficiencients are resized according to the number of times they appear in the bit stream The most frequently repeated coefficients are expressed in the smallest word length decreasing the total number of bits need to represent a single frame Four character code used to identify data types For the purposes of this document this term is used for video and audio codecs Lines of spacial information for a video signal Group of Pictures A set of pictures used for temporal encoding of MPEG video High definition Instantaneous decoding refresh ISO IEC 14496 10 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 59 l frame Inter frame prediction ITU Level Mbps Macroblock Motion Prediction MC Motion Vector ME MPEG PAT Packetized Elementary Stream PES Payload Packet PES Packet PES Packet Header PID Profile P frame PMT PRX PSI PTS SD SDI SEI SPTS Spacial Encoding SPS PPS Temporal Encoding An intra coded frame or a frame encoded without reference to any other frame l frame acts as a reference for predicted P frame and Bidirectionally predicted B frame pictures in a comp
51. Table of Contents 1 Introduction 1 Scope 2 History of Video in Flash 4 Adobe Flash Player 10 x and later 6 Assumptions 7 Transcoding Workflow Setup and Verification 29 Improving Overall Video Quality 56 Performance 56 Video Player Design Considerations 58 Conclusion 59 Glossary 61 Reference Materials 62 Addendum A Video encoding and transcoding recommendations for HTTP Dynamic Streaming on the Adobe Flash Platform NOTE All abbreviations and acronyms referenced in this paper are defined in the Glossary on page 59 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform Video on Demand Encoding Transcoding Guide for Desktop End Users By Maxim Levkov Adobe Systems Inc encodingcookbook adobe com VERSION 1 3 Introduction Video compression is indeed both an art form and a highly technical process Many compressionists and website developers responsible for preparing video for web delivery today don t fully understand the details behind the settings in their encoding software these details are often hard to find and are often only discussed in scholarly technical papers This comprehensive technical whitepaper is intended as a reference guide for those whose aim it is to improve the overall quality of their encoded video producing the very best quality possible Best practices quality control testing techniques and specific encoding considerations for deliv
52. VIDEO FRAME FULL VIDEO FRAME FULL VIDEO FRAME u 9 wi Lu ui k O O O m gt gt 5 3 a a a 5 5 gt L L i L 45 1 85 1 to 16 9 Conversion Table Reference Diagram FULL VIDEO FRAME Variant where Black Bars are inserted at the time of transcoding or encoding FULL VIDEO FRAME FULL VIDEO FRAME Ne LHOISH z z z Li Ww u O O O gt gt gt J a J 5 5 5 m Wwe Li lt 1 85 gt 16 a 16 WIDTH WIDTH lt q INGESTED gt lt ENCODED gt lt DISPLAYED 1 85 1 to 16 9 Conversion Sample Implementation FULL VIDEO FRAME E o ie lt p Lu wi Lu 2 S iL Ww Li O O O 2 1 gt i a 5 gt gt gt a a a gt gt re Ww i i d amp i Ie 1 85 Figure 53 1 85 1 to 16 9 Variant where Black Bars are inserted at the time of display and or playback 1 85 1 to 16 9 Conversion Table Reference Diagram FULL VIDEO FRAME FULL VIDEO FRAME FULL VIDEO FRAME ss F So T l l z z z z u TN u O O O m 1 e w m gt gt gt a J a ra r md L A L L 1 85 k 1 85 g 16 7 je WIDTH e INGESTED gt lt ENCODED gt l
53. We Q 5 gt ix lt gt a 4 co m J gt D u TA H LL is k 4 16 16 WIDTH WIDTH a INGESTED gt lt ENCODED a DISPLAYED 4 3 to 16 9 Conversion Sample Implementation k FULL VIDEO FRAME k FULLVIDEO FRAME _ k FULLVIDEO FRAME i R i DR 7 if hs gt w uw Ww g 2 w l iE xt aE uw x O O a m O m r af E ae ae gt Sx gt I a J Wa a z E i E L Y Y m 4 p 16 16 WIDTH WIDTH Figure 49 4 3 to 16 9 i Variant where Black Bars are inserted at the time of display and or playback 4 3 to 16 9 Conversion Table Reference Diagram k FULL VIDEO FRAME k FULLVIDEO FRAME FULL VIDEO FRAME wi Lu uu z z z 2 Be 2 jra x iL x lt O O O oo ao m e a A 3 w S 9 9 S gt gt i 3 7 a a o Ee m 5 5 5 Wwe LL Ww H L _E a 4 d I 4 4 16 WIDTH lt a INGESTED gt lt ENCODED q DISPLAYED 4 3 to 16 9 Conversion Sample Implementation k FULL VIDEO FRAME ER A ug 2 2 z 4 Figure 50 4 3 to 16 9 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper FULL VIDEO FRAME oa FULL VIDEO FRAME k FULL VIDEO FRAME z w BLACK BARS s
54. a moov atom at e mvhd 100 0464 hdr 8 the beginning Bagh rak 36545 0s8ec1 hdr 6 ae lalate oo khad 84 0454 hdr 8 Ee india 36445 0s8e5d hdr 8 a SGM tak 62687 Oxfdd hdr 8 WH ween La D khad 84 0x54 hdr 8 mdial 62597 Oxtd b hdr 8 heel 2040 0748 hdr 8 om mdat O 0x0 hdr 8 mdat 53490044 0x3300a6c hdr 8 processed file with edts atom Figure 4 An MP4 file created by AtomicParsley and analyzed by MP4Muxer MP4Creator Illustrates removal of invalid edts atom and moov atom relocation to the beginning of the structure Additional Resources There are many useful articles tutorials and software tools available to assist in processing the moov atom MP4 Standard Overview MP4 Registration Authority MP4 creator AtomicParsley MP4 Faststart MP4box MP4 Audio FAQ TechBlog Wikipedia MPEG 4 ISO info Wikipedia Flash Video List of various atoms within an MP4 compliant container FLVCheck MP4 checker http mpeg chiariglione org standards mpeg 4 mpeg 4 htm http www mp4ra org specs html http mp4creator sourceforge net http atomicparsley sourceforge net http www datagoround com lab http gpac sourceforge net doc_mp4box php http mpeg chiariglione org faq mp4 aud mp4 aud htm http renaun com blog 2010 06 qtindexswapper 2 more 518 http en wikipedia org wiki ISO_base_media_file_format http en wikipedia org wiki Flash_Video
55. ackBerry iOS devices personal computers and televisions Media related features of AIR 3 include Background audio playback new feature in iOS already works on Android Because of the unique multi tasking implementation of iOS it was previously not possible to continue playing audio from an AIR app that wasn t active Starting in AIR 3 the application will continue running when it s placed in the background However all screen updates will be disabled in order to preserve battery life and to comply with the multitasking requirements of iOS CameraRoll support for iPad Although CameraRoll was technically already supported on the iPad support has been improved in AIR 3 Hardware accelerated video mobile AIR 2 5 brought hardware accelerated video to TVs with StageVideo now AIR 3 brings StageVideo to mobile as well Front facing camera support iOS and Android The ActionScript Camera APIs now have access to both front and rear facing cameras on iOS and Android devices for Android devices version 2 3 or later is required H 264 video encoding desktop only You can how encode video captured through the Camera class in H 264 Multichannel audio digital output AIR for TV only Adobe AIR for TV can now play Dolby Digital Plus 5 1 Surround and DTS 5 1 audio streams Developers can detect a device s multichannel audio capabilities and stream the correct audio bitstream both from ActionScript and through RTMP
56. al the particular problem If you are seeing a problem in the media clip but cannot link this problem with specific reason of this issue you need to disjoin magnify and isolate the problem This is why it is not enough to have one type of synthetic testing these tests must be complex and comprehensive to reveal the entire spectrum of problems and sometimes need to be long enough and repetitive enough to reveal the issues due to cumulative nature of some problems e g AV Sync Buffer occupancy and removal etc Profiling of typical common used settings is the best approach for achieving optimum output results However such an approach may lead to creation of a large number of profiles which can be difficult to manage Because of this many people choose to maintain as few profiles as possible serving most typical situations It is recommended however that many specialized profiles be maintained for the highest quality output Using Technical Testing Content The following pages will detail the use of synthetic dynamic test patterns specially designed by VideoQ to diagnose problems in various elements of profile creation workflow setup and verification The following test patterns are discussed Levels Colors and Color Matrix LINYRGB Y R G B Gradation amp PLUGE CB Color Bars SMPTE 60 fps EBU 50 fps Scaling Cropping and Sharpness e ST Horizontal amp Vertical Rulers Static Radial Mire amp Crop Marker
57. and Profile Guidelines for the Adobe Flash Platform White Paper 88 AI Adobe Adobe Systems Incorporated 345 Park Avenue San Jose CA 95110 2704 USA www adobe com Acknowledgements The author would like to thank the following people for their valuable assistance in the development of this document Lisa Larson Kelley for excellent editing creative insight and for outstanding day to day cooperation on every aspect of this cookbook Ashley Still for taking a chance with me on this unprecedented endeavor for her leadership and for the opportunity itself Pritham Shetty for entrusting me to do this project David Devisser for active participation and help resolving day to day issues Desiree Motamedi for paving the way for the endearing presentations and helping to acquire great content Jens Loeffler for unprecedented day to day cooperation on the many tasks this project has entailed Victor Steinberg of VideoQ for meticulous technical oversight lots of time and extraordinary cooperation excellent ideas and great engineering in creation of specialized dynamic test patterns Matthew Kaufman for straightforward feedback and unparalleled insight into the inner workings of Flash and for help in putting together the Encoding HTTP Delivery for Flash addendum section of the cookbook Kevin Towes for keeping me in tune with latest developments and then some Srinivas Manapragada for helping to put forth the Encoding HTTP De
58. and can create artifacts thus it is not advisable to have content remain interlaced for web delivery If your source content is interlaced it is advised that a method of motion compensated or motion adaptive deinterlacing be applied prior to any other operation Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 29 Progressively segmented Frames PsF are full frames of video The PsF format was developed to transmit progressive images through an interlace environment using legacy hardware connectivity A PsF signal could often be mistakenly treated as interlaced source The essence of PsF content is exactly the same as progressive content So an important part in PsF processing therefore it is that it should not be treated the same as interlaced source Any professional ingest systems should detect the existence of the PsF format and output the frames as progressive video not as interlaced If you are confident that the incoming signal is PsF and the ingest system is treating it as interlaced then check the input profile settings to make sure that the output is not interlaced i e 30 PsF signal in gt 30 FPS progressive file out Inverse Telecine When it is known that content has been shot at 24 or 23 976 progressive frames per second but it was later telecined for broadcast to 29 97 interlaced fields per second using 3 2 or similar pulldown process it is strongly recommended that the content be reversed back f
59. as compromised and is then used as input for the next coding process then the final output will be compromised as well resulting in suboptimal picture and audio quality Figure 1 manufacturing factory making tangible goods The following are the key elements that are important to maintain throughout the encoding process in order to achieve the highest quality output and maintain the creative integrity of content Video Levels scheme 16 235 and 0 255 Y R G B Audio levels Audio Video Synchronization Video Scaling Video Color Matrix 601 709 and YUV RGB Bitrate Source intermediate and output Frame Rate Conversion ly l7 QA QC Test Points Monitor Display Figure 1 The transcoding process Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 7 Testing Overview Each step in the encoding process needs to be examined to assure integrity Test patterns are helpful at each step to reveal artifacts that are undetectable to the human eye Just because the final video and audio may look fine does not mean that all of the transformational stages were performed correctly It simply means that you cannot see what is going on behind the scenes In some cases the entire supply chain needs to be tested in order to make sure that all of the integral elements of that chain are functioning properly In other cases when all stages have been tested and vali
60. at the next scene cut or the next maximum interval whichever happens first This has the possibility of causing misalignment of all future keyframes after a scene cut the scene cuts often match up and if they don t at that one then the next one they do Of course there is a possibility of long runs 10 seconds or more of misalignment however and therefore it is not recommended a See Max GOP size with scene detection on page 5 and 6 The best case would be an encoder which allows encoding one bitrate i e the highest with scene cut detection plus either a fixed or maximum keyframe interval writing out a list of where those keyframes are This list would then be used to encode the rest of the bitrates with forced keyframe placement at exact points matching the first encoded file Another best case would be the encoder toolset that allows for placement of intra coded P frames or non IDR keyframes in between IDR keyframes within closed GOP at scene change Keyframes generated at scene cuts and forced at points should always be in alignment When choosing a keyframe interval selection method consider a Best case is scene cut detection and maximum interval based keyframe point selection done in a first pass for one rate then used by all other bitrates b Asa fallback use scene cut detection and keyframes at fixed intervals from start of content NOT at maximum intervals since last keyframe c Worst case keyframes at fixed
61. by scaling Figure 23 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 20 Scaled Up or Down Picture Figure 24 Zoomed in cut out of sections from ST test depicting the use of radial plates in scaled up down size and the use of scaling is observed Color lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Figure 24 depicts loss and or distortion of fine details Sharpness Test Usage Optimal Sharpness Optimal Sharpness Control Settings Full contrast of fine details in all directions perfect digital sharpness no blur no ghost images Figure 25 Zoomed in cut out of sections from ST test depicting the sharpness and optimal control of sharpness Color lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 21 Sharpness Test Usage Not Enough Sharpness Not enough sharpness 1 Fine details contrast reduced 2 Central cross blurred Figure 26 Zoomed in cut out of sections from ST test depicting the sharpness and lack of sharpness Color lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Too Much Sharpness 7 Ja j Fi Hii Zz f Too much sharpness 1 Fine details distorted overenhanc
62. cast providing one or a few to many streaming of continuous live video and audio live video chat using RTMFP groups Requires Stratus http adobe com go stratus or Flash Media Server 4 or later Buffered stream catch up allows developers to set a target latency threshold that triggers slightly acceler ated video playback to ensure that live video streaming stays in sync with real time over extended playback periods Fast Switch enhances the Dynamic Streaming capability first introduced in Flash Player 10 and FMS 3 5 to improve switching times between bitrates reducing the time to receive the best viewing experience for available bandwidth and processing speed Users no longer need to wait for the buffer to play through resulting in a faster bitrate transition time and an uninterrupted video playback experience regardless of bandwidth fluctuations Requires Flash Media Server 4 or later Microphone Access desktop only allows access to binary data of the live and continuous waveform coming from the microphone to create new types of audio applications such as audio recording for transcoding karaoke vocoder voice manipulation sonographic analysis pitch detection and more Adobe AIR 3 The Adobe AIR runtime enables developers to deploy standalone applications built with HTML JavaScript ActionScript Flex Adobe Flash Professional and Adobe Flash Builder across platforms and devices including Android Bl
63. d and application creation It provides advanced monitoring and reporting on traffic and throughput There are various flavors of RTMP available with Flash Media Server 3 5 and later RTMP Standard unencrypted RTMP e RTMPT RTMP tunneled over HTTP The RTMP data is encapsulated as valid HTTP data This protocol is used when a client s network blocks RTMP traffic e RTMPS RTMP sent over an SSL SSL utilizes certificates and enables secure connections e RTMPE Enhanced and encrypted version of RTMP RTMPE is faster than SSL and does not require certifi cate management as SSL does supported with Flash Player 9 0 115 0 or later and Adobe AIR RTMPTE Encrypts the communication channel tunneling over HTTP supported with Flash Player 9 0 115 0 or later and Adobe AIR The key benefits over SSL RTMPS are performance ease of implementation and limited impact on server capacity e RTMFP Peer to peer networking protocol that enables Flash Player clients to share video audio and data over a direct P2P connection Requires Flash Player 10 or later and an introduction service such as Stratus or Flash Media Enterprise Server 4 or later Utilizing the appropriate RTMP type Flash Media Server can send streams through all but the most restrictive firewalls and help protect rights managed or sensitive content from piracy Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform HTTP Dy
64. d applications based on the Adobe Flash Platform It enables developers to easily assemble pluggable components to create high quality full featured playback experiences Whether you are designing an application from scratch or building it using OSMF the following best practices should be followed in order to deliver the best overall playback experience General Best Practices Some specific guidelines to follow for the best playback performance in Flash Player include Avoid scaling the video object or playback component match the video source size Make sure that video size is divisible by 16 for best perceptual and playback performance Conform player s aspect ratio to the video aspect ratio and pad it with black bars if necessary Turn off smoothing and deblocking when using the video object Position the video object on full coordinates e g x 0 y 0 width 320 height 240 Avoid using alpha overlays Use visible false not alpbha 0 Avoid placing overlays above video object if possible Don t apply 3D transformations to video unless it is very low bitrate In addition to these performance guidelines some general rules for interactivity should also be considered when designing a player Of course video players will have a specific set of expected behaviors such as play pause stop fast forward rewind mute and so on Users also appreciate having a thumbnail preview of the video and generally don t want a video tha
65. data outside of 16 235 scheme Figures 63 and 64 show how such valuable picture data may get lost in the transformational process if excessive boost is applied Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 51 Figure 63 Original source 0 255 scheme Notice black and white levels excellent picture details in darker and lighter areas Image of Nefertiti source Wikipedia under GNU author unknown Figure 64 Example of wrongful assumption erroneously expected 16 235 scheme and transformed to 0 255 scheme notice clipping in black and white levels and loss of picture detail in darker and whiter areas RGB scheme of 0 255 does not foresee levels below black and above white which exist in YUV scheme 16 235 Because of this transformation of 16 235 to 0 255 done once simply clips levels with no major distortions introduced except banding However if 0 255 gets interpreted erroneously as 16 235 then black and white crash happens 16 levels of close to black and 20 levels of close to white will be clipped This issue is irrecoverable unfortunately even though one would try to reverse it by converting it to 16 235 this still will not help It will make the picture worse and add banding This can happen not in the situation where picture metadata was bad or wrong but when it does not exist at all Keep in mind that when you are viewing the picture on a PC monitor there are a number of permu
66. dated it is necessary to test only some of the stages to establish confidence in the final output Of course human error is always a possibility so validation of foundational elements i e scaling color transformation audio video sync etc can be essential The diagram above depicts left to right the additive process of establishing audio video quality confidence However sometimes you may choose to process your confidence testing selectively from right to left of the transcoding process to discover errors through a process of elimination The audio visual quality control process makes use of synthetic test patterns and other technical testing content i e synthetic dynamic test patterns concatenated in sequence with real video and is divided into four levels 1 Subjective audio visual observation and quality estimation e g playback in Flash Player AIR VLC Elecard etc 2 Operator driven objective measurement of audio and video performance through special instruments and test patterns e g Tektronix Interra Systems Sencore VideoQ etc 3 Fully automated robotic video quality control e g VideoQ VQL VQMA Interra Systems Baton Tektronix Cerify etc 4 Fully automated robotic checking of syntax metadata optionally combined with video and audio quality control e g Interra Systems Baton The use of complex and comprehensive technical testing content in your workflow provides confidence in the results of transcoding
67. e it will try to re sync itself constantly Use audio test patterns to ascertain confidence in audio processing systems and audio video synchronization tests to make sure that neither audio nor video drifts apart Usually if audio errors are not severe audio video synchronization errors do not occur immediately Because they may be subtle their effects may occur over time making audio video synchronization errors cumulative in nature These errors can occur either in several repeat cycles of 10 30 minutes each or past a 10 20 minute continuous play period therefore making this type of issue difficult to catch unless persistently tested for and observed Keyframe Alignment Keyframe alignment is related to the continuity of keyframes across all of the segments in multibitrate encoding for Dynamic Streaming See Appendix A Video Encoding and Transcoding Recommendations for Adobe Flash HTTP Dynamic Streaming for expanded explanation on keyframe alignment Playback Capability of a Client System When considering the encoding parameters for a desired audience it is vital to understand what kind of systems the video is intended to work with Whether there is a support for GPU acceleration or whether there is enough contingency scenarios built in to the player s logic to provide a high quality viewing experience Careful planning around the prospective target audience systems will provide a good foundation for encoding parameters in synergy with desi
68. e web a choice was made to select video that was intended for broadcast Then during the transcoding transformation process the guidelines were not specified to maintain video in the YUV 16 235 level scheme and through some interim process video was transformed to the RGB 0 255 level scheme Then transformed video was used as a source for an editing operation while being transformed back to the YUV 16 235 level scheme In this transformational phase of video going from YUV to RGB to YUV the picture loses its fidelity and any substantial details are washed out Any further transformations between YUV and RGB will worsen the picture even further The choice of LINYRGB synthetic pattern from VideoQ technical test collection was made for better demonstration of transformations that take place in such a process Figure 62 Considering that the transformation of YUV 16 235 to RGB 0 255 needs to happen one way or the other it is important to understand that it should happen at the end of the chain and not earlier because at the display side RGB 0 255 transformation will happen anyway By making certain that this transformation does not happen earlier than at the end you are avoiding chance of further clipping and irreparable damage of color scheme transformations earlier than necessary Also similar damage can be done by boosting gain However at the end of the day anything outside of 16 235 will be lost or clipped so don t place any valuable picture
69. ect by smoothing the P to I frame transition The side effect of non IDR frames that they can reduce seeking precision or increase decoder start up time Flash can only change bitrates at IDR keyframe intervals referred to as keyframe from here forward Thus the selection of keyframe distance must be carefully considered Keyframe interval affects seeking performance in file playback decoder playback start up time for network streaming recovery time from network errors and overall picture quality It is suggested to keep the keyframe interval at a static distance of no less than 2 seconds for short form content and no less than 3 seconds for long form content across all bitrates See above for suggested ranges If keyframes are spaced closer than 2 seconds resulting response is going to be better for the heuristic bitrate changes but video quality will suffer Keyframes are much larger than intermediate frames If the keyframe rate is taken from one every 2 seconds to one every 1 second the data rate is nearly doubled if everything else is held constant Calculated on the basis of 2x the number of large keyframes less the number of intermediate frames no longer needed a negligible amount resulting in almost 2x the rate Generally the goal is to provide a file at a given download bitrate thus not all elements can be held constant Instead the video quality must be reduced proportionately in order to get the data rate back down
70. ed 2 Visible ghost images next to central cross Figure 27 Zoomed in cut out of sections from ST test depicting the sharpness and excess of sharpness Color lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 22 Interlacing Frame Rate Conversion and Cadence Frame Rate Conversion FRC Dynamic Test De interlacing Frame Rate Conversion amp Cadence Correction Check Victor Steinberg Figure 28 Depiction of a dynamic test pattern of de interlacing frame rate conversion and cadence correction FRC Test Usage Bursts 1 amp 2 Horiz tal Busts 1 amp 2 Horizontal Bursts 3 amp 4 Obli e Bursts 3 amp 4 Oblique Texture Period Texture Period Bursts 1 amp 4 2 pixels Bursts 1 amp 4 2 pixels Bursts 2 amp 3 4 pixels Bursts2 amp 3 4 pixels V Speed 1 V Speed 2 Odd Number of pixels per fra n By n Number of pixels per frame Victor Stein berg Figure 29 Depiction of a dynamic test pattern of de interlacing frame rate conversion and cadence correction with usage commentary Colored lines with arrows and colored text are not part of the test pattern and are superimposed for explanation purposes only Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 23 Figure 30 Snapshots of FRC dynam
71. en s Loeffler s blog http www flashstreamworks com archive php post_id 1253805570 For more details about full screen support see http www flashstreamworks com archive php post_id 1241799250 Conclusion As anyone who has been tasked with media encoding can attest it is an art form as well as a science In this paper we have tried to address both the scientific aspects as well as the nuanced tailoring of settings to achieve the highest possible quality for video on demand delivery on the Flash Platform As the requirements and expectations of media delivery evolve this paper will be expanded with additional content and updated recommendations Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 58 Glossary The following table defines acronyms and abbreviations used in this document 608B 708B ASF AU CBR B frame Block BER CEA Compression CPB CPB Delay Discreet Cosine Transform DCT DV Elementary Stream ES EIA Entry point Enthropy Coding FourCC Frame GOP HD IDR Refers to closed captioning in the EIA 608B formerly known as CEA 608B format Refers to closed captioning in the EIA 708B Section Nine format However the US FCC July 2000 Report and Order is actually the governing document The Report and Order goes beyond the recommendations of EIA 708B Section Nine Advanced Systems Format A container file format for holding audio and video ele
72. erations that help make the mostof this feature are addressed in the Video Player Design Considerations section of this document Adobe Flash Player 10 1 introduced a wealth of new video and audio features as well Hardware acceleration for graphics and video along with many other performance improvements i e rendering scripting memory utilization start up time battery and CPU optimizations HTTP Dynamic Streaming support Adobe s multibitrate adaptive streaming delivery solution Content protection powered by Adobe Flash Access to support a wide range of business models including video on demand rental and electronic sell through for streaming as well as download Smart seek allows you to seek within the buffer and introduces a new back buffer so you can easily rewind or fast forward video without going back to the server reducing the start time after a seek Smart seek can speed up and improve the seeking performance of streamed videos and enable the creation of slow motion double time or instant replay experiences for streaming video Requires Flash Media Server 3 5 3 or later Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform Stream reconnect allows an RTMP stream to continue to play through the buffer even if the connection is disrupted Requires Flash Media Server 3 5 3 or later Peer assisted networking using the RTMFP protocol now supports application level multi
73. errors or inaccuracies that may appear in the informational content contained in this guide This article is intended for US audiences only Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization Adobe and the Adobe logo Adobe Integrated Runtime AIR ColdFusion Flash and Flash Media Server are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and or other countries Adobe Systems Incorporated 345 Park Avenue San Jose California 95110 USA Notice to U S Government End Users The Software and Documentation are Commercial Items as that term is defined at 48 C F R 2 101 consisting of Commercial Computer Software and Commercial Computer Software Documentation as such terms are used in 48 C F R 12 212 or 48 C F R 227 7202 as applicable Consistent with 48 C F R 12 212 or 48 C F R 227 7202 1 through 227 7202 4 as applicable the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U S Government end users a only as Commercial Items and b with only those rights as are granted to all other end users pursuant to the terms and conditions herein Unpublished rights reserved under the copyright laws of the United States Adobe Systems Incorporated 345 Park Avenue San Jose CA 95110 2704 USA For U S Government End Users Adobe agrees to c
74. ery on the Flash Platform are discussed While highly technical in nature it is meant to introduce advanced encoding techniques to those who may not adequately understand what is happening behind the UI in their compression software providing greater insight into the encoding process and ultimately helping to deliver the very best playback experience Scope This document addresses techniques best practices recommended settings and tools for encoding video on demand VOD assets that will be streamed by Flash Media Server and played back in Flash Player or on AIR The objective of this guide is not to reiterate the fundamental knowledge put forth in an encoding transcoding software user manual but rather to draw on the experience and technical benefits that make the Flash Platform the popular choice for video on the Internet and beyond while advancing knowledge through explanation of key concepts that help compressionists and video site developers to achieve the highest quality playback possible Along with the guide the following elements will be made available to help solidify and reproduce concepts presented optimized profiles technical video and real video segments The best practices and settings outlined in this document are designed to operate with Flash Media Server 3 5 and later and Flash Player 10 0 32 x and later In order to be compliant with quality and performance optimizations these versions of the server and player a
75. es 1 4Pel 1 4 IP 384x288 SaS P 1200 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP 384x288 SaS P 1500 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 77 Variant 1 AUDIO Variant 1 AUDIO VIDEO Combined Bitrate Stream Encode Mode Bitrate SR kHz A Stream V Stream 1 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 1 364 1 2 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 2 664 2 3 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 3 964 3 4 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 4 1264 4 5 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 5 1564 5 6 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St COR 7s 7 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 7 2064 7 8 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 8 2564 8 9 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 9 3064 9 10 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 10 3564 10 11 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St aro o 4o uoo 12 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 12 5064 12 13 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 13 6064 13 14 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 14 8064 14 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 78 Variant 2 Variant 2 incorporates encoding best practices for smooth switching among bitrates for use in desktop environment This variant details recomme
76. evel scheme is concerned Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 49 Transformation of 0 255 RGB to 16 235 YUV YUV Scope One line of first frame YMax 235 RARGBMax 235 Selected Line Number 270 Yy 7 l 7 w Mapped Down saat i 235 ne ES R RSS SARE FERS ES E E EES eee Fee 200 gt gt Levels 130 i 100 i oo s so Pret A Gd OS te ai 16 so 7 A f 2 34 100 cae RIS pow ee ARO EN TERR 1E Fw et UR Fe eee Lees ER ERE AEN a Pan areal Ue freee Weta ere A i S I o o 100 200 300 400 500 ot 700 Looe 900 1000 1100 1200 1300 1400 1508 00 1700 1800 1500 2000 Zoomed scope waveform of Mapped Up Jo Zoomed fragment of a gradient ramp distorted Figure 61 Depiction of Linear YRGB test pattern transformation from 0 255 RGB to 16 235 YUV with color matrixing and range mapping Notice banding of color gradient ramp and slightly distorted waveform on the ramp no potential danger of clipping i e safe mode boost proof Player will do final transformation of level mapping from 16 down to 0 and 235 up to 255 Typically when computer graphics originated using the RGB 0 255 scheme and later converted to YUV 16 235 light distortions are introduced in addition to banding The choice of LINYRGB synthetic pattern from VideoQ technical test collection was made for better demonstration of transformations that take place in
77. first group 256x144 192x144 is targeted to reach low bandwidth end client most likely with in page use The second group 512x288 384x288 aimed to reach low high range bandwidth end client with in page use The third group 768x432 576x432 is aimed to medium bandwidth end client with in page and full screen use The fourth group 1280x720 is aimed to reach medium high bandwidth end client with in page and full screen use The fifth group 1920x1080 is aimed to reach high bandwidth end client with full screen use Variant 4 VIDEO Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant VIDEO Basic H 264 Advanced Bitrate Stream PM Picture Size ST Bitrate GOP IDR Ref Frms SR wtP wtB 8x8 Trsfm 1 IP 256x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 512x288 SaS P 500 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP FS 768x432 SaS P 1000 CBR 2pass H 264 CAVLC M 42 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP FS 768x432 SaS P 1700 CBR 2pass H 264 CAVLC M 4 2 1 F Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 6 IP FS 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Ye
78. formance results or at least divisible by 8x for good performance results 640x360 768x432 896x504 Performance CPU Processing Limitation The CPU performance at the end stations is a significant determinant of their capabilities CPU consumption depends almost linearly on image size The Encoder require 2 4x CPU cycles than the Decoder CPU performance and display size limit the maximum number of participants decoders and their respective transmissions that the end station can decode and display Moreover the graphics chipset or GPU may offload from the processor tasks such as YUVRGB conversion 4 2 0 to 4 2 2 conversion video scaling postprocessing and even certain stages of the decoding process Video Player Design Considerations The Flash Platform offers a comprehensive set of features ranging from real time interaction to complex 3D transformation It is possible to have an application that supports video playback that also contains a wide range of these sophisticated features and effects each of them having varying impact on overall performance Therefore it is important to understand how to optimize certain Flash Player features in video playback applications especially when delivering high definition content One efficient way to avoid many pitfalls in the design of video playback applications is to utilize Open Source Media Framework OSMF OSMF is an open software framework for building robust feature rich video players an
79. g with other atoms that define other track and movie characteristics In this tree like hierarchy the moov atom acts an index of the video data It is here that the MPEG 4 muxer stores information about the file to allow the viewer to play and scrub the file The file will not start to play until the player can access this index Unless specified otherwise the moov atom is normally stored at the end of the file in on demand content after all of the information describing the file has been generated Depending on the type of on demand delivery method selected progressive download streaming or local playback the location will need to move either to the end or to the beginning of the file If the planned delivery method is progressive download or streaming RTMP or HTTP the moov atom will have to be moved to the beginning of the file This ensures that the required movie information is downloaded first enabling playback to start right away If the moov atom is located at the end of the file it forces the download of the entire file first before it will start playback If the file is intended for local playback then the location of the moov atom will not impact the start time since the entire file is available for playback right away The placement of the moov atom is specified in various software packages through settings such as progressive download fast start use streaming mode or similar options Software packages
80. gn of the player experience Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 55 Video Dimension Choices A Use Case A video engineering team working on a video player for their company s website has proposed dimensions of 640x480 to follow 4 3 aspect ratio and 854x480 to follow 16 9 aspect ratio These sizes do not follow best practices which advise a divisibility of 16 width amp height Although it is technically possible to use the stretch coefficient of 1 7777 to derive a width that corresponds to their height the height and width in this case is not guaranteed to fall within divisibility of 16 Earlier VP6 and more recent H 264 codecs use 16x16 macroblock subdivisions If they would like to achieve best client performance 16x divisible sizes should be used Of course if they need to scale scaling width should be done first before height in order to maintain picture sharpness It is suggested that they keep the horizontal stretch at a maximum of 30 of the height For instance if looking at 720 w x 480 h then scaling it to 640x480 will still provide the necessary bit reduction and will maintain picture sharpness When resizing the horizontal dimension beyond 30 of the scaling threshold you must then consider resizing vertical dimension as well to maintain aspect ratio Therefore if the original dimensions are 640x480 then the 16x divisible dimension would have to be either 768x432 for best per
81. h Player supports a 44 1 kHz sampling rate Everything below 44 1 gets up sampled at play time So down sampling audio to anything below 44 1 kHz such as 11 kHz or 22 kHz is not advisable unless you have specific bandwidth considerations that cannot be covered by a high efficiency codec such as HE AAC v2 Channel Remapping An audio track typically carries one or more channels of audio Each channel of audio discretely identifies its designated speaker location left right etc in the stereo mode or unidentified channel designation in mono mode Flash Player downmixes all multichannel audio tracks into two stereo channels or single mono channel lineup Bit Depth For bit depth if possible always use 16 bit It has a wide range of values 65 536 The sampling rate and value range of bit depth has a direct relationship the lower the sampling rate the lower the bit depth the lower the bitrate thereby lowering audible quality The higher the sampling rate the higher the bit depth and the higher the bitrate therefore producing higher audible quality Levels Normalization During the audio production process sound engineers typically set audio normalization levels below 0 dB to allow for flexibility within subsequent processing Audio level normalization is a subjective element with each organization setting its own standards The levels could typically range from 6 dBfs to 18 dBfs When processing audio it is imperative to know what the n
82. h as 40 of processing resources that could otherwise be used for some other task As scaling down takes place the picture quality will suffer as well The image will be softer jaggier edges will occur and finer details will be less visible Instead of using a single video file to service different target audiences encode for separate audiences and conditions Whenever possible work from original source and not from subsequently encoded video If at the time of content creation there is an understanding what audience is being targeted it is recommended that designated content for that size be used For example if video is shot specifically for high definition broadcast that same content simply encoded at a smaller dimension may lose detail resulting in a suboptimal viewing experience However if the same content has been specifically shot for web delivery then use of that content is advisable When video is shot at 1920x1080 for instance and it was shot progressively and then processed for interlaced broadcast it is advisable that such source not be used if there is a possibility to create content ata smaller dimension If no other source is available then retaining frame size proportions is advised while producing pre scaled versions of playable files at the time of encoding or transcoding One of the simplistic techniques that is often used for producing downscaled reduced quality video from an interlaced source is to use frame sizes
83. here picture aspect ratio does not change from source state to encode state to display state source Artbeats The following is the table of various frame sizes that are adhering to 2 35 1 picture aspect ratio that is divisible by 16 8 and 4 956 x 400 478 x 200 239 x 100 1912 x 800 956 x 400 478 x 200 2868 x 1200 1434 x 600 717 x 300 1912 x 800 956 x 400 2390 x 1000 1195 x 500 2868 x 1200 1434 x 600 1673 x 700 1912 x 800 Best performance aia Good performance eo ADDU Worst performance 2629 x 1100 2868 x 1200 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 36 Combined table of aspect ratio i e stretch coefficient and corresponding size dimensions of width and height divisible by 16 96 144 192 240 288 336 384 400 432 480 528 576 624 672 720 768 800 816 864 912 960 1008 1056 1104 1152 1200 1 33 4x3 1 3333 128 192 256 320 384 448 512 576 640 704 768 832 896 960 1024 1088 1152 1216 1280 1344 1408 1472 1536 1600 1 78 16x9 1 7777 256 512 768 1024 1280 1536 1792 2048 1 85 1 85 740 1480 2220 2 0 1 2 0 800 1440 1600 2400 2 301 2 35 2 39 956 1912 2868 Note 720x576 amp 720x480 not square pixels Pixel dimensions shown in the table are square pixel dimensions except for 720x576 PAL 720x480 NTSC and anamorphic sizes Video Encoding Cookbook and
84. hronization check test with corresponding White Frame reference What is shown here is a timeline snippet of AV sync test with overlaying frame information to help explain the underlying audio component of the test Pulses O dBfs 1 ms 1000 ms Loud Bursts 6 dBfs 30 ms 1000 ms Low Bursts 40 dBfs 20 ms 100 ms Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 27 CNT in Motion Snapshots in time Figure 34 Depiction of snapshots in time of CNT dynamic test pattern in motion Video APL Average Picture Level changes from very low to almost maximum 100 white for two frames flashing white every one second Two special White Frames are numbered 01 and 00 Audio Pulse hits exactly the middle point of this group of two frames i e the boundary between two White Frames see Figure 34 AV Sync Check Methodology Visual Aural Check Listen to beeping low level 1KHz bursts then much louder 1KHz Loud Burst starting 15ms before main Clap Pulse and observe negative 2 digits Frame Numbers approaching 01 whilst blue Clock Dots are coming closer AV Sync errors can be estimated with about 30ms accuracy Instrumental Measurement Step 1 Display CNT 2 digits Frame Numbers in Video Editor and find the timeline position of two White Frames numbered 01 and 00 Step 2 Find the timeline positions of the Loud Burst and Clap Pulse in the Audio Track AV Sync Errors can be measured with about
85. ic test pattern in motion of de interlacing frame rate conversion and cadence correction Colored arrows depicting direction and colored lines depicting paused moment in time are not part of the test pattern and are superimposed for explanation purposes only The appearance of the bursts may change significantly after sub optimal spatial and or temporal scaling Snapshots above illustrate possible variations They are strongly dependent on Motion Speed and Motion Type Slightly different vertical position increments of odd numbers of frame lines per frame on the left side or even on the right side demonstrates differences in performance between various de interlacers Moving Frequency Bursts Usage De Interlacing Quality Check Methodology i il Figure 31 Zoomed in cut out of moving frequency bursts section from FRC dynamic test pattern Colored arrows depicting direction and colored lines depicting paused moment in time are not part of the test pattern and are superimposed for explanation purposes only Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 24 Frame Rate Conversion and Cadence Correction Check Usage Frame Counter Continuity Drop Freeze Check Observe 3 digit Frame Numbers in Video Editor or similar software tool eCheck the appearance of white Clock Dots there should not be frozen double or missing images no noticeable irregularities Cadence Correction Check
86. im phases of other languages e g English to Russian to German to Japanese to Spanish and back to English the tone of the article is lost and the original idea is no longer there regardless of how accurate the translation process is Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 12 Why Test Allin all the picture may be perceived from to the human eye as being fine however it may not be good enough for downstream processing thus the need for confidence testing with dynamic test patterns Looking at the transcoded media clip for quality analysis is fine but it doesn t tell the whole story and professional compressionists need to know the whole story in order to make qualifying decisions about which variables to focus on in order to achieve optimum profile settings Specially designed professional test patterns remain suitable for accurate measurements even after low bitrate coding heavy scaling and or cropping e g after down conversion for mobile devices If you are observing some sort of a problem on the synthetic test pattern and not seeing it in the actual clips this means that in another clip sooner or later you will see that problem If you don t see it now it only means that the clip is not critical enough However if you are seeing a problem on the clip but not seeing it on the synthetic test clip it simply means that you are not using the appropriate test pattern to reve
87. increase the volume later to find out that it was too loud Then another engineer decreases the audio volume supposedly back to the previous level thinking that his adjustment set the perceivable audio loudness and throughput gain equal to the original While it may seem fine throughout the process neither of the engineers oriented their adjustments with special test signals reaching OdBfs typical testing reaches 6dBfs or 8dBfs and at these levels perceived audible quality will sound great and critical sound loudness will be left unnoticed The problem will only reveal itself at levels exceeding 6dBfs and not otherwise and since such levels may rarely exceed 6dBfs in real video content the error will therefore remain unnoticed Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform In reality no one knows what the nominal normalization level is and should be unlike in video i e 16 235 levels there is no globally accepted standard reference level of loudness therefore the need to test the system with entire range is highly recommended Hence any adjustments in the audio may result in clipping of critical levels and crippling overall audio performance Situation 1 Levels are aligned and representative levels are preserved throughout the test duration Figure 2 Situtation 2 Levels are excessive gain somewhere in the processing chain resulting in clipping and excessive loundness Figure 3
88. intervals with no scene cut detection d Keyframes at scene cuts with maximum intervals and hoping for alignment is not recommended Reference frames 2 4 closer to 2 Frame Rate Must remain constant across all bitrates This avoids multibitrate synchronization issues and maintains seamless transition during changes in the end user s network conditions Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 65 Rate Control Settings Mode 1 or 2 Pass CBR 2 Pass CBR recommended Buffer Length 1 2 seconds 1000ms or 2000ms VBV Buffer Initial Buffer fullness Final Buffer fullness not available in all 70 quicker response at seek times or trick 100 keeps it full once fullness is reached software packages modes Note about encoder recommendations It is advised to use the same encoder for encoding multibitrate versions of content thus avoiding issues related to predictability of keyframe alignment logic which may be different in different encoders VBR bitrate maybe used as well however exceeding 10 above the minimum set bitrate is not recommended Frame Sizes and Bitrate Switching In order to maintain the smoothest switching performance across all of the bitrates thus keeping SPS Sequence Parameter Set PPS Picture Parameter Set NAL Network Abstraction Level units sent to AVCC the same the following aspects should be taken into consideration Fixed frame size across all switching bitra
89. its color matrix and video levels scheme unnecessarily and therefore loses its integrity of color matrix and video scheme levels If this video undergoes several of these transformational stages the picture at the final stage will end up looking entirely different from the original The following are examples of such transformations in YUV and RGB domains YUV Range 0 255 Reference Scheme 16 235 YUV Scope One line of first trace YMax 255 RGBMax 255 Selected Line Number 270 sedessadshh sssabess hee ee Pee eee Ae Sees ese ee eb see se hese se deesessbessssbeessebsscssdssssssesssssbsses Pres eee Oe TE eee TE eee CETT Ol AE eee Pee ete eee tee eee eee te Cee Lee ee ee TETTT s s00 1000 1100 1200 2300 1400 1500 foo 1700 1800 1900 2000 Zoomed scope waveform of Zoomed fragment of gradient ramp reference Figure 60 Depiction of linear YRGB reference test pattern reference scheme of 16 235 ramp test range 0 255 inclusive sub range levels below black 16 and white 235 Notice clean gradient and no banding of color gradient ramp and clean waveform on the ramp When video originated in the video domain i e broadcast television and is maintained in the video domain of broadcast television then the chance of it transforming to RGB 0 255 color scheme is minimal Thus the picture in Figure 60 is an indication of what the video on the YUV scope will look like as far as the color l
90. livery for Flash addendum section of the cookbook Abhinav Kapoor Vishy Swaminathan Kevin Streeter and Slavik Lozben for insight on the inner workings of Flash and for their feedback on various sections of the cookbook Special appreciation to ArtBeats for providing excellent content and timely delivery VideoQ for making variety of special test patterns timely availability and unquestionable general technical oversight Hillman Curtis for providing creative content 2011 Adobe Systems Incorporated All rights reserved If this whitepaper is distributed with software that includes an end user agreement this guide as well as the software described in it is furnished under license and may be used or copied only in accordance with the terms of such license Except as permitted by any such license no part of this guide may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical recording or otherwise without the prior written permission of Adobe Systems Incorporated Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement The content of this guide is furnished for informational use only is subject to change without notice and should not be construed as a commitment by Adobe Systems Incorporated Adobe Systems Incorporated assumes no responsibility or liability for any
91. m to Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform Video Settings The following are recommended video encoding settings for use in targeting HTTP and RTMP multibitrate delivery on the Flash Platform along with behavioral considerations and best practice use cases H 264 Settings GOP Settings GOP IDR control Closed GOP Maximum B frames 2 Adaptive mode on or Adaptive number of B frames on depending on the software used IDR Keyframe interval see Table 1 Short Form 30 second commercials with many changing scenes Long Form 1 min or longer Content Form Length Keyframe General 2 5 seconds 5 8 seconds Distance Typical 2 3 seconds 3 5 seconds No less than 2 seconds 3 seconds Table 1 Keyframe distance fixed across all streamed segments and bitrates Behavioral Considerations Keyframes In H 264 IDR and non IDR I frames have different meaning IDRs Instantaneous Decoding Refresh are traditional l frames the way they were known in previous standards An IDR I frame allows subsequent frames reference itself and the frames after it thus marking a closed GOP Group of Pictures This behavior resets the decoder completely and thus guarantees reliable seeking A non IDR I frame can be understood as an intra coded P frame They can be referenced by preceding B frames which improves picture quality especially in high motion scenes and reduces frame flicker eff
92. mentary streams Access Unit A set of NAL units in a specified form is referred to as an access unit The decoding of each access unit results in one decoded picture Each access unit contains a set of VCL NAL units that together compose a primary coded picture It may also be prefixed with an access unit delimiter to aid in locating the start of the access unit Some supplemental enhancement information containing data such as picture timing information may also precede the primary coded picture For additional details see http en wikipedia org wiki Network_Abstraction_Layer Access_Units Constant Bit Rate A bidirectionally predicted picture or a picture created by reference to preceding and subsequent pictures A set of 8x8 pixels used during Discrete Cosine Transform Bit Error Rate Consumer Electronics Association Reduction of the number of bits needed to represent an item of data CPB Coded Picture Buffer is a first in first out buffer containing access units in decoding order CPB affects the amount of time it takes to rejoin the primary stream when returning from a trick stream Typically the CPB value is established in milliseconds CPB delay is the time difference between the arrival of an access unit into the Coded Picture Buffer and when the Decoder starts decoding the access unit Refer to Section C 1 2 in ISO IEC14496 10 for additional information Temporal to frequency transform used during spacial encoding of MPE
93. n 180 degrees Both central super white vertical band and central small square are clearly visible Contrast is too high Clipped sector with no shades of gray is much more than 180 degrees Both central super white vertical band and central small square are almost the same brightness as big white square Contrast is correct The super white vertical band is almost the same brightness as big whitesquare Conicalgrayscaleis clipped exactly half circle 180 degrees no shades of gray on the left half Central small square is clearly visible Figure 12 Depiction of white PLUGE amp SuperPLUGE elements from static test pattern of YRGB range and gradation linearity check Colored lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 15 YRGB Linearity Check By observing YRGB YUV levels in Video Editor Scope or similar software tool if linearity is preserved correct mode of operation reconstructed YRGB Ramps still have regular 1 LSB increments every 1 2 or 3 pixels depending on video image width it should be different but display a regular spatial level increments pattern if image is scaled By checking the appearance of full range Ramps if linearity is preserved correct mode of operation there should be no visible banding i e gradation gradient sho
94. namic Streaming HTTP HTTP Dynamic Streaming Adobe s multibitrate adaptive streaming delivery solution enables delivery of video on demand and live streaming using standard HTTP servers or from HTTP servers at CDNs leveraging standard HTTP infrastructure The addition of HTTP streaming support to Flash Player 10 1 and later enables expanded protocol options to deliver live and recorded media to Flash player including DVR functionality and full content protection powered by Flash Access 2 0 This delivery method requires that media files go through an additional level of processing They are broken into fragments which are then delivered in sequence with Flash player detecting the client s bandwidth and requesting the appropriate bitrate fragments from the server at playback time This provides the client with the highest possible video quality for their resources and a smooth playback experience Peer to peer RTMFP Flash Player 10 0 introduced support for the Real Time Media Flow Protocol RTMFP which enables peer to peer connections between Flash player clients This technology requires an introduction service which is currently known as Stratus Stratus provides a way for clients to find each other and open direct connections to share video audio and data Flash Media Enterprise Server 4 0 and later also supports peer introductions RTMFP Groups RTMFP Groups is an extension of the RTMFP technology introduced in Flash Player 10
95. namic Streaming and DVR functionality are available with Flash Media Server 3 5 and later With streaming as with progressive download the video content FLV or F4V an MP4 variant is kept external to the other content and the video playback controls It is therefore relatively easy to add or change content without the need to republish the SWF file Streaming also has other advantages including the following The video starts playing sooner than it does using progressive delivery Streaming uses less of the client s memory and disk space because the clients don t need to download the entire file It makes more efficient use of network resources because only the parts of the video that are viewed are sent to the client It provides more secure delivery of media because media does not get saved to the client s cache when streamed Flash Media Server also allows for encrypted streaming providing an additional level of security It provides better tracking reporting and logging ability It allows you to deliver and record live video and audio or capture video from a client s webcam or digital video camera It enables multiway and multiuser streaming for creating video chat video messaging and video conferenc ing applications It provides programmatic control of streams server scripting for the creation of server side playlists synchronization of streams smarter delivery adjusted to client connection spee
96. ncoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 76 Variant 1 Variant 1 incorporates encoding best practices for smooth switching among bitrates for use in desktop environment This variant details recommended encoding parameters grouped into three target groups with various frame sizes and bitrates The first group 512x288 384x288 is targeted to reach low bandwidth end client most likely with in page use The second group 1280x720 is aimed to reach medium range bandwidth end client with in page and full screen use The third group 1920x1080 is aimed to high bandwidth end client with full screen use AV dro o al a D 50 Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant VIDEO Basic Bitrate H 264 Advanced Stream Picture Size Bitrate B FDM GOP Size GOP IDR IDRFrq Ref Frms 8x8 Trsfm 1 IP 512x288 SaS P 300 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 512x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 512x288 SaS P 900 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 512x288 SaS P 1200 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP 512x288 SaS P 1500 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx2 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1
97. nded encoding parameters grouped into five target groups with various frame sizes and bitrates The first group 256x144 192x144 is targeted to reach low bandwidth end client most likely with in page use The second group 512x288 384x288 aimed to reach medium range bandwidth end client with in page use The third group 768x432 576x432 is aimed to medium bandwidth end client with in page and full screen use The fourth group 1280x720 is aimed to reach medium high bandwidth end client with in page and full screen use Fifth group 1920x1080 is aimed to reach high bandwidth end client with full screen use Variant 2 VIDEO Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant VIDEO Basic H 264 Advanced Bitrate BFDM GOP Size GOPIDR Ref Frms SR wtP wtB 8x8 Trsfm Picture Size ST Bitrate Stream 1 IP 256x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 512x288 SaS P eoo ENS H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 512x288 SaS P 900 CBR 2pass H 264 CAVLC M 3 2 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 el Nees 768x432 SaS P 1200 CBR 2pass H 264 CAVLC M 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP FS 768x432 SaS P 1500 CBR 2pass H 264 CAVLC M 4 1 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel
98. odec also introduced at this time is generally used with H 264 video Speex Flash Player 10 and later now support the Speex codec audio recording in the browser This codec is optimized for encoding speech so it is ideal for VOIP and audio chat applications Delivery Protocols There are a variety of protocols available for media delivery on the Flash Platform The method you choose depends on the attributes of your content and the size of your audience Progressive Delivery HTTP The simplest delivery method to implement is progressive delivery In this method a video file is downloaded and displayed just like any other web asset In this method the video content FLV or F4V an MP4 variant is kept external to the other content and the video playback controls Because of this it s relatively easy to add or change content without republishing the SWF file Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform Streaming RTMP The most complete consistent and robust delivery option is to stream video and audio files from a Flash Media Server In streaming each client opens a persistent RTMP connection back to the video server This approach lets you deliver features such as realtime data sharing live webcam chats bandwidth detection quality of service metrics detailed tracking and reporting statistics and a whole range of interactive features along with the video experience Advanced features such as Dy
99. omply with all applicable equal opportunity laws including if appropriate the provisions of Executive Order 11246 as amended Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 38 USC 4212 and Section 503 of the Rehabilitation Act of 1973 as amended and the regulations at 41 CFR Parts 60 1 through 60 60 60 250 and 60 741 The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference 12 11 89
100. ormalization level is to avoid oversaturation and clipping Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 53 Encoding Mode Selection When selecting target bitrate one of the main elements in that process is audio encoding mode Deciding which encoding mode to concentrate on is based on target device capability and bandwidth availability Presently there are three audio coding modes of AAC types AAC AAC LC HE AAC v1 and HE AAC v2 AAC Advanced Audio Coding or AAC LC Low Complexity was adapted early on and it is frequently used in low powered devices and offers the least amount of compression of the three HE AAC v1 High Efficiency includes Spectral Band Replication SBR and it is able to encode at a lower data rates than AAC LC HE AAC v2 includes SBR and PS Parametric Stereo and it compresses data rates even further than HE AAC v1 Spectral Band Replication is a method for highly efficient coding of the high frequencies in audio compression algorithms that enables audio codecs to deliver the same quality at half the bitrate Parametric Stereo works by encoding a stereo signal into one monaural signal and transmitting information about the stereo image parametric information Parametric Stereo reduces the data rate needed for equivalent quality It is only available with HE AAC v2 encoding mode The drawback of HE AAC v1 and HE AAC v2 may be resource usage in lower powered devices which have no hard
101. our hardware playback performance Once it is confirmed that hardware capacity is adequate for smooth playback the content can then be transcoded to the faster frame rate Video Frame Size and Picture Scaling When scaling down frame size it is recommended that the original aspect ratio be maintained and that the resulting frame dimension be an even divisor of 16 Add black bars if necessary to compensate for difference between frame size and player display dimensions Selecting the right target frame size for video is a key component of the player and encoding process When selecting a frame size try to consider the following best practices Choose width and height dimensions that are divisible by 16 If the dimensions are not divisible by 16 encoders will have different solutions to achieve 16x16 macroblock division Highly advanced H 264 core codecs add padding to reach the nearest 16 divisible width and height Less advanced H 264 codecs will clip resize or splice the picture in order to adhere to 16x16 macroblock divisibility Although at high resolutions HD and above such divisibility may not be as critical as close to 16 divisibility is padded to the nearest 16x16 divisible block thus increasing pixel and bitrate count However at lower resolutions such divisibility is critical because every pixel and bit describing it needs to be accounted for It is generally recommended to avoid resolutions that are not evenly divisible by 16 If
102. proach that keeps the controls and UI crisp but is processor intensive to render This solution may not be acceptable for high definition content for this reason Software scaled video with no smoothing offers better playback performance while keeping the controls crisp However depending on the resolution of the original video and the scaled size the video may be noticeably pixelated Hardware scaled video with smoothing provides the best performance and video quality and is supported in Flash Player 9 and later In this case the fullScreenSourceRect matches the video area 1 1 pixel mapping and although the controls might appear slightly blurrier the GPU will take care of the video scaling as well as smoothing Some best practices for handling video controls in full screen mode include Flash Player 9 Use the method outlined previously with care and only if performance impact is acceptable and fidelity of the user interface is a priority i e standard definition content low screen resolution Flash Player 9 Since the video resolution of high definition content is closer to screen resolution evaluate if a minor pixelation of controls is acceptable If so use the video object or movie size as fullScreenSourceRect value and perform minor resizing of the video controls as needed Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 57 For more information about these full screen scaling techniques see J
103. processes repeatable objective results repeatable setup results a foundation for verification and test procedures and eliminates subjectivity of human interpretation Of course it does not eliminate the need for traditional syntax functionality checks and subjective AV quality estimation on live clips NOTE The technical testing content static and dynamic test patterns elements depicted in this section were acquired from VideoQ which focuses on video test and measurement and video enhancement technologies products and services This technical test content was carefully appended without the loss of perceptual quality audible quality and structural integrity to specially selected video clips provided by Artbeats and HillmanCurtis Inc Examples of Quality Problems The following are some examples of issues with audio and video encoding that are ordinarily not immediately revealed without special instruments and technical testing content Domain Transformation If you ve transcoded a media clip and the results looked fine e g size color audio quality it does not mean that transformations were made within the same domain ex YUV in to YUV out or 30 FPS in to 30 FPS out or 1080p in to 1080p out throughout the process Just because your input is the same as the output it doesn t mean that the interim processes were consistent See Figures 2 4 for examples For example in a typical audio processing operation an audio engineer may
104. r one picture less because of the dropped field However if there are slower moving pans or not as much motion the video may look fine This technique is mentioned is because it is quick and not as resource intensive for transcoding but it has to be chosen with caution and weighed against other techniques such as motion adaptive and motion compensated deinterlacing If you have to scale frame size and your source is interlaced for best results deinterlace video first then apply scaling as illustrated in Figure 36 If video is scaled first and then deinterlaced the interlacing consequently will lose fidelity and introduce blocky artifacts or blurry images once actual encoding takes place ee Ne ae Sa ae ee re are As input for further From other processes processing by a coder pass through N Interlaced N Deinterlacing Scaling OR Source Scaled output H A Process Process l Filter input o Step 1 Step 2 Step 3 Step 4 Figure 36 Depiction of the process of scaling interlaced content Step 1 shows ingestion of interlaced source whether it is an input from another process or an independent process via file Step 2 is a preceding deinterlacing process to Step 3 Step 3 is a scaling process Step 4 is a final step in this scaling procedure The final step is then used either as an input to any other subsequent processes or as a final file Scaling in line with transcoding
105. re recommended The profiles presented in this document are targeted specifically at encoding of VOD i e non live content While these profiles may be similar to those used to encode live content profile options for live content are not specifically considered in this release Encoding profiles for live hardware encoders used primarily for live content will be covered in live content encoding releases of this document This guide will be modified as new VOD encoding options are supported or new tools are identified Content that is created with any publicly released version of this document is expected to be supported by future versions of Flash Media Server The rights for content supplied with this guide is for non commercial use only rights for commercial use of the content must be obtained individually by the user History of Video in Flash Video on the Flash Platform has been constantly evolving since the first videos were embedded in SWF files and played in Flash Player 6 back in 2002 Flash is now the defacto delivery method for video on the web with over 75 of web video being delivered in the Flash player Flash supports many different codecs and container formats along with a flexible array of delivery protocols Codecs and Container Formats Flash supports a variety of codecs and container formats When video support was first introduced in Flash Player 6 a video could either be embedded directly in a SWF file or it could
106. ressed video stream A compression technique that periodically encodes a complete reference frame and then uses that frame to predict the preceding and following frames International Telecommunications Union UIT A range of picture parameters and combinations of picture parameters specified by H 264 The level of a video signal generally indicates the number of pixels per frame along with other device specific parameters such as required memory and buffering Megabits per second A group of 16x16 pixels used for motion estimation in temporal encoding of H 264 video The process that reduces redundancy in a video signal by measuring an object s motion at the encoder and sending a motion vector to the decoder in place of the encoded object Motion Compensation A pair of numbers that represents the vertical and horizontal displacement of a region from one frame to another Motion Estimation Moving Picture Experts Group Program Association Table Packetized elementary stream ISO IEC 13818 1 A stream containing variable length packets of video audio or data All the bytes in a packet that follow the packet header For packets of audio or video the payload contains audio or video data from the PES packets see PES Packet The structure used to carry a single frame of audio or video data It consists of a header and a payload The leading bytes of a PES packet which contain ancillary data for the packet Packet Iden
107. ring No Date Published Reinhardt R Video with Adobe Flash CS4 Professional Berkley CA Adobe Press Peachpit 2009 Richardson E G Video Codec Design West Sussex UK John Wiley amp Sons Ltd 2002 Simpson W Video Over IP 2nd Ed Burlington MA Elseiver Inc 2008 Smart M and B Keepence Understanding MPEG 4 Video IndigoVision 2008 Steinberg V Video Standards Signals Formats and Interfaces Hampshire UK Snell amp Wilcox 1997 T Wiegand G J Sullivan G Bjwntegaard and A Luthra Overview of the H 264 AVC video coding standard IEEE Trans Circuits Syst Video Technol 13 7 July 2003 560 576 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 61 Addendum A Addendum Table of Contents 62 Scope 62 Video Settings 65 Frame Sizes and Bitrate Switching 67 Audio Settings 67 MP4 Considerations 71 Additional Resources 71 Encoding Variants Broadband Vod 76 Detailed AAC AVC Audio Video Settings Video encoding and transcoding recommendations for HTTP Dynamic Streaming on the Adobe Flash Platform Preliminary Recommendations By Maxim Levkov Adobe Systems Inc Scope Video encoding and transcoding recommendations for HTTP Dynamic Streaming on the Adobe Flash Platform describes techniques best practices and recommended settings for encoding live and video on demand VOD files for use with Flash Media Server This paper is an addendu
108. rogressive only Scaling needs to be exact encode and decode same stretch coefficient as source 16 9 anamorphing width works only with 4 3 sizes that have the same height see item 1 above Decoder performance could introduce higher processing consumption Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 47 Technical metadata needs to explicitly stamp that it is 16 9 content at encode time even though the sizes will correspond to the exact 16 9 dimensions The transformation does not come for free The cost will be in picture quality Re transformed video at player display time will be a slightly softer than the equivalent picture without anamorphic transformation The following anamorphic width transformation diagram and table was put together to assist in the decision making process FULL VIDEO FRAME k FULL VIDEO FRAME FULL VIDEO FRAME a FULL VIDEO FRAME H FULL VIDEO FRAME 0 FULL VIDEO FRAME 16 16 R Ey p Figure 57 Anamorphic width transformation diagram 1920x1080 gt 1440x1080 amp gt 1920x1080 Figure 58 Anamorphic width transformation video snapshots Source Video Frame Transformed Anamorphed Video Frame Target Re Transformed Video Frame Ingested Encoded Displayed ele Width Height aspect Width Source Width Height Aspect Aspect Width Heigh
109. rom 29 97 interlaced fields per second to its original state of 24 or 23 976 progressive frames per second for motion fidelity and higher quality compression This process of inverse telecine is always performed as part of deinterlacing process The most critical part of the process is determining that telecine was applied using 3 2 pulldown automatic detection If such a detector mistakenly detected video mode as film mode or vice versa then the resulting output will demonstrate catastrophic jerkiness jaggies etc Frame Rate Conversion In some cases source is shot at one frame rate and then converted to higher frame rate For instance the content was shot on film at 24 progressive frames per second FPS but at some point the decision was made to convert it up to 60 frames per second Technically this should result in smoother motion but if poorly converted the video will stutter and not achieve the intended playback motion at 60 FPS If high quality motion compensated and motion adaptive frame rate conversion was done then the video should not perceptually differ from originally shot content at 24 FPS However some negligible differences should be expected Understanding this it is important to also have the hardware capacity to play back video at its current frame rate to assess whether it actually behaves as expected with proper motion If any hiccups are noted play back the file at the original slower frame rate first and inspect y
110. rts playing Adobe Media Player calculates an appropriate buffer time based on the rate the data is being received and the total length of the video Once the video has been downloaded subsequent viewing does not require any buffering Progressively downloaded files are usually delivered through a content delivery network CDN using the standard HTTP protocol In this case Adobe Media Player establishes a direct connection with the CDN s servers to retrieve the content Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 54 Streaming Streaming video delivers the video bits as they are requested in real time The bits are viewed and then discarded The user experience is virtually the same as with downloaded content but has a few key differences Viewers do not have to wait for video to download before seeking throughout the video Video is not cached on the viewer s computer so it cannot be viewed offline Adobe Media Player can deliver streaming video via the RTMP or RTMPE protocols supported by Adobe Flash Media Server The stream packaging i e making of multiplexed file procedure typically consists of many elements that enable control of the distribution delivery process Depending on the type of delivery method selected progressive download or streaming MOOV Atom location will move either to the end or to the beginning of the file When progressive delivery is used the MOOV Atom location should be a
111. run causing video to pause or stutter However with bigger segments averaging can actually improve across the download to find the actual data rate which improves the operation of client driven HTTP Dynamic Streaming Ultimately less network bandwidth and time is spent on overhead such as HTTP requests returned headers and the round trip latency of waiting for a download to start and more resources are spent on downloading the actual video Processing Resources If the reason for bitrate switching is lack of CPU processing resources to play back video which is not as common it only takes one initial measurement per playback to realize where to cap the rate Also if CPU processing resources run out there are all sorts of other unsolvable problems that take place trying to instantly detect the failure and then drop no more frames It is easier to turn off smoothing than it is to downshift the bitrate fast enough so that the user doesn t notice The details of this are different for the Flash Media Server multibitrate case of course because the server is controlling pushing the data down rather than the client pulling However in the FMS case fast switching is possible in a way that it isn t for HTTP which negates almost all the concern about long keyframe intervals if implemented properly Generally keyframe interval and fast switching depends on the content and the users For long form content starting the video at a shorter ke
112. s Interlacing Frame Rate Conversion and Cadence FRC Moving Frequency Bursts and Frame Counter Audio Video Synchronization CNT Timeline Markers amp Frame Counter AV Sync Audio Test Claps Pulses amp 1 KHz Bursts Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 13 Levels Colors and Color Matrix LINYRGB Static Test Y R G B Range and Gradations Linearity Check Linear YRGB Range amp Gradation Check Black SuperPLUGE Traditional PLUGEs White SuperPLUGE for brightness offset fine tuning for quick coarse setup for contrast gain fine tuning 100 Color Bars FourO 255FullRange Ramps consistent 1 LSB Y R G B increments siayx1eyW dolp a E ie ge z a p Sra nn a 1080 1 LSB every 3 pixels 720 1 LSB every 2 pixels 480 amp 576 1 LSB every 1 pixel Victor Steinborn 0 255Levels Ruler 75 Color Bars ee Figure 10 Depiction of a static test pattern of YRGB range and gradation linearity check Colored lines with arrows and text are not part of the test pattern and are superimposed for explanation purposes only How to Use This Test Figure 10 General Use Note This test can inserted as a frame into a media file for transcoding and or as a live signal input through the use of special external devices YRGB Range Check By observing YRGB YUV levels in Video Editor Scope or similar software tool
113. s grouped into four target groups with various frame sizes and bitrates The first group 256x144 192x144 is targeted to reach low bandwidth end client most likely with in page use The second group 512x288 384x288 aimed to reach low high range bandwidth end client with in page use The third group 768x432 576x432 is aimed to medium bandwidth end client with in page and full screen use The fourth group 1280x720 is aimed to reach medium high bandwidth end client with in page and full screen use Variant 3 VIDEO Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant H 264 Advanced VIDEO Basic Bitrate B FDM GOP Size GOP IDR Ref Frms SR wtP wtB 8x8 Trsfm Stream PM Picture Size ST Bitrate 1 IP 256x144 SaS P l 300 i CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 512x288 SaS P 500 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP FS 768x432 SaS P 1000 CBR 2pass H 264 CAVLC M 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP FS 768x432 SaS P 1700 CBR 2pass H 264 CAVLC M 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 6 IP FS 1280x720 SaS P 3500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8
114. s then your keyframe period is equal to 60 frames based on 30 frames per second timeline because gop keyframes sets a period of I frames in number of frames In this case there are two regular periods of 30 frames each This is set by GOP Size or GOP Interval to FIXED GOP This also means that gop keyframes are non IDR I frames If your timeline or timescale is other than 30 frames per second such as 24 25 50 or 60 then gop keyframes settings need to be adjusted appropriately Caveat When rc scene_detect is activated in this case it is set to sensitivity of 50 it dynamically places the keyframe interval e g whenever a scene change is detected with an accuracy sensitivity of 50 Essentially this invalidates the regularity of the keyframe interval set by gop idr_period and gop keyframes Turning on rc scene_detect mode by Max GOP size with scene detection setting is not recommended since it results in no perfect alignment of frames across all of the bitrates Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 64 Additional Behavioral Observations Generally allowing the encoder to generate a keyframe at a scene cut produces better quality video than requiring a scene cut to wait for a later fixed keyframe interval to occur This is because it is simply not possible to describe the video image post cut sufficiently using intermediate frames and so the quality of the video between the scene cut and
115. s Yes Yes Yes 1 4Pel 1 7 FS 1290x1080 SaS P 5500 CBR 2pass H 264 CAVLC H 4 2 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 8 FS 1920x1080 SaS P 8000 CBR 2pass H 264 CAVLC H 4 2 0 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 SR wtP wtB 8x8 Trsfm 1 IP 192x144 SaS P l 300 CBR 2pass H 264 CAVLC M 3 0 1 F Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 384x288 SaS P 600 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP 576x432 SaS P 1000 CBR 2pass H 264 CAVLC M 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP 576x432 SaS P 1700 CBR 2pass H 264 CAVLC M 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes No Yes 1 4Pel 1 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 82 Variant 4 AUDIO Variant 4 AUDIO VIDEO Combined Bitrate Stream Encode Mode Bitrate SR kHz A Stream V Stream 1 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 1 364 2 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 2 664 2 3 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St CO oc C 4 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 4 1764 E 5 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St CO o O 6 HEAACv 2 Yes No 64 441 16 2 0 LR St 6 3564 6 13 HEAAC v 2 Yes No 64 44 1 16 2 0 L R St 13 5564 13 14 HEAAC v 2 Yes No 64 441 16 2 0 L R St 14 8064 14 Video Encoding Cookbook and Profile Guidelines for the Adobe
116. smooth switching among bitrates for use in desktop environment This variant details recommended encoding parameters grouped into four target groups with various frame sizes and bitrates The first group 256x144 192x144 is targeted to reach low bandwidth end client most likely with in page use The second group 512x288 384x288 aimed to reach medium range bandwidth end client with in page use and full screen use The third group 1280x720 is aimed to medium high bandwidth end client with in page and full screen use The fourth group 1920x1080 is aimed to high bandwidth end client with full screen use Variant 6 VIDEO Picture Aspect Ratio 16 9 Pixel 1 1 Container MPEG 4 System MPEG 4 Part 12 amp 14 Compliant H 264 Advanced VIDEO Basic Bitrate GOP IDR Ref Frms SR wtP wtB 8x8 Trsfm Picture Size ST Bitrate Stream PM 1 IP 256x144 SaS P 300 CBR 2pass H 264 CAVLC M 3 0 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 2 IP 512x288 SaS P 500 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 3 IP FS 512x288 SaS P 1000 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 4 IP FS 512x288 SaS P 1700 CBR 2pass H 264 CAVLC M 3 1 1 T Fixed SaSx3 Closed 1 2 8x8 64 Yes Yes No Yes 1 4Pel 1 5 IP FS 1280x720 SaS P 2500 CBR 2pass H 264 CAVLC H 4 2 1 T Fixed SaSx3 Closed 1 4 8x8 64 Yes Yes Yes Yes 1 4Pel 1 6 IP FS
117. such a process Figure 61 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 50 YUV Range transformation from 16 235 to 0 255 to 16 235 YUV Scope One line of first trame YMax 235 RGBMax 235 Selected Line Number 270 Ye ST EON E D E PN E TT E E EEEE ST OS w gt maia iit am ileal ais 2 3 5 250 1 l i i l i i i 7 i i i 7 s too 4 4 gt i TXT d 200 i i i f i a e i i so Levels se aS pee 100 50 16 m Deas se 100 Clipped and remapped back X o mo 0 1700 1800 1500 2000 Zoomed scope waveform of gradient ramp distorted Zoomed fragment of gradient ramp distorted Figure 62 Depiction of result of two cascaded level mapping processes Notice distorted gradient and banding of color gradient ramp and distorted waveform on the ramp also visible gray limits of white on the right of Luma gradient Black square on the left is no longer showing perpendicular rectangular shape clearly visible in reference Figure 60 White square on the right is no longer showing white perpendicular rectangular shape clearly visible in reference Figure 60 Hence the clipping of white and black occurs If further transformations take place entire color scheme will deteriorate significantly resulting in irreversible reduction of picture quality For example during the process of selecting a video source for transcoding for th
118. t 0 255 gt 16 235 By doing so the video changes its color matrix and video levels scheme unnecessarily and therefore loses its color matrix and video scheme levels fidelity If this video undergoes several of these transformational stages the picture at the final stage will end up looking entirely different from the original Figures 5 7 YUV Range 0 255 Reference Scheme 16 235 YUV Scope One line of first frame YMax 255 RGBMax 255 Selected Line Nember 270 235 ES 200 Levels ne Zoomed fragment of gradient ramp reference 24 Figure 5 Depiction of linear YRGB test pattern reference scheme of 16 235 ramp test range 0 255 inclusive sub range levels below black 16 and white 235 Notice clean gradient and no banding of color gradient ramp and clean waveform on the ramp Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper Transformation of 0 255 RGB to 16 235 YUV YUV Scope One line of first frame YMax 235 RGBMax 235 Selected Line Number 270 Mapped Down 100 i A s pe p eet a T 16 E f q Ts i 100 a fc pm aA pase sat ce ened ss acne Anta doe ese een Sten Eee ot a jee eee Hore Een 0 100 300 400 500 ry 700 Lase 900 1000 1100 1200 1300 1400 1569 00 1700 1800 1500 2000 Zoomed scope waveform of 4 sradient ramp distorted Zoomed fragment of gradient ramp distorted Figure 6 Depiction of Linear YRGB reference
119. t DISPLAYED 1 85 1 to 16 9 Conversion Sample Implementation FULL VIDEO FRAME FULL VIDEO FRAME F if J i Lu uw Lu 2 1 2 1 Se 2 gt gt gt a a 5 5 5 Li U iL L i d L 4 le 1 85 le 1 85 gt 16 a Figure 54 1 85 1 to 16 9 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 46 2 35 1 to 16 9 Conversion Table Reference Diagram FULL VIDEO FRAME d O W Q S J gt LL 2 35 INGESTED Variant where Black Bars are inserted at the time of transcoding or encoding k FULLVIDEO FRAME k FULLVIDEO FRAME 2 35 1 to 16 9 Conversion Sample Implementation FULL VIDEO FRAM E ry Q a Z 5 OS NS T I 2 35 Figure 55 2 35 1 to 16 9 2 35 1 to 16 9 Conversion Table Reference Diagram gt o FULL VIDEO FRAME wh ee u O lu Q gt a Ww ve 2 35 lt INGESTED t BLACK BARS TOP Tf i i ui ui z z ra aE rm a O 9 m O 9 m a o 2 a gt A S 5 J o r AVFx T 4 BLACK BARS i a 16 gt a 16 gt e WIDTH WIDTH ENCODED gt a DISPLAYED FULL VIDEO FRAME FULL VIDEO FRAME L L LL Ww O O W wi fa fa gt gt J a J E AN A ie Se A P BLACK BARS i
120. t Ratio Ratio Squeeze Width Ratio Ratio Stretch Stretch Factor Factor Delta Factor 16 9 1920 1080 AS 1333 3 4 0 75 25 1440 1080 16 9 4 3 1920 1080 1 7777 16 9 AN 1 7777 1 333 16 9 1792 1008 4S S33 3 4 0 75 25 1344 1008 16 9 4 3 1792 1008 1 7777 16 9 AN NTF L333 16 9 1536 864 4 3 1 333 3 4 0 75 25 1152 864 16 9 4 3 1536 864 1 7777 16 9 AN 1 7777 1 333 16 9 1280 720 A e335 3 4 0 75 25 960 720 16 9 4 3 1280 720 1 7777 16 9 AN 1 7777 1 333 16 9 1024 576 4 3 S L533 3s 075 25 768 576 16 9 4 3 1024 576 1 7777 16 9 AN TUTT 1333 16 9 1024 432 43 1 333 3 4 0 75 25 576 432 16 9 ABE 768 432 1 7777 16 9 AN 1 7777 1 333 16 9 512 288 A Bek See 3 4 0 75 25 384 288 16 9 4 3 512 288 1 7777 16 9 AN 1 7777 1 333 16 9 256 144 4 3 1333 3 4 0 75 25 192 144 16 9 4 3 256 144 1 7777 16 9 AN 1 7777 1 333 Figure 59 Anamorphic width conversion table Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 48 Color Space and Levels Scheme Transformation Consider an example if your input is in the YUV color matrix domain and your output is in the YUV color matrix domain the transcoder can achieve the output through conversion to the RGB color matrix domain YUV in gt RGB at processing time gt YUV out and then back to the YUV color matrix domain while modifying the video levels scheme 16 235 gt 0 255 gt 16 235 By doing so the video changes
121. t one of the audio coding formats AAC LC HEAAC v1 HEAAC v2 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper Transcoding Workflow Setup and Verification Typical content workflow is complicated with many creative decisions Adding content transcoding workflow to the creative process complicates it even further and making sure the creative work did not get compromised throughout the supply chain process is a daunting task Many audio visual transcoding problems arise as a result of Asupply chain consisting of many cascaded processing stages Processors that are provided by many suppliers Many different formats are involved Use of suboptimal source often in previously published form Asemi automated or manual profile creation process resulting in a variety of human errors Profiles seldom accommodate a variety of content generally they are recycled without regard to the specifics of the ingested media One of the ways to minimize unpredictability in final perceptual quality while maintaining consistency is Coding processes a a gP through a combination of synthetic AV test patterns and real AV media clips are no different than Encoding and transcoding is a transformational process where each preceding element is an input to the next element with the result being an output of this combination thereby making the process irreversible If a processes in the preceding element w
122. t performance 1 85 1 Figure 40 Picture above depicts video frame adhering to 1 85 1 picture aspect ratio where picture aspect ratio does not change from source state to encode state to display state source Artbeats The following is the table of various frame sizes that are adhering to 1 85 1 picture aspect ratio that is divisible by 16 8 and 4 740 x 400 370 x 200 185 x 100 1295 x 700 1480 x 800 740 x 400 370 x 200 1480 x 800 2220 x 1200 1110 x 600 555 x 300 1665 x 900 1480 x 800 740 x 400 1850 x 1000 1850 x 1000 925 x 500 2035 x 1100 2220 x 1200 1110 x 600 2220 x 1200 2 0 1 common to Red One formerly used as SuperScope Ly A ENKE Figure 41 Picture above depicts video frame adhering to 2 0 1 picture aspect ratio where picture aspect ratio does not change from source state to encode state to display state source Artbeats The following is the table of various frame sizes that are adhering to 2 0 1 picture aspect ratio that is divisible by 16 8 and 4 800 x 400 400 x 200 200 x 100 1400 x 700 1440 x 720 800 x 400 400 x 200 1600 x 800 1600 x 800 1200 x 600 600 x 300 1800 x 900 2400 x 1200 1600 x 800 800 x 400 2000 x 1000 2000 x 1000 1000 x 500 2200 x 1100 2400 x 1200 1200 x 600 2400 x 1200 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 2 35 1 also known as 2 39 1 Figure 42 Picture above depicts video frame adhering to 2 35 1 picture aspect ratio w
123. t starts automatically when they go to a web page Pausing a video on application start will also save bandwidth costs as the video will only play when specifically requested Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 56 Bitmap Transformations Flash Player allows access to the bitmap data of each frame of a video allowing you to apply a wide variety of effects in realtime such as filters and other color transformations This is quite processor intensive however so it is not recommended for large or high bitrate video It is also important to note that access to bitmap data of video streamed with Flash Media Server 3 FMS 3 0 or later is restricted by default This is a security measure to avoid stream ripping or screen recording of the content To access the bitmap data of a stream you must modify the application xml for your FMS application to explicitly permit this or set it in server side ActionScript If you don t have server side access to your FMS machine to change this setting you won t be able to access the pixel data in the video Full Screen Support Full screen playback has become an expected feature in professional video player applications Too often however performance is compromised by a lack of optimization in the application code Recommendations differ depending on the Flash Player version being targeted Flash Player 9 and Later Full screen playback is supported
124. t the beginning of the file Typically this is enabled via checking the fast start option at the muxing stage of the transcoding process Placing the MOOV Atom at the beginning of the file will enable immediate streaming download and playback whereas placement of the MOOV Atom at the end of the file will force it to download in full first before it will start playing the file If progressive download is a desired delivery method then enabling progressive download option in the muxing or transcoding software will place the MOOV Atom at the beginning of the file Streaming playback will not be affected by the location of the MOOV Atom Stream Bitrate Budget Allocation The stream bitrate budget is comprised of all of the audio visual elements in addition to target audience capability network conditions distribution capacity and general economics of delivery When deciding ona bitrate budget to adhere to add about 10 20 percent for network spikes Audio Video Synchronization Keeping audio and video in sync is vital for making certain that a viewing experience is watchable Flash player synchronizes its clock to the audio clock on the system because it is the oldest most reliable and least expensive clock to adhere to Therefore it is important to make sure that the audio source is of the best quality and has the least amount of noise is not clipped and is not muted If audio is not in order the video will pause or play sporadically becaus
125. tations of transformations that may be beyond the player s control as shown in the following table Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 52 RGB 0 255 4 4 4 RGB 0 255 4 4 4 VGA DVI Legacy currently not in use practically requires about 50 higher bitrate YUV 16 235 4 2 2 RGB 0 255 4 4 4 VGA DVI Most widely used YUV 16 235 4 2 2 RGB 0 255 4 4 4 HDMI DisplayLink Increasingly popular and gaining momentum and marketshare replacing DVI YUV 16 235 4 2 2 YUV 16 235 4 4 4 or 4 2 2 HDMI DisplayLink Transformed inside the display device into RGB 0 255 scheme Even if your image was originally born as 0 255 keeping it as such may result in a chance of severe clipping because it may be erroneously interpreted as 16 235 scheme Therefore it makes sense to transform it to the 16 235 scheme and maintain that scheme throughout the process thus minimizing the chance of clipping during chain of transformation processes Audio The quality of sound produced during transformational encoding processes plays a significant part not only in the finished part of the output but also in the quality of the playback experience Audio Bitrate Allocation The bitrate allocation for audio is a straightforward process much less complex than video bitrate selection The elements that comprise of the final bitrate for audio are Sampling rate Amount of channels e Bit depth Encoding mode Sampling Rate Flas
126. tes Bitrate as a variable component across all switching bitrates Same video duration for all switching bitrates Sample use cases Fixed Page Size a Regular In page Size Mode ex 480p b Full Screen Size Mode ex 720p Fixed Screen Size a Mobile Devices b Netbooks c Set Top Boxes IPTV d Full Screen Mode Avoid scaling down from a larger screen size to a smaller designated frame size e g 1280x720 scaled down to 768x432 frame size This will hinder the performance of the player by as much as 40 depending on the client s processing capability Instead upscale or encode at the final fixed size and use ActionScript player logic to switch among targeted bitrates Keep frame sizes with respective aspect ratio in even divisors of 16 for most optimal performance Try not to scale the video object in Flash but use fullscreenSourceRect to zoom to fullscreen mode this improves the smoothness of fullscreen playback significantly For more details visit http www flashstreamworks com archive php post_id 1253805570 To clarify and exemplify our recommendations here is a standard use case of 480p video window in regular website mode and 720p video window in fullscreen mode bitrates are just examples A Without modification of the standard player components beginner 1 512x288p 400 kbps 512x288p 400 kbps 2 512x288p 800 kbps 512x288p 800 kbps 3 512x288p 1200 kbps 512x288p 1200 kbps 4 1280x720p
127. test pattern transformation from 0 255 RGB to 16 235 YUV with color matrixing and range mapping Notice banding of color gradient ramp and slightly distorted waveform on the ramp no potential danger of clipping i e safe mode boost proof Player will do final transformation of level mapping from 16 down to 0 and 235 up to 255 YUV Range transformation from 16 235 to 0 255 to 16 235 YUV Scope One line of first trame YMax 235 RGBMax 235 Selected Line Number 270 Y f DN SR PEAT w wer pe D ie A Ts 235 See EST WES NUDE TT FEE SRE ZEROED SD SHRP RE DE CRS A I SEE 290 l St l t l il 1A l l s Levels 130 aS o am 100 x r t 50 E AEON ores Ss SS SS ess eS aoe Clipped and js ese mc a es S Zz a a as iad ass i ae Ho PERE remapped back o 100 200 300 400 ee _ fo 700 0 900 1000 1100 1200 1300 1400 1500 Imo 1700 41800 1900 2000 Zoomed scope waveform of Ki gradient ramp distorted See Zoomed fragment of gradient ramp distorted Figure 7 Depiction of result of two cascaded level mapping processes Notice distorted gradient and banding of color gradient ramp and distorted waveform onthe ramp also visible gray limits of white on the right of Luma gradient Black square on the left is no longer showing perpendicular rectangular shape clearly visible in reference Figure 5 White square on the right is no longer showing white perpendicular rectangular shape
128. that are exactly half of the original size It should be noted that due to the lack of filtering not only vertical sharpness is lost but also 100 aliasing may be introduced For example 1920x1080 interlaced source with halving technique produces a 960x540 progressive source he ha eel gt aa CO SSS SSS a D RE E D esses FIELDED VIDEO INTERLACED FIELD DECOUPLING DROPPING ONE FIELD REMAINING FIELD 960x540 FIELD 1 29 97 960X540 FIELD 1 29 97 DROPPED 1920xL080i59 94 960X540 FIELD 2 29 97 960X540 FIELD 2 29 97 POO Roe ager ieee Figure 35 Field drop technique process diagram Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 31 This technique is used because interlaced content is based on having two distinct moments in time captured in one half frame in the form of a field where each field is exact half of the picture This interlacing technique was established in the broadcast industry and by various standard associations as a compression mechanism to retain high quality picture data while passing through existing legacy equipment The technique of halving the interlaced picture through decoupling and dropping of one of the fields is not always optimal in all cases It is a selective process of trial and error If there is a lot of motion and panning this technique may produce a stuttering effect where each picture in sequence is not an actual picture in sequence but rathe
129. tiates the removal of the specific atom edts which is hierarchically located within the trak atom which is within the moov atom If the file contains more than one trak such as audio and video media elements then the track number is added to the moov trak edts as shown above By default AtomicParsley will remove the atom from the first moov atom track Adding the next track number in sequence or a track number of your choice will force AtomicParsley to proceed to that atom number next for example moov 2 trak edts To edit all track numbers repeat the command for each track Adding the command string overWrite overwrites your original processed file Atoms Dump n typ 16 010 hdr 8 i mdat O 0x0 hdr 8 a mdat 53480044 0 3300a6c hdr 8 ra a Eh i Lk nor a ll mod ee vk 100 0x64 hdr 8 atom at Bad rak 36581 O6ee5 hdr the end oo thhd 84 0x54 hdr 8 E mdia 36445 0x8e5d hdr 8 Bei hak 62723 OxF503 hdr 8 Hebd 84 0 54 hdr 8 a sat a mdia 62587 Osf47b hdr 8 unprocessed file with invalid edts atoms Figure 3 An original analyzed mp4 file by MP4Muxer MP4Creator Illustrates existence and location of edts atom within the file This file was found to have an invalid edts data Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 70 en typ 16 0x10 hdr 8 99356 041841 c hdr 8 lt
130. tifier ISO IEC 13818 1 A defined subset of the syntax specified in the H 264 video coding specification Different profiles indicate different levels of coding complexity for a picture A predicted frame or a picture coded using references to a previous l or P frame Program Map Table ISO IEC 13818 1 Extension given to profile xml files used by Windows Media Encoder Program Specific Information Presentation Time Stamp ISO IEC 13818 1 Standard definition Serial Digital Interface Supplemental Enhancement Information ISO IEC 14496 10 MPEG 2 Single Program Transport Stream ISO IEC 13818 1 The process of compressing a video signal by eliminating redundancy between adjacent pixels in a frame Sequence Parameter Set Picture Parameter Set The process that compresses a video signal by eliminating redundancy between sequential frames Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform 60 Temporal Masking The phenomenon that happens when a loud sound drowns out a softer sound that occurs immediately before or after it Quantization Part of the spacial encoding process it re orders DCT coefficients according to their visual importance Video Compression The process used to reduce the number of bits needed to repsent a video frame VOD Video on Demand VUI Video Usability Information ISO IEC 14496 10 Weighting During video compression it is the process by which degradation or noise is
131. tterns Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 17 With Scaling Figure 17 Zoomed in cut out of section from ST test depicting the use of Tri band patterns and example of use of incorrect setting with scaling or poor quality scaling There are visible beat waves on both horizontal and vertical Tri band patterns caused by scaling Diamond Pattern and Crop Markers Usage No Cropping a Figure 18 Zoomed in cut out of sections from ST test depicting the use of Diamond Pattern and Crop Marker and example of use of correct setting with no cropping Colored circles are not part of the test pattern and are superimposed for explanation purposes only All picture edges are not cropped and single pixel white markers are visible Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 18 With Cropping Figure 19 Zoomed in cut out of sections from ST test depicting the use of Diamond Pattern and Crop Marker and example of use of incorrect setting with cropping Colored circles are not part of the test pattern and are superimposed for explanation purposes only All picture edges are cropped and single pixel white markers are not visible Frame Aspect Ratio Markers 2 35 1 4 3 14 9 Crop Markers Figure 20 Zoomed in cut out of sections from ST test depicting the use of Frame Aspect Ratio Crop Markers Correct 4 3 Crop
132. uld be constant The transformation of YUV 16 235 to RGB 0 255 needs to happen but it is important that it occur at the end of the processing chain as the display side RGB 0 255 transformation will happen anyway By making certain that this transformation does not happen earlier than at the end you are avoiding chance of further clipping and irreparable damage to the color scheme transformations Also similar damage can be done by boosting gain However ultimately anything outside of 16 235 will be lost or clipped so don t place any valuable picture data outside of 16 235 scheme RGB scheme of 0 255 does not foresee levels below black and above white which exist in YUV scheme 16 235 Because of this transformation of 16 235 to 0 255 done once simply clips levels and no major distortions introduced besides banding However if 0 255 gets interpreted erroneously as 16 235 then black and white crash happens 16 levels of close to black and 20 levels of close to white will be clipped This issue is unrecoverable unfortunately even though one would try to reverse it by converting it to 16 235 that data is gone This would make the picture worse and add banding Even if your image was originally shot as 0 255 keeping it as such may result in a chance of severe clipping because it may be erroneously interpreted as a 16 235 scheme Therefore it makes sense to transform it to a 16 235 scheme and maintain that scheme throughout the process thus
133. ure 5 Consistent GOP structure frame rate and duration is important for smooth playback of multibitrate content The stream in the above diagram could be live or on demand For on demand content the file is typically encoded first and then packaged Live encoding is typically an in line process along with packaging without any intermediate steps So the on demand encoding process results are sent to the packaging process as a file set In live scenarios the audio video payload is sent as data packets in the form of a continuous stream The following variants assume the use of H 264 AVC video codecs and AAC HEAACv1 HEAACv2 audio encoding methods First the bitrate allocation is highlighted against picture frame sizes for video and corresponding interleaved audio Second the matching detailed parameter set is shown for the highlighted bitrate allocation In this document broadband and desktop variants are presented Other platforms will be detailed in future versions of the document Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper N gt A V Stream 2 N gt A V Stream 3 gt A V Stream 5 iat gt A V Stream 6 72 Variant 1 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size Stream Picture Size 1 512x288 300 64 364 1 384x288 300 64 364 2 512x288 600 64 664 2 384
134. ware decoding support However in multibitrate environments where the audio bitrate should be the same across all segments the selection of HE AAC v2 will prevail CODEC BITRATE AAC 48 56 64 80 96 112 128 160 HEAAC v1 40 48 56 64 80 96 112 128 HEAAC v2 40 48 56 64 80 96 112 128 Figure 65 Table of typically selected bitrates for AAC HEAAC v1 and HEAAC v2 CODECs Important Note About Video Audio Synchronization Although video and audio can be multiplexed into a multiprogram stream within the MPEG 4 format due to the need for legacy support video in the Flash Player supports only a single audio and video stream within a file Synchronization of audio and video is done through the audio reference clock So if your audio is experiencing issues such as subpar quality noise or pauses or there is no audio track included then video will either go out of sync or will drop frames Each frame of audio and video have a timestamp associated with them These timestamps are created during the encoding process and act as reference points during decoding and playback When audio and video timestamps are misaligned or unable to synchronize either the audio or the video will start to drift apart unless a reliable resynchronization or realignment mechanism is triggered to bring them back into alignment If the realignment is unsuccessful such as when audio is garbled or cannot be decoded the video and audio will continue to drift apart and eventually the
135. x288 600 64 664 3 512x288 900 64 964 3 384x288 900 64 964 4 512x288 1200 64 1264 4 384x288 1200 64 1264 5 512x288 1500 64 1564 5 384x288 1500 64 1564 6 1280x720 1500 64 1564 7 1280x720 2000 64 2064 8 1280x720 2500 64 2564 2 1280x720 3000 64 3064 10 1280x720 3500 64 3564 11 1920x1080 4000 64 4064 12 1920x1080 5000 64 5064 13 1920x1080 6000 64 6064 14 1920x1080 8000 64 8064 Table 4 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 1 Variant 2 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband Conn Type Broadband 4 3 matched to 16 9 height Stream Picture Size 1 256x144 300 64 364 1 192x244 300 64 364 2 512x288 600 64 664 2 384x288 600 64 664 3 512x288 900 64 964 3 384x288 900 64 964 4 768x432 1200 64 1264 4 576x432 1200 64 1264 5 768x432 1500 64 1564 5 576x432 1500 64 1564 6 1280x720 2000 64 2064 7 1280x720 2500 64 2564 8 1280x720 3000 64 3064 9 1280x720 3500 64 3564 10 1280x720 4000 64 4064 11 1920x1080 5000 64 5064 12 1920x1080 6000 64 6064 13 1920x1080 8000 64 8064 Table 5 For more detailed encoding settings see the Detailed AAC AVC audio video settings section of this document under Variant 2 Video Encoding Cookbook and Profile Guidelines for the Adobe Flash Platform White Paper 73 Variant 3 Multibitrate VOD Desktop Multibitrate VOD Desktop Conn Type Broadband
136. yframe interval still results in good quality and acceptable efficiency 2 3 seconds and switching to a longer interval with much improved network efficiency and reduced server transaction load in the HTTP case 3 5 seconds or more after the first minute or two will provide the best user experience to network efficiency ratio Note When GOP Size or GOP Interval is set to FIXED GOP size then IDR Indexing Scene Change Sensitivity depending on the software should be set to disabled since setting Max GOP size with scene detection or GOP size determined by scene detection not active Also when GOP Size or GOP Interval is set to FIXED GOP the IDR Index Sensitivity determines the sensitivity frequency response to scene change detection or Scene Detection Threshold is normally disabled It is typically set by sensitivity percentage 0 100 lowest least sensitive highest most sensitive In various software packages these settings are available to the user regardless of interdependence relationships that these settings have consequently creating an invalid file or simply omitting the settings altogether For example If encoder is issued a command based on the following settings gop idr_period 2 gop keyframes 30 rc scene_detect 50 Then it means that gop idr_period is a period of keyframes frames where Nth I frame is a keyframe where every 2nd period is a keyframe For instance if your period is a keyframe period set to 2 second
Download Pdf Manuals
Related Search
Related Contents
Sony CDX-GT565UP Operating Instructions ESS600SS ESS610SS ESS620SS User Guide calendrier 2013 - Saint PC Application Manual [SOURce[1|2]] Electrolux ESL 4114 User's Manual V2VCOM 2005 - UCLA Computer Science ASUS RT-AC56R PG8016 User's Manual Fresador conformador de electrodos automático Copyright © All rights reserved.
Failed to retrieve file