1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright 2013 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 <!DOCTYPE MediaSettings [ 17 <!ELEMENT MediaSettings (CamcorderProfiles, 18 EncoderOutputFileFormat+, 19 VideoEncoderCap+, 20 AudioEncoderCap+, 21 VideoDecoderCap, 22 AudioDecoderCap)> 23 <!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)> 24 <!ELEMENT EncoderProfile (Video, Audio)> 25 <!ATTLIST EncoderProfile quality (high|low) #REQUIRED> 26 <!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED> 27 <!ATTLIST EncoderProfile duration (30|60) #REQUIRED> 28 <!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED> 29 <!ELEMENT Video EMPTY> 30 <!ATTLIST Video codec (h264|h263|m4v) #REQUIRED> 31 <!ATTLIST Video bitRate CDATA #REQUIRED> 32 <!ATTLIST Video width CDATA #REQUIRED> 33 <!ATTLIST Video height CDATA #REQUIRED> 34 <!ATTLIST Video frameRate CDATA #REQUIRED> 35 <!ELEMENT Audio EMPTY> 36 <!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED> 37 <!ATTLIST Audio bitRate CDATA #REQUIRED> 38 <!ATTLIST Audio sampleRate CDATA #REQUIRED> 39 <!ATTLIST Audio channels (1|2) #REQUIRED> 40 <!ELEMENT ImageEncoding EMPTY> 41 <!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED> 42 <!ELEMENT ImageDecoding EMPTY> 43 <!ATTLIST ImageDecoding memCap CDATA #REQUIRED> 44 <!ELEMENT Camera EMPTY> 45 <!ELEMENT EncoderOutputFileFormat EMPTY> 46 <!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED> 47 <!ELEMENT VideoEncoderCap EMPTY> 48 <!ATTLIST VideoEncoderCap name (hevc|h264|h263|m4v|wmv) #REQUIRED> 49 <!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED> 50 <!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED> 51 <!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED> 52 <!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED> 53 <!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED> 54 <!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED> 55 <!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED> 56 <!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED> 57 <!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED> 58 <!ELEMENT AudioEncoderCap EMPTY> 59 <!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED> 60 <!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED> 61 <!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED> 62 <!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED> 63 <!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED> 64 <!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED> 65 <!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED> 66 <!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED> 67 <!ELEMENT VideoDecoderCap EMPTY> 68 <!ATTLIST VideoDecoderCap name (wmv) #REQUIRED> 69 <!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED> 70 <!ELEMENT AudioDecoderCap EMPTY> 71 <!ATTLIST AudioDecoderCap name (wma) #REQUIRED> 72 <!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED> 73 ]> 74 <!-- 75 This file is used to declare the multimedia profiles and capabilities 76 on an android-powered device. 77 --> 78 <MediaSettings> 79 <!-- Each camcorder profile defines a set of predefined configuration parameters --> 80 <CamcorderProfiles cameraId="0"> 81 82 <EncoderProfile quality="low" fileFormat="3gp" duration="60"> 83 <Video codec="h264" 84 bitRate="128000" 85 width="176" 86 height="144" 87 frameRate="30" /> 88 89 <Audio codec="amrnb" 90 bitRate="12200" 91 sampleRate="8000" 92 channels="1" /> 93 </EncoderProfile> 94 95 <EncoderProfile quality="high" fileFormat="mp4" duration="30"> 96 <Video codec="h264" 97 bitRate="42000000" 98 width="3840" 99 height="2160" 100 frameRate="30" /> 101 <Audio codec="aac" 102 bitRate="96000" 103 sampleRate="48000" 104 channels="1" /> 105 </EncoderProfile> 106 107 <EncoderProfile quality="qcif" fileFormat="3gp" duration="60"> 108 <Video codec="h264" 109 bitRate="128000" 110 width="176" 111 height="144" 112 frameRate="30" /> 113 <Audio codec="amrnb" 114 bitRate="12200" 115 sampleRate="8000" 116 channels="1" /> 117 </EncoderProfile> 118 119 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 120 <Video codec="h264" 121 bitRate="512000" 122 width="320" 123 height="240" 124 frameRate="30" /> 125 <Audio codec="aac" 126 bitRate="156000" 127 sampleRate="48000" 128 channels="2" /> 129 </EncoderProfile> 130 131 <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> 132 <Video codec="h264" 133 bitRate="1200000" 134 width="352" 135 height="288" 136 frameRate="30" /> 137 <Audio codec="aac" 138 bitRate="96000" 139 sampleRate="48000" 140 channels="1" /> 141 </EncoderProfile> 142 143 <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> 144 <Video codec="h264" 145 bitRate="6000000" 146 width="720" 147 height="480" 148 frameRate="30" /> 149 <Audio codec="aac" 150 bitRate="96000" 151 sampleRate="48000" 152 channels="1" /> 153 </EncoderProfile> 154 155 <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> 156 <Video codec="h264" 157 bitRate="12000000" 158 width="1280" 159 height="720" 160 frameRate="30" /> 161 <Audio codec="aac" 162 bitRate="96000" 163 sampleRate="48000" 164 channels="1" /> 165 </EncoderProfile> 166 167 <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> 168 <Video codec="h264" 169 bitRate="17000000" 170 width="1920" 171 height="1080" 172 frameRate="30" /> 173 <Audio codec="aac" 174 bitRate="96000" 175 sampleRate="48000" 176 channels="1" /> 177 </EncoderProfile> 178 179 <EncoderProfile quality="2160p" fileFormat="mp4" duration="30"> 180 <Video codec="h264" 181 bitRate="42000000" 182 width="3840" 183 height="2160" 184 frameRate="30" /> 185 <Audio codec="aac" 186 bitRate="96000" 187 sampleRate="48000" 188 channels="1" /> 189 </EncoderProfile> 190 191 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 192 <Video codec="h264" 193 bitRate="192000" 194 width="176" 195 height="144" 196 frameRate="30" /> 197 <!-- audio setting is ignored --> 198 <Audio codec="amrnb" 199 bitRate="12200" 200 sampleRate="8000" 201 channels="1" /> 202 </EncoderProfile> 203 204 <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> 205 <Video codec="h264" 206 bitRate="1200000" 207 width="352" 208 height="288" 209 frameRate="30" /> 210 <!-- audio setting is ignored --> 211 <Audio codec="aac" 212 bitRate="96000" 213 sampleRate="48000" 214 channels="1" /> 215 </EncoderProfile> 216 217 <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> 218 <Video codec="h264" 219 bitRate="6000000" 220 width="720" 221 height="480" 222 frameRate="30" /> 223 <!-- audio setting is ignored --> 224 <Audio codec="aac" 225 bitRate="96000" 226 sampleRate="48000" 227 channels="1" /> 228 </EncoderProfile> 229 230 <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> 231 <Video codec="h264" 232 bitRate="12000000" 233 width="1280" 234 height="720" 235 frameRate="30" /> 236 <!-- audio setting is ignored --> 237 <Audio codec="aac" 238 bitRate="96000" 239 sampleRate="48000" 240 channels="1" /> 241 </EncoderProfile> 242 243 <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> 244 <Video codec="h264" 245 bitRate="17000000" 246 width="1920" 247 height="1080" 248 frameRate="30" /> 249 <!-- audio setting is ignored --> 250 <Audio codec="aac" 251 bitRate="96000" 252 sampleRate="48000" 253 channels="1" /> 254 </EncoderProfile> 255 256 <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30"> 257 <Video codec="h264" 258 bitRate="42000000" 259 width="3840" 260 height="2160" 261 frameRate="30" /> 262 <!-- audio setting is ignored --> 263 <Audio codec="aac" 264 bitRate="96000" 265 sampleRate="48000" 266 channels="1" /> 267 </EncoderProfile> 268 269 <!-- CAMCORDER_QUALITY_HIGH_SPEED_LOW/720P : 720p@240fps; 55.0 Mbps --> 270 <EncoderProfile quality="highspeedlow" fileFormat="mp4" duration="30"> 271 <Video codec="h264" 272 bitRate="42000000" 273 width="1280" 274 height="720" 275 frameRate="240" /> 276 <!-- audio setting is ignored --> 277 <Audio codec="aac" 278 bitRate="96000" 279 sampleRate="48000" 280 channels="1" /> 281 </EncoderProfile> 282 283 <!-- CAMCORDER_QUALITY_HIGH_SPEED_HIGH/720P : 720p@240fps; 55.0 Mbps --> 284 <EncoderProfile quality="highspeedhigh" fileFormat="mp4" duration="30"> 285 <Video codec="h264" 286 bitRate="42000000" 287 width="1280" 288 height="720" 289 frameRate="240" /> 290 <!-- audio setting is ignored --> 291 <Audio codec="aac" 292 bitRate="96000" 293 sampleRate="48000" 294 channels="1" /> 295 </EncoderProfile> 296 297 <EncoderProfile quality="highspeed720p" fileFormat="mp4" duration="30"> 298 <Video codec="h264" 299 bitRate="42000000" 300 width="1280" 301 height="720" 302 frameRate="240" /> 303 <!-- audio setting is ignored --> 304 <Audio codec="aac" 305 bitRate="96000" 306 sampleRate="48000" 307 channels="1" /> 308 </EncoderProfile> 309 310 <ImageEncoding quality="95" /> 311 <ImageEncoding quality="80" /> 312 <ImageEncoding quality="70" /> 313 <ImageDecoding memCap="20000000" /> 314 315 </CamcorderProfiles> 316 317 <CamcorderProfiles cameraId="1"> 318 319 <EncoderProfile quality="low" fileFormat="3gp" duration="60"> 320 <Video codec="h264" 321 bitRate="128000" 322 width="176" 323 height="144" 324 frameRate="30" /> 325 326 <Audio codec="amrnb" 327 bitRate="12200" 328 sampleRate="8000" 329 channels="1" /> 330 </EncoderProfile> 331 332 <EncoderProfile quality="high" fileFormat="mp4" duration="30"> 333 <Video codec="h264" 334 bitRate="17000000" 335 width="1920" 336 height="1080" 337 frameRate="30" /> 338 <Audio codec="aac" 339 bitRate="96000" 340 sampleRate="48000" 341 channels="1" /> 342 </EncoderProfile> 343 344 <EncoderProfile quality="qcif" fileFormat="3gp" duration="60"> 345 <Video codec="h264" 346 bitRate="128000" 347 width="176" 348 height="144" 349 frameRate="30" /> 350 <Audio codec="amrnb" 351 bitRate="12200" 352 sampleRate="8000" 353 channels="1" /> 354 </EncoderProfile> 355 356 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 357 <Video codec="h264" 358 bitRate="512000" 359 width="320" 360 height="240" 361 frameRate="30" /> 362 <Audio codec="aac" 363 bitRate="156000" 364 sampleRate="48000" 365 channels="2" /> 366 </EncoderProfile> 367 368 <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> 369 <Video codec="h264" 370 bitRate="1200000" 371 width="352" 372 height="288" 373 frameRate="30" /> 374 <Audio codec="aac" 375 bitRate="96000" 376 sampleRate="48000" 377 channels="1" /> 378 </EncoderProfile> 379 380 <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> 381 <Video codec="h264" 382 bitRate="6000000" 383 width="720" 384 height="480" 385 frameRate="30" /> 386 <Audio codec="aac" 387 bitRate="96000" 388 sampleRate="48000" 389 channels="1" /> 390 </EncoderProfile> 391 392 <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> 393 <Video codec="h264" 394 bitRate="12000000" 395 width="1280" 396 height="720" 397 frameRate="30" /> 398 <Audio codec="aac" 399 bitRate="96000" 400 sampleRate="48000" 401 channels="1" /> 402 </EncoderProfile> 403 404 <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> 405 <Video codec="h264" 406 bitRate="17000000" 407 width="1920" 408 height="1080" 409 frameRate="30" /> 410 <Audio codec="aac" 411 bitRate="96000" 412 sampleRate="48000" 413 channels="1" /> 414 </EncoderProfile> 415 416 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 417 <Video codec="h264" 418 bitRate="192000" 419 width="176" 420 height="144" 421 frameRate="30" /> 422 <!-- audio setting is ignored --> 423 <Audio codec="amrnb" 424 bitRate="12200" 425 sampleRate="8000" 426 channels="1" /> 427 </EncoderProfile> 428 429 <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> 430 <Video codec="h264" 431 bitRate="1200000" 432 width="352" 433 height="288" 434 frameRate="30" /> 435 <!-- audio setting is ignored --> 436 <Audio codec="aac" 437 bitRate="96000" 438 sampleRate="48000" 439 channels="1" /> 440 </EncoderProfile> 441 442 <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> 443 <Video codec="h264" 444 bitRate="6000000" 445 width="720" 446 height="480" 447 frameRate="30" /> 448 <!-- audio setting is ignored --> 449 <Audio codec="aac" 450 bitRate="96000" 451 sampleRate="48000" 452 channels="1" /> 453 </EncoderProfile> 454 455 <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> 456 <Video codec="h264" 457 bitRate="12000000" 458 width="1280" 459 height="720" 460 frameRate="30" /> 461 <!-- audio setting is ignored --> 462 <Audio codec="aac" 463 bitRate="96000" 464 sampleRate="48000" 465 channels="1" /> 466 </EncoderProfile> 467 468 <ImageEncoding quality="95" /> 469 <ImageEncoding quality="80" /> 470 <ImageEncoding quality="70" /> 471 <ImageDecoding memCap="20000000" /> 472 473 </CamcorderProfiles> 474 475 <EncoderOutputFileFormat name="3gp" /> 476 <EncoderOutputFileFormat name="mp4" /> 477 478 <!-- 479 If a codec is not enabled, it is invisible to the applications 480 In other words, the applications won't be able to use the codec 481 or query the capabilities of the codec at all if it is disabled 482 --> 483 <VideoEncoderCap name="hevc" enabled="true" 484 minBitRate="64000" maxBitRate="100000000" 485 minFrameWidth="176" maxFrameWidth="3840" 486 minFrameHeight="144" maxFrameHeight="2160" 487 minFrameRate="15" maxFrameRate="30" /> 488 489 <VideoEncoderCap name="h264" enabled="true" 490 minBitRate="64000" maxBitRate="100000000" 491 minFrameWidth="176" maxFrameWidth="3840" 492 minFrameHeight="144" maxFrameHeight="2160" 493 minFrameRate="15" maxFrameRate="30" /> 494 495 <VideoEncoderCap name="h263" enabled="true" 496 minBitRate="64000" maxBitRate="2000000" 497 minFrameWidth="176" maxFrameWidth="800" 498 minFrameHeight="144" maxFrameHeight="480" 499 minFrameRate="15" maxFrameRate="30" /> 500 501 <VideoEncoderCap name="m4v" enabled="true" 502 minBitRate="64000" maxBitRate="40000000" 503 minFrameWidth="176" maxFrameWidth="1920" 504 minFrameHeight="144" maxFrameHeight="1080" 505 minFrameRate="15" maxFrameRate="30" /> 506 507 <AudioEncoderCap name="aac" enabled="true" 508 minBitRate="758" maxBitRate="288000" 509 minSampleRate="8000" maxSampleRate="48000" 510 minChannels="1" maxChannels="1" /> 511 512 <AudioEncoderCap name="heaac" enabled="true" 513 minBitRate="8000" maxBitRate="64000" 514 minSampleRate="16000" maxSampleRate="48000" 515 minChannels="1" maxChannels="1" /> 516 517 <AudioEncoderCap name="aaceld" enabled="true" 518 minBitRate="16000" maxBitRate="192000" 519 minSampleRate="16000" maxSampleRate="48000" 520 minChannels="1" maxChannels="1" /> 521 522 <AudioEncoderCap name="amrwb" enabled="true" 523 minBitRate="6600" maxBitRate="23050" 524 minSampleRate="16000" maxSampleRate="16000" 525 minChannels="1" maxChannels="1" /> 526 527 <AudioEncoderCap name="amrnb" enabled="true" 528 minBitRate="5525" maxBitRate="12200" 529 minSampleRate="8000" maxSampleRate="8000" 530 minChannels="1" maxChannels="1" /> 531 532 <!-- 533 FIXME: 534 We do not check decoder capabilities at present 535 At present, we only check whether windows media is visible 536 for TEST applications. For other applications, we do 537 not perform any checks at all. 538 --> 539 <VideoDecoderCap name="wmv" enabled="false"/> 540 <AudioDecoderCap name="wma" enabled="false"/> 541 </MediaSettings> 542