FFmpeg在Android多媒体平台下的编码优化研究
发布时间:2019-04-24 12:01
【摘要】:在移动互联网飞速发展的现今,人们对移动终端的需求不再满足于发短信和通电话了,越来越多的人都将手机作为了日常生活的消遣和娱乐工具。伴随着智能手机的普及以及性能的提高,多媒体应用也层出不穷,可以说在未来的移动互联网领域中,多媒体应用将占据着举足轻重的地位。Android智能手机作为移动互联网的载体,是目前最为流行的智能手机之一,其在全球的市场份额已经达到了78.1%,因此吸引了很多的开发者投向Android阵型。然而,Android系统上层的多媒体接口并没有像它的市场份额一样发展迅速,很多涉及到多媒体流式传输和可视化通信的应用都是基于Android底层开发,开发者首先需要熟悉Android的底层代码,而不同开发者又有不同的实现方式。这样的结果导致了Android多媒体应用的开发难度大,开发周期长。 为了实现一个通用的Android多媒体开发方案,本文将目前最为流行的音视频编解码库FFmpeg整合到Android多媒体中,通过使用FFmpeg的接口来达到开发Android多媒体应用的目的。针对于FFmpeg只能软件编码从而导致编码效率过低的问题,本文还提出了优化FFmpeg编码器的方案设计。在深入理解Android多媒体编码机制的基础上,从中提取出硬件编码器,并将其设计成插件的形式融合到FFmpeg中,实现高效的编码。 为了能够体现FFmpeg优化后的编码性能,本文设定了在三种视频分辨率的环境下,对优化前后的视频编码进行比较。分别记录不同分辨率下,它们的PSNR值、编码平均效率、CPU平均使用率和内存平均使用率。结果表明:从PSNR值可以发现优化后的视频编码质量要比优化前的稍微好一些,但从视觉效果上是完全相同的。由于高负荷工作导致CPU平均使用率相差并不大;而在144x176分辨率下,优化后的FFmpeg比优化前具有高出将近8倍的编码效率,而且分辩率越高,编码效率相差的倍数也越高。对于内存的平均使用率,优化后比优化前降低了约2倍。因此,优化后的FFmpeg编码器更能适用于Android平台。
[Abstract]:Nowadays, with the rapid development of mobile Internet, the demand for mobile terminals is no longer satisfied with texting and telephone communication. More and more people use mobile phones as entertainment and entertainment tools in daily life. With the popularity of smart phones and the improvement of their performance, multimedia applications also emerge one after another. It can be said that in the future, in the field of mobile Internet, Multimedia applications will occupy an important position. As the carrier of mobile Internet, Android smartphone is one of the most popular smart phones at present, and its market share in the world has reached 78.1%. As a result, many developers are attracted to the Android formation. However, the multimedia interface in the upper layer of the Android system has not developed as rapidly as its market share. Many applications involving multimedia streaming and visual communication are based on the development of the bottom layer of Android. Developers first need to be familiar with the underlying code of Android, and different developers have different methods of implementation. As a result, the development of Android multimedia applications is difficult and the development cycle is long. In order to realize a general Android multimedia development scheme, this paper integrates the most popular audio and video coding library, FFmpeg, into Android multimedia, and uses the interface of FFmpeg to achieve the purpose of developing Android multimedia application. In view of the problem that FFmpeg can only be coded by software which leads to low coding efficiency, this paper also puts forward the scheme design of optimizing FFmpeg encoder. On the basis of deep understanding of the multimedia coding mechanism of Android, the hardware encoder is extracted from it and integrated into the form of plug-in into FFmpeg to achieve efficient coding. In order to reflect the optimized coding performance of FFmpeg, the video coding before and after optimization is compared under the environment of three kinds of video resolution. Their PSNR values, average coding efficiency, CPU average usage and memory average utilization were recorded at different resolutions. The results show that the optimized video coding quality is slightly better than that before the optimization from PSNR value, but the visual effect is exactly the same. Because of the high load work, the average utilization rate of CPU is not much different, but under the 144x176 resolution, the optimized FFmpeg has nearly 8 times higher coding efficiency than that before the optimization, and the higher the resolution rate, the higher the multiple of the difference of coding efficiency. For the average memory usage, the optimized usage is about 2 times lower than before the optimization. Therefore, the optimized FFmpeg encoder is more suitable for Android platform.
【学位授予单位】:华南理工大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:TN919.81
本文编号:2464430
[Abstract]:Nowadays, with the rapid development of mobile Internet, the demand for mobile terminals is no longer satisfied with texting and telephone communication. More and more people use mobile phones as entertainment and entertainment tools in daily life. With the popularity of smart phones and the improvement of their performance, multimedia applications also emerge one after another. It can be said that in the future, in the field of mobile Internet, Multimedia applications will occupy an important position. As the carrier of mobile Internet, Android smartphone is one of the most popular smart phones at present, and its market share in the world has reached 78.1%. As a result, many developers are attracted to the Android formation. However, the multimedia interface in the upper layer of the Android system has not developed as rapidly as its market share. Many applications involving multimedia streaming and visual communication are based on the development of the bottom layer of Android. Developers first need to be familiar with the underlying code of Android, and different developers have different methods of implementation. As a result, the development of Android multimedia applications is difficult and the development cycle is long. In order to realize a general Android multimedia development scheme, this paper integrates the most popular audio and video coding library, FFmpeg, into Android multimedia, and uses the interface of FFmpeg to achieve the purpose of developing Android multimedia application. In view of the problem that FFmpeg can only be coded by software which leads to low coding efficiency, this paper also puts forward the scheme design of optimizing FFmpeg encoder. On the basis of deep understanding of the multimedia coding mechanism of Android, the hardware encoder is extracted from it and integrated into the form of plug-in into FFmpeg to achieve efficient coding. In order to reflect the optimized coding performance of FFmpeg, the video coding before and after optimization is compared under the environment of three kinds of video resolution. Their PSNR values, average coding efficiency, CPU average usage and memory average utilization were recorded at different resolutions. The results show that the optimized video coding quality is slightly better than that before the optimization from PSNR value, but the visual effect is exactly the same. Because of the high load work, the average utilization rate of CPU is not much different, but under the 144x176 resolution, the optimized FFmpeg has nearly 8 times higher coding efficiency than that before the optimization, and the higher the resolution rate, the higher the multiple of the difference of coding efficiency. For the average memory usage, the optimized usage is about 2 times lower than before the optimization. Therefore, the optimized FFmpeg encoder is more suitable for Android platform.
【学位授予单位】:华南理工大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:TN919.81
【参考文献】
相关期刊论文 前3条
1 张仕成;;基于Google Android平台的应用程序开发与研究[J];电脑知识与技术;2009年28期
2 刘建敏;杨斌;;嵌入式Linux下基于FFmpeg的视频硬件编解码[J];单片机与嵌入式系统应用;2011年06期
3 温伟;刘荣科;;Android多媒体框架下Stagefright的功能扩展[J];太赫兹科学与电子信息学报;2013年05期
,本文编号:2464430
本文链接:https://www.wllwen.com/kejilunwen/wltx/2464430.html