摘要
根据视频流与实时监视应用的特点,提出一种基于TCP协议的动态双缓冲与双线程视频实时传输算法。在发送方设置视频数据缓存与数据发送缓存,并分别由视频数据输入线程与视频数据发送线程负责管理;视频数据输入线程根据预设的最大等待发送时间与实时计算的网络传输速率,动态调节缓存的大小以及在网络拥塞时有选择性地丢弃视频帧;视频数据发送线程实现视频数据发送与按帧从视频数据缓存获取数据,并实时计算出网络数据传输速率。实验结果表明,本算法能最大限度地利用动态变化的网络带宽,保证视频实时发送至接收方与平稳播放,可有效地应用于窄变带宽网络环境下实时视频监视。
A real-time video transmission algorithm using double dynamic buffers and double operation threads based on TCP protocol is proposed according to the characteristics of video stream and real-time surveillance applications. One video data buffer and one data sending buffer, which are managed respectively by one video data storing thread and one data sending thread, are set up in the transmitter. The video data storing thread dynamicaliy adjusts the video data buffer size and discards some video frames selectively during network congestion according to the maximal time waiting for sending and the network data transmission speed calculated actually in the data sending thread. The data sending thread sends vid- eo data to receiver and obtains video data one frame by one frame from the video data buffer, and calculates the network real-time data transmission speed. The experiment in simulated environment is given at last. The results show that the proposed algorithm is able to utilize network variable bandwidth in the greatest extent for transmitting video to receiver by real-time and ensures to play back smoothly in receiver, and can be applied effectively for real-time video surveillance in narrow and variable bandwidth networks.
出处
《光电子.激光》
EI
CAS
CSCD
北大核心
2012年第3期547-553,共7页
Journal of Optoelectronics·Laser
基金
浙江省科技计划项目(2011C21035
2010R50009)
工业控制技术国家重点实验室开放课题(ICT1004)资助项目
关键词
视频
实时传输
窄变带宽
丢帧
video
real-time transmission
narrow and variable bandwidth
discard video frames