CN111031338A - 一种改善在线信源速率异常的方法 - Google Patents
一种改善在线信源速率异常的方法 Download PDFInfo
- Publication number
- CN111031338A CN111031338A CN201911305169.7A CN201911305169A CN111031338A CN 111031338 A CN111031338 A CN 111031338A CN 201911305169 A CN201911305169 A CN 201911305169A CN 111031338 A CN111031338 A CN 111031338A
- Authority
- CN
- China
- Prior art keywords
- information source
- time
- code stream
- current
- warning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
- H04N21/23805—Controlling the feeding rate to the network, e.g. by controlling the video pump
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
- H04N21/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明公开了一种改善在线信源速率异常的方法。它具体包括如下步骤:(1)将转码服务器接入到NTP服务器,保证转码服务器的时钟是正常的;(2)设置检测阈值与信源的初始参数,检测阈值包括警告阈值和警告持续阈值;信源的初始参数包括系统起始时间以及码流的起始时间;(3)检测码流的实时性,包括当前系统的时间以及当前码流的时间;(4)计算信源是否异常,信源异常包括信源发送快和信源发送慢;(5)温和调整信源,根据信源发送快慢、系统时间以及警告阈值来改变当前信源的码流时间戳。本发明的有益效果是:保证信源能够长时间运行,不会出现断流、一直卡顿的问题,大大改善用户体验。
Description
技术领域
本发明涉及视频处理相关技术领域,尤其是指一种改善在线信源速率异常的方法。
背景技术
在直播服务过程中,由于机器硬件各异,直播服务器本身的晶振芯片也各不相同,需要通过连接NTP(Network Time Protocol)服务器来校准时钟,保证输出信源的实时性。但是,实际上由于各种原因,如机房条件限制,网络安全考虑等,也存在很多直播服务器无法连接外网。这样输出的实时信源可能并不实时,取决于各个直播服务器的硬件时钟,有的是比实际慢一点点,有的是快一点点。当下游收到这种非实时的信源时,运行一段时间后会一直卡顿,导致直播无法进行。
当前比较常见的流媒体协议有UDP、RTMP等,其中UDP携带的文件格式通常是TS(Transport Stream:ISO/IEC 13818-1),而RTMP携带的文件格式是FLV。
发明内容
本发明是为了克服现有技术中存在上述的不足,提供了一种保证信源能够长时间运行的改善在线信源速率异常的方法。
为了实现上述目的,本发明采用以下技术方案:
一种改善在线信源速率异常的方法,具体包括如下步骤:
(1)将转码服务器接入到NTP服务器,保证转码服务器的时钟是正常的;
(2)设置检测阈值与信源的初始参数,其中:检测阈值包括检测的警告阈值T_warning_thres和检测的警告持续阈值T_warning_sustain_thres;信源的初始参数包括系统起始时间t_first以及码流的起始时间T_first;
(3)检测码流的实时性,具体包括:当前系统的时间t_cur以及当前码流的时间T_cur;
(4)计算信源是否异常,信源异常包括信源发送快了和信源发送慢了,如果异常则进入下一步,如果正常则返回步骤(3);
(5)温和调整信源,根据信源发送快慢、系统时间以及检测的警告阈值来改变当前信源的码流时间戳,以保证异常的信源长时间稳定输出。
本发明提供一种机制,针对上述这两种直播协议UDP、RTMP,当信源的实时性出现问题时,通过温和的调整,保证信源能够长时间运行,不会出现断流、一直卡顿的问题,大大改善用户体验。
作为优选,在步骤(2)中,码流的起始时间T_first确定分为以下两种情况:
(2a)对于TS with UDP,码流的起始时间T_first为第一个PCR;
(2b)对于RTMP,码流的起始时间T_first为第一个video tag的PTS。
作为优选,在步骤(3)中,当前码流的时间T_cur确定分为以下两种情况:
(3a)对于TS with UDP,当前码流的时间T_cur为当前PCR;
(3b)对于RTMP,当前码流的时间T_cur为当前video的PTS。
作为优选,在步骤(4)中,计算信源异常的方法如下:设置Delta_sys=t_cur-t_first,Delta_pts=T_cur–T_first;如果Delta_pts-Delta_sys>T_warning_thres,并且该状态持续了T_warning_sustain_thres则信源发送快了;如果Delta_sys-Delta_pts>T_warning_thres,并且该状态持续了T_warning_sustain_thres则信源发送慢了。
作为优选,在步骤(5)中,温和调整信源的方法如下:如果信源发送快了,将当前信源的码流时间戳回退到t_cur-t_first-T_warning_thres;如果信源发送慢了,将当前信源的码流时间戳回退到t_cur-t_first+T_warning_thres。
本发明的有益效果是:保证信源能够长时间运行,不会出现断流、一直卡顿的问题,大大改善用户体验。
具体实施方式
下面结合具体实施方式对本发明做进一步的描述。
一种改善在线信源速率异常的方法,具体包括如下步骤:
(1)将转码服务器接入到NTP服务器,保证转码服务器的时钟是正常的;
(2)设置检测阈值与信源的初始参数,其中:检测阈值(参数可配置)包括检测的警告阈值T_warning_thres(300ms)和检测的警告持续阈值T_warning_sustain_thres(5000ms);信源的初始参数包括系统起始时间t_first以及码流的起始时间T_first;码流的起始时间T_first确定分为以下两种情况:
(2a)对于TS with UDP,码流的起始时间T_first为第一个PCR(program clockreference);
(2b)对于RTMP,码流的起始时间T_first为第一个video tag的PTS(presentationtime-stamp);
(3)检测码流的实时性,具体包括:当前系统的时间t_cur以及当前码流的时间T_cur;当前码流的时间T_cur确定分为以下两种情况:
(3a)对于TS with UDP,当前码流的时间T_cur为当前PCR;
(3b)对于RTMP,当前码流的时间T_cur为当前video的PTS;
(4)计算信源是否异常,信源异常包括信源发送快了和信源发送慢了,如果异常则进入下一步,如果正常则返回步骤(3);计算信源异常的方法如下:设置Delta_sys=t_cur-t_first,Delta_pts=T_cur–T_first;如果Delta_pts-Delta_sys>T_warning_thres,并且该状态持续了T_warning_sustain_thres则信源发送快了;如果Delta_sys-Delta_pts>T_warning_thres,并且该状态持续了T_warning_sustain_thres则信源发送慢了;
(5)温和调整信源,根据信源发送快慢、系统时间以及检测的警告阈值来改变当前信源的码流时间戳,以保证异常的信源长时间稳定输出;温和调整信源的方法如下:如果信源发送快了,将当前信源的码流时间戳回退到t_cur-t_first-T_warning_thres;如果信源发送慢了,将当前信源的码流时间戳回退到t_cur-t_first+T_warning_thres。
本发明提供上述机制,针对上述这两种直播协议UDP、RTMP,当信源的实时性出现问题时,通过温和的调整,保证信源能够长时间运行,不会出现断流、一直卡顿的问题,大大改善用户体验。
Claims (5)
1.一种改善在线信源速率异常的方法,其特征是,具体包括如下步骤:
(1)将转码服务器接入到NTP服务器,保证转码服务器的时钟是正常的;
(2)设置检测阈值与信源的初始参数,其中:检测阈值包括检测的警告阈值T_warning_thres和检测的警告持续阈值T_warning_sustain_thres;信源的初始参数包括系统起始时间t_first以及码流的起始时间T_first;
(3)检测码流的实时性,具体包括:当前系统的时间t_cur以及当前码流的时间T_cur;
(4)计算信源是否异常,信源异常包括信源发送快了和信源发送慢了,如果异常则进入下一步,如果正常则返回步骤(3);
(5)温和调整信源,根据信源发送快慢、系统时间以及检测的警告阈值来改变当前信源的码流时间戳,以保证异常的信源长时间稳定输出。
2.根据权利要求1所述的一种改善在线信源速率异常的方法,其特征是,在步骤(2)中,码流的起始时间T_first确定分为以下两种情况:
(2a)对于TS with UDP,码流的起始时间T_first为第一个PCR;
(2b)对于RTMP,码流的起始时间T_first为第一个video tag的PTS。
3.根据权利要求2所述的一种改善在线信源速率异常的方法,其特征是,在步骤(3)中,当前码流的时间T_cur确定分为以下两种情况:
(3a)对于TS with UDP,当前码流的时间T_cur为当前PCR;
(3b)对于RTMP,当前码流的时间T_cur为当前video的PTS。
4.根据权利要求1或2或3所述的一种改善在线信源速率异常的方法,其特征是,在步骤(4)中,计算信源异常的方法如下:设置Delta_sys=t_cur-t_first,Delta_pts=T_cur–T_first;如果Delta_pts-Delta_sys>T_warning_thres,并且该状态持续了T_warning_sustain_thres则信源发送快了;如果Delta_sys-Delta_pts>T_warning_thres,并且该状态持续了T_warning_sustain_thres则信源发送慢了。
5.根据权利要求4所述的一种改善在线信源速率异常的方法,其特征是,在步骤(5)中,温和调整信源的方法如下:如果信源发送快了,将当前信源的码流时间戳回退到t_cur-t_first-T_warning_thres;如果信源发送慢了,将当前信源的码流时间戳回退到t_cur-t_first+T_warning_thres。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911305169.7A CN111031338B (zh) | 2019-12-17 | 2019-12-17 | 一种改善在线信源速率异常的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911305169.7A CN111031338B (zh) | 2019-12-17 | 2019-12-17 | 一种改善在线信源速率异常的方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111031338A true CN111031338A (zh) | 2020-04-17 |
CN111031338B CN111031338B (zh) | 2021-09-28 |
Family
ID=70210224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911305169.7A Active CN111031338B (zh) | 2019-12-17 | 2019-12-17 | 一种改善在线信源速率异常的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111031338B (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112616077A (zh) * | 2020-12-14 | 2021-04-06 | 杭州当虹科技股份有限公司 | 一种基于ip的cbr码率发送控制方法 |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100166080A1 (en) * | 2008-12-26 | 2010-07-01 | Satoko Miki | Video display apparatus |
CN103873891A (zh) * | 2014-03-20 | 2014-06-18 | 深圳创维-Rgb电子有限公司 | 一种ts流媒体文件快速定位方法及系统 |
CN104333795A (zh) * | 2014-11-04 | 2015-02-04 | 北京佳讯飞鸿电气股份有限公司 | 一种不依赖时间戳的实时视频码流播放速度控制方法 |
US20150109529A1 (en) * | 2012-06-08 | 2015-04-23 | Tencent Technology (Shenzhen) Company Limited | Method and system of playing real time online video at variable speed |
CN104618798A (zh) * | 2015-02-12 | 2015-05-13 | 北京清源新创科技有限公司 | 面向互联网视频直播的播放时刻控制方法及装置 |
CN106470352A (zh) * | 2015-08-18 | 2017-03-01 | 中兴通讯股份有限公司 | 直播频道播放方法、装置及系统 |
CN107566889A (zh) * | 2017-09-15 | 2018-01-09 | 深圳国微技术有限公司 | 音频流流速误差处理方法、装置、计算机装置及计算机可读存储介质 |
CN108810656A (zh) * | 2018-06-12 | 2018-11-13 | 深圳国微视安科技有限公司 | 一种实时直播ts流的去抖处理方法及处理系统 |
CN109413371A (zh) * | 2017-08-17 | 2019-03-01 | 成都鼎桥通信技术有限公司 | 视频帧率计算方法及装置 |
-
2019
- 2019-12-17 CN CN201911305169.7A patent/CN111031338B/zh active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100166080A1 (en) * | 2008-12-26 | 2010-07-01 | Satoko Miki | Video display apparatus |
US20150109529A1 (en) * | 2012-06-08 | 2015-04-23 | Tencent Technology (Shenzhen) Company Limited | Method and system of playing real time online video at variable speed |
CN103873891A (zh) * | 2014-03-20 | 2014-06-18 | 深圳创维-Rgb电子有限公司 | 一种ts流媒体文件快速定位方法及系统 |
CN104333795A (zh) * | 2014-11-04 | 2015-02-04 | 北京佳讯飞鸿电气股份有限公司 | 一种不依赖时间戳的实时视频码流播放速度控制方法 |
CN104618798A (zh) * | 2015-02-12 | 2015-05-13 | 北京清源新创科技有限公司 | 面向互联网视频直播的播放时刻控制方法及装置 |
CN106470352A (zh) * | 2015-08-18 | 2017-03-01 | 中兴通讯股份有限公司 | 直播频道播放方法、装置及系统 |
CN109413371A (zh) * | 2017-08-17 | 2019-03-01 | 成都鼎桥通信技术有限公司 | 视频帧率计算方法及装置 |
CN107566889A (zh) * | 2017-09-15 | 2018-01-09 | 深圳国微技术有限公司 | 音频流流速误差处理方法、装置、计算机装置及计算机可读存储介质 |
CN108810656A (zh) * | 2018-06-12 | 2018-11-13 | 深圳国微视安科技有限公司 | 一种实时直播ts流的去抖处理方法及处理系统 |
Non-Patent Citations (1)
Title |
---|
平亮: "基于IP的TS流传输关键技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112616077A (zh) * | 2020-12-14 | 2021-04-06 | 杭州当虹科技股份有限公司 | 一种基于ip的cbr码率发送控制方法 |
Also Published As
Publication number | Publication date |
---|---|
CN111031338B (zh) | 2021-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8516528B2 (en) | Synchronization of 2nd screen applications | |
US9137551B2 (en) | Dynamic bit rate adaptation over bandwidth varying connection | |
JP7279767B2 (ja) | 送信方法および送信装置 | |
CN103067778B (zh) | 数据监测系统和数据监测方法 | |
US20090219992A1 (en) | Compensating delay of channel state information between receiver and transmitter during adaptive video delivery | |
WO2020036668A1 (en) | Dynamic reduction in playout of replacement content to help align end of replacement content with end of replaced content | |
US20160359610A1 (en) | Method and apparatus for synchronization of slave clock to master clock | |
US10721008B2 (en) | Transmitting system, multiplexing apparatus, and leap second correction method | |
CN111031338B (zh) | 一种改善在线信源速率异常的方法 | |
JP2007535245A (ja) | Mpegpcrデジッタリングのレート制限制御メカニズム | |
EP1984834A4 (en) | SYSTEM AND METHOD FOR EFFICIENT NETWORK FLOW CONTROL | |
CN110809179A (zh) | Hls协议下切换直播时移时间轴的方法及系统 | |
CN104333795A (zh) | 一种不依赖时间戳的实时视频码流播放速度控制方法 | |
US7706400B2 (en) | Transport stream processing device and transport stream processing method | |
EP3101902A1 (en) | Transmission device, transmission method, reception device, and reception method | |
EP2640082B1 (en) | A processing module for injecting a digital media transport stream into a host device | |
CN107835192B (zh) | 一种检测实时转码系统中hls直播流是否正常的方法及系统 | |
CN109698961A (zh) | 一种监控方法、装置及电子设备 | |
US10135945B2 (en) | Methods and systems for boundary placement in a data stream | |
WO2014162748A1 (ja) | 受信装置、及び受信方法 | |
US20180242035A1 (en) | Reception device, data processing method, and program | |
US7748015B2 (en) | Processing of a broadcast signal | |
JP4947447B2 (ja) | リアルタイムデータ伝送システム | |
US8520788B2 (en) | Receiving device, receiving method and program | |
JP2004104701A (ja) | 通信端末装置及びデータ通信プログラム |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |