广东工业大学学报 ›› 2017, Vol. 34 ›› Issue (04): 58-64.doi: 10.12052/gdutxb.160040

• 综合研究 • 上一篇    下一篇

一种基于FFMPEG的音视频同步算法

曾碧, 张宇   

  1. 广东工业大学 计算机学院, 广东省 广州市 510006
  • 收稿日期:2016-03-09 出版日期:2017-07-09 发布日期:2017-07-09
  • 作者简介:曾碧(1963–),女,教授,博士,CCF高级会员(E20-0007403S),主要研究方向为嵌入式系统与智能技术、信息物理融合系统.
  • 基金资助:

    国家基金广东省联合基金重点项目(U1201251);广东省产学研合作专项资助项目(2014B090904080)

A Research on Synchronous Transmission for Audio and Video Based on FFMPEG

Zeng Bi, Zhang Yu   

  1. School of Computers, Guangdong University of Technology, Guangzhou 510006, China
  • Received:2016-03-09 Online:2017-07-09 Published:2017-07-09

摘要:

在视频监控系统中,音视频的同步传输是一个非常关键的问题.由于音视频数据量大小的差异以及网络状况的不同,使得在其采集、传输、编解码的过程中,存在失同步的可能.针对这些缺陷,提出一种利用时间戳将采集时间存在相关性的音频和视频数据存入一个固定的同步数据结构中,并在采集、编码、传输、接收、解码以及播放过程中始终加以同步控制.最后将FFMPEG移植到Android平台对该算法进行实验,结果表明,该同步算法具有较稳定的同步效果,能够很好地满足应用场景下的音视频同步需求,同时对Android平台的音视频处理提出了新方法,具有很好的工程实践意义.

关键词: 视频监控系统, FFMPEG, Android, 音视频同步

Abstract:

In video-monitor system, the synchronous transmission of audio and video is a key issue. The audio and video being out of synchronization was caused by the difference among the size of audio data and video data in the procedure of capturing, transmitting and encoding. To solve these problems, a solution is proposed which defines a data structure to store the time-related frames of audio and video data and control the synchronization of audio and video data through all the procedure. At last, the FFMPEG project is ported to Android device to do the experiment. It turns out that the algorithm proposed in this research has a good effect of synchronization. It can meet the need of synchronization in the specified scenes. At the same time, the new method of audio and video processing of Android platform is proposed, which is of great significance in engineering practice.

Key words: video monitor system, FFMPEG, Android, audio and video synchronization

中图分类号: 

  • TP37

[1] 柴若楠, 曾文献, 张鹏云. 音视频同步技术综述[J]. 计算机系统应用, 2011, 20(11): 223-226CHAI R N, ZENG W X, ZHANG P Y. Survey on audio and video synchronization [J]. Computer Systems & Applications, 2011, 20(11): 223-226
[2] RADHAKRISHNAN R, TERRY K, BAUER C. Audio and video signatures for synchronization [C]// Multimedia and Expo, 2008 IEEE International Conference on. Hanover: IEEE, 2008: 1549-1552.
[3] ESCOBAR J, DEUTSCH D, PATRIDGE C. Flow synchronization protocol [C]//Global Telecommunications Conference, 1992. Conference Record. GLOBECOM'92. Communication for Global Users., IEEE. Orlando, FL: IEEE, 1992: 111-121.
[4] RANGAN P V, RAMANATHAN S, VIN H M, et al. Techniques for multimedia synchronization in network file systems [J]. Computer Communications, 1993, 16(3): 168-176.
[5] KUO C C, CHEN M S, CHEN J C. An adaptive transmission scheme for audio and video synchronization based on real-time transport protocol [C]//Multimedia and Expo, 2001. ICME 2001. IEEE International Conference on. Tokyo, Japan: IEEE, 2001: 403-406.
[6] ZHANG J F, LI Y, WEI Y N. Using timestamp to realize audio-video synchronization in real-time streaming media transmission [C]//Proceedings of the2008 IEEE International Conference on Audio, Language and Image Processing. Shanghai: IEEE Press, 2008: 1073-1076.
[7] PALACHARLA S, KARMOUCH A, MAHMOUD S A. Design and implementation of a real-time multimedia presentation system using RTP [C]//2012 IEEE 36th Annual Computer Software and Applications Conference. IEEE Computer Society, 1997: 376-381.
[8] AGGARWAL S, JINDALA. Comprehensive overview of various lip synchronization techniques [C]. Proceedings of the2008 IEEE International Symposium on Biometrics and Security Technologies. Washington, DC: IEEE Press, 2008: 1-6.
[9] 曾碧, 林建浩, 肖红, 等. 基于可变码长的音视频同步编码改进算法[J]. 计算机应用. 2014, 34(5): 1467-1472.ZENG B, LIN J H, XIAO H, et al. Improved algorithm of audio-video synchronization coding based on variable code length [J]. Journal of Computer Science. 2014, 34(5): 1467-1472.
[10] 李晓妮, 陈贺新, 陈绵书, 等. 基于H.264运动估计的音视频同步编码技术[J]. 吉林大学学报(工学版), 2012, 42(5): 1321-1326.LI X N, CHEN H X, CHEN M S, et al. Audio-video synchronous coding based on motion estimation in H.264[J]. Journal of Jilin University (Engineering and Technology Edition), 2012, 42(5): 1321-1326.
[11] 温洁嫦. 数字音频信号的水印隐藏与嵌入算法[J]. 广东工业大学学报, 2008, 25(3): 51-54.WEN J C. Hidden and embedded water marking algorithm for digital audio signals [J]. Journal of Guangdong University of Technology, 2008, 25(3): 51-54.
[12] ITU-R BT. 1359-1. Relative timing of sound and vision for broadcasting [S]. 1998.
[13] 刘丽霞, 边金松, 张琍, 等. 基于FFMPEG解码的音视频同步实现[J]. 计算机工程与设计. 2013, 34(6): 2087-2092LIU L X, BIAN J S, ZHANG L, et al. Synchronization playing of audio and video based on FFMPEG [J]. Computer Engineering and Design. 2013, 34(6): 2087-2092.
[14] 张昕, 吕凝, 王春雷, 等. 多媒体同步传输方法研究[J]. 吉林大学学报(信息科学版). 2009, 27(6): 573-578.ZHANG X, LYU N, WANG C L, et al. Transmission method of audio and video synchronization [J]. Journal of Jilin University (Information Science Edition), 2009, 27(6): 573-578.
[15] Bertoglio L, Leonardi R, Migliorati P. Intermedia synchronization for videoconference over IP [J]. Signal Processing: Image Communication, 1999, 15(1): 149-164.
[16] 薛彬, 徐京, 王猛. 一种改进的基于时间戳的空间音视频同步方法[J]. 电子设计工程. 2013, 21(11): 88-93.XUE B, XU J, WANG M. An improved audio-video synchronization method based on timestamp [J]. Electronic Design Engineering. 2013, 21(11): 88-93.

[1] 范锐, 颜思伟, 彭中煌, 廖永乐, 陈月峰, 罗小行, 林恒, 谭治. 可拓策略生成软件架构及其应用研究[J]. 广东工业大学学报, 2017, 34(02): 1-5.
[2] 黄斌杰,刘怡俊. 基于Hadoop云平台的无线门铃系统的设计与实现[J]. 广东工业大学学报, 2016, 33(03): 55-59.
[3] 吴一民,何嘉荣. 基于远程服务的Android平台下SQlite数据库安全机制的研究与实现[J]. 广东工业大学学报, 2013, 30(3): 49-52.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!