Start from scratch-go deep into Android (theory-preparations before development-9. multimedia formats supported by Android)

Source: Internet
Author: User
Tags webp
Multimedia formats supported by Android

This document describes media codecs, containers, and network protocols supported by the Android platform.

As an application developer, you can use any media codecs and can use them on any Android device. However, it is best to use the Media Encoding configuration file, because it has nothing to do with the device.

9.1 network protocol

Audio and video playback supports the following network protocols:

  • RTSP (RTP, SDP)
  • HTTP/httpsSequential stream transmission(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

9.2 core multimedia format

The following table describes the built-in media formats supported by the Android platform. Note that any specific mobile device may provide additional formats or require additional support for file types not listed in the table.

Note:Not all android platforms support all formats, and some require specific versions such as Android 3.0 +

Table 1.Supported core media formats and codecs.

Type Format/Codec Encoding Decoding Details Supported file types/contained formats
Audio Aac lc/LTP Single-channel/Stereo content with a standard bitrate of up to 160 kbps and a sampling rate ranging from 8 to 48 khz in any combination • 3GPP (. 3GP)
• MPEG-4 (.mp4,. m4a)
• ADTs raw aac (. AAC, decoding in Android 3.1 +, encoding in Android 4.0 +, ADIF not supported)
• MPEG-TS (. Ts, not seek, Android 3.0 +)
The HE-AACv1 (AAC +)  
The HE-AACv2 (enhanced AAC +)  
AMR-NB 4.75 to 12.2 kbps sampling @ 8 kHz 3GPP (. 3GP)
AMR-WB 6.60 kbit/s to 23.85 kbit/s sampling @ 16 kHz 3GPP (. 3GP)
FLAC  
(Android 3.1 +)
Single to/Stereo (no multi-channel). sampling rate up to 48 khz, 16-bit recommended; preferably 24-bit without Jitter FLAC (.flac) only
MP3   Single Channel/Stereo 8-kbps unchanged (CBR) or variable bit rate (VBR) MP3 (metadata)
MIDI   MIDI Type 0 and 1. DLS version 1 and 2. xmf and mobile xmf. Supported 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 (hardware restrictions on rates) Wave (.wav)
Image JPEG   JPEG (.jpg)
GIF     GIF (.gif)
PNG   PNG (.png)
BMP     BMP (.bmp)
Webp
(Android 4.0 +)

(Android 4.0 +)
  Webp (. webp)
Video H.263   • 3GPP (. 3GP)
• MPEG-4 (.mp4)
H.264 AVC
(Android 3.0 +)
  • 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 must be later than Android 4.0
• Webm (. webm)
• Matroska (.mkv, Android 4.0

 

9.3 video encoding specifications

Table 2 lists the video encoding configuration files and parameters, as well as the playback example of the android media framework. In addition to these encoding parameters, the configuration file of the available video device can be used as a proxy for media playback. Check these

File, you can use the camcorderprofile class, the API level must be 8.

Table 2.Example of supported video encoding Parameters

  SD (low quality) SD (high quality) HD (all devices are invalid)
Video codecs H.264 baseline Profile H.264 baseline Profile H.264 baseline Profile
Video resolution 176x144 PX 480X360 PX 1280x720 PX
Video Frame Rate 12 FPS 30 FPS 30 FPS
Video Bit Rate 56 kbps 500 kbps 2 Mbps
Audio codecs AAC-LC AAC-LC AAC-LC
Audio audio channel 1 (Mono) 2 (stereo) 2 (stereo)
Audio Bit Rate 24 kbps 128 Kbps 192 kbps
9.4 summary of this Chapter

This chapter mainly describes some formats and requires us to be impressed. For more specific and in-depth behaviors, we will describe the android framework in detail. Please keep up your passion for learning. What is wonderful is coming soon !!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.