1# AVCodec Supported Formats 2 3## Media Codec 4 5### Video Decoding 6 7Currently, the following decoding capabilities are supported: 8 9| Video Hardware Decoding Type | Video Software Decoding Type | 10| --------------------- | ---------------- | 11| AVC (H.264) and HEVC (H.265)|AVC (H.264)<!--RP12--><!--RP12End--> | 12 13Video software decoding and hardware decoding are different. When a decoder is created based on the MIME type, <!--RP13-->only H.264 (OH_AVCODEC_MIMETYPE_VIDEO_AVC) is supported for software decoding,<!--RP13End--> and H.264 (OH_AVCODEC_MIMETYPE_VIDEO_AVC) and H.265 (OH_AVCODEC_MIMETYPE_VIDEO_HEVC) can be used for hardware decoding as long as they are supported by the hardware platform. 14 15For details about the range of each decoding capability, see [Obtaining Supported Codecs](obtain-supported-codecs.md). 16 17For details about the development guide, see [Video Decoding](video-decoding.md). 18 19### Video Encoding 20 21Currently, the following encoding capabilities are supported: 22 23| Container Format| Video Encoding Type | 24| -------- | ---------------------------- | 25| mp4 | HEVC (H.265) and AVC (H.264)| 26 27Only hardware encoding is supported. When an encoder is created based on the MIME type, H.264 (OH_AVCODEC_MIMETYPE_VIDEO_AVC) and H.265 (OH_AVCODEC_MIMETYPE_VIDEO_HEVC) are supported. 28 29For details about the range of each encoding capability, see [Obtaining Supported Codecs](obtain-supported-codecs.md). 30 31For details about the development guide, see [Video Encoding](video-encoding.md). 32 33 34### Audio Decoding 35 36Currently, the following decoding capabilities are supported: 37 38| Container Format| Audio Decoding Type | 39| -------- | :--------------------------- | 40| mp4 | AAC, MPEG (MP3), FLAC, Vorbis<!--RP1--><!--RP1End--> | 41| m4a | AAC | 42| flac | Flac | 43| ogg | Vorbis<!--RP2--><!--RP2End--> | 44| aac | AAC | 45| mp3 | MPEG (MP3) | 46| amr | AMR (AMR-NB and AMR-WB) | 47| raw | G711mu | 48| ape | APE | 49 50For details about the development guide, see [Audio Decoding](audio-decoding.md). 51 52 53### Audio Encoding 54 55Currently, the following encoding capabilities are supported: 56 57| Container Format| Audio Encoding Type | 58| -------- | :--------------- | 59| mp4 | AAC, FLAC | 60| m4a | AAC | 61| flac | Flac | 62| aac | AAC | 63| mp3 | MP3 | 64| raw | G711mu | 65<!--RP3--><!--RP3End--> 66 67For details about the development guide, see [Audio Encoding](audio-encoding.md). 68 69 70## Media Data Muxing and Demuxing 71 72### Media Data Demuxing 73 74The following demuxing formats are supported: 75 76| Media Format | Muxing Format | Stream Format | 77| -------- | :----------------------------| :----------------------------| 78| Audio/Video | mp4 |<!--RP4-->Video stream: AVC (H.264); audio stream: AAC and MPEG (MP3); subtitle stream: WEBVTT<!--RP4End-->| 79| Audio/Video | fmp4 |<!--RP5-->Video stream: AVC (H.264); audio stream: AAC and MPEG (MP3)<!--RP5End-->| 80| Audio/Video | mkv |<!--RP6-->Video stream: AVC (H.264); audio stream: AAC, MPEG (MP3), and OPUS<!--RP6End-->| 81| Audio/Video | mpeg-ts |<!--RP7-->Video stream: AVC (H.264); audio stream: AAC and MPEG (MP3)<!--RP7End-->| 82| Audio/Video | flv |<!--RP8-->Video stream: AVC (H.264); audio stream: AAC<!--RP8End-->| 83| Audio | m4a |<!--RP9-->Audio stream: AAC<!--RP9End-->| 84| Audio | aac |Audio stream: AAC| 85| Audio | mp3 |Audio stream: MPEG (MP3)| 86| Audio | ogg |Audio stream: OGG| 87| Audio | flac |Audio stream: FLAC| 88| Audio | wav |Audio stream: PCM and PCM-MULAW| 89| Audio | amr |Audio stream: AMR (AMR-NB and AMR-WB)| 90| Audio | ape |Audio stream: APE| 91| External subtitle | srt |Subtitle stream: SRT| 92| External subtitle | webvtt |Subtitle stream: WEBVTT| 93 94The DRM demuxing capability supports the following formats: <!--RP10-->mp4 (H.264 and AAC) and mpeg-ts (H.264 and AAC)<!--RP10End-->. 95 96For details about the development guide, see [Media Data Demuxing](audio-video-demuxer.md). 97 98 99### Media Data Muxing 100 101Currently, the following muxer capabilities are supported: 102 103| Muxing Format| Video Codec Type | Audio Codec Type | Cover Type | 104| -------- | --------------------- | ---------------- | -------------- | 105| mp4 | AVC (H.264) <!--RP11--><!--RP11End--> | AAC, MPEG (MP3)| jpeg, png, bmp| 106| m4a | - | AAC | jpeg, png, bmp| 107| mp3 | - | MPEG (MP3) | - | 108| amr | - | AMR (AMR-NB and AMR-WB)| - | 109| wav | - | G711mu(pcm-mulaw) | - | 110 111> **NOTE** 112> 113> - When the container format is MP4 and the audio codec type is MPEG (MP3), the sampling rate must be greater than or equal to 16000 Hz. 114> - When the container format is MP4 or M4A and the audio codec type is AAC, the number of audio channels ranges from 1 to 7. 115 116For details about the development guide, see [Media Data Muxing](audio-video-muxer.md). 117