CN103118241B - Based on the mobile video monitor streaming media self-adapting regulation method of 3G network - Google Patents
Based on the mobile video monitor streaming media self-adapting regulation method of 3G network Download PDFInfo
- Publication number
- CN103118241B CN103118241B CN201210043367.2A CN201210043367A CN103118241B CN 103118241 B CN103118241 B CN 103118241B CN 201210043367 A CN201210043367 A CN 201210043367A CN 103118241 B CN103118241 B CN 103118241B
- Authority
- CN
- China
- Prior art keywords
- network
- socket
- coding parameter
- grade
- network state
- 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.)
- Active
Links
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a kind of mobile video monitor streaming media Adaptive adjusting algorithm based on 3G network, it comprises the following steps: a) arrange network monitoring parameter; B) 3G network state is obtained; C) whether verification msg is key frame; D) the non-key frame data in step c are abandoned; E) network state is recorded; F) judge whether network state reaches adjustment coding parameter condition; G) coding parameter is adjusted; H) network state record is reset.The invention has the beneficial effects as follows and the speed of 3G network can be allowed to fluctuate in a big way, and can not cause network congestion, there is the phenomenon that Hua Pinghe blocks in user monitoring picture; Judged, come the coding parameter of dynamic conditioning equipment by statistics, make equipment make a reaction in time to current network capabilities, alleviate the load of network, reach and improve current network conditions, eliminate congested effect.
Description
[technical field]
The present invention relates to a kind of mobile video monitor streaming media Adaptive adjusting algorithm based on 3G network.
[background technology]
Along with rapid rise and the extensive use of all kinds of internet, day by day increase from the business of network data services upload and download data message.Mobile monitoring device adopts 3G network to transmit data usually, and popularizing along with mobile monitor product, the bandwidth bottleneck problem of 3G network highlights day by day, terminal equipment streaming media belongs to uploads action, although 3G network speed of download is day by day soaring, but owing to uploading the asymmetry of download, uploading speed supports the real time streaming of resolution CIF, code check 256Kps reluctantly.Video monitoring to the real-time of network and stability requirement very high, and 3G network is easily subject to external environment influence, produces fluctuation, affects real time flow medium transfer of data.
[summary of the invention]
The object of the invention is to the deficiency effectively overcoming above-mentioned technology, a kind of mobile video monitor streaming media Adaptive adjusting algorithm based on 3G network is provided, the present invention is according to 3G network real-time status, the real-time coding mode of mobile monitoring device is adjusted, ensures the smoothness of the unimpeded of network and user monitoring picture.
Technical scheme of the present invention is achieved in that its improvements are, it comprises the following steps:
A) network monitoring parameter is set, utilizing socket option SO_SNDBUF to arrange socket transmission buffer size is buf, utilizing socket option SO_SNDLOWAT to arrange socket transmission low tide is buf/2, arranges network good level value GOOD_CONDITION and the severe grade point BAD_CONDITION of network in addition;
B) obtain 3G network state, whether poll socket can be write can judge 3G network state, if socket can not be write, then represent that the consumption rate of socket buffer data does not catch up with speed of production, i.e. network state blocking, then enter step c; If socket can be write, represent that network state is good, then enter step e; The frame per second of normal stream media is 25 frames, and namely average 40ms sends a secondary data, considers the time that sending action consumes, and arranging time-out time long is 5-20ms, avoids unnecessary circulation, saves cpu resource;
C) whether verification msg is key frame, if these data are key frame, then enters step e, if this data non-key frame, then directly enters steps d;
D) the non-key frame data in step c are abandoned;
E) record network state, if socket can be write, namely network state is good, then network is well counted nGood and add 1, network congestion is counted nBad and sets to 0; If socket can not be write, namely network state is blocked up, then network is well counted nGood and set to 0, network congestion is counted nBad and adds 1;
F) judge whether network state reaches adjustment coding parameter condition:
Just network well counts nGood and network good level value GOOD_CONDITION contrasts, if nGood is >=GOOD_CONDITION, then improves coding parameter grade;
Network congestion is counted nBad and the severe grade point BAD_CONDITION of network contrasts, if nBad is >=BAD_CONDITION, then reduce coding parameter grade;
G) adjust coding parameter, when network environment is good, adopts and recover slowly, improve coding parameter grade, each lifting amount is that code check grade adds 1; When network environment is congested, significantly need reduce code check, reduce coding parameter grade, therefore each reduction amount is that code check grade reduces by half;
H) reset network state record, network is well counted nGood and reset, network congestion is counted nBad and reset, repeat step b to step h.
In described step b, the time-out time of setting is long is 10ms.
In described step f, code check parameter level is always divided into 8 kinds, and code check and the frame per second of its correspondence meet following table:
Grade | Frame per second (fps) | Code check (kbps) |
1 | 3 | 32 |
2 | 5 | 64 |
3 | 7 | 96 |
4 | 9 | 128 |
5 | 11 | 160 |
6 | 13 | 192 |
7 | 15 | 222 |
8 | 17 | 256 |
In described step g, adjustment coding parameter is temporarily stored in internal memory, and do not write direct equipment flash.Beneficial effect of the present invention is: one, the present invention can allow the speed of 3G network to fluctuate in a big way, and can not cause network congestion, and the phenomenon that Hua Pinghe blocks appears in user monitoring picture; When network environment is deteriorated, reduce coding parameter grade, ensure monitor video smoothness, when network environment is recovered, improve coding parameter grade, ensure image sharpness, even under the network environment of very severe, use minimum coded system to ensure that user monitoring picture can not block; Two, the present invention judges, comes the coding parameter of dynamic conditioning equipment by statistics, equipment is made to make a reaction in time to current network capabilities, alleviate the load of network, then select whether abandon these data according to the importance of data, improve current network conditions to reach, eliminate congested effect.
[accompanying drawing explanation]
Fig. 1 is flow chart of the present invention.
[embodiment]
Below in conjunction with drawings and Examples, the invention will be further described.
With reference to shown in Fig. 1, the mobile video monitor streaming media Adaptive adjusting algorithm based on 3G network that the present invention discloses, it comprises the following steps:
A) arrange network monitoring parameter, utilizing socket option SO_SNDBUF to arrange socket transmission buffer size is buf, and utilizing socket option SO_SNDLOWAT to arrange socket transmission low tide is buf/2; Buffering area is the bigger the better, and small size network fluctuation can be offset in large buffering area, arranges network good level value GOOD_CONDITION and the severe grade point BAD_CONDITION of network in addition;
B) obtain 3G network state, whether poll socket can be write can judge 3G network state, if socket can not be write, then represent that the consumption rate of socket buffer data does not catch up with speed of production, i.e. network state blocking, then enter step c; If socket can be write, represent that network state is good, then enter step e; The frame per second of normal stream media is 25 frames, and namely average 40ms sends a secondary data, considers the time that sending action consumes, and arranging time-out time long is 10ms, avoids unnecessary circulation, saves cpu resource;
C) whether verification msg is key frame, if these data are key frame, then enters step e, if this data non-key frame, then directly enters steps d;
D) the non-key frame data in step c are abandoned; Key frame in H264 can decode separately a pictures, and non-key frame need to rely on it before key frame decode, so key frame can not abandon, non-key frame can abandon;
E) record network state, if socket can be write, namely network state is good, then network is well counted nGood and add 1, network congestion is counted nBad and sets to 0; If socket can not be write, namely network state is blocked up, then network is well counted nGood and set to 0, network congestion is counted nBad and adds 1;
F) judge whether network state reaches adjustment coding parameter condition:
Just network well counts nGood and network good level value GOOD_CONDITION contrasts, if nGood is >=GOOD_CONDITION, then improves coding parameter grade;
Network congestion is counted nBad and the severe grade point BAD_CONDITION of network contrasts, if nBad is >=BAD_CONDITION, then reduce coding parameter grade;
G) adjust coding parameter, when network environment is good, adopts and recover slowly, improve coding parameter grade, each lifting amount is that code check grade adds 1; When network environment is congested, significantly need reduce code check, reduce coding parameter grade, therefore each reduction amount is that code check grade reduces by half; Code check parameter level is always divided into 8 kinds, and frame per second and the code check of often kind of grade see the following form:
Grade | Frame per second (fps) | Code check (kbps) |
1 | 3 | 32 |
2 | 5 | 64 |
3 | 7 | 96 |
4 | 9 | 128 |
5 | 11 | 160 |
6 | 13 | 192 |
7 | 15 | 222 |
8 | 17 | 256 |
Further, because the adjustment encoder bit rate action invocation in this algorithm is quite frequent, the equipment flash so adjustment coding parameter should not write direct, is only temporarily stored in internal memory;
H) reset network state record, network is well counted nGood and reset, network congestion is counted nBad and reset, repeat step b to step h.
Mobile monitoring device, when adopting 3G network transmission data, if be subject to external action, can produce fluctuation, thus have impact on the transmission of real time flow medium data, by above-mentioned steps, when network congestion and network environment are deteriorated, then reduce code check parameter level, as shown above, code check grade reduces, so frame per second and code check then corresponding reduction, thus ensure the fluency of monitor video, when network well namely recover by network environment, then improve code check parameter level, thus ensure the definition of picture.Time under the network environment of very severe, use minimum coded system to ensure that user monitoring picture can not block.
Described above is only preferred embodiment of the present invention, and above-mentioned specific embodiment is not limitation of the present invention.In technological thought category of the present invention, can occur various distortion and amendment, all those of ordinary skill in the art, according to describing retouching, the amendment made above or equivalent replacing, all belong to the scope that the present invention protects.
Claims (3)
1., based on a mobile video monitor streaming media self-adapting regulation method for 3G network, it is characterized in that: it comprises the following steps:
A) network monitoring parameter is set, utilizing socket option SO_SNDBUF to arrange socket transmission buffer size is buf, utilizing socket option SO_SNDLOWAT to arrange socket transmission low tide is buf/2, arranges network good level value GOOD_CONDITION and the severe grade point BAD_CONDITION of network in addition;
B) obtain 3G network state, whether poll socket can be write can judge 3G network state, if socket can not be write, then represent that the consumption rate of socket buffer data does not catch up with speed of production, i.e. network state blocking, then enter step c; If socket can be write, represent that network state is good, then enter step e; The frame per second of normal stream media is 25 frames, and namely average 40ms sends a secondary data, considers the time that sending action consumes, and arranging time-out time long is 5-20ms, avoids unnecessary circulation, saves cpu resource;
C) whether verification msg is key frame, if these data are key frame, then enters step e, if this data non-key frame, then directly enters steps d;
D) the non-key frame data in step c are abandoned;
E) record network state, if socket can be write, namely network state is good, then network is well counted nGood and add 1, network congestion is counted nBad and sets to 0; If socket can not be write, namely network state is blocked up, then network is well counted nGood and set to 0, network congestion is counted nBad and adds 1;
F) judge whether network state reaches adjustment coding parameter condition:
Network is well counted nGood and network good level value GOOD_CONDITION contrasts, if nGood is >=GOOD_CONDITION, then improve coding parameter grade;
Network congestion is counted nBad and the severe grade point BAD_CONDITION of network contrasts, if nBad is >=BAD_CONDITION, then reduce coding parameter grade;
G) adjust coding parameter, when network environment is good, adopts and recover slowly, improve coding parameter grade, each lifting amount is that code check grade adds 1; When network environment is congested, significantly need reduce code check, reduce coding parameter grade, therefore each reduction amount is that code check grade reduces by half;
H) reset network state record, network is well counted nGood and reset, network congestion is counted nBad and reset, repeat step b to step h;
In described step g, adjustment coding parameter is temporarily stored in internal memory, and do not write direct equipment flash.
2. a kind of mobile video monitor streaming media self-adapting regulation method based on 3G network according to claim 1, is characterized in that: in described step b, and the time-out time of setting is long is 10ms.
3. a kind of mobile video monitor streaming media self-adapting regulation method based on 3G network according to claim 1, it is characterized in that: in described step g, code check parameter level is always divided into 8 kinds, and code check and the frame per second of its correspondence meet following table:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210043367.2A CN103118241B (en) | 2012-02-24 | 2012-02-24 | Based on the mobile video monitor streaming media self-adapting regulation method of 3G network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210043367.2A CN103118241B (en) | 2012-02-24 | 2012-02-24 | Based on the mobile video monitor streaming media self-adapting regulation method of 3G network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103118241A CN103118241A (en) | 2013-05-22 |
CN103118241B true CN103118241B (en) | 2016-01-06 |
Family
ID=48416502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210043367.2A Active CN103118241B (en) | 2012-02-24 | 2012-02-24 | Based on the mobile video monitor streaming media self-adapting regulation method of 3G network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103118241B (en) |
Families Citing this family (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103501429A (en) * | 2013-10-22 | 2014-01-08 | 中国农业银行股份有限公司 | Data coding method and device based on dynamic code rate |
CN103702136A (en) * | 2013-12-23 | 2014-04-02 | 乐视致新电子科技(天津)有限公司 | Storage method and device of multimedia data |
CN103686346A (en) * | 2013-12-26 | 2014-03-26 | 乐视网信息技术(北京)股份有限公司 | Video playing unsmoothness switching method and system |
CN105282484B (en) * | 2014-05-27 | 2019-01-01 | 普天信息技术有限公司 | Transmission of video code rate adaptive approach and device based on LTE |
CN104135486A (en) * | 2014-08-08 | 2014-11-05 | 浙江奇汇电子提花机有限公司 | Streaming media wireless adaptive transmission method based on TCP (Transmission Control Protocol) |
CN105530449B (en) * | 2014-09-30 | 2019-01-22 | 阿里巴巴集团控股有限公司 | Coding parameter method of adjustment and device |
CN104506874A (en) * | 2015-01-05 | 2015-04-08 | 重庆邮电大学 | Key frame transmission method |
WO2017008198A1 (en) | 2015-07-10 | 2017-01-19 | 华为技术有限公司 | Channel access period allocation method, device and system |
CN105262699B (en) * | 2015-10-29 | 2018-07-03 | 浙江大华技术股份有限公司 | A kind of network self-adapting code adjustment method and device |
CN105898403A (en) * | 2015-11-16 | 2016-08-24 | 乐视云计算有限公司 | Online media service code stream self-adaptive method and system |
WO2018027700A1 (en) * | 2016-08-10 | 2018-02-15 | 张北江 | Transmission method and system for high-speed network environment |
CN106488273B (en) * | 2016-10-10 | 2019-09-10 | 广州酷狗计算机科技有限公司 | A kind of method and apparatus for transmitting live video |
CN106454432B (en) * | 2016-10-18 | 2019-09-17 | 浙江大华技术股份有限公司 | A kind of video frame treating method and apparatus |
WO2018072675A1 (en) | 2016-10-18 | 2018-04-26 | Zhejiang Dahua Technology Co., Ltd. | Methods and systems for video processing |
CN108377428A (en) * | 2018-02-07 | 2018-08-07 | 深圳市亿联智能有限公司 | A kind of high efficiency safety monitoring equipment audio, video data flow control methods |
CN108632376B (en) * | 2018-05-10 | 2021-10-08 | Oppo广东移动通信有限公司 | Data processing method, terminal, server and computer storage medium |
CN108833995B (en) * | 2018-06-08 | 2020-10-27 | 西安交通大学 | Transmission method of self-adaptive streaming media in wireless network environment |
CN112399268A (en) * | 2020-11-12 | 2021-02-23 | 唐桥科技(杭州)有限公司 | Real-time streaming media transmission method and device and electronic equipment |
CN114915804A (en) * | 2022-04-26 | 2022-08-16 | 中航华东光电(上海)有限公司 | Video data transmission method and system based on adaptive parameter adjustment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101511010A (en) * | 2009-03-27 | 2009-08-19 | 北京中星微电子有限公司 | Method and device for sending medium stream |
CN101800697A (en) * | 2010-01-27 | 2010-08-11 | 深圳市宇速科技有限公司 | Method for real-time video transmission self-adapting to network bandwidth |
CN101895753A (en) * | 2010-07-07 | 2010-11-24 | 清华大学 | Network congestion degree based video transmission method, system and device |
CN101919212A (en) * | 2007-07-10 | 2010-12-15 | 拜特移动网络公司 | Adaptive bitrate management for streaming media over packet networks |
CN102098547A (en) * | 2011-01-24 | 2011-06-15 | 深圳市威康普科技有限公司 | Transmission method of self-adaptive/real-time high-definition video for embedded network |
CN102325274A (en) * | 2011-10-13 | 2012-01-18 | 浙江万里学院 | A kind of video flowing transfer control method of network bandwidth adaptive |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100466725C (en) * | 2005-11-03 | 2009-03-04 | 华为技术有限公司 | Multimedia communication method and terminal thereof |
-
2012
- 2012-02-24 CN CN201210043367.2A patent/CN103118241B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101919212A (en) * | 2007-07-10 | 2010-12-15 | 拜特移动网络公司 | Adaptive bitrate management for streaming media over packet networks |
CN101511010A (en) * | 2009-03-27 | 2009-08-19 | 北京中星微电子有限公司 | Method and device for sending medium stream |
CN101800697A (en) * | 2010-01-27 | 2010-08-11 | 深圳市宇速科技有限公司 | Method for real-time video transmission self-adapting to network bandwidth |
CN101895753A (en) * | 2010-07-07 | 2010-11-24 | 清华大学 | Network congestion degree based video transmission method, system and device |
CN102098547A (en) * | 2011-01-24 | 2011-06-15 | 深圳市威康普科技有限公司 | Transmission method of self-adaptive/real-time high-definition video for embedded network |
CN102325274A (en) * | 2011-10-13 | 2012-01-18 | 浙江万里学院 | A kind of video flowing transfer control method of network bandwidth adaptive |
Also Published As
Publication number | Publication date |
---|---|
CN103118241A (en) | 2013-05-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103118241B (en) | Based on the mobile video monitor streaming media self-adapting regulation method of 3G network | |
US11006129B2 (en) | System and method for automatic encoder adjustment based on transport data | |
WO2021244341A1 (en) | Picture coding method and apparatus, electronic device and computer readable storage medium | |
US10602139B2 (en) | Embedded multimedia systems with adaptive rate control for power efficient video streaming | |
US10382495B2 (en) | Method and interworking network node for enabling bit rate adaption in media streaming | |
CN109729437B (en) | Streaming media self-adaptive transmission method, terminal and system | |
CN102450014B (en) | Video optimized method and video optimizer is perceived for quality | |
US20120307886A1 (en) | Adaptive Video Encoding Based on Predicted Wireless Channel Conditions | |
US10887151B2 (en) | Method for digital video transmission adopting packaging forwarding strategies with path and content monitoring in heterogeneous networks using MMT protocol, method for reception and communication system | |
CN107317795B (en) | Method and device for adjusting code rate of data packet | |
CN102098547A (en) | Transmission method of self-adaptive/real-time high-definition video for embedded network | |
CN102036061A (en) | Video data transmission and sending processing method, device and network system | |
CN106954101B (en) | Frame loss control method for low-delay real-time video streaming media wireless transmission | |
CN101562615A (en) | Transmission method for MPEG-4 code based multimedia data stream self-adapting network bandwidth | |
CN103763216A (en) | System and method for adjusting data transmission | |
CN104702922A (en) | Method and system for transmitting video | |
US20170142029A1 (en) | Method for data rate adaption in online media services, electronic device, and non-transitory computer-readable storage medium | |
CN105812710A (en) | Method and system for optimizing image quality in video call process | |
CN104219539A (en) | Video encoding and transmitting method based on TD-LTE (time division long term evolution) channel detection | |
CN110769296A (en) | Video code rate self-adaptive adjusting mode based on local cache during transmission | |
CN104009819A (en) | Anti-packet-loss real-time communication method and system based on layered coding, and related devices | |
CN111263192A (en) | Video processing method and related equipment | |
CN111385571B (en) | Method and device for controlling code rate of ultra-long image group | |
US20190089759A1 (en) | Video encoding circuit and wireless video transmission apparatus and method | |
CN102264003A (en) | Realization method for lowering code rate as well as relevant equipment and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C56 | Change in the name or address of the patentee | ||
CP03 | Change of name, title or address |
Address after: 518000 Longhua Guangdong New District, Longhua street, Qinghua Road, west side of the south side of the building J Industrial Park, building to 5 level 1 Patentee after: Shenzhen Jin made video Polytron Technologies Inc Address before: 518000 Guangdong City, Baoan District Province, Longhua street, Qinghua Road, west side of the south side of the industrial park, building to the 5 floor of the building, J Patentee before: Santachi Video Technology (Shenzhen) Co., Ltd. |