• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="qvga" fileFormat="3gp" duration="60">
93            <Video codec="m4v"
94                   bitRate="128000"
95                   width="320"
96                   height="240"
97                   frameRate="15" />
98            <Audio codec="amrnb"
99                   bitRate="12200"
100                   sampleRate="8000"
101                   channels="1" />
102        </EncoderProfile>
103
104        <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
105            <Video codec="h264"
106                   bitRate="1200000"
107                   width="352"
108                   height="288"
109                   frameRate="30" />
110            <Audio codec="aac"
111                   bitRate="96000"
112                   sampleRate="48000"
113                   channels="1" />
114        </EncoderProfile>
115
116        <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
117            <Video codec="h264"
118                   bitRate="6000000"
119                   width="720"
120                   height="480"
121                   frameRate="30" />
122            <Audio codec="aac"
123                   bitRate="96000"
124                   sampleRate="48000"
125                   channels="1" />
126        </EncoderProfile>
127
128        <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
129            <Video codec="h264"
130                   bitRate="12000000"
131                   width="1280"
132                   height="720"
133                   frameRate="30" />
134            <Audio codec="aac"
135                   bitRate="96000"
136                   sampleRate="48000"
137                   channels="1" />
138        </EncoderProfile>
139
140        <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
141            <Video codec="h264"
142                   bitRate="17000000"
143                   width="1920"
144                   height="1080"
145                   frameRate="30" />
146            <Audio codec="aac"
147                   bitRate="96000"
148                   sampleRate="48000"
149                   channels="1" />
150        </EncoderProfile>
151
152        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
153            <Video codec="h264"
154                   bitRate="192000"
155                   width="176"
156                   height="144"
157                   frameRate="30" />
158            <!-- audio setting is ignored -->
159            <Audio codec="amrnb"
160                   bitRate="12200"
161                   sampleRate="8000"
162                   channels="1" />
163        </EncoderProfile>
164
165        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
166            <Video codec="h264"
167                   bitRate="1200000"
168                   width="352"
169                   height="288"
170                   frameRate="30" />
171            <!-- audio setting is ignored -->
172            <Audio codec="aac"
173                   bitRate="96000"
174                   sampleRate="48000"
175                   channels="1" />
176        </EncoderProfile>
177
178        <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
179            <Video codec="h264"
180                   bitRate="6000000"
181                   width="720"
182                   height="480"
183                   frameRate="30" />
184            <!-- audio setting is ignored -->
185            <Audio codec="aac"
186                   bitRate="96000"
187                   sampleRate="48000"
188                   channels="1" />
189        </EncoderProfile>
190
191        <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
192            <Video codec="h264"
193                   bitRate="12000000"
194                   width="1280"
195                   height="720"
196                   frameRate="30" />
197            <!-- audio setting is ignored -->
198            <Audio codec="aac"
199                   bitRate="96000"
200                   sampleRate="48000"
201                   channels="1" />
202        </EncoderProfile>
203
204        <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
205            <Video codec="h264"
206                   bitRate="17000000"
207                   width="1920"
208                   height="1080"
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        <ImageEncoding quality="95" />
218        <ImageEncoding quality="80" />
219        <ImageEncoding quality="70" />
220        <ImageDecoding memCap="20000000" />
221
222    </CamcorderProfiles>
223
224    <CamcorderProfiles cameraId="1">
225
226        <EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
227            <Video codec="m4v"
228                   bitRate="128000"
229                   width="320"
230                   height="240"
231                   frameRate="15" />
232            <Audio codec="amrnb"
233                   bitRate="12200"
234                   sampleRate="8000"
235                   channels="1" />
236        </EncoderProfile>
237
238        <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
239            <Video codec="h264"
240                   bitRate="1200000"
241                   width="352"
242                   height="288"
243                   frameRate="30" />
244            <Audio codec="aac"
245                   bitRate="96000"
246                   sampleRate="48000"
247                   channels="1" />
248        </EncoderProfile>
249
250        <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
251            <Video codec="h264"
252                   bitRate="6000000"
253                   width="720"
254                   height="480"
255                   frameRate="30" />
256            <Audio codec="aac"
257                   bitRate="96000"
258                   sampleRate="48000"
259                   channels="1" />
260        </EncoderProfile>
261
262        <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
263            <Video codec="h264"
264                   bitRate="12000000"
265                   width="1280"
266                   height="720"
267                   frameRate="30" />
268            <Audio codec="aac"
269                   bitRate="96000"
270                   sampleRate="48000"
271                   channels="1" />
272        </EncoderProfile>
273
274        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
275            <Video codec="h264"
276                   bitRate="192000"
277                   width="176"
278                   height="144"
279                   frameRate="30" />
280            <!-- audio setting is ignored -->
281            <Audio codec="amrnb"
282                   bitRate="12200"
283                   sampleRate="8000"
284                   channels="1" />
285        </EncoderProfile>
286
287        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
288            <Video codec="h264"
289                   bitRate="1200000"
290                   width="352"
291                   height="288"
292                   frameRate="30" />
293            <!-- audio setting is ignored -->
294            <Audio codec="aac"
295                   bitRate="96000"
296                   sampleRate="48000"
297                   channels="1" />
298        </EncoderProfile>
299
300        <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
301            <Video codec="h264"
302                   bitRate="6000000"
303                   width="720"
304                   height="480"
305                   frameRate="30" />
306            <!-- audio setting is ignored -->
307            <Audio codec="aac"
308                   bitRate="96000"
309                   sampleRate="48000"
310                   channels="1" />
311        </EncoderProfile>
312
313        <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
314            <Video codec="h264"
315                   bitRate="12000000"
316                   width="1280"
317                   height="720"
318                   frameRate="30" />
319            <!-- audio setting is ignored -->
320            <Audio codec="aac"
321                   bitRate="96000"
322                   sampleRate="48000"
323                   channels="1" />
324        </EncoderProfile>
325
326        <ImageEncoding quality="95" />
327        <ImageEncoding quality="80" />
328        <ImageEncoding quality="70" />
329        <ImageDecoding memCap="20000000" />
330
331    </CamcorderProfiles>
332
333    <EncoderOutputFileFormat name="3gp" />
334    <EncoderOutputFileFormat name="mp4" />
335
336    <!--
337         If a codec is not enabled, it is invisible to the applications
338         In other words, the applications won't be able to use the codec
339         or query the capabilities of the codec at all if it is disabled
340    -->
341    <VideoEncoderCap name="h264" enabled="true"
342        minBitRate="64000" maxBitRate="40000000"
343        minFrameWidth="176" maxFrameWidth="1920"
344        minFrameHeight="144" maxFrameHeight="1080"
345        minFrameRate="15" maxFrameRate="30" />
346
347    <VideoEncoderCap name="h263" enabled="true"
348        minBitRate="64000" maxBitRate="2000000"
349        minFrameWidth="176" maxFrameWidth="800"
350        minFrameHeight="144" maxFrameHeight="480"
351        minFrameRate="15" maxFrameRate="30" />
352
353    <VideoEncoderCap name="m4v" enabled="true"
354        minBitRate="64000" maxBitRate="40000000"
355        minFrameWidth="176" maxFrameWidth="1920"
356        minFrameHeight="144" maxFrameHeight="1080"
357        minFrameRate="15" maxFrameRate="30" />
358
359    <AudioEncoderCap name="aac" enabled="true"
360        minBitRate="758" maxBitRate="288000"
361        minSampleRate="8000" maxSampleRate="48000"
362        minChannels="1" maxChannels="1" />
363
364    <AudioEncoderCap name="heaac" enabled="true"
365        minBitRate="8000" maxBitRate="64000"
366        minSampleRate="16000" maxSampleRate="48000"
367        minChannels="1" maxChannels="1" />
368
369    <AudioEncoderCap name="aaceld" enabled="true"
370        minBitRate="16000" maxBitRate="192000"
371        minSampleRate="16000" maxSampleRate="48000"
372        minChannels="1" maxChannels="1" />
373
374    <AudioEncoderCap name="amrwb" enabled="true"
375        minBitRate="6600" maxBitRate="23050"
376        minSampleRate="16000" maxSampleRate="16000"
377        minChannels="1" maxChannels="1" />
378
379    <AudioEncoderCap name="amrnb" enabled="true"
380        minBitRate="5525" maxBitRate="12200"
381        minSampleRate="8000" maxSampleRate="8000"
382        minChannels="1" maxChannels="1" />
383
384    <!--
385        FIXME:
386        We do not check decoder capabilities at present
387        At present, we only check whether windows media is visible
388        for TEST applications. For other applications, we do
389        not perform any checks at all.
390    -->
391    <VideoDecoderCap name="wmv" enabled="false"/>
392    <AudioDecoderCap name="wma" enabled="false"/>
393
394    <!--
395        The VideoEditor Capability configuration:
396        - maxInputFrameWidth: maximum video width of imported video clip.
397        - maxInputFrameHeight: maximum video height of imported video clip.
398        - maxOutputFrameWidth: maximum video width of exported video clip.
399        - maxOutputFrameHeight: maximum video height of exported video clip.
400        - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
401        used to limit the amount of memory for prefetched YUV frames.
402        For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
403        frames) memory.
404    -->
405    <VideoEditorCap  maxInputFrameWidth="1920"
406        maxInputFrameHeight="1080" maxOutputFrameWidth="1920"
407        maxOutputFrameHeight="1080" maxPrefetchYUVFrames="10"/>
408    <!--
409        The VideoEditor Export codec profile and level values
410        correspond to the values in OMX_Video.h.
411        E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
412        and  level 4096 means OMX_VIDEO_AVCLevel41.
413        Please note that the values are in decimal.
414        These values are for video encoder.
415    -->
416    <!--
417      Codec = h.264, Baseline profile, level 4.0
418    -->
419    <ExportVideoProfile name="h264" profile= "1" level="2048"/>
420    <!--
421      Codec = h.263, Baseline profile, level 70
422    -->
423    <ExportVideoProfile name="h263" profile= "1" level="128"/>
424    <!--
425      Codec = mpeg4, Simple profile, level 5
426    -->
427    <ExportVideoProfile name="m4v" profile= "1" level="128"/>
428</MediaSettings>
429