1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2010 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 (timelapse1080p|timelapse720p|timelapse480p|timelapsehigh|timelapselow|480p|qcif|high|low|1080p) #REQUIRED> 26 <!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED> 27 <!ATTLIST EncoderProfile duration (30|60) #REQUIRED> 28 <!ELEMENT Video EMPTY> 29 <!ATTLIST Video codec (h264|h263|m4v) #REQUIRED> 30 <!ATTLIST Video bitRate CDATA #REQUIRED> 31 <!ATTLIST Video width CDATA #REQUIRED> 32 <!ATTLIST Video height CDATA #REQUIRED> 33 <!ATTLIST Video frameRate CDATA #REQUIRED> 34 <!ELEMENT Audio EMPTY> 35 <!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED> 36 <!ATTLIST Audio bitRate CDATA #REQUIRED> 37 <!ATTLIST Audio sampleRate CDATA #REQUIRED> 38 <!ATTLIST Audio channels (1|2) #REQUIRED> 39 <!ELEMENT ImageEncoding EMPTY> 40 <!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED> 41 <!ELEMENT ImageDecoding EMPTY> 42 <!ATTLIST ImageDecoding memCap CDATA #REQUIRED> 43 <!ELEMENT Camera EMPTY> 44 <!ATTLIST Camera previewFrameRate CDATA #REQUIRED> 45 <!ELEMENT EncoderOutputFileFormat EMPTY> 46 <!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED> 47 <!ELEMENT VideoEncoderCap EMPTY> 48 <!ATTLIST VideoEncoderCap name (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 <!-- Back Camera --> 81 <CamcorderProfiles cameraId="0"> 82 83 <EncoderProfile quality="low" fileFormat="3gp" duration="30"> 84 <Video codec="h264" 85 bitRate="384000" 86 width="176" 87 height="144" 88 frameRate="30" /> 89 90 <Audio codec="amrnb" 91 bitRate="12200" 92 sampleRate="8000" 93 channels="1" /> 94 </EncoderProfile> 95 96 <EncoderProfile quality="high" fileFormat="3gp" duration="30"> 97 <Video codec="h264" 98 bitRate="14000000" 99 width="1920" 100 height="1080" 101 frameRate="30" /> 102 103 <Audio codec="aac" 104 bitRate="96000" 105 sampleRate="48000" 106 channels="2" /> 107 </EncoderProfile> 108 109 <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> 110 <Video codec="h264" 111 bitRate="384000" 112 width="176" 113 height="144" 114 frameRate="30" /> 115 116 <Audio codec="amrnb" 117 bitRate="12200" 118 sampleRate="8000" 119 channels="1" /> 120 </EncoderProfile> 121 122 <EncoderProfile quality="cif" fileFormat="3gp" duration="30"> 123 <Video codec="h264" 124 bitRate="1536000" 125 width="352" 126 height="288" 127 frameRate="30" /> 128 129 <Audio codec="amrnb" 130 bitRate="12200" 131 sampleRate="8000" 132 channels="1" /> 133 </EncoderProfile> 134 135 <EncoderProfile quality="480p" fileFormat="3gp" duration="30"> 136 <Video codec="h264" 137 bitRate="4000000" 138 width="640" 139 height="480" 140 frameRate="30" /> 141 142 <Audio codec="aac" 143 bitRate="96000" 144 sampleRate="48000" 145 channels="2" /> 146 </EncoderProfile> 147 148 <EncoderProfile quality="720p" fileFormat="3gp" duration="30"> 149 <Video codec="h264" 150 bitRate="8000000" 151 width="1280" 152 height="720" 153 frameRate="30" /> 154 155 <Audio codec="aac" 156 bitRate="96000" 157 sampleRate="48000" 158 channels="2" /> 159 </EncoderProfile> 160 161 <EncoderProfile quality="1080p" fileFormat="3gp" duration="30"> 162 <Video codec="h264" 163 bitRate="14000000" 164 width="1920" 165 height="1080" 166 frameRate="30" /> 167 168 <Audio codec="aac" 169 bitRate="96000" 170 sampleRate="48000" 171 channels="2" /> 172 </EncoderProfile> 173 174 <EncoderProfile quality="timelapselow" fileFormat="3gp" duration="30"> 175 <Video codec="h264" 176 bitRate="384000" 177 width="176" 178 height="144" 179 frameRate="30" /> 180 181 <!-- 182 The Audio part of the profile will not be used since time lapse mode 183 does not capture audio 184 --> 185 <Audio codec="amrnb" 186 bitRate="12200" 187 sampleRate="8000" 188 channels="1" /> 189 </EncoderProfile> 190 191 <EncoderProfile quality="timelapsehigh" fileFormat="3gp" duration="30"> 192 <Video codec="h264" 193 bitRate="14000000" 194 width="1920" 195 height="1080" 196 frameRate="30" /> 197 198 <!-- 199 The Audio part of the profile will not be used since time lapse mode 200 does not capture audio 201 --> 202 <Audio codec="aac" 203 bitRate="96000" 204 sampleRate="48000" 205 channels="2" /> 206 </EncoderProfile> 207 208 <EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="30"> 209 <Video codec="h264" 210 bitRate="384000" 211 width="176" 212 height="144" 213 frameRate="30" /> 214 215 <!-- 216 The Audio part of the profile will not be used since time lapse mode 217 does not capture audio 218 --> 219 <Audio codec="amrnb" 220 bitRate="12200" 221 sampleRate="8000" 222 channels="1" /> 223 </EncoderProfile> 224 225 <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30"> 226 <Video codec="h264" 227 bitRate="1536000" 228 width="352" 229 height="288" 230 frameRate="30" /> 231 232 <!-- 233 The Audio part of the profile will not be used since time lapse mode 234 does not capture audio 235 --> 236 <Audio codec="amrnb" 237 bitRate="12200" 238 sampleRate="8000" 239 channels="1" /> 240 </EncoderProfile> 241 242 <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="30"> 243 <Video codec="h264" 244 bitRate="4000000" 245 width="640" 246 height="480" 247 frameRate="30" /> 248 249 <!-- 250 The Audio part of the profile will not be used since time lapse mode 251 does not capture audio 252 --> 253 <Audio codec="aac" 254 bitRate="96000" 255 sampleRate="48000" 256 channels="2" /> 257 </EncoderProfile> 258 259 <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="30"> 260 <Video codec="h264" 261 bitRate="8000000" 262 width="1280" 263 height="720" 264 frameRate="30" /> 265 266 <!-- 267 The Audio part of the profile will not be used since time lapse mode 268 does not capture audio 269 --> 270 <Audio codec="aac" 271 bitRate="96000" 272 sampleRate="48000" 273 channels="2" /> 274 </EncoderProfile> 275 276 <EncoderProfile quality="timelapse1080p" fileFormat="3gp" duration="30"> 277 <Video codec="h264" 278 bitRate="14000000" 279 width="1920" 280 height="1080" 281 frameRate="30" /> 282 283 <!-- 284 The Audio part of the profile will not be used since time lapse mode 285 does not capture audio 286 --> 287 <Audio codec="aac" 288 bitRate="96000" 289 sampleRate="48000" 290 channels="2" /> 291 </EncoderProfile> 292 293 <ImageEncoding quality="90" /> 294 <ImageEncoding quality="80" /> 295 <ImageEncoding quality="70" /> 296 <ImageDecoding memCap="20000000" /> 297 298 </CamcorderProfiles> 299 300 <!-- Front Camera --> 301 <CamcorderProfiles cameraId="1"> 302 303 <EncoderProfile quality="low" fileFormat="3gp" duration="30"> 304 <Video codec="h264" 305 bitRate="384000" 306 width="176" 307 height="144" 308 frameRate="30" /> 309 310 <Audio codec="amrnb" 311 bitRate="12200" 312 sampleRate="8000" 313 channels="1" /> 314 </EncoderProfile> 315 316 <EncoderProfile quality="high" fileFormat="3gp" duration="30"> 317 <Video codec="h264" 318 bitRate="8000000" 319 width="1280" 320 height="720" 321 frameRate="30" /> 322 323 <Audio codec="aac" 324 bitRate="96000" 325 sampleRate="48000" 326 channels="2" /> 327 </EncoderProfile> 328 329 <EncoderProfile quality="720p" fileFormat="3gp" duration="30"> 330 <Video codec="h264" 331 bitRate="8000000" 332 width="1280" 333 height="720" 334 frameRate="30" /> 335 336 <Audio codec="aac" 337 bitRate="96000" 338 sampleRate="48000" 339 channels="2" /> 340 </EncoderProfile> 341 342 <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> 343 <Video codec="h264" 344 bitRate="384000" 345 width="176" 346 height="144" 347 frameRate="30" /> 348 349 <Audio codec="amrnb" 350 bitRate="12200" 351 sampleRate="8000" 352 channels="1" /> 353 </EncoderProfile> 354 355 <EncoderProfile quality="cif" fileFormat="3gp" duration="30"> 356 <Video codec="h264" 357 bitRate="1536000" 358 width="352" 359 height="288" 360 frameRate="30" /> 361 362 <Audio codec="amrnb" 363 bitRate="12200" 364 sampleRate="8000" 365 channels="1" /> 366 </EncoderProfile> 367 368 <EncoderProfile quality="480p" fileFormat="3gp" duration="30"> 369 <Video codec="h264" 370 bitRate="4000000" 371 width="640" 372 height="480" 373 frameRate="30" /> 374 375 <Audio codec="aac" 376 bitRate="96000" 377 sampleRate="48000" 378 channels="2" /> 379 </EncoderProfile> 380 381 <EncoderProfile quality="timelapselow" fileFormat="3gp" duration="30"> 382 <Video codec="h264" 383 bitRate="384000" 384 width="176" 385 height="144" 386 frameRate="30" /> 387 388 <!-- 389 The Audio part of the profile will not be used since time lapse mode 390 does not capture audio 391 --> 392 <Audio codec="amrnb" 393 bitRate="12200" 394 sampleRate="8000" 395 channels="1" /> 396 </EncoderProfile> 397 398 <EncoderProfile quality="timelapsehigh" fileFormat="3gp" duration="30"> 399 <Video codec="h264" 400 bitRate="4000000" 401 width="640" 402 height="480" 403 frameRate="30" /> 404 405 <!-- 406 The Audio part of the profile will not be used since time lapse mode 407 does not capture audio 408 --> 409 <Audio codec="aac" 410 bitRate="96000" 411 sampleRate="48000" 412 channels="2" /> 413 </EncoderProfile> 414 415 <EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="30"> 416 <Video codec="h264" 417 bitRate="384000" 418 width="176" 419 height="144" 420 frameRate="30" /> 421 422 <!-- 423 The Audio part of the profile will not be used since time lapse mode 424 does not capture audio 425 --> 426 <Audio codec="amrnb" 427 bitRate="12200" 428 sampleRate="8000" 429 channels="1" /> 430 </EncoderProfile> 431 432 <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30"> 433 <Video codec="h264" 434 bitRate="1536000" 435 width="352" 436 height="288" 437 frameRate="30" /> 438 439 <!-- 440 The Audio part of the profile will not be used since time lapse mode 441 does not capture audio 442 --> 443 <Audio codec="amrnb" 444 bitRate="12200" 445 sampleRate="8000" 446 channels="1" /> 447 </EncoderProfile> 448 449 <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="30"> 450 <Video codec="h264" 451 bitRate="4000000" 452 width="640" 453 height="480" 454 frameRate="30" /> 455 456 <!-- 457 The Audio part of the profile will not be used since time lapse mode 458 does not capture audio 459 --> 460 <Audio codec="aac" 461 bitRate="96000" 462 sampleRate="48000" 463 channels="2" /> 464 </EncoderProfile> 465 466 <ImageEncoding quality="90" /> 467 <ImageEncoding quality="80" /> 468 <ImageEncoding quality="70" /> 469 <ImageDecoding memCap="20000000" /> 470 471 </CamcorderProfiles> 472 473 <EncoderOutputFileFormat name="3gp" /> 474 475 <!-- 476 If a codec is not enabled, it is invisible to the applications 477 In other words, the applications won't be able to use the codec 478 or query the capabilities of the codec at all if it is disabled 479 --> 480 <VideoEncoderCap name="h264" enabled="true" 481 minBitRate="64000" maxBitRate="20000000" 482 minFrameWidth="176" maxFrameWidth="1920" 483 minFrameHeight="144" maxFrameHeight="1080" 484 minFrameRate="1" maxFrameRate="30" /> 485 486 <VideoEncoderCap name="h263" enabled="true" 487 minBitRate="64000" maxBitRate="8000000" 488 minFrameWidth="176" maxFrameWidth="704" 489 minFrameHeight="144" maxFrameHeight="576" 490 minFrameRate="1" maxFrameRate="30" /> 491 492 <VideoEncoderCap name="m4v" enabled="true" 493 minBitRate="64000" maxBitRate="10000000" 494 minFrameWidth="176" maxFrameWidth="1280" 495 minFrameHeight="144" maxFrameHeight="720" 496 minFrameRate="1" maxFrameRate="30" /> 497 498 <AudioEncoderCap name="aac" enabled="true" 499 minBitRate="8000" maxBitRate="320000" 500 minSampleRate="8000" maxSampleRate="48000" 501 minChannels="1" maxChannels="2" /> 502 503 <AudioEncoderCap name="amrwb" enabled="true" 504 minBitRate="6600" maxBitRate="23050" 505 minSampleRate="16000" maxSampleRate="16000" 506 minChannels="1" maxChannels="1" /> 507 508 <AudioEncoderCap name="amrnb" enabled="true" 509 minBitRate="4750" maxBitRate="12200" 510 minSampleRate="8000" maxSampleRate="8000" 511 minChannels="1" maxChannels="1" /> 512 513 <VideoDecoderCap name="wmv" enabled="true"/> 514 <AudioDecoderCap name="wma" enabled="true"/> 515 </MediaSettings> 516