节点文献

基于H.264的远程视频传输软件系统的开发

The Development of Long-distance Video Transmission Software System Based on H.264

【作者】 马林

【导师】 李雄飞;

【作者基本信息】 吉林大学 , 软件工程, 2014, 硕士

【摘要】 如今的社会已经进入了一个信息化的社会,人们期望随时随地的,不受限制的进行信息交流,提高工作效率和经济意义。随着3G技术的日趋成熟,视频的远程监控最大可能地帮助和改善人们的生活质量。3G视频监控系统,采用的是国内先进的3G无线数据通信,数字化图像采集、压缩、存储,智能手机图像监控和广域网络等先进技术,研发出来的一种“看得远—无线图像监控系统”。只要在有手机信号的地方,就可以随时随地通过安装在生产现场或随身携带的“无线图像监控系统终端”,将现场的实时图像通过手机无线通信网络传输到管理人员的办公电脑或手机上,通过这种方式,无论管理人员身处何地,都可随时随地通过手机或电脑上网查看生产现场的实时图像和声音,为安全生产实现“可控、在控、能控”提供了有力的保障。无线移动视频监控系统是基于CDMA或TD-SWCDMA\3G移动通讯技术,应用在多生产现场的远程无线图像监控系统,尤其对自然环境和气候恶劣,现场有线网络布线困难的地区,可以根据现场情况和用户需求来实现远程无线实时监控。3G无线视频监控在很多场景中有着广泛的应用:例如有线网络无法到达或者有线网络价格过于昂贵的地方,比如:电力高压线路、高速公路、环境监测、森林防火、路灯、石油开采、石油输油管线、物流、运输船、防洪抢险等;人员无法接近的场所,比如:易燃易爆等危险场所、疾病传染区、其他微生物危险区等;相对不固定的被监控场所、临时布线会有成本浪费的地方,公安侦查临时布防、部队野战训练、临时活动场所、会展中心、临时建筑工地等。远程无线视频监控系统总体上是由三个部分组成的,分别是视频采集编码终端,视频传输部分和监控中心。视频采集编码终端负责视频的采集、编码和RTP(实时传送协议)封包的工作。封包后的视频数据,再由CDMA2000无线传输模块发送出去,数据经中国电信CDMA2000公网传送,后端监控台通过接入Internet接收数据,然后对接收到的数据进行解码显示,从而达到了实时监控的目的。远程无线视频监控系统利用CDMA2000移动通信网络完成监控终端数据的无线传输,免去了监控终端现场组网的初期建设费用以及日后的网络维护费用,而后台监控中心用Internet网络接入而不用相对昂贵的3G无线网络更是节省了大量成本。软件系统需要承载的最主要的部分是视频通信业务。考虑到实际运用的需求,设计软件系统最终需要拥有较为良好美观的登录界面以及菜单界面;并且实现视频通信的功能,包括实现点对点,点对多点的视频监控功能。视频监控系统主要由四个部分组成,分别是:视频摄像节点、网络代理模块、视频采录与控制模块以及客户观看终端。视频监控系统中的拍摄节点多数为高精度的摄像机,其任务是负责原始视频的完整有效的采集;视频采集控制模块包括采集卡和相应的控制软件。具体流程如下:首先,将采集卡安装在主板上,主板多为嵌入式的,然后将摄像机先前采集到的原始视频数据进行压缩和解压缩,直至将其转换成H.264格式的码字和码流,返回调制给系统进行处理。在嵌入式Linux的系统上,有控制软件的运行,控制软件通过采集卡之中的驱动程序,得到压缩了之后的H.264格式的码字和码流。控制软件同时监控网络代理模块之间的连接,数据的传输以及响应,命令的传输以及响应。比如:网络代理接压缩后的码流和码字,并且对某个摄像机发出命令;在此之中网络管理模块的主要任务是:负责视频观看终端的网络连通的管理,并且控制命令的同时实现视频的传输。视频服务器系统由四部分构成:1.视频信息的采录部分;2.视频信息编解码部分;3.视频数据传输部分;4.视频信息显示部分。其中,视频信息采集模块和视频编码模块位于整个监控系统的前端,主要由Android底层系统库以及USB摄像头实现;监控系统中的中继是视频数据传输模块,其负责监控终端的视频数据与监控前段的交替工作。监控终端主要包括LCD显示模块还有电源模块,其中LCD显示模块可以实时地查看视频,电源模块能够为系统提供充足的能量供应。在实际编程实现中,视频通信包括H.264视频的采样,H.264视频的编码,视频数据的发送,视频数据的接收以及视频数据的解码和视频数据的播放;视频监控数据的接收与视频监控数据解码的播放。另外,还有登录过程等等许多的子过程。平台实现的过程其实较为复杂。因此,一个良好的总体设计是软件系统最终实现的夯实基础和坚实保证。H.264视频传输主要运用了如下技术:ConfigSWIPandPort的作用是:设置对方的IP地址和通话端口;另一个ConfigSWIPandPort的作用是:设置本机的IP地址和数据收发端口; OpenVideoSocketSend()的作用是:打开套接口的视频发送;CloseVideoSocketSend()的作用是:关闭套接口的视频发送;OpenVideoSocketReceive()的作用是:打开视频套接口接收;CloseVideoSocketReceive()的作用是:关闭视频套接口的接收;OpenVideoSend()的作用是:打开视频发送;OpenVideoReceive()的作用是:打开视频接收;SystemIntiVideo()的作用是:系统设备初始化开启视频。在SystemIntiVideo()函数里开启了四个线程“Thread”。其中,VideoSampleThread的作用是:驱动摄像头,进行视频图像采样;VideoPlayThread的作用是:打开射频播放线程,意在接受到视频之后,将视频在电脑上播放;Depackand264DecodeThread的作用是:H.264的解码;H.264EncodeAndPackageThread的作用是:H.264的编码。

