- Hard solution, play with your own player, Videoview in Android
- Soft solutions, using audio and video decoding libraries, such as FFmpeg
First, hard decoding
Hard Solution: is to call the GPU dedicated module encoding to solve, reduce CPU operation, CPU and other hardware requirements are relatively low point. The soft solution requires CPU operation, which increases the CPU power consumption in disguise. hardware decoding is the original all the CPU to process the video data part of the GPU to do, and the GPU parallel computing power is much higher than the CPU, so that can greatly reduce the load on the CPU, CPU occupancy rate is low, you can run some other programs at the same time.
For Android devices, the more recently used SoCs are Qualcomm, HiSilicon and MediaTek, which are mostly integrated with many functions, CPU, GUP, DSP, ISP including video decoding, audio decoding and so on, so we are talking about SOC instead of CPU directly. At present, the CPU integration of the mobile phone is very high, the following is our big Huawei's sea-view Kylin 950 composition diagram:
We can see that this SOC integrates a separate audio and video decoding unit.
Second, soft decoding
Soft decoding: that is, the software allows the CPU to decode the video, that is, through the CPU to run the video codec code, our most common video soft decoding open source to see is ffmpeg:
FFmpeg official website: https://ffmpeg.org/
Domestic ffmpeg Tutorial: Rai (leixiaohua1020) column
Currently FFmpeg based open source player has B station Ijkplayer, tutorial please step: http://blog.csdn.net/u010072711/article/details/51728537
Turn Android video playback the difference between soft and hard solutions