基于H.264的網(wǎng)絡(luò)視頻監(jiān)控系統(tǒng)的研究與實(shí)現(xiàn)
本文選題:視頻監(jiān)控 + 幀內(nèi)預(yù)測(cè) ; 參考:《吉林大學(xué)》2014年碩士論文
【摘要】:計(jì)算機(jī)和互聯(lián)網(wǎng)的普及度的迅速提高,視頻編碼技術(shù)和網(wǎng)絡(luò)技術(shù)的不斷發(fā)展,這些條件為網(wǎng)絡(luò)視頻監(jiān)控系統(tǒng)的普及提供了必要條件。網(wǎng)絡(luò)視頻監(jiān)控結(jié)合視頻監(jiān)控和網(wǎng)絡(luò)技術(shù),實(shí)現(xiàn)了遠(yuǎn)程監(jiān)控的功能。近年來,隨著智能手機(jī)和無線網(wǎng)絡(luò)的廣泛使用,移動(dòng)終端進(jìn)入到了視頻監(jiān)控系統(tǒng)中,,使用智能手機(jī)通過無線網(wǎng)絡(luò)接入監(jiān)控系統(tǒng),能夠真正的實(shí)現(xiàn)隨時(shí)隨地的讀取監(jiān)控視頻數(shù)據(jù)。 本文對(duì)實(shí)現(xiàn)網(wǎng)絡(luò)視頻監(jiān)控所使用到的技術(shù)進(jìn)行了較深入的研究。研究的技術(shù)主要有:H.264視頻編碼技術(shù)、V4L2、流媒體服務(wù)器、RTP/RTCP網(wǎng)絡(luò)傳輸協(xié)議、Windows和Android系統(tǒng)下的流媒體播放器等。在這些技術(shù)的基礎(chǔ)上,本文對(duì)網(wǎng)絡(luò)視頻監(jiān)控系統(tǒng)進(jìn)行了設(shè)計(jì)、實(shí)現(xiàn)。除此之外,本文還對(duì)幀內(nèi)預(yù)測(cè)模式選擇算法進(jìn)行了優(yōu)化,同時(shí)實(shí)現(xiàn)了基于網(wǎng)絡(luò)狀況的碼率自適應(yīng)。 本文對(duì)網(wǎng)絡(luò)視頻監(jiān)控系統(tǒng)的實(shí)現(xiàn),還使用到了一些開源項(xiàng)目。服務(wù)器的實(shí)現(xiàn)過程:首先,使用V4L2驅(qū)動(dòng)攝像頭獲取視頻數(shù)據(jù)。然后,將讀入的YUYV格式視頻轉(zhuǎn)換為YUV420格式。接下來,通過對(duì)x264編碼器的修改,完成對(duì)實(shí)時(shí)視頻的編碼。最后,通過修改后的live555完成實(shí)時(shí)的視頻數(shù)據(jù)的傳輸?蛻舳税ㄟm用于Windows和Android平臺(tái)的兩種實(shí)現(xiàn)。兩種平臺(tái)下的客戶端都是使用VLC作為主框架完成的。完成客戶端的實(shí)現(xiàn)首先需要編譯VLC源碼生成VLC的核心庫(kù),然后,通過調(diào)用VLC核心庫(kù)的函數(shù),基于MFC編碼實(shí)現(xiàn)Windows平臺(tái)下的客戶端,基于Android JNI技術(shù)和SurfaceView等控件完成Android平臺(tái)下客戶端的開發(fā)。 快速幀內(nèi)預(yù)測(cè)模式選擇算法的主要思想,計(jì)算宏塊內(nèi)部在橫向、縱向和兩條對(duì)角線方向的特征。根據(jù)闕值和各方向的特征值判斷四種模式是否存在滿足最佳模式要求的模式,如果有,則將選定的預(yù)測(cè)模式作為最佳預(yù)測(cè)模式,算法結(jié)束;如果沒有,通過方向特征來縮減可供選擇的4x4亮度預(yù)測(cè)模式種類。4x4的幀內(nèi)亮度預(yù)測(cè)模式根據(jù)橫向、縱向以及兩個(gè)對(duì)角線方向被分為4個(gè)候選組。選出特征值最小的方向?qū)?yīng)的候分組作為候選組,對(duì)應(yīng)的8x8色度預(yù)測(cè)模式為最佳色度預(yù)測(cè)模式,對(duì)候選組中的模式計(jì)算編碼代價(jià),代價(jià)最小的即為最佳亮度預(yù)測(cè)模式。 基于網(wǎng)絡(luò)狀況的碼率自適應(yīng)研究算法的主要思想,在視頻數(shù)據(jù)傳輸?shù)某跗谑褂肨CP慢啟動(dòng)的思想根據(jù)RR數(shù)據(jù)包進(jìn)行碼率增加。通過這種方法可以有效的避免固定初始碼率對(duì)不同網(wǎng)絡(luò)狀況適應(yīng)性差的問題。因?yàn)橄鄬?duì)真實(shí)網(wǎng)絡(luò)狀況,如果初始碼率過大,會(huì)出現(xiàn)大量丟包、網(wǎng)絡(luò)延遲嚴(yán)重,甚至?xí)邮詹坏絉R包,并且會(huì)是網(wǎng)絡(luò)狀況更差;如果初始碼率過小,丟包率會(huì)為0,則無法計(jì)算網(wǎng)絡(luò)的有效帶寬,仍要通過遞加碼率才能實(shí)現(xiàn)與真實(shí)網(wǎng)絡(luò)狀況的適應(yīng)。首先,本文使用TCP慢啟動(dòng)的思想,由于編碼的量化值與發(fā)送碼率成反比關(guān)系,從而將初始的編碼器量化值設(shè)定較大來保證較低的發(fā)送碼率,收到丟包率為0的RR包,減小編碼器的量化值。如果存在5個(gè)RR數(shù)據(jù)包中有3個(gè)及以上的丟包率不為0或者QP減小到QP_MIN,則進(jìn)入擁塞避免狀態(tài)。進(jìn)入擁塞避免階段后,根據(jù)RR數(shù)據(jù)包計(jì)算網(wǎng)絡(luò)支持的最大編碼量化值,根據(jù)網(wǎng)絡(luò)支持的最小編碼量化值改變當(dāng)前編碼器的量化值,從而實(shí)現(xiàn)碼率的自適應(yīng)。
[Abstract]:In recent years , with the extensive use of smart phones and wireless networks , mobile terminals have entered the video monitoring system . With the widespread use of smart phones and wireless networks , mobile terminals have entered the video monitoring system , and using smart phones to access the monitoring system through the wireless network can truly realize the reading and monitoring video data anytime and anywhere .
In this paper , the technology of network video surveillance is studied in detail . The main technologies are : H.264 video coding technology , V4L2 , streaming media server , RTP / RTCP network transmission protocol , Windows and Android system streaming media player etc . On the basis of these technologies , this paper designs and implements the network video monitoring system . In addition , this paper optimizes the algorithm of intra prediction mode selection , and realizes the rate adaptation based on network condition .
In this paper , the realization of the network video monitoring system is realized , and some open source projects are used . The realization process of the server is as follows : firstly , the video data is acquired by using V4L2 driving camera . Then , the read - in YUYV format video is converted into YUV420 format . Then , through modifying the x264 encoder , the encoding of the real - time video is completed . Finally , the client end realizes the development of the client under the Windows platform on the basis of MFC code by calling the function of the VLC core library , and finishes the development of the client under the Android platform based on the control of Android JNI technology and the SurfaceView .
according to the threshold value and the characteristic value of each direction , judging whether the four modes have the mode satisfying the optimal mode requirement , if so , selecting the selected prediction mode as the optimal prediction mode and ending the algorithm ;
if no , that alternative 4x4 brightness prediction mode type is reduce by directional characteristic . the 4x4 intra - frame brightness prediction mode is divided into four candidate groups according to the transverse direction , the longitudinal direction and the two diagonal directions .
This method can effectively avoid the problem of poor adaptability of fixed initial code rate to different network conditions . Because of the relative real network condition , if the initial code rate is too large , a lot of packet loss will occur , the network delay is severe , even the RR packet can be received , and the network condition is worse ;
if that initial code rate is too low and the packet loss rate is 0 , the effective bandwidth of the network cannot be compute , and the adaptation of the real network condition can not be realized by transmitting the code rate .
【學(xué)位授予單位】:吉林大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2014
【分類號(hào)】:TN948.6
【參考文獻(xiàn)】
相關(guān)期刊論文 前9條
1 韓慧英;潘婭;;基于Davinci的嵌入式Web視頻監(jiān)控系統(tǒng)[J];兵工自動(dòng)化;2010年04期
2 張久玲;練秋生;;利用宏塊特征的H.264/AVC快速幀內(nèi)模式?jīng)Q策[J];計(jì)算機(jī)工程與應(yīng)用;2012年14期
3 于溯,盛彥瑾,黃凱,王文靜;RTP自適應(yīng)傳輸控制算法的研究[J];計(jì)算機(jī)工程與科學(xué);2005年11期
4 俞國(guó)鋒;周星;;多媒體網(wǎng)絡(luò)視頻數(shù)字監(jiān)控系統(tǒng)[J];建筑電氣;2007年11期
5 茅炎菲;黃忠東;;基于RTSP協(xié)議網(wǎng)絡(luò)監(jiān)控系統(tǒng)的研究與實(shí)現(xiàn)[J];計(jì)算機(jī)工程與設(shè)計(jì);2011年07期
6 陳亮;裴海龍;伍越;;基于Linux系統(tǒng)的USB攝像頭視頻播放實(shí)現(xiàn)[J];現(xiàn)代電子技術(shù);2008年24期
7 周寧兆,宋彬;H.264中幀內(nèi)編碼算法及其快速實(shí)現(xiàn)研究[J];中國(guó)有線電視;2004年24期
8 陶桂東;張占軍;;基于RTP協(xié)議H.264視頻流傳輸QoS保證的研究[J];裝甲兵工程學(xué)院學(xué)報(bào);2006年05期
9 趙雪;;視頻監(jiān)控系統(tǒng)的發(fā)展與應(yīng)用[J];科技資訊;2012年02期
本文編號(hào):1900438
本文鏈接:http://sikaile.net/kejilunwen/wltx/1900438.html