Home | History | Annotate | Download | only in 5_multimedia
      1 ## 5.2\. Video Encoding
      2 
      3 Handheld device implementations MUST support the following encoding and make it
      4 available to third-party applications.
      5 
      6 *    [H-0-1] H.264 AVC
      7 *    [H-0-2] VP8
      8 
      9 Television device implementations MUST support the following encoding.
     10 
     11 *    [T-0-1] H.264 AVC
     12 *    [T-0-2] VP8
     13 
     14 Automotive device implementations MUST support the following encoding:
     15 
     16 *    [A-0-1] H.264 AVC
     17 *    [A-0-2] VP8
     18 
     19 
     20 If device implementations support any video encoder and make it available
     21 to third-party apps, they:
     22 
     23 *   SHOULD NOT be, over two sliding windows, more than ~15% over the bitrate
     24 between intraframe (I-frame) intervals.
     25 *   SHOULD NOT be more than ~100% over the bitrate over a sliding window
     26 of 1 second.
     27 
     28 If device implementations include an embedded screen display with the
     29 diagonal length of at least 2.5 inches or include a video output port or
     30 declare the support of a camera via the `android.hardware.camera.any`
     31 feature flag, they:
     32 
     33 *   [C-1-1] MUST include the support of at least one of the VP8 or H.264 video
     34 encoders, and make it available for third-party applications.
     35 *   SHOULD support both VP8 and H.264 video encoders, and make it available
     36 for third-party applications.
     37 
     38 If device implementations support any of the H.264, VP8, VP9 or HEVC video
     39 encoders and make it available to third-party applications, they:
     40 
     41 *   [C-2-1] MUST support dynamically configurable bitrates.
     42 *   SHOULD support variable frame rates, where video encoder SHOULD determine
     43 instantaneous frame duration based on the timestamps of input buffers, and
     44 allocate its bit bucket based on that frame duration.
     45 
     46 If device implementations support the MPEG-4 SP video encoder and make it
     47 available to third-party apps, they:
     48 
     49 *   SHOULD support dynamically configurable bitrates for the supported encoder.
     50 
     51 
     52 ### 5.2.1\. H.263
     53 
     54 If device implementations support H.263 encoders and make it available
     55 to third-party apps, they:
     56 
     57 *   [C-1-1] MUST support Baseline Profile Level 45.
     58 *   SHOULD support dynamically configurable bitrates for the supported encoder.
     59 
     60 
     61 ### 5.2.2\. H-264
     62 
     63 Television device implementations are:
     64 
     65 *   [T-SR] STRONGLY RECOMMENDED to support H.264 encoding of 720p and 1080p
     66 resolution videos.
     67 *   [T-SR] STRONGLY RECOMMENDED to support H.264 encoding of 1080p resolution
     68 video at 30 frame-per-second (fps).
     69 
     70 
     71 If device implementations support H.264 codec, they:
     72 
     73 *   [C-1-1] MUST support Baseline Profile Level 3.
     74     However, support for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock
     75     Ordering) and RS (Redundant Slices) is OPTIONAL. Moreover, to maintain
     76     compatibility with other Android devices, it is RECOMMENDED that ASO, FMO
     77     and RS are not used for Baseline Profile by encoders.
     78 *   [C-1-2] MUST support the SD (Standard Definition) video encoding profiles
     79 in the following table.
     80 *   SHOULD support Main Profile Level 4.
     81 *   SHOULD support the  HD (High Definition) video encoding profiles as
     82 indicated in the following table.
     83 
     84 If device implementations report support of H.264 encoding for 720p or 1080p
     85 resolution videos through the media APIs, they:
     86 
     87 *   [C-2-1] MUST support the encoding profiles in the following table.
     88 
     89 
     90 <table>
     91  <tr>
     92     <th></th>
     93     <th>SD (Low quality)</th>
     94     <th>SD (High quality)</th>
     95     <th>HD 720p</th>
     96     <th>HD 1080p</th>
     97  </tr>
     98  <tr>
     99     <th>Video resolution</th>
    100     <td>320 x 240 px</td>
    101     <td>720 x 480 px</td>
    102     <td>1280 x 720 px</td>
    103     <td>1920 x 1080 px</td>
    104  </tr>
    105  <tr>
    106     <th>Video frame rate</th>
    107     <td>20 fps</td>
    108     <td>30 fps</td>
    109     <td>30 fps</td>
    110     <td>30 fps</td>
    111  </tr>
    112  <tr>
    113     <th>Video bitrate</th>
    114     <td>384 Kbps</td>
    115     <td>2 Mbps</td>
    116     <td>4 Mbps</td>
    117     <td>10 Mbps</td>
    118  </tr>
    119 </table>
    120 
    121 
    122 ### 5.2.3\. VP8
    123 
    124 If device implementations support VP8 codec, they:
    125 
    126 *   [C-1-1] MUST support the SD video encoding profiles.
    127 *   SHOULD support the following HD (High Definition) video encoding profiles.
    128 *   SHOULD support writing Matroska WebM files.
    129 *   SHOULD use a hardware VP8 codec that meets the
    130 [WebM project RTC hardware coding requirements](
    131 http://www.webmproject.org/hardware/rtc-coding-requirements), to ensure
    132 acceptable quality of web video streaming and video-conference services.
    133 
    134 If device implementations report support of VP8 encoding for 720p or 1080p
    135 resolution videos through the media APIs, they:
    136 
    137 *   [C-2-1] MUST support the encoding profiles in the following table.
    138 
    139 <table>
    140  <tr>
    141     <th></th>
    142     <th>SD (Low quality)</th>
    143     <th>SD (High quality)</th>
    144     <th>HD 720p</th>
    145     <th>HD 1080p</th>
    146  </tr>
    147  <tr>
    148     <th>Video resolution</th>
    149     <td>320 x 180 px</td>
    150     <td>640 x 360 px</td>
    151     <td>1280 x 720 px</td>
    152     <td>1920 x 1080 px</td>
    153  </tr>
    154  <tr>
    155     <th>Video frame rate</th>
    156     <td>30 fps</td>
    157     <td>30 fps</td>
    158     <td>30 fps</td>
    159     <td>30 fps</td>
    160  </tr>
    161  <tr>
    162     <th>Video bitrate</th>
    163     <td>800 Kbps </td>
    164     <td>2 Mbps</td>
    165     <td>4 Mbps</td>
    166     <td>10 Mbps</td>
    167  </tr>
    168 </table>
    169 
    170 
    171 ### 5.2.4\. VP9
    172 
    173 If device implementations support VP9 codec, they:
    174 
    175 *   SHOULD support writing Matroska WebM files.
    176 
    177