摘要
在飞行试验中,机载视频数据是试飞测试数据中的重要组成部分。目前机载记录视频数据为独立的M2T文件,现有视频播放软件只能对单路视频文件进行回放。为解决机载多路视频数据同步回放的问题,提出了一种基于C/S模式的多路视频同步回放技术方案,服务器端进行视频文件读取控制,客户端进行视频解码显示。首先介绍了FFMPEG的基本概念,然后论述了系统的总体设计方案,重点介绍了服务器端和客户端的设计与实现。该系统采用C++语言进行设计,服务器采用TCP/IP协议与客户端进行数据交互。软件设计利用模块化和多线程的思路,提高处理效率,保证功能的可扩展性。目前该软件已成功应用于多个型号任务多路视频同步回放中,实际应用效果表明该系统工作稳定,能够有效提高型号试飞效率。
In flight test,airborne video data is an important part of flight test data. At present,airborne recording video data is a single M2 T file.A single video file can be replayed at one time using current video player software.In order to solve the problem of the synch-playback of multi-channel airborne videos,we propose a synch-playback scheme of multi-channel videos based on C/S mode. The server performs video file read control,and the client performs video decoding and display. Firstly,the basic concept of FFMPEG is introduced. Then the overall design of the system is discussed,and the design and implementation of the server and the client are emphasized. The system is designed in C++ language,and the server uses TCP/IP protocol to interact with the client. The modular and multi-threaded ideas are used in the software design to improve processing efficiency and ensure scalability of function. At present,the software has been successfully applied to synch-playback of multi-channel videos of multiple types' task. The application shows that the system works steadily and can effectively improve the efficiency of flight test.
引文
[1] 张杰,邹强,晏晖.机载多路视频PCM遥测传输技术[J].计算机与数字工程,2013,41(5):805-807.
[2] 朱明海.流媒体服务器TS流封装的实现及流控的研究[D].北京:北京邮电大学,2011.
[3] 李叶.基于TS流的数字电视播出系统的研究与实现[D].长沙:中南大学,2014.
[4] 杨赞国,高敬惠.基于C/S模式的网络信息管理系统设计与实现[J].微计算机信息,2005,21(7-3):27-29.
[5] 李云云.浅析B/S和C/S体系结构[J].科学之友,2011(2):6-8.
[6] YOUM B J,PARK J.TCP/IP protocol over IEEE-1394 network for real-time control applications[J].IFAC Proceedings Volumes,2005,38(1):37-42.
[7] 于宏亮.TCP与UDP的原理及其在网络编程中的区别[J].计算机与网络,2007(22):186.
[8] 罗亚非.基于TCP的Socket多线程通信[J].电脑知识与技术,2009,5(3):563-565.
[9] MUKHERJEE J,LANGB M K,MITRA S K.Demosaicing of images obtained from single-chip imaging sensors in YUV color space[J].Pattern Recognition Letters,2005,26(7):985-997.
[10] 李亚南,杨亮,李波.一种基于YUV颜色空间的匹配跟踪算法[J].机电产品开发与创新,2017,30(4):89-91.
[11] 孟成,陈亚.FFmpeg+SDL实时播放摄像机视频设计[J].产业与科技论坛,2017,16(17):57-58.
[12] 李科,李璐,兰时勇.基于FFmpeg和SDL实现多路实时流变换及播放[J].计算机技术与发展,2014,24(4):65-68.
[13] 辛长春,娄小平,吕乃光.基于FFmpeg的远程视频监控系统编解码[J].电子技术,2013(1):3-5.
[14] ZENG Hao,FANG Yuan.Implementation of video transcoding client based on FFMPEG[J].Advanced Materials Research,2013,756-759:1748-1752.
[15] COURBIN P,LUPU I,GOOSSENS J.Scheduling of hard real-time multi-phase multi-thread(MPMT) periodic tasks[J].Real-Time Systems,2013,49(2):239-266.
[16] 郝文化.Windows多线程编程技术与实例[M].北京:中国水利水电出版社,2005.
[17] 郝朝,药红红,山寿.基于OSG的飞行器实时监控软件设计[J].计算机技术与发展,2017,27(4):21-24.