Stay organized with collections
Save and categorize content based on your preferences.
class OutputFormat
Defines the output format. These constants are used with MediaRecorder.setOutputFormat(int)
.
Summary
Constants |
static Int |
AAC ADTS file format
|
static Int |
AMR NB file format
|
static Int |
AMR WB file format
|
static Int |
|
static Int |
H.
|
static Int |
MPEG4 media file format
|
static Int |
Opus data in a Ogg container
|
static Int |
AMR NB file format
|
static Int |
3GPP media file format
|
static Int |
VP8/VORBIS data in a WEBM container
|
Constants
AAC_ADTS
static val AAC_ADTS: Int
AAC ADTS file format
Value: 6
AMR_NB
static val AMR_NB: Int
AMR NB file format
Value: 3
AMR_WB
static val AMR_WB: Int
AMR WB file format
Value: 4
DEFAULT
static val DEFAULT: Int
Value: 0
MPEG_2_TS
static val MPEG_2_TS: Int
H.264/AAC data encapsulated in MPEG2/TS
Value: 8
MPEG_4
static val MPEG_4: Int
MPEG4 media file format
Value: 2
OGG
static val OGG: Int
Opus data in a Ogg container
Value: 11
RAW_AMR
static val RAW_AMR: Int
Deprecated: Deprecated in favor of MediaRecorder.OutputFormat.AMR_NB
AMR NB file format
Value: 3
THREE_GPP
static val THREE_GPP: Int
3GPP media file format
Value: 1
WEBM
static val WEBM: Int
VP8/VORBIS data in a WEBM container
Value: 9
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# MediaRecorder.OutputFormat\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOutputFormat\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaRecorder.OutputFormat \"View this page in Java\") \n\n```\nclass OutputFormat\n```\n\n|---|-----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.MediaRecorder.OutputFormat](#) |\n\nDefines the output format. These constants are used with [MediaRecorder.setOutputFormat(int)](/reference/kotlin/android/media/MediaRecorder#setOutputFormat(kotlin.Int)).\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AAC_ADTS](#AAC_ADTS:kotlin.Int) AAC ADTS file format |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AMR_NB](#AMR_NB:kotlin.Int) AMR NB file format |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AMR_WB](#AMR_WB:kotlin.Int) AMR WB file format |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DEFAULT](#DEFAULT:kotlin.Int) \u003cbr /\u003e |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MPEG_2_TS](#MPEG_2_TS:kotlin.Int) H. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [MPEG_4](#MPEG_4:kotlin.Int) MPEG4 media file format |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [OGG](#OGG:kotlin.Int) Opus data in a Ogg container |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [RAW_AMR](#RAW_AMR:kotlin.Int) AMR NB file format |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [THREE_GPP](#THREE_GPP:kotlin.Int) 3GPP media file format |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [WEBM](#WEBM:kotlin.Int) VP8/VORBIS data in a WEBM container |\n\nConstants\n---------\n\n### AAC_ADTS\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AAC_ADTS: Int\n```\n\nAAC ADTS file format \n\n Value: 6\n\n### AMR_NB\n\nAdded in [API level 10](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AMR_NB: Int\n```\n\nAMR NB file format \n\n Value: 3\n\n### AMR_WB\n\nAdded in [API level 10](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AMR_WB: Int\n```\n\nAMR WB file format \n\n Value: 4\n\n### DEFAULT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DEFAULT: Int\n``` \n\n Value: 0\n\n### MPEG_2_TS\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MPEG_2_TS: Int\n```\n\nH.264/AAC data encapsulated in MPEG2/TS \n\n Value: 8\n\n### MPEG_4\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val MPEG_4: Int\n```\n\nMPEG4 media file format \n\n Value: 2\n\n### OGG\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val OGG: Int\n```\n\nOpus data in a Ogg container \n\n Value: 11\n\n### RAW_AMR\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val RAW_AMR: Int\n```\n\n**Deprecated:** *Deprecated in favor of MediaRecorder.OutputFormat.AMR_NB*\n\nAMR NB file format \n\n Value: 3\n\n### THREE_GPP\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val THREE_GPP: Int\n```\n\n3GPP media file format \n\n Value: 1\n\n### WEBM\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val WEBM: Int\n```\n\nVP8/VORBIS data in a WEBM container \n\n Value: 9"]]