CN114172874A - Self-adaptive adjustment method and system for video transmission parameters - Google Patents

Self-adaptive adjustment method and system for video transmission parameters Download PDF

Info

Publication number
CN114172874A
CN114172874A CN202111618926.3A CN202111618926A CN114172874A CN 114172874 A CN114172874 A CN 114172874A CN 202111618926 A CN202111618926 A CN 202111618926A CN 114172874 A CN114172874 A CN 114172874A
Authority
CN
China
Prior art keywords
video transmission
transmission
video
level
time
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.)
Pending
Application number
CN202111618926.3A
Other languages
Chinese (zh)
Inventor
缪文
林喆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Sunmi Technology Group Co Ltd, Shenzhen Michelangelo Technology Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN202111618926.3A priority Critical patent/CN114172874A/en
Publication of CN114172874A publication Critical patent/CN114172874A/en
Priority to PCT/CN2022/142041 priority patent/WO2023125443A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/114Adapting the group of pictures [GOP] structure, e.g. number of B-frames between two anchor frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a method and a system for adaptively adjusting video transmission parameters. The adjusting method comprises the following steps: configuring a plurality of video transmission levels; enabling the video to be transmitted according to the set value of the video parameter in the selected video transmission level, and recording the transmission time of a plurality of continuous key frames in the video; and counting the size relation between each transmission time and the first time threshold and the second time threshold, and adjusting the currently selected video transmission grade. The self-adaptive adjustment method and the self-adaptive adjustment system for the video transmission parameters can effectively reduce the pause phenomenon in the transmission process of IPC video data.

Description

