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 (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<!ELEMENT VideoEditorCap EMPTY> 74<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED> 75<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED> 76<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED> 77<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED> 78<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED> 79<!ELEMENT ExportVideoProfile EMPTY> 80<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED> 81<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED> 82<!ATTLIST ExportVideoProfile level CDATA #REQUIRED> 83]> 84<!-- 85 This file is used to declare the multimedia profiles and capabilities 86 on an android-powered device. 87--> 88<MediaSettings> 89 <!-- Each camcorder profile defines a set of predefined configuration parameters --> 90 <CamcorderProfiles cameraId="0"> 91 92 <EncoderProfile quality="low" fileFormat="3gp" duration="60"> 93 <Video codec="h264" 94 bitRate="128000" 95 width="176" 96 height="144" 97 frameRate="30" /> 98 99 <Audio codec="amrnb" 100 bitRate="12200" 101 sampleRate="8000" 102 channels="1" /> 103 </EncoderProfile> 104 105 <EncoderProfile quality="high" fileFormat="mp4" duration="30"> 106 <Video codec="h264" 107 bitRate="42000000" 108 width="3840" 109 height="2160" 110 frameRate="30" /> 111 <Audio codec="aac" 112 bitRate="96000" 113 sampleRate="48000" 114 channels="1" /> 115 </EncoderProfile> 116 117 <EncoderProfile quality="qcif" fileFormat="3gp" duration="60"> 118 <Video codec="h264" 119 bitRate="128000" 120 width="176" 121 height="144" 122 frameRate="30" /> 123 <Audio codec="amrnb" 124 bitRate="12200" 125 sampleRate="8000" 126 channels="1" /> 127 </EncoderProfile> 128 129 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 130 <Video codec="h264" 131 bitRate="512000" 132 width="320" 133 height="240" 134 frameRate="30" /> 135 <Audio codec="aac" 136 bitRate="156000" 137 sampleRate="48000" 138 channels="2" /> 139 </EncoderProfile> 140 141 <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> 142 <Video codec="h264" 143 bitRate="1200000" 144 width="352" 145 height="288" 146 frameRate="30" /> 147 <Audio codec="aac" 148 bitRate="96000" 149 sampleRate="48000" 150 channels="1" /> 151 </EncoderProfile> 152 153 <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> 154 <Video codec="h264" 155 bitRate="6000000" 156 width="720" 157 height="480" 158 frameRate="30" /> 159 <Audio codec="aac" 160 bitRate="96000" 161 sampleRate="48000" 162 channels="1" /> 163 </EncoderProfile> 164 165 <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> 166 <Video codec="h264" 167 bitRate="12000000" 168 width="1280" 169 height="720" 170 frameRate="30" /> 171 <Audio codec="aac" 172 bitRate="96000" 173 sampleRate="48000" 174 channels="1" /> 175 </EncoderProfile> 176 177 <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> 178 <Video codec="h264" 179 bitRate="17000000" 180 width="1920" 181 height="1080" 182 frameRate="30" /> 183 <Audio codec="aac" 184 bitRate="96000" 185 sampleRate="48000" 186 channels="1" /> 187 </EncoderProfile> 188 189 <EncoderProfile quality="2160p" fileFormat="mp4" duration="30"> 190 <Video codec="h264" 191 bitRate="42000000" 192 width="3840" 193 height="2160" 194 frameRate="30" /> 195 <Audio codec="aac" 196 bitRate="96000" 197 sampleRate="48000" 198 channels="1" /> 199 </EncoderProfile> 200 201 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 202 <Video codec="h264" 203 bitRate="192000" 204 width="176" 205 height="144" 206 frameRate="30" /> 207 <!-- audio setting is ignored --> 208 <Audio codec="amrnb" 209 bitRate="12200" 210 sampleRate="8000" 211 channels="1" /> 212 </EncoderProfile> 213 214 <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> 215 <Video codec="h264" 216 bitRate="1200000" 217 width="352" 218 height="288" 219 frameRate="30" /> 220 <!-- audio setting is ignored --> 221 <Audio codec="aac" 222 bitRate="96000" 223 sampleRate="48000" 224 channels="1" /> 225 </EncoderProfile> 226 227 <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> 228 <Video codec="h264" 229 bitRate="6000000" 230 width="720" 231 height="480" 232 frameRate="30" /> 233 <!-- audio setting is ignored --> 234 <Audio codec="aac" 235 bitRate="96000" 236 sampleRate="48000" 237 channels="1" /> 238 </EncoderProfile> 239 240 <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> 241 <Video codec="h264" 242 bitRate="12000000" 243 width="1280" 244 height="720" 245 frameRate="30" /> 246 <!-- audio setting is ignored --> 247 <Audio codec="aac" 248 bitRate="96000" 249 sampleRate="48000" 250 channels="1" /> 251 </EncoderProfile> 252 253 <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> 254 <Video codec="h264" 255 bitRate="17000000" 256 width="1920" 257 height="1080" 258 frameRate="30" /> 259 <!-- audio setting is ignored --> 260 <Audio codec="aac" 261 bitRate="96000" 262 sampleRate="48000" 263 channels="1" /> 264 </EncoderProfile> 265 266 <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30"> 267 <Video codec="h264" 268 bitRate="42000000" 269 width="3840" 270 height="2160" 271 frameRate="30" /> 272 <!-- audio setting is ignored --> 273 <Audio codec="aac" 274 bitRate="96000" 275 sampleRate="48000" 276 channels="1" /> 277 </EncoderProfile> 278 279 <ImageEncoding quality="95" /> 280 <ImageEncoding quality="80" /> 281 <ImageEncoding quality="70" /> 282 <ImageDecoding memCap="20000000" /> 283 284 </CamcorderProfiles> 285 286 <CamcorderProfiles cameraId="1"> 287 288 <EncoderProfile quality="low" fileFormat="3gp" duration="60"> 289 <Video codec="h264" 290 bitRate="128000" 291 width="176" 292 height="144" 293 frameRate="30" /> 294 295 <Audio codec="amrnb" 296 bitRate="12200" 297 sampleRate="8000" 298 channels="1" /> 299 </EncoderProfile> 300 301 <EncoderProfile quality="high" fileFormat="mp4" duration="30"> 302 <Video codec="h264" 303 bitRate="17000000" 304 width="1920" 305 height="1080" 306 frameRate="30" /> 307 <Audio codec="aac" 308 bitRate="96000" 309 sampleRate="48000" 310 channels="1" /> 311 </EncoderProfile> 312 313 <EncoderProfile quality="qcif" fileFormat="3gp" duration="60"> 314 <Video codec="h264" 315 bitRate="128000" 316 width="176" 317 height="144" 318 frameRate="30" /> 319 <Audio codec="amrnb" 320 bitRate="12200" 321 sampleRate="8000" 322 channels="1" /> 323 </EncoderProfile> 324 325 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 326 <Video codec="h264" 327 bitRate="512000" 328 width="320" 329 height="240" 330 frameRate="30" /> 331 <Audio codec="aac" 332 bitRate="156000" 333 sampleRate="48000" 334 channels="2" /> 335 </EncoderProfile> 336 337 <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> 338 <Video codec="h264" 339 bitRate="1200000" 340 width="352" 341 height="288" 342 frameRate="30" /> 343 <Audio codec="aac" 344 bitRate="96000" 345 sampleRate="48000" 346 channels="1" /> 347 </EncoderProfile> 348 349 <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> 350 <Video codec="h264" 351 bitRate="6000000" 352 width="720" 353 height="480" 354 frameRate="30" /> 355 <Audio codec="aac" 356 bitRate="96000" 357 sampleRate="48000" 358 channels="1" /> 359 </EncoderProfile> 360 361 <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> 362 <Video codec="h264" 363 bitRate="12000000" 364 width="1280" 365 height="720" 366 frameRate="30" /> 367 <Audio codec="aac" 368 bitRate="96000" 369 sampleRate="48000" 370 channels="1" /> 371 </EncoderProfile> 372 373 <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> 374 <Video codec="h264" 375 bitRate="17000000" 376 width="1920" 377 height="1080" 378 frameRate="30" /> 379 <Audio codec="aac" 380 bitRate="96000" 381 sampleRate="48000" 382 channels="1" /> 383 </EncoderProfile> 384 385 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 386 <Video codec="h264" 387 bitRate="192000" 388 width="176" 389 height="144" 390 frameRate="30" /> 391 <!-- audio setting is ignored --> 392 <Audio codec="amrnb" 393 bitRate="12200" 394 sampleRate="8000" 395 channels="1" /> 396 </EncoderProfile> 397 398 <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> 399 <Video codec="h264" 400 bitRate="1200000" 401 width="352" 402 height="288" 403 frameRate="30" /> 404 <!-- audio setting is ignored --> 405 <Audio codec="aac" 406 bitRate="96000" 407 sampleRate="48000" 408 channels="1" /> 409 </EncoderProfile> 410 411 <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> 412 <Video codec="h264" 413 bitRate="6000000" 414 width="720" 415 height="480" 416 frameRate="30" /> 417 <!-- audio setting is ignored --> 418 <Audio codec="aac" 419 bitRate="96000" 420 sampleRate="48000" 421 channels="1" /> 422 </EncoderProfile> 423 424 <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> 425 <Video codec="h264" 426 bitRate="12000000" 427 width="1280" 428 height="720" 429 frameRate="30" /> 430 <!-- audio setting is ignored --> 431 <Audio codec="aac" 432 bitRate="96000" 433 sampleRate="48000" 434 channels="1" /> 435 </EncoderProfile> 436 437 <ImageEncoding quality="95" /> 438 <ImageEncoding quality="80" /> 439 <ImageEncoding quality="70" /> 440 <ImageDecoding memCap="20000000" /> 441 442 </CamcorderProfiles> 443 444 <EncoderOutputFileFormat name="3gp" /> 445 <EncoderOutputFileFormat name="mp4" /> 446 447 <!-- 448 If a codec is not enabled, it is invisible to the applications 449 In other words, the applications won't be able to use the codec 450 or query the capabilities of the codec at all if it is disabled 451 --> 452 <VideoEncoderCap name="h264" enabled="true" 453 minBitRate="64000" maxBitRate="100000000" 454 minFrameWidth="176" maxFrameWidth="3840" 455 minFrameHeight="144" maxFrameHeight="2160" 456 minFrameRate="15" maxFrameRate="30" /> 457 458 <VideoEncoderCap name="h263" enabled="true" 459 minBitRate="64000" maxBitRate="2000000" 460 minFrameWidth="176" maxFrameWidth="800" 461 minFrameHeight="144" maxFrameHeight="480" 462 minFrameRate="15" maxFrameRate="30" /> 463 464 <VideoEncoderCap name="m4v" enabled="true" 465 minBitRate="64000" maxBitRate="40000000" 466 minFrameWidth="176" maxFrameWidth="1920" 467 minFrameHeight="144" maxFrameHeight="1080" 468 minFrameRate="15" maxFrameRate="30" /> 469 470 <AudioEncoderCap name="aac" enabled="true" 471 minBitRate="758" maxBitRate="288000" 472 minSampleRate="8000" maxSampleRate="48000" 473 minChannels="1" maxChannels="1" /> 474 475 <AudioEncoderCap name="heaac" enabled="true" 476 minBitRate="8000" maxBitRate="64000" 477 minSampleRate="16000" maxSampleRate="48000" 478 minChannels="1" maxChannels="1" /> 479 480 <AudioEncoderCap name="aaceld" enabled="true" 481 minBitRate="16000" maxBitRate="192000" 482 minSampleRate="16000" maxSampleRate="48000" 483 minChannels="1" maxChannels="1" /> 484 485 <AudioEncoderCap name="amrwb" enabled="true" 486 minBitRate="6600" maxBitRate="23050" 487 minSampleRate="16000" maxSampleRate="16000" 488 minChannels="1" maxChannels="1" /> 489 490 <AudioEncoderCap name="amrnb" enabled="true" 491 minBitRate="5525" maxBitRate="12200" 492 minSampleRate="8000" maxSampleRate="8000" 493 minChannels="1" maxChannels="1" /> 494 495 <!-- 496 FIXME: 497 We do not check decoder capabilities at present 498 At present, we only check whether windows media is visible 499 for TEST applications. For other applications, we do 500 not perform any checks at all. 501 --> 502 <VideoDecoderCap name="wmv" enabled="false"/> 503 <AudioDecoderCap name="wma" enabled="false"/> 504 505 <!-- 506 The VideoEditor Capability configuration: 507 - maxInputFrameWidth: maximum video width of imported video clip. 508 - maxInputFrameHeight: maximum video height of imported video clip. 509 - maxOutputFrameWidth: maximum video width of exported video clip. 510 - maxOutputFrameHeight: maximum video height of exported video clip. 511 - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder, 512 used to limit the amount of memory for prefetched YUV frames. 513 For this platform, it allows maximum 30MB(3MB per 1080p frame x 10 514 frames) memory. 515 --> 516 <VideoEditorCap maxInputFrameWidth="1920" 517 maxInputFrameHeight="1080" maxOutputFrameWidth="1920" 518 maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/> 519 <!-- 520 The VideoEditor Export codec profile and level values 521 correspond to the values in OMX_Video.h. 522 E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline 523 and level 4096 means OMX_VIDEO_AVCLevel41. 524 Please note that the values are in decimal. 525 These values are for video encoder. 526 --> 527 <!-- 528 Codec = h.264, Baseline profile, level 4.0 529 --> 530 <ExportVideoProfile name="h264" profile= "1" level="2048"/> 531 <!-- 532 Codec = h.263, Baseline profile, level 70 533 --> 534 <ExportVideoProfile name="h263" profile= "1" level="128"/> 535 <!-- 536 Codec = mpeg4, Simple profile, level 5 537 --> 538 <ExportVideoProfile name="m4v" profile= "1" level="128"/> 539</MediaSettings> 540