Android支持的媒体格式
来源:互联网 发布:网络小祖宗是什么意思 编辑:程序博客网 时间:2024/04/28 19:50
Android Supported Media Formats
IN THIS DOCUMENT
- Network Protocols
- Core Media Formats
- Video Encoding Recommendations
SEE ALSO
- Multimedia and Camera
KEY CLASSES
MediaPlayer
MediaRecorder
This document describes the media codec, container, and network protocol support provided by the Android platform.
As an application developer, you are free to make use of any media codec that is available on any Android-powered device, including those provided by the Android platform and those that are device-specific. However, it is a best practice to use media encoding profiles that are device-agnostic.
Network Protocols
The following network protocols are supported for audio and video playback:
- RTSP (RTP, SDP)
- HTTP/HTTPS progressive streaming
- HTTP/HTTPS live streaming draft protocol:
- MPEG-2 TS media files only
- Protocol version 3 (Android 4.0 and above)
- Protocol version 2 (Android 3.x)
- Not supported before Android 3.0
Note: HTTPS is not supported before Android 3.1.
Core Media Formats
The table below describes the media format support built into the Android platform. Note that any given mobile device may provide support for additional formats or file types not listed in the table.
Note: Media codecs that are not guaranteed to be available on all Android platform versions are accordingly noted in parentheses—for example "(Android 3.0+)".
• 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+) •HE-AACv2 (enhanced AAC+) •AMR-NB••4.75 to 12.2 kbps sampled @ 8kHz3GPP (.3gp)AMR-WB••9 rates from 6.60 kbit/s to 23.85 kbit/s sampled @ 16kHz3GPP (.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) onlyMP3 •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 •8- and 16-bit linear PCM (rates up to limit of hardware)WAVE (.wav)ImageJPEG••Base+progressiveJPEG (.jpg)GIF • GIF (.gif)PNG•• PNG (.png)BMP • BMP (.bmp)WEBP•
(Android 4.0+)•
(Android 4.0+) WebP (.webp)VideoH.263•• • 3GPP (.3gp)
• MPEG-4 (.mp4)H.264 AVC•
(Android 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 •
(Android 2.3.3+)Streamable only in Android 4.0 and above• WebM(.webm)
• Matroska (.mkv, Android 4.0+)
Video Encoding Recommendations
Table 2, below, lists examples of video encoding profiles and parameters that the Android media framework supports for playback. In addition to these encoding parameter recommendations, a device's available video recording profiles can be used as a proxy for media playback capabilities. These profiles can be inspected using the CamcorderProfile
class, which is available since API level 8.
For video content that is streamed over HTTP or RTSP, there are additional requirements:
- For 3GPP and MPEG-4 containers, the
moov
atom must precede anymdat
atoms, but must succeed theftyp
atom. - For 3GPP, MPEG-4, and WebM containers, audio and video samples corresponding to the same time offset may be no more than 500 KB apart. To minimize this audio/video drift, consider interleaving audio and video in smaller chunk sizes.
Android支持的媒体格式
在这份文件中
- 网络协议
- 核心媒体格式
- 视频编码建议
参见
- 多媒体和相机
重点班
MediaPlayer的
MediaRecorder
本文档介绍了媒体编解码器,容器,和Android平台所提供的网络协议的支持。
作为应用程序开发人员,您可以自由使用任何媒体编解码器,可用在任何Android的供电设备,包括Android平台所提供的那些设备特定的。但是,它是最好的做法是使用媒体编码配置文件是设备无关。
网络协议
音频和视频播放支持以下网络协议:
- RTSP协议(RTP,SDP的)
- HTTP / HTTPS的进步流
- HTTP / HTTPS的现场直播议定书草案:
- MPEG-2 TS流媒体文件只
- 协议版本3(的Android 4.0及以上)
- 议定书“第2版(Android的3.x版)
- 不支持之前的Android 3.0
注: HTTPS不支持之前的Android 3.1。
核心媒体格式
下表介绍了Android平台内置的媒体格式支持。请注意,任何特定的移动设备可能提供额外的格式或者表中未列出的文件类型的支持。
注:例如,括号“(Android 3.0的+)”中指出,不能保证所有Android平台版本的媒体编解码器相应。
MPEG-4(MP4,。M4A)
ADTS的原始的AAC(AAC,在Android 3.1解码,在Android 4.0编码,不支持将ADIF)
的MPEG-TS(TS,不可搜索的Android 5.0 +)HE-AACv1(AAC +格式) •HE-AACv2(增强型AAC +等) •AMR-NB的••4.75至12.2 kbps的@ 8kHz的采样3GPP(.3 GP)AMR-WB的••9从6.60 kbit / s到23.85 kbit / s的@ 16kHz的采样率3GPP(.3 GP)后手
(Android的3.1 +)单声道/立体声(多声道)。采样率可达48千赫(但高达44.1千赫,44.1千赫输出设备,建议为48至44.1千赫downsampler不包括一个低通滤波器)。16位建议;申请的24位没有抖动。FLAC(FLAC)只的MP3 •单声道/立体声8-320Kbps的恒定(CBR)或可变比特率(VBR)MP3(MP3)的MIDI •的MIDI类型0和1。当值律师服务版本1和2。XMF和移动XMF。为RTTTL / RTX,大田,iMelody铃声格式的支持•类型0和1(。中旬,XMF,mxmf)
•RTTTL / RTX(。RTTTL,RTX)
•OTA(OTA)
•iMelody(。IMY)Vorbis格式 • •奥格(OGG)
的Matroska(MKV,Android的4.0 +)PCM /波 •8 - 位和16位线性PCM(速率高达硬件限制)WAVE(。WAV)图像JPEG格式••基地+累进JPEG(JPG)的GIF • GIF(GIF)巴布亚新几内亚•• PNG(。PNG)骨形态发生蛋白 • BMP(。BMP)WEBP
(Android的4.0 +)
(Android的4.0 +) WebP(。webp)视频H.263的•• •3GPP(.3 gp)的
MPEG-4(MP4)H.264 AVC
(采用Android 3.0 +)•基线(BP)•3GPP(.3 gp)的
MPEG-4(MP4)
的MPEG-TS(TS,只AAC音频,不可搜索的Android 3.0 +)MPEG-4 SP • 3GPP(.3 GP)VP8的
(Android的2.3.3 +)流化只有在Android 4.0及以上• WEBM(WEBM)
的Matroska(MKV,Android的4.0 +)
视频编码建议
表2,下面,列出了视频编码配置文件和参数,Android的媒体播放支持框架的例子。除了 这些编码参数的建议,可用录像设备的配置文件可以被用来作为一个媒体播放功能的代理。检查这些文件,可以使用CamcorderProfile
类,这是因为API级别8。
对于视频的内容是通过HTTP或RTSP流,也有额外的要求:
MOOV
原子3GPP和MPEG-4容器,必须先于任何MDAT
原子,但必须成功的ftyp的
原子。- 对于3GPP,MPEG-4和的WEBM容器,音频和视频同时偏移相应的样本可能是除了不超过500 KB的。为了减少这种音频/视频的漂移,考虑交错较小的块大小的音频和视频。
- Android支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式
- Android 支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式
- Android支持的媒体格式 .
- Android支持的媒体格式
- Android 支持的媒体格式(音频,视频,图片)
- Android 媒体 IV-支持的媒体格式
- QuickTime Player 支持的媒体格式
- 媒体和相机:支持的媒体格式
- 在Fedora 9 下让你的 Amarok 支持 RealyPlayer 所支持的所有媒体格式~~
- Android 视频播放之流媒体格式处理
- iTunes Connect 开发者上手经验
- Oracle 分页
- 2012—07—09
- Oracle 数据库开发 面试试题
- poj3112
- Android支持的媒体格式
- Js操作Cookie,保持页面刷新(需要用到jquery.js文件)
- Linux 防火墙iptables 学习笔记(五)linux+iptables构筑防火墙实例
- poj 2709 贪心
- linux_sound_alsa_Android+alsa音频系统中的几个问题
- 系统调用的理解
- linux_sound_alsa_ALSA体系SOC子系统中数据流分析
- opengl中局部坐标和全局坐标之我的理解
- linux_sound_alsa_ALSA体系SOC子系统中hw_params逻辑