【Abstract】 Nowadays, our society has entered upon a IT-based phase, in which we wish forunrestrained communication at all times and places to promote our worked and commercialefficiency. Along with the gradual maturity of3rd-Generation (3G), long-distance videosupervisory control system has improved the life quality as far as possible.3G video supervisory control system is a wireless one which has adopted severaladvanced technologies at home, such as wireless data communication, digital video collection,compression, storage, intelligence mobile video surveillance, and wide area network (WAN).So long as the mobile signal exists, the real-time video in work field can be transferred, by themobile wireless communication network, onto the computer or mobile of manager throughthe terminator of the wireless video supervisory control system which is installed in workfield or carried on by the worker. So, no matter where the manager is, he can examine thereal-time image and sound in work field by mobile phone or computer by means of Internet,which provides a strong guarantee for the production safety.The wireless mobile video supervisory control system, which is based on CDMA orTD-SWCDMA/3G, is a long-distance wireless video supervisory control system. Accordingto the circumstances of the work field and the practical needs of the clients, especially in theones where the natural environment and climate are bad or it is difficult to arrange the wire,3G wireless video supervisory control system is applied widely in the fields where it isincapable or expensive to arrange the wire, such as high-tension line for electricity,expressway, observation system for environment, fire prevention in forest, streetlight,petroleum recovery, pipeline for petroleum, logistics, transport ship, flood protection andrescue work; where it is unable for people to approach, such as the dangerously inflammableand explosive places, infectious disease zones, and other dangerous zones; where it istemporary to supervise and control, such as reconnaissance for a short time, temporarybuilding site, and activity center.As a whole, the long-distance wireless video supervisory control system consists of threeparts, namely the terminator of video collection and coding, video transferring part andmonitor center. The terminator of video collection and coding is responsible for the collection and encoding of the video and the RTP sealing. After the RTP sealing, the video data istransmitted by CDMA2000wireless transferring module, and then transferred by CDMA2000public net. Finally, the monitor center accepts the data by means of Internet and decodesthe data for the purpose real-time supervising and controlling. The data from terminator istransferred by CDMA2000mobile communication net, avoiding the initial building expensein work field and sums of maintenance in the future. What’s more, by Internet, instead of3Gwireless network, the expense is cut down greatly.The video communication part is the most important one of the software. Consideringthe practical need, besides the functions of the video communication part, the beautiful log-inand menu picture are also needed. The video supervisory control system consists of parts,namely, video photograph node, Internet acting module, video collection and controllingmodule as well as the watching terminator of the clients. Most of photograph nodes of thesystem are high precision camera, whose job is the entire and efficient collection of the initialvideo. Video collection and control module includes collection card and related controllingsoftware. Firstly, the collection card is installed in the embedded key plate, then the initialvideo data collected by the camera is encoded and decoded to the code words of H.264, andthen calculated by the system. In the embedded system, the controlling software in thecollection card, by means of the driving program, get the decoded code words of H.264.Meanwhile, the controlling software supervises and controls the link between the Internetacting modules, the transmission and response of the data and the order. For example, afterthe Internet acting module receives the decoded code words, it will give instructions to somecamera. During the process, the module is mostly responsible for the management of theInternet link between different watching terminators of clients, the order control and thereal-time video transmission. Video service system consists of four parts, namely, collectionpart of video information, encoded and decoded part of video information, transmission partof video data, and displaying part of video information. The collection part of videoinformation and the encoded and decoded part of video information lie in the leading end ofthe entire system, who are mostly realized by Androit bottom system house and USB camera.Relaying of the supervisory control system is the transmission module of the video data, whois responsible for the alternation between the terminators and leading ends. The terminators ofthe system include LCD displaying module and electrical module. Displaying module canwatch the video at all times, and electrical module can provide enough power for the system.In the real process, video communication includes sampling, encoding and displaying of thevideo data, and other sub-process of log-in process. The realization of the platform is complicated, so an excellent design is a solid foundation and guarantee of the final realizationof the system.H.264video transmission applies following techniques. The function ofConfigSWIPandPort is setting up the IP address and communication port of the counterpartand the system itself. The function of OpenVideoSocketSend is opening the port of the videotransmission. The function of CloseVideoSocketSend is closing the port of the videotransmission. The function of OpenVideoSocketReceive is opening the port of the videoreceiving. The function of CloseVideoSocketSendReceive is closing the port of the videoreceiving. The function of OpenVideoSend is opening the video transmission. The function ofOpenVideoReceive is opening the video receiving. The function of SystemIntiVideo isopening the initial video of the system. There are four thread in the functions ofSystemIntiVideo. The function of VideoSampleThread is driving the camera and sampling thevideo. The function of VideoPlayThread is opening the thread of video watching. Thefunction of Depackand264DecodeThread is decoding H.264. The function ofH.264EncodeAndPackageThread is encoding H.264.

【关键词】 TCP/IPSocket套接字H.264MFC多线程
【Key words】 TCP/IPSocketH.264MFCMulti-thread
  • 【网络出版投稿人】 吉林大学
  • 【网络出版年期】2014年 09期
  • 【分类号】TN919.81
  • 【被引频次】9
  • 【下载频次】336
节点文献中: 

本文链接的文献网络图示:

本文的引文网络