Self-adaptive adjustment method and system for video transmission parameters
Technical Field
The present invention relates to the field of video transmission, and in particular, to a method and a system for adaptively adjusting video transmission parameters.
Background
Rate adaptive regulation has been commonly applied in video streaming services. The adjustment of the code rate can be actively detected by the server, and can also be adjusted by the feedback of the client. The active adjustment mode of the streaming media server generally makes a decision by monitoring information such as network bandwidth occupation and sending cache. Because the real-time code rate of the video data of the IPC (IP camera) is unstable, the active adjustment mode of the code rate of the streaming media is generally not suitable for the IPC.
The IPC video data for security monitoring has the following characteristics: (1) dynamic code rate coding is mostly adopted, and the interval of I frames (Intra-coded picture, Intra-coded image frames) is longer; (2) the data volume of the I frame is much larger than that of a P frame (forward-coded Picture frame), and the real-time code rate fluctuation is large. Due to the above characteristics of the IPC video data, the conventional bandwidth detection and buffer detection method is used, even though the adjusted network bandwidth is higher than the average code rate, the smooth transmission of the I frame cannot be guaranteed, and there may occur a situation that within a GOP (Group of Pictures, including an I frame and a plurality of P frames), the P frame is normally transmitted, but the I frame is overtime transmitted, which causes delay or pause in the I frame picture, thereby affecting the user experience.
Disclosure of Invention
The invention aims to provide a method and a system for adaptively adjusting video transmission parameters, which can effectively reduce the pause phenomenon in the transmission process of IPC video data.
In order to solve the above technical problem, the present invention provides a method for adaptively adjusting video transmission parameters, comprising the following steps: configuring a plurality of video transmission levels, wherein the video transmission levels have a level order from high to low according to the size of the corresponding key frame data, and each video transmission level comprises a set value of at least one video parameter; enabling a video to be transmitted according to a set value of a video parameter in a selected video transmission level, and recording the transmission time of a plurality of continuous key frames in the video, wherein the selected video transmission level is any one of the plurality of video transmission levels; and counting the size relation between each transmission time and a first time threshold and a second time threshold, when the number of a plurality of continuous key frames of which the transmission time is greater than the first time threshold reaches a first number threshold and the selected video transmission level is not the lowest level of the plurality of video transmission levels, reducing the selected video transmission level, and when the number of the plurality of continuous key frames of which the transmission time is less than the second time threshold reaches a second number threshold and the selected video transmission level is not the highest level of the plurality of video transmission levels, improving the selected video transmission level.
Optionally, in an embodiment of the present invention, the video parameters include a resolution and a maximum bitrate.
Optionally, in an embodiment of the present invention, in the rank order, a difference between sizes of the key frame data corresponding to adjacent transmission ranks satisfies a data difference threshold.
Optionally, in an embodiment of the present invention, the method for adaptively adjusting video transmission parameters further includes determining whether a current frame being transmitted is the key frame, recording a transmission time of the current frame when the current frame is the key frame, and continuing determining whether a key frame in the same group as the current frame is not transmitted or is not in a transmission queue when the current frame is a non-key frame, and if the determination result is yes, discarding the current frame.
Optionally, in an embodiment of the present invention, the method for adaptively adjusting video transmission parameters further includes emptying the transmission queue and discarding the current frame being transmitted after reducing the selected video level.
Optionally, in an embodiment of the present invention, if the selected video transmission level is the lowest level of the plurality of video transmission levels, when the number of consecutive key frames whose transmission time is greater than the first time threshold reaches a first number threshold, the selected video transmission level is maintained, and if the selected video transmission level is the highest level of the plurality of video transmission levels, when the number of consecutive key frames whose transmission time is less than the second time threshold reaches a second number threshold, the selected video transmission level is maintained.
Optionally, in an embodiment of the present invention, in a default state, the selected video transmission level is the highest level.
Optionally, in an embodiment of the invention, the first time threshold is 2-4 times of a frame interval, and the second time threshold is 1/4-1/2 of the frame interval.
Optionally, in an embodiment of the present invention, when transmitting the first key frame or the first to nth key frames of the video, the first number threshold is set to 1, where n is an integer greater than 1.
Optionally, in an embodiment of the present invention, the number of the plurality of video transmission levels is 3 or 4.
The invention also provides a self-adaptive adjusting system of video transmission parameters, which comprises: the transmission level configuration module is suitable for configuring a plurality of video transmission levels, the video transmission levels have a level sequence from high to low according to the size of the corresponding key frame data, and each video transmission level comprises a set value of at least one video parameter; the video transmission device comprises a key frame transmission statistical module, a first time threshold and a second time threshold, wherein the key frame transmission statistical module is configured to record transmission time of a plurality of continuous key frames in a video when the video is transmitted according to a set value of a video parameter in a selected video transmission grade, the selected video transmission grade is any one of the plurality of video transmission grades, and the key frame transmission statistical module is further configured to count the size relation between each transmission time and the first time threshold and the second time threshold; and a transmission level decision module configured to decrease the selected video transmission level when the number of consecutive key frames having a transmission time greater than the first time threshold reaches a first number threshold and the selected video transmission level is not the lowest of the plurality of video transmission levels, and increase the selected video transmission level when the number of consecutive key frames having a transmission time less than the second time threshold reaches a second number threshold and the selected video transmission level is not the highest of the plurality of video transmission levels.
Optionally, in an embodiment of the present invention, the video parameters include a resolution and a maximum bitrate.
The invention also provides a self-adaptive adjusting system of video transmission parameters, which comprises: a memory for storing instructions executable by the processor; and a processor for executing the instructions to implement the above-mentioned method for adaptive adjustment of video transmission parameters.
The invention also provides a computer-readable medium having stored thereon computer program code which, when executed by a processor, implements the above-described method of adaptive adjustment of video transmission parameters.
Compared with the prior art, the invention has the following advantages:
the self-adaptive adjustment method and the self-adaptive adjustment system for the video transmission parameters automatically adjust the resolution and the code rate of video coding by monitoring the video data frame transmission conditions of the IPC and the receiving end. When the network is not smooth, the code rate is automatically reduced, and video blocking is reduced; and the code rate is improved when the network is smooth, and a clearer video picture is provided. The difference between the scheme of the invention and the prior art is that the transmission state of the I frame (key frame) is used as a decision condition for adjusting the code rate grade, so that the invention has good pertinence and obvious effect, and especially under the condition of network fluctuation, the self-adaptive adjustment scheme of the video transmission parameters in the invention can improve the playing experience of users.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the principle of the invention. In the drawings:
fig. 1 is a flowchart illustrating a method for adaptively adjusting video transmission parameters according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a group of pictures including key frames and non-key frames in a method for adaptive adjustment of video transmission parameters according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for adaptively adjusting video transmission parameters according to another embodiment of the present invention;
fig. 4 is a system block diagram of an adaptive video transmission parameter adjustment system according to an embodiment of the present invention; and
fig. 5 is a system block diagram of an adaptive adjustment system for video transmission parameters according to another embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only examples or embodiments of the application, from which the application can also be applied to other similar scenarios without inventive effort for a person skilled in the art. Unless otherwise apparent from the context, or otherwise indicated, like reference numbers in the figures refer to the same structure or operation.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the description of the present application, it is to be understood that the orientation or positional relationship indicated by the directional terms such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc., are generally based on the orientation or positional relationship shown in the drawings, and are used for convenience of description and simplicity of description only, and in the case of not making a reverse description, these directional terms do not indicate and imply that the device or element being referred to must have a particular orientation or be constructed and operated in a particular orientation, and therefore, should not be considered as limiting the scope of the present application; the terms "inner and outer" refer to the inner and outer relative to the profile of the respective component itself.
Spatially relative terms, such as "above … …," "above … …," "above … …," "above," and the like, may be used herein for ease of description to describe one device or feature's spatial relationship to another device or feature as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if a device in the figures is turned over, devices described as "above" or "on" other devices or configurations would then be oriented "below" or "under" the other devices or configurations. Thus, the exemplary term "above … …" can include both an orientation of "above … …" and "below … …". The device may be otherwise variously oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly.
It should be noted that the terms "first", "second", and the like are used to define the components, and are only used for convenience of distinguishing the corresponding components, and the terms have no special meanings unless otherwise stated, and therefore, the scope of protection of the present application is not to be construed as being limited. Further, although the terms used in the present application are selected from publicly known and used terms, some of the terms mentioned in the specification of the present application may be selected by the applicant at his or her discretion, the detailed meanings of which are described in relevant parts of the description herein. Further, it is required that the present application is understood not only by the actual terms used but also by the meaning of each term lying within.
It will be understood that when an element is referred to as being "on," "connected to," "coupled to" or "contacting" another element, it can be directly on, connected or coupled to, or contacting the other element or intervening elements may be present. In contrast, when an element is referred to as being "directly on," "directly connected to," "directly coupled to" or "directly contacting" another element, there are no intervening elements present. Similarly, when a first component is said to be "in electrical contact with" or "electrically coupled to" a second component, there is an electrical path between the first component and the second component that allows current to flow. The electrical path may include capacitors, coupled inductors, and/or other components that allow current to flow even without direct contact between the conductive components.
Flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations are added to or removed from these processes.
Fig. 1 is a schematic diagram of an adaptive adjustment method 10 (hereinafter referred to as "adjustment method 10") for video transmission parameters according to an embodiment of the present application. As shown in fig. 1, the present application provides a method 10 for adaptive adjustment of video transmission parameters, comprising the following steps.
S1 is configuring a plurality of video transmission levels.
S2 is to transmit the video according to the set values of the video parameters in the selected video transmission level and record the transmission time of a plurality of consecutive key frames in the video.
S3 counts the size relationship between each transmission time and the first time threshold and the second time threshold, and adjusts the video transmission level.
Steps S1-S3 are described in further detail below.
In step S1, the plurality of video transmission levels have a level order from high to low according to the size of the key frame data that can be corresponded, and each video transmission level includes a setting value of at least one video parameter.
Specifically, in an embodiment of the present invention, the adjusting method 10 is suitable for transmitting a security monitoring network Camera (IP Camera, IPC) video. As shown in fig. 2, in the IPC video transmission data scenario, the key frame in the adjustment method 10 is an Intra-coded Picture frame (i.e. I-frame). In contrast, there are also forward-Predictive-coded Picture frames (P-frames). In the practical application process, the IPC encoder compresses the collected original images and encodes the compressed original images into continuous groups of pictures (gops). As is clear from fig. 2, a GOP is composed of an I frame (key frame 1) which can independently decode a complete original picture and a plurality of P frames (non-key frame 1, non-key frame 2 … …) which only record the difference between the current frame and the I frame or the previous P frame in the GOP, so that the data amount of the I frame is often much larger than that of the P frame. This also causes a bottleneck that it is difficult to make adjustment decisions on parameters such as code rate for such video transmission data in the prior art.
Preferably, in an embodiment of the present invention, the video parameters in step S1 include resolution and maximum bitrate. Where resolution is a parameter used to measure how much data is in an image, usually expressed as ppi (pixel per inch), for example, a video has a resolution of 1920 x 1080, meaning that the effective pixels of the video in the horizontal and vertical directions are 1920ppi and 1080ppi, respectively. In practical applications, such as video transmission, the resolution affects the clarity of the video. The code rate is the number of bits of data transmitted per unit time during data transmission, and is usually expressed in kbps (kilobits per second, or kb/s). The larger the code rate is, the higher the precision is, the closer the processed file is to the original file, and meanwhile, the higher the requirements on transmission bandwidth and storage space are. It should be emphasized that, in the present embodiment, the maximum bitrate is not the average bitrate, because it is mentioned above, the data amount of the key frame is often much larger than that of the non-key frame, and for practical application, the interval of the key frame is longer, so that the real-time bitrate of the video fluctuates greatly, and the average bitrate is far lower than the maximum bitrate. At this time, if the video transmission parameters are adjusted according to the average code rate, the transmission of the key frame may be over time. Therefore, it is preferable in some embodiments of the present invention to mainly select two parameters, i.e., the resolution and the maximum bitrate, as the video parameters in step S2.
Further, in step S2, the selected video transmission level may be any one of a plurality of video transmission levels. Preferably, in some embodiments of the present application, the selected video transmission level is the highest level by default. The selection of the video transmission level and the change in the actual operation will be described in more detail below.
Finally, in step S3 of fig. 1, the specific manner of adjusting the video transmission level is as follows. When the number of the plurality of consecutive key frames with the transmission time greater than the first time threshold reaches a first number threshold and the selected video transmission level is not the lowest of the plurality of video transmission levels, decreasing the selected video transmission level, and when the number of the plurality of consecutive key frames with the transmission time less than the second time threshold reaches a second number threshold and the selected video transmission level is not the highest of the plurality of video transmission levels, increasing the selected video transmission level.
Specifically, in some embodiments of the present application, the first time threshold in step S3 is 2 to 4 times of the frame interval, and the second time threshold is 1/4 to 1/2 of the frame interval. The Inter-Frame Space (IFS) represents a time interval between Frame transmissions, and for example, when the number of frames transmitted per second is set to 10 frames, the Frame interval is 0.1 second. In a normal transmission state, when the transmission time is less than the frame interval, the transmission effect is considered to be better, when the transmission time is greater than the frame interval, the condition that the transmission of the key frames is overtime may exist, and when the number of a plurality of continuous key frames exceeding the first threshold reaches the first number threshold, the condition becomes more obvious, and the picture of the key frames is delayed or jammed seriously. It will be appreciated that the downgrading operation is not performed when the currently selected video transmission grade is already the lowest of the plurality of video transmission grades.
On the other hand, when the transmission time is far less than the frame interval, the transmission effect is smoother, and at this time, the video transmission grade can be further improved so as to obtain higher video transmission quality, that is, when the number of a plurality of continuous key frames of which the transmission data of the key frames is less than the second threshold reaches the second threshold, the selected video transmission grade is reduced. It will also be appreciated that the upscale operation is not performed when the currently selected video transmission level is already the highest of the plurality of video transmission levels.
To better illustrate the adaptive adjustment scheme of video transmission parameters of the present invention, fig. 3 is a flowchart of an adaptive adjustment method 30 (hereinafter referred to as "adjustment method 30") of video transmission parameters during single frame transmission according to another embodiment of the present application. It is understood that the adjustment method 30 shown in fig. 3 is based on the adjustment method 10 shown in fig. 1, and a more complete adjustment manner in one embodiment is realized. Referring to fig. 3, in an embodiment of the present invention, when a new data frame is generated and transmission is started, i.e., step S301, a current frame is generated, and the current frame undergoes the following steps.
Step S302 is to determine whether the current frame being transmitted is a key frame (for example, the aforementioned I frame), and if the current frame is a key frame, step S303 is executed, which is a flow step of the key frame portion. If the current frame is a non-key frame (e.g., the above-mentioned P frame), the process proceeds to step S308 and subsequent steps, which are steps of the non-key frame part, and this part will be described in more detail below. First, the following describes a further adjustment process if the current frame is a key frame. (ii) a
Now that the current frame is known as a key frame, the process continues to step S303, where the transmission time of the current frame (key frame) is recorded, and the transmission time is combined with the transmission time statistics of a plurality of consecutive key frames before the current frame (key frame), so as to comprehensively determine whether to execute a decision for changing the video transmission level. For example, in step S304, if the number of consecutive times that the current frame transmission time is higher than the first time threshold T1 reaches the first number threshold N1, step S309 is executed to lower the video transmission level, and step S310 is further executed to empty the current transmission queue, and step S311 is executed to discard the current frame being transmitted, in such a way as to ensure that after a new video frame is generated again, the video frame will be transmitted again at the lowered video transmission level, thereby improving the fluency of video data transmission with the minimum cost.
It should be added that, in some preferred embodiments of the present application, the first number threshold N1 is set to 1 when transmitting the first key frame or the first to nth key frames of the video, where N is an integer greater than 1, and exemplary N may be 2 or 3. This means that if the transmission time of the first or first few key frames is greater than the first time threshold T1, the currently selected video transmission level is lowered until the video transmission is stabilized and then the video transmission level is raised through the flow of fig. 3. The advantage of setting the first number threshold corresponding to the first (or first few) key frames of the transmission video to 1 is that, when the device is just connected to the network, the transmission level can be quickly adjusted according to the network state, so as to realize smooth transmission and playing of the video.
On the other hand, if the determination result in the step S304 is no, the step S305 is continuously executed to continuously determine whether the transmission time of the current frame is lower than the second time threshold T2, and comprehensively consider the transmission times of a plurality of consecutive key frames before the current frame, and determine whether the number of consecutive times that the transmission time is lower than T2 after the current frame is transmitted reaches N2, if the determination result in the step S305 is yes, the step S307 is executed to increase the video transmission level. While the video transmission level is increased, step S306 is executed to transmit the current frame (key frame) according to the current video transmission level or add the current frame (key frame) to the transmission queue, and such an arrangement can reduce the cost of losing video frames as much as possible on the basis of optimizing the video transmission effect.
In contrast, if the determination result in step S305 is negative, it means that in the embodiment shown in fig. 3, the transmission time of the current frame does not reach the limit that can increase the video transmission level, or does not reach the limit that can decrease the video transmission level, at this time, the current video transmission level is maintained, and the transmission process of the next generated data frame is continuously monitored until a limit that can change the video transmission level is reached after a certain video frame is transmitted, and at this time, the video transmission level is changed according to the specific situation, so that the video transmission parameters can be adjusted in time, and the overall effect of video transmission is improved.
It is understood that in the embodiment shown in fig. 3, the steps S304 and S305 are arranged in a sequential order, but the present invention is not limited thereto, for example, in some other embodiments of the present invention, the order between the steps S304 and S305 may be exchanged, or the relationship between the current frame transmission time and the first time threshold T1, the second time threshold T2, the first number threshold N1 and the second number threshold N2 may be determined comprehensively in the same step, which is not limited by the present invention.
The following describes the steps of the non-key frame related process. As described above, if the determination result in step S302 is no, which means that the current frame is a non-key frame (e.g., a P frame), step S308 is executed to determine whether a key frame in the same group as the current frame (non-key frame) has been transmitted or is in the transmission queue, and if the determination result is yes, the transmission condition of the key frame in the same group is continuously waited for, and then a decision is made as to whether to change the video transmission level. If the determination result in step S308 is negative, it means that the key frame in the same group as the current frame (non-key frame) is not successfully transmitted and is not in the transmission queue, wherein the reason why the key frame is not in the transmission queue may be that the key frame in the same group is cleared from the transmission queue by the operation of emptying the transmission queue in step S310 described above. At this point, it is assumed that the same group of data frames preceding this non-key frame is already in a stuck/not successfully transmitted condition. In this case, since the decoding of the non-key frames in the same group of data frames depends on the key frames in the same group, when the key frames are not completely transmitted, the non-key frames cannot be further decoded even if the transmission of the non-key frames is successful, so that the flow sets the step S311 to directly discard the current non-key frames, thereby reducing the load for the transmission queue of video data in the shortest time to resume the smooth transmission of video data in the shortest time possible. It can be seen that the sub-process (i.e. steps S308 and S311) related to the transmission of non-key frames provides a good auxiliary function for guaranteeing the fluency of video transmission.
In order to further understand the technical details of the adjusting method 30 shown in fig. 3, the group of pictures (GOP) diagram in fig. 2 is used to further specifically describe the key frame 1 and the non-key frame 1 in reference to the flow shown in fig. 3.
Specifically, in an embodiment of the present invention, the number of video transmission levels is set to be 3, and two video transmission parameters, i.e., different resolutions and maximum bit rates, are configured in each video transmission level. Specifically, as shown in table 1 below, where the video transmission level 1 is the highest level, the video transmission levels 2 and 3 are sequentially lowered on the basis of the video transmission level 1.
Table 1
Video transmission grade Resolution ratio Maximum code rate (kbps)
1 1920*1080 1740
2 704*576 870
3 704*576 108
As shown in table 1, in this embodiment, the data size (unit byte) of the key frame in a certain test scene corresponding to the video transmission level 1 is 57835, and the data sizes (unit byte) of the key frames in certain test scenes corresponding to the video transmission levels 2 and 3 are 15534 and 5166, respectively, it can be seen that the key frame data sizes corresponding to adjacent levels are approximately 2-3 times as large, so that the key frame data size sections requiring switching of the video transmission levels can be better distinguished during adjustment, thereby better meeting the requirement of video transmission effect. In some embodiments of the present application, including fig. 3, the difference in critical frame data sizes corresponding to adjacent transmission levels in the level order satisfies a data difference threshold (e.g., 2 or 3 times).
Referring to fig. 2, fig. 3 and table 1 in combination, when the key frame 1 in the current GOP in fig. 2 starts to be transmitted, step S303 is first entered, i.e. the transmission time of the current key frame 1 is recorded, and then step S304 is entered, and in combination with the historical data of the transmission times of consecutive key frames before the key frame 1, it is determined whether the number of consecutive key frames whose transmission time of the current key frame 1 is greater than the first time threshold T1 reaches the first number threshold N1.
Specifically, if the current key frame 1 is not the first or the first key frames of the video transmission, the first number threshold and the second number threshold may be set to be 3. Firstly, step S304 is executed to determine whether the number of consecutive key frames with the key frame 1 transmission time being greater than a first time threshold T1 reaches 3, if yes, step S309 is executed to lower the video transmission level, step S310 is executed to empty the transmission queue and step S311 is executed to discard the current frame, and then the transmission of the next frame (i.e. non-key frame 1, which is also the first P frame in the current GOP) is started; if the number does not reach the threshold 3, further executing step S305 to determine whether the number of consecutive key frames with transmission time less than the second time threshold T2 reaches 3, if so, executing step S307 to increase the video transmission level, and adding the current frame (key frame 1) to the sending queue; if not, the current selected video transmission grade is not adjusted, and the current frame (key frame 1) is directly added into the sending queue.
The above description exemplarily shows the transmission flow of the key frame 1, and if the current frame is the non-key frame 1, the transmission flow is specifically as follows.
Firstly, judging whether the key frame 1 of the same group of the non-key frame 1 is already sent or is in a sending queue, if the key frame 1 is not completely transmitted and is not in the transmission queue, directly discarding the current frame (non-key frame 1) and entering the transmission of the next frame (non-key frame 2); if the key frame 1 in the same group is already transmitted or is still in the transmission queue, the next step is step S304, i.e., it is determined whether the number of consecutive key frames whose transmission time of the key frame 1 is greater than the first time threshold T1 reaches the first number threshold N1, and the following process is the same as the foregoing key frame transmission process, and is not repeated here. With such a configuration, the present scheme considers that the amount of data of the key frame 1 is too large, so that the key frame 1 is allowed to have a certain delay (but generally not more than several frame intervals) during transmission, and at this time, other non-key frames 1 and non-key frames 2 … … in the same group of the key frame 1 will make a decision to change the currently selected video transmission level depending on the actual transmission condition of the key frame 1 during actual transmission.
For example, if the key frame 1 encounters a condition that the number of consecutive times that the current frame transmission time is higher than T1 reaches N1 while executing step S304, the selected video transmission level needs to be degraded, and the transmission queue needs to be emptied and the current frame needs to be discarded. This means that if the key frame 1 in the current GOP meets the above-mentioned critical condition requiring degradation, the non-key frames in the same group following the key frame 1 are directly discarded through step S311, so as to quickly restore the fluency of the video transmission until the key frame in the next GOP starts to be transmitted again.
It is emphasized that the above mentioned raising of the video transmission level is premised on the fact that the current video transmission level is not the highest level, and likewise, the above mentioned lowering of the video transmission level is premised on the fact that the current video transmission level is not the lowest level. In the embodiments of the present invention including fig. 1 or fig. 3, the adjustment of the video transmission level needs to be performed stepwise.
In a specific application scene such as a security video, the data volume contained in a key frame (I frame) is often much higher than that of a non-key frame (P frame), so how to solve the problem that it is difficult to balance the data transmission quality and rate, the video resolution parameter, and the like due to a large data volume difference becomes a bottleneck in the prior art. The adaptive adjustment method for the video transmission parameters, provided by the application, is used for counting historical transmission time information of the key frames, so that the transmission time of the key frames becomes an important decision factor for deciding video transmission grade conversion, and the adaptive adjustment method has good pertinence and obvious effect on solving the problems in the prior art.
According to fig. 4, another aspect of the present invention also proposes an adaptive adjustment system 40 (hereinafter referred to as "adjustment system 40") for video transmission parameters. The adaptation system 40 includes a transmission level configuration module 41, a key frame transmission statistics module 42, and a transmission level decision module 43.
The transmission level configuration module 41 is adapted to configure a plurality of video transmission levels, which have a level order from high to low according to a corresponding key frame data size, and each of which includes a setting value of at least one video parameter. The key frame transmission statistics module 42 is configured to record transmission times of a plurality of consecutive key frames in the video when the video is transmitted according to a set value of a video parameter in a selected video transmission level, wherein the selected video transmission level is any one of the plurality of video transmission levels, and the key frame transmission statistics module is further configured to count a size relationship between each transmission time and a first time threshold and a second time threshold. The transmission level decision module 43 is configured to decrease the selected video transmission level when the number of consecutive key frames having a transmission time greater than the first time threshold reaches a first number threshold and the selected video transmission level is not the lowest of the plurality of video transmission levels, and to increase the selected video transmission level when the number of consecutive key frames having a transmission time less than the second time threshold reaches a second number threshold and the selected video transmission level is not the highest of the plurality of video transmission levels. Preferably, in some embodiments of the present application, the video parameters are specifically resolution and maximum bitrate.
For example, the adjusting system 40 of the present invention may be applied to the adjusting method 10 or 30 described above with reference to fig. 1 to 3, and further details regarding the adjusting system 40 may refer to the above description and will not be repeated herein.
An embodiment of the present invention further provides an adaptive adjustment system 50 for video transmission parameters as shown in fig. 5. According to fig. 5, the adaptive adjustment system 50 of video transmission parameters may comprise an internal communication bus 51, a Processor (Processor)52, a Read Only Memory (ROM)53, a Random Access Memory (RAM)54, and a communication port 55. When applied to a personal computer, the adaptive video transmission parameter adjustment system 50 may further include a hard disk 56.
The internal communication bus 51 may enable data communication among the components of the adaptive adjustment system 50 for video transmission parameters. Processor 52 may make the determination and issue the prompt. In some embodiments, processor 52 may be comprised of one or more processors. The communication port 55 can implement the adaptive adjustment system 50 for video transmission parameters to communicate with external data. In some embodiments, the adaptive video transmission parameter adjustment system 50 may send and receive information and data from the network through the communication port 55.
The adaptive video transmission parameter adjustment system 50 may also include various forms of program storage units and data storage units, such as a hard disk 56, Read Only Memory (ROM)53 and Random Access Memory (RAM)54, capable of storing various data files for computer processing and/or communication, and possibly program instructions for execution by the processor 52. The processor executes these instructions to implement the main parts of the method. The results processed by the processor are communicated to the user device through the communication port and displayed on the user interface.
In addition, another aspect of the present invention provides a computer readable medium storing computer program code, which when executed by a processor implements the above-mentioned method for adaptive adjustment of video transmission parameters.
Having thus described the basic concept, it will be apparent to those skilled in the art that the foregoing disclosure is by way of example only, and is not intended to limit the present application. Various modifications, improvements and adaptations to the present application may occur to those skilled in the art, although not explicitly described herein. Such modifications, improvements and adaptations are proposed in the present application and thus fall within the spirit and scope of the exemplary embodiments of the present application.
Also, this application uses specific language to describe embodiments of the application. Reference throughout this specification to "one embodiment," "an embodiment," and/or "some embodiments" means that a particular feature, structure, or characteristic described in connection with at least one embodiment of the present application is included in at least one embodiment of the present application. Therefore, it is emphasized and should be appreciated that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, some features, structures, or characteristics of one or more embodiments of the present application may be combined as appropriate.
Aspects of the present application may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software. The above hardware or software may be referred to as "data block," module, "" engine, "" unit, "" component, "or" system. The processor may be one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), digital signal processing devices (DAPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or a combination thereof. Furthermore, aspects of the present application may be represented as a computer product, including computer readable program code, embodied in one or more computer readable media. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips … …), optical disks (e.g., Compact Disk (CD), Digital Versatile Disk (DVD) … …), smart cards, and flash memory devices (e.g., card, stick, key drive … …).
The computer readable medium may comprise a propagated data signal with the computer program code embodied therein, for example, on a baseband or as part of a carrier wave. The propagated signal may take any of a variety of forms, including electromagnetic, optical, and the like, or any suitable combination. The computer readable medium can be any computer readable medium that can communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device. Program code on a computer readable medium may be propagated over any suitable medium, including radio, electrical cable, fiber optic cable, radio frequency signals, or the like, or any combination of the preceding.
Similarly, it should be noted that in the preceding description of embodiments of the application, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the embodiments. This method of disclosure, however, is not intended to require more features than are expressly recited in the claims. Indeed, the embodiments may be characterized as having less than all of the features of a single embodiment disclosed above.
Numerals describing the number of components, attributes, etc. are used in some embodiments, it being understood that such numerals used in the description of the embodiments are modified in some instances by the use of the modifier "about", "approximately" or "substantially". Unless otherwise indicated, "about", "approximately" or "substantially" indicates that the number allows a variation of ± 20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximations that may vary depending upon the desired properties of the individual embodiments. In some embodiments, the numerical parameter should take into account the specified significant digits and employ a general digit preserving approach. Notwithstanding that the numerical ranges and parameters setting forth the broad scope of the range are approximations, in the specific examples, such numerical values are set forth as precisely as possible within the scope of the application.
Although the present application has been described with reference to the present specific embodiments, it will be recognized by those skilled in the art that the foregoing embodiments are merely illustrative of the present application and that various changes and substitutions of equivalents may be made without departing from the spirit of the application, and therefore, it is intended that all changes and modifications to the above-described embodiments that come within the spirit of the application fall within the scope of the claims of the application.

Claims (14)

1. A method for adaptively adjusting video transmission parameters is characterized by comprising the following steps:
configuring a plurality of video transmission levels, wherein the video transmission levels have a level order from high to low according to the size of the corresponding key frame data, and each video transmission level comprises a set value of at least one video parameter;
enabling a video to be transmitted according to a set value of a video parameter in a selected video transmission level, and recording the transmission time of a plurality of continuous key frames in the video, wherein the selected video transmission level is any one of the plurality of video transmission levels; and
and counting the size relation between each transmission time and a first time threshold and a second time threshold, when the number of a plurality of continuous key frames of which the transmission time is greater than the first time threshold reaches a first number threshold and the selected video transmission level is not the lowest level of the plurality of video transmission levels, reducing the selected video transmission level, and when the number of the plurality of continuous key frames of which the transmission time is less than the second time threshold reaches a second number threshold and the selected video transmission level is not the highest level of the plurality of video transmission levels, improving the selected video transmission level.
2. The method of claim 1, wherein the video parameters comprise a resolution and a maximum bitrate.
3. The method of claim 1, wherein a difference in key frame data sizes corresponding to adjacent transmission levels in the level order satisfies a data difference threshold.
4. The method of claim 1, further comprising determining whether a current frame being transmitted is the key frame, recording a transmission time of the current frame when the current frame is the key frame, and continuing to determine whether a key frame in the same group as the current frame is not transmitted or is not in a transmission queue when the current frame is a non-key frame, and discarding the current frame if the determination result is yes.
5. The method of claim 1, further comprising, after said reducing said selected video transmission level, emptying a transmission queue and discarding a current frame being transmitted.
6. The method of claim 1, wherein if said selected video transmission level is the lowest of said plurality of video transmission levels, said selected video transmission level is maintained when a number of consecutive key frames having a transmission time greater than said first time threshold reaches a first number threshold, and if said selected video transmission level is the highest of said plurality of video transmission levels, said selected video transmission level is maintained when a number of consecutive key frames having a transmission time less than said second time threshold reaches a second number threshold.
7. The method of claim 6, wherein the selected video transmission level is the highest level in a default state.
8. The method of claim 1 or 7, wherein the first number threshold is set to 1 when transmitting the first key frame or the first through nth key frames of the video, where n is an integer greater than 1.
9. The method of claim 1, wherein the first time threshold is 2-4 times a frame interval and the second time threshold is 1/4-1/2 times the frame interval.
10. The method of claim 1, wherein the number of the plurality of video transmission levels is 3 or 4.
11. A system for adaptive adjustment of video transmission parameters, comprising:
the transmission level configuration module is suitable for configuring a plurality of video transmission levels, the video transmission levels have a level sequence from high to low according to the size of the corresponding key frame data, and each video transmission level comprises a set value of at least one video parameter;
the video transmission device comprises a key frame transmission statistical module, a first time threshold and a second time threshold, wherein the key frame transmission statistical module is configured to record transmission time of a plurality of continuous key frames in a video when the video is transmitted according to a set value of a video parameter in a selected video transmission grade, the selected video transmission grade is any one of the plurality of video transmission grades, and the key frame transmission statistical module is further configured to count the size relation between each transmission time and the first time threshold and the second time threshold; and
a transmission level decision module configured to decrease the selected video transmission level when the number of consecutive key frames having a transmission time greater than the first time threshold reaches a first number threshold and the selected video transmission level is not the lowest of the plurality of video transmission levels, and increase the selected video transmission level when the number of consecutive key frames having a transmission time less than the second time threshold reaches a second number threshold and the selected video transmission level is not the highest of the plurality of video transmission levels.
12. The system of claim 11, wherein the video parameters include a resolution and a maximum bitrate.
13. A system for adaptive adjustment of video transmission parameters, comprising:
a memory for storing instructions executable by the processor; and a processor for executing the instructions to implement the method of any one of claims 1-10.
14. A computer-readable medium having stored thereon computer program code which, when executed by a processor, implements the method of any of claims 1-10.
CN202111618926.3A 2021-12-27 2021-12-27 Self-adaptive adjustment method and system for video transmission parameters Pending CN114172874A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111618926.3A CN114172874A (en) 2021-12-27 2021-12-27 Self-adaptive adjustment method and system for video transmission parameters
PCT/CN2022/142041 WO2023125443A1 (en) 2021-12-27 2022-12-26 Self-adaptive adjustment method and system for video transmission parameter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111618926.3A CN114172874A (en) 2021-12-27 2021-12-27 Self-adaptive adjustment method and system for video transmission parameters

Publications (1)

Publication Number Publication Date
CN114172874A true CN114172874A (en) 2022-03-11

Family

ID=80488217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111618926.3A Pending CN114172874A (en) 2021-12-27 2021-12-27 Self-adaptive adjustment method and system for video transmission parameters

Country Status (2)

Country Link
CN (1) CN114172874A (en)
WO (1) WO2023125443A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116260799A (en) * 2023-05-16 2023-06-13 北京庭宇科技有限公司 Method for adjusting network state and electronic equipment
WO2023125443A1 (en) * 2021-12-27 2023-07-06 上海商米科技集团股份有限公司 Self-adaptive adjustment method and system for video transmission parameter

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130117796A1 (en) * 2011-11-07 2013-05-09 Empire Technology Development Llc Redundant key frame transmission
CN103533356A (en) * 2013-10-10 2014-01-22 深圳市智美达科技有限公司 Video data transmission method and device
CN111245769A (en) * 2018-11-28 2020-06-05 深圳技威时代科技有限公司 Audio and video transmission method and device and storage medium
CN111669619A (en) * 2020-06-04 2020-09-15 北京奇艺世纪科技有限公司 Video stream data switching method, device, terminal and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125429B (en) * 2013-04-27 2018-07-06 杭州海康威视数字技术股份有限公司 The adjusting method and device of video data transmission
CN104703051B (en) * 2014-01-06 2018-06-05 杭州海康威视数字技术股份有限公司 Code stream sending method and device
EP3513563A1 (en) * 2016-10-18 2019-07-24 Zhejiang Dahua Technology Co., Ltd Methods and systems for video processing
CN109151612B (en) * 2017-06-27 2020-10-16 华为技术有限公司 Video transmission method, device and system
CN114172874A (en) * 2021-12-27 2022-03-11 上海商米科技集团股份有限公司 Self-adaptive adjustment method and system for video transmission parameters

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130117796A1 (en) * 2011-11-07 2013-05-09 Empire Technology Development Llc Redundant key frame transmission
CN103533356A (en) * 2013-10-10 2014-01-22 深圳市智美达科技有限公司 Video data transmission method and device
CN111245769A (en) * 2018-11-28 2020-06-05 深圳技威时代科技有限公司 Audio and video transmission method and device and storage medium
CN111669619A (en) * 2020-06-04 2020-09-15 北京奇艺世纪科技有限公司 Video stream data switching method, device, terminal and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023125443A1 (en) * 2021-12-27 2023-07-06 上海商米科技集团股份有限公司 Self-adaptive adjustment method and system for video transmission parameter
CN116260799A (en) * 2023-05-16 2023-06-13 北京庭宇科技有限公司 Method for adjusting network state and electronic equipment

Also Published As

Publication number Publication date
WO2023125443A1 (en) 2023-07-06

Similar Documents

Publication Publication Date Title
WO2021244341A1 (en) Picture coding method and apparatus, electronic device and computer readable storage medium
CN101371589B (en) Adaptive filtering to enhance video encoder performance
CN114172874A (en) Self-adaptive adjustment method and system for video transmission parameters
US8891370B2 (en) Method and apparatus for transmitting a coded video signal
US20180063549A1 (en) System and method for dynamically changing resolution based on content
US7958532B2 (en) Method of transmitting layered video-coded information
US20060188014A1 (en) Video coding and adaptation by semantics-driven resolution control for transport and storage
JP5164866B2 (en) Method and apparatus for adapting temporal frequency of video image sequences
US8493499B2 (en) Compression-quality driven image acquisition and processing system
JP6463041B2 (en) Image processing apparatus, image processing method, and program
CN109729437B (en) Streaming media self-adaptive transmission method, terminal and system
JP5549681B2 (en) Display method, apparatus, and communication system of moving image encoded data
EP2658167A1 (en) Transmission control method of video-stream based on dual time scale
CN107509120A (en) A kind of streaming media self-adapting transmission method based on buffer underflow probability Estimation
JP2014523713A (en) Frame coding selection based on similarity, visual quality, and interest
CN117597920A (en) Video coding method, device, equipment and storage medium
CN112866746A (en) Multi-path streaming cloud game control method, device, equipment and storage medium
CN112866752A (en) Video code stream self-adaptive network bandwidth method, device, equipment and medium
US20120195364A1 (en) Dynamic mode search order control for a video encoder
US20160360220A1 (en) Selective packet and data dropping to reduce delay in real-time video communication
US20190089759A1 (en) Video encoding circuit and wireless video transmission apparatus and method
CN116962613A (en) Data transmission method and device, computer equipment and storage medium
US8791981B2 (en) Bit rate control apparatus and method thereof
CN114302145A (en) Video coding optimization method, device, equipment and storage medium for adaptive network environment
US10003803B1 (en) Motion-based adaptive quantization

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