H263、H264和3GPP、MPEG4是什么关系,下面的表格Android支持的编解码格式,看其标题,你就应该知道这个概念:H263、H264是视频编解码器(编码标准),而3GPP (.3gp)、MPEG-4 (.mp4)是容器格式(Supported File Type/Container formats),也就是说,这个容器(文件)是用来保存H263、H264编码后的输出的,.3gp、.mp4就是这个输出文件的格式。
一个是编解码器(编码标准),一个是实际存储的文件格式,这是两个不同纬度的概念。
网上有更形象的说法:mpge4是视频格式,h264是编码器,前者就像水桶后者就像水桶里的水,一个水桶可以装不同的水,同样一种水也可以装在不同的水桶里,mpge可以用h264编码同样其他格式也可以用h264编码
http://developer.android.com/guide/appendix/media-formats.html
Type | Format / Codec | Encoder | Decoder | Details | Supported File Type(s) / Container Formats |
---|---|---|---|---|---|
Audio | AAC LC | • | • | Support for mono/stereo/5.0/5.1 content with standard sampling rates from 8 to 48 kHz. | • 3GPP (.3gp)
• MPEG-4 (.mp4, .m4a)
• ADTS raw AAC (.aac, decode in Android 3.1+, encode in Android 4.0+, ADIF not supported) • MPEG-TS (.ts, not seekable, Android 3.0+) |
HE-AACv1 (AAC+) | • (Androi 4.1+) | • | |||
HE-AACv2 (enhanced AAC+) | • | Support for stereo/5.0/5.1 content with standard sampling rates from 8 to 48 kHz. | |||
AAC ELD (enhanced low delay AAC) | • (Androi 4.1+) | • (Android 4.1+) | Support for mono/stereo content with standard sampling rates from 16 to 48 kHz | ||
AMR-NB | • | • | 4.75 to 12.2 kbps sampled @ 8kHz | 3GPP (.3gp) | |
AMR-WB | • | • | 9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz | 3GPP (.3gp) | |
FLAC | • (Android 3.1+) | Mono/Stereo (no multichannel). Sample rates up to 48 kHz (but up to 44.1 kHz is recommended on devices with 44.1 kHz output, as the 48 to 44.1 kHz downsampler does not include a low-pass filter). 16-bit recommended; no dither applied for 24-bit. | FLAC (.flac) only | ||
MP3 | • | Mono/Stereo 8-320Kbps constant (CBR) or variable bit-rate (VBR) | MP3 (.mp3) | ||
MIDI | • | MIDI Type 0 and 1. DLS Version 1 and 2. XMF and Mobile XMF. Support for ringtone formats RTTTL/RTX, OTA, and iMelody | • Type 0 and 1 (.mid, .xmf, .mxmf) • RTTTL/RTX (.rtttl, .rtx) • OTA (.ota) • iMelody (.imy) | ||
Vorbis | • | • Ogg (.ogg) • Matroska (.mkv, Android 4.0+) | |||
PCM/WAVE | • (Androi 4.1+) | • | 8- and 16-bit linear PCM (rates up to limit of hardware). Sampling rates for raw PCM recordings at 8000, 16000 and 44100 Hz. | WAVE (.wav) | |
Image | JPEG | • | • | Base+progressive | JPEG (.jpg) |
GIF | • | GIF (.gif) | |||
PNG | • | • | PNG (.png) | ||
BMP | • | BMP (.bmp) | |||
WebP | • (Androi 4.0+) (Lossless, Transparency, Android 4.2.1+) | • (Android 4.0+) (Lossless, Transparency, Android 4.2.1+) | WebP (.webp) | ||
Video | H.263 | • | • | • 3GPP (.3gp) • MPEG-4 (.mp4) | |
H.264 AVC | • (Androi 3.0+) | • | Baseline Profile (BP) | • 3GPP (.3gp) • MPEG-4 (.mp4) • MPEG-TS (.ts, AAC audio only, not seekable, Android 3.0+) | |
MPEG-4 SP | • | 3GPP (.3gp) | |||
VP8 | • (Androi 4.3+) | • (Android 2.3.3+) | Streamable only in Android 4.0 and above | • WebM (.webm) • Matroska (.mkv, Android 4.0+) |