WO2016050145A1 - 编码参数调整方法及装置 - Google Patents

编码参数调整方法及装置 Download PDF

Info

Publication number
WO2016050145A1
WO2016050145A1 PCT/CN2015/089959 CN2015089959W WO2016050145A1 WO 2016050145 A1 WO2016050145 A1 WO 2016050145A1 CN 2015089959 W CN2015089959 W CN 2015089959W WO 2016050145 A1 WO2016050145 A1 WO 2016050145A1
Authority
WO
WIPO (PCT)
Prior art keywords
code rate
parameter
network characteristic
adjustment
characteristic parameter
Prior art date
Application number
PCT/CN2015/089959
Other languages
English (en)
French (fr)
Inventor
黄敦笔
宗明
徐月刚
彭俊
郑清雄
Original Assignee
阿里巴巴集团控股有限公司
黄敦笔
宗明
徐月刚
彭俊
郑清雄
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 阿里巴巴集团控股有限公司, 黄敦笔, 宗明, 徐月刚, 彭俊, 郑清雄 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016050145A1 publication Critical patent/WO2016050145A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method and an apparatus for adjusting a coding parameter.
  • the processing process of the existing video communication system is as follows: the video transmitting end collects the original video information through a video capturing device such as a camera, and after being preprocessed, is sent to the video encoder to encode to generate a video code stream, and then packaged to form a video frame, and then passes through the channel. Encoding, sending data packets and redundant packets generated by channel coding to the video receiving end. The video receiving end receives the data packet, decodes the channel, obtains the complete video code stream, and sends it to the video decoder for decoding to generate a video frame, which is finally sent to the video output device for display.
  • a video capturing device such as a camera
  • the video receiving end periodically collects network characteristic parameters, such as the current actual available bandwidth (Target Bitrate), the link loss rate (Loss Ratio), and the packet back-to-ring delay (Round-Trip Time). And feed back to the video sender.
  • the video transmitting end directly adjusts the coding parameters used by the video encoder by using the network characteristic parameters fed back by the receiving end.
  • the video encoder uses the encoding parameters adjusted in this manner to perform video encoding and output video stream.
  • the video encoder outputs poor video quality, large blur distortion, and low fluency. It is prone to problems such as Caton.
  • aspects of the present application provide a coding parameter adjustment method and apparatus for improving video quality and fluency of video coding output.
  • An aspect of the present application provides a method for adjusting a coding parameter, including:
  • the encoding parameters used by the video encoder are adjusted to the target encoding parameters.
  • an encoding parameter adjustment apparatus including:
  • a receiving module configured to receive network characteristic parameters fed back by the video receiving end
  • An obtaining module configured to perform smoothing processing on at least one network characteristic parameter currently received, and obtain a network characteristic parameter used in the adjustment of the encoding parameter
  • a second acquiring module configured to adjust, according to the current network coding parameter, the network characteristic parameter used to obtain the target coding parameter required for the current coding parameter adjustment;
  • an adjustment module configured to adjust an encoding parameter used by the video encoder to the target encoding parameter.
  • the network characteristic parameter fed back by the video receiving end is received, and smoothed according to at least one network characteristic parameter currently received, and the network characteristic parameter used in the current encoding parameter adjustment is obtained, and then the current coding parameter is used according to the current coding parameter adjustment.
  • the network characteristic parameter obtains the target coding parameter required for the adjustment of the coding parameter, thereby implementing the adjustment of the coding parameter used by the video encoder. Therefore, the present application uses the received parameters of the at least one network characteristic parameter smoothing process to perform coding parameter adjustment, and directly adjusts the coding parameters according to the network characteristic parameter after receiving the network characteristic parameter fed back by the video receiving end. Compared with the scheme, it can eliminate the influence of factors such as random fluctuation of the network, and can better respond to changes in the network state, which is beneficial to improving the video quality and smoothness of the video encoder when the network state changes.
  • FIG. 1 is a schematic flowchart of a method for adjusting a coding parameter according to an embodiment of the present disclosure
  • FIG. 1b is a schematic flowchart of a method for adjusting a coding parameter according to another embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a method for adjusting a coding parameter according to another embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart diagram of an implementation manner of step 207 according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram showing an effect comparison between the technical solution of the present application and the prior art solution according to an embodiment of the present application;
  • FIG. 8 is a schematic structural diagram of an apparatus for adjusting a coding parameter according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram of an apparatus for adjusting a coding parameter according to another embodiment of the present disclosure.
  • the present application provides a method for adjusting a coding parameter, as shown in FIG. 1a, the method includes the following steps:
  • the target coding parameter required for the adjustment of the coding parameter is obtained.
  • the executor of the embodiment may be an encoding parameter adjustment device, and the device may be located at a video transmitting end, and configured to adjust a coding parameter of the video encoder, so that the video encoder performs encoding processing on the video frame by using the adjusted coding parameter.
  • it may be a media optimization module of the video sending end, but is not limited thereto.
  • the video encoder in this embodiment may be a hardware video encoder based on a system DSP chip, or may be a software encoder implemented in a computer language such as C/C++, or may be a single instruction multiple data. Single Instruction Multiple Data (SIMD) code instruction set optimization technology implementation, or other parallel technology implementation of the encoder.
  • SIMD Single Instruction Multiple Data
  • the coding parameter adjustment device in this embodiment may also be implemented in hardware or in software.
  • the video transmitting end collects original video information through a video capture device such as a camera, performs preprocessing, video encoding, channel coding, and the like on the original video information, and forms a video data packet, and then sends the video data packet to the video receiving end.
  • the video receiving end After receiving the video data packet, the video receiving end performs channel decoding, video decoding, and the like on the video data packet to obtain a video frame, and sends the video frame to the video output device for display.
  • the video receiving end may be a participant terminal, but is not limited thereto.
  • the video receiving end periodically counts network characteristic parameters, such as expected code rate, packet loss rate and packet loopback delay, and feeds back network characteristic parameters to the coding parameter adjustment device.
  • the coding parameter adjustment device adjusts the coding parameters used by the video encoder according to the network characteristic parameters fed back by the video receiving end, so that the video code stream output by the video encoder can adapt to the network transmission characteristics, and improve the transmission quality and smoothness of the video code stream. Wait.
  • the coding parameter adjustment device does not perform the coding parameter adjustment according to the network characteristic parameter just received, but uses the current previously received at least one network characteristic parameter to perform smoothing processing, and obtains the network characteristics used in the current coding parameter adjustment.
  • the parameters are adjusted according to the network characteristic parameters used in this encoding parameter adjustment.
  • the present embodiment adopts the smoothing result of the received at least one network characteristic parameter, it can ensure that the adjustment of the coding parameter is relatively gentle when the network status changes frequently, and the influence of factors such as random fluctuation of the network can be eliminated, and A good response to network state changes is beneficial to improve the video quality and fluency of the video encoder when the network status changes.
  • FIG. 1b is a schematic flowchart of a method for adjusting a coding parameter according to another embodiment of the present application. As shown in FIG. 1b, the method includes:
  • the network characteristic parameter fed back by the video receiving end is an available network characteristic parameter, and/or, currently belongs to the parameter adjustable time
  • the at least one available network characteristic parameter currently received before is smoothed, and the current coding parameter adjustment is obtained.
  • the executor of the embodiment may be an encoding parameter adjustment device, and the device may be located at a video transmitting end, and configured to adjust a coding parameter of the video encoder, so that the video encoder performs encoding processing on the video frame by using the adjusted coding parameter.
  • it may be a media optimization module of the video sending end, but is not limited thereto.
  • the video encoder in this embodiment may be a hardware video encoder based on a system DSP chip, or may be a software encoder implemented in a computer language such as C/C++, or may also use a SIMD code instruction set. Optimize the implementation of the technology, or other parallel technology implementation of the encoder.
  • the coding parameter adjustment device in this embodiment may also be implemented in hardware or in software.
  • the video transmitting end collects original video information through a video capture device such as a camera, performs preprocessing, video encoding, channel coding, and the like on the original video information, and forms a video data packet, and then sends the video data packet to the video receiving end.
  • the video receiving end After receiving the video data packet, the video receiving end performs channel decoding, video decoding, and the like on the video data packet to obtain a video frame, and sends the video frame to the video output device for display.
  • the video receiving end may be a participant terminal, but is not limited thereto.
  • the video receiving end periodically counts network characteristic parameters, such as expected code rate, packet loss rate and packet loopback delay, and feeds back network characteristic parameters to the coding parameter adjustment device.
  • the coding parameter adjustment device adjusts the coding parameters used by the video encoder according to the network characteristic parameters fed back by the video receiving end, so that the video code stream output by the video encoder can adapt to the network transmission characteristics, and improve the transmission quality and smoothness of the video code stream. Wait.
  • the coding parameter adjustment apparatus receives the network characteristic parameter fed back by the video receiving end; after receiving the network characteristic parameter fed back by the video receiving end, performing the availability judgment on the network characteristic parameter fed back by the video receiving end, that is, determining the feedback of the video receiving end Whether the network characteristic parameter is used for the adjustment of the coding parameter, in this embodiment, the network characteristic parameter fed back by the video receiving end that can be used for the adjustment of the coding parameter is called an available network characteristic parameter, that is, the video receiving end is determined. Whether the feedback network characteristic parameter is an available network characteristic parameter.
  • the encoding parameter adjusting device may determine whether the encoding parameter adjustment is currently possible.
  • the time that can be used to adjust the encoding parameter is referred to as the parameter adjustable time, and thus, it is determined whether the current parameter is the parameter adjustable time.
  • the coding parameters can be adjusted at the time suitable for the adjustment of the coding parameters, which is beneficial to improve the rationality and accuracy of the adjustment of the coding parameters, and provides conditions for improving the video quality and smoothness.
  • the encoding parameter device when receiving the network characteristic parameter fed back by the video receiving end, performs usability judgment on the network characteristic parameter fed back by the video receiving end, and judges whether the encoding parameter adjustment can be currently performed; only the feedback is received at the video receiving end.
  • the network characteristic parameter is an available network characteristic parameter, and the current parameter is adjustable time, it is determined that the coding parameter adjustment is performed. In this way, it is possible to avoid the use of the network characteristic parameters that are not suitable for the adjustment of the coding parameters by the video receiving end to perform the coding parameter adjustment, and only the coding parameter adjustment is performed at the time suitable for the adjustment of the coding parameters, which is beneficial to improve the rationality of the adjustment of the coding parameters and Accuracy provides conditions for improved video quality and fluency.
  • the encoding parameter adjusting device When it is determined that the encoding parameter adjustment can be performed, the encoding parameter adjusting device does not perform the encoding parameter adjustment according to the network characteristic parameter just received, as in the prior art, but performs smoothing processing using at least one available network characteristic parameter currently received. Obtain the network characteristic parameters used in the adjustment of the coding parameters, and then adjust the coding parameters according to the network characteristic parameters used in the current coding parameter adjustment. Since the embodiment adopts the smoothing result of the received at least one available network characteristic parameter, it can ensure that the adjustment of the coding parameter is relatively gentle when the network status changes frequently, and the influence of factors such as random fluctuation of the network can be eliminated. Better response to changes in network status is beneficial Improve the video quality and fluency that the video encoder outputs when the network status changes.
  • the currently received at least one available network characteristic parameter includes: the network characteristic parameter received in step 101.
  • the encoding parameter adjusting device may obtain the target encoding parameter required for the current encoding parameter adjustment according to the target characteristic parameter, and then adjust the encoding parameter used by the video encoder to the target encoding parameter to implement adjustment of the encoding parameter. .
  • the encoding parameter adjusting device when receiving the network characteristic parameter fed back by the video receiving end, performs usability judgment on the network characteristic parameter fed back by the video receiving end, and/or determines whether the encoding parameter adjustment can be currently performed. To some extent, it can avoid the use of the unavailable network characteristic parameters fed back by the video receiving end to adjust the encoding parameters, and/or avoid the adjustment of the encoding parameters at inappropriate time, which is beneficial to improve the rationality and accuracy of the adjustment of the encoding parameters.
  • the embodiment uses the received parameters of the at least one available network characteristic parameter to perform coding parameter adjustment, and the prior art receives the network characteristic parameter fed back by the video receiving end.
  • the influence of factors such as random fluctuation of the network can be eliminated, and the network state change can be better responded, which is beneficial to improving the video outputted by the video encoder when the network state changes.
  • the quality and fluency of the code stream is beneficial to improving the video outputted by the video encoder when the network state changes.
  • the resolution size ratio supported by the video encoder may be pre-configured, such as 16:9, 4:3, and 11:9.
  • a coding parameter table for each resolution size ratio needs to be pre-configured, including: a width and a height (in pixels) that characterize the resolution of the video, and a frame rate (in frames per second) that characterize the video fluency. (fps)), a range of code rate ranges corresponding to resolution and frame rate, and a given initial code rate value.
  • the range of the code rate range needs to be configured into the range of the maximum code rate and the minimum code rate supported by the network.
  • the minimum bit rate it is necessary to ensure a video encoder, such as a hardware encoder implemented by a system on chip (SoC) or a software implemented encoder, and the video quality output under the corresponding coding conditions can be Accepted.
  • SoC system on chip
  • the data domain information of the coding parameter table configured above includes at least: video width (pixel), video height (pixel), frame rate (fps), minimum code rate (kbps), initial code rate (kbps), and maximum code rate (kbps). ).
  • video width pixel
  • video height pixel
  • frame rate fps
  • minimum code rate kbps
  • initial code rate kbps
  • maximum code rate kbps
  • FIG. 2 is a flowchart of a method for adjusting an encoding parameter according to another embodiment of the present disclosure. As shown in Figure 2, the method includes:
  • the executor of the embodiment may be an encoding parameter adjustment device, and the device may be located at a video transmitting end, and configured to adjust a coding parameter of the video encoder, so that the video encoder performs encoding processing on the video frame by using the adjusted coding parameter.
  • it may be a media optimization module of the video sending end, but is not limited thereto.
  • the video encoder in this embodiment may be a hardware video encoder based on a system DSP chip, or may be a software encoder implemented in a computer language such as C/C++, or may also use a SIMD code instruction set. Optimize the implementation of the technology, or other parallel technology implementation of the encoder.
  • the coding parameter adjustment device in this embodiment may also be implemented in hardware or in software.
  • the video sending end collects original video information through a video capture device such as a camera, and performs preprocessing, video encoding, channel coding, and the like on the original video information to form a video data packet. Send to the video receiver. After receiving the video data packet, the video receiving end performs channel decoding, video decoding, and the like on the video data packet to obtain a video frame, and sends the video frame to the video output device for display.
  • a video capture device such as a camera
  • the video receiving end periodically counts network characteristic parameters, such as expected code rate, packet loss rate and packet loopback delay, and feeds back network characteristic parameters to the coding parameter adjustment device.
  • the coding parameter adjustment device adjusts the coding parameters used by the video encoder according to the network characteristic parameters fed back by the video receiving end, so that the video code stream output by the video encoder can adapt to the network transmission characteristics, and improve the transmission quality and smoothness of the video code stream. Wait.
  • step 202 Determine whether the interval between the time when the network characteristic parameter fed back by the video receiving end is received, and the time when the last time the network characteristic parameter is received is greater than the preset first time duration threshold; if yes, go to step 203; , end the operation.
  • Step 204 Determine whether the time of receiving the network characteristic parameter fed back by the video receiving end, and the time between the time when the video receiving end establishes a session with the local end is greater than a preset second time duration threshold, and receiving the network characteristic parameter fed back by the video receiving end Whether the interval between the time and the time of the last coding parameter adjustment is greater than a preset third time duration threshold; if yes, step 205 is performed; otherwise, the operation is ended.
  • the case where the above determination is yes is: the time when the network characteristic parameter fed back by the video receiving end is received, and the time between the time when the video receiving end establishes a session with the local end is greater than the preset second time duration threshold, and the receiving video receiving end The interval between the time when the network characteristic parameter is fed back and the time when the last encoding parameter is adjusted is greater than the preset third time duration threshold.
  • the case where the above judgment is negative means that the time between receiving the network characteristic parameter fed back by the video receiving end and the time when the video receiving end establishes a session with the local end is less than or equal to the preset second time duration threshold, and/or The interval between the time when the network characteristic parameter fed back by the video receiving end is received, and the time when the last encoding parameter is adjusted is less than or equal to the preset third time duration threshold.
  • the video receiving end may repeatedly feed back the same network characteristic parameters, and the repeated network characteristic parameters belong to the unavailable network. Sexual parameters.
  • a first time duration threshold is set to determine whether the network characteristic parameter fed back by the video receiving end is information fed back within a reasonable feedback interval.
  • the first duration threshold is a preset feedback interval, and may be, for example, but not limited to: 100 ms.
  • the number of network characteristic parameters fed back by the video receiving end may be insufficient, in order to avoid network characteristics. If the number of parameters is insufficient, the adjustment of the coding parameters may result in poor adjustment.
  • it is better not to adjust the coding parameters that is, the initial establishment of the session is not a parameter adjustable time.
  • the time interval of the coding parameter adjustment may be set, that is, the first The three-time threshold is adjusted once every time interval, that is, the time when the last encoding parameter adjustment time is less than the third time threshold is not the parameter adjustable time.
  • the second time duration threshold is used to determine whether there are enough available network characteristic parameters, and whether the interval between the time when the network characteristic parameter fed back by the video receiving end is received and the time when the last encoding parameter is adjusted is greater than the preset third duration Threshold.
  • the second duration threshold may be, but is not limited to, 5000 ms.
  • the third duration threshold may be, but is not limited to, 5000 ms.
  • the current time belongs to the parameter adjustable time, and then proceeds to the following steps 206-208 to perform the coding parameter adjustment.
  • the encoding parameter adjustment can be obtained according to formula (1).
  • Network characteristic parameters
  • smooth_X is the network characteristic parameter used for the adjustment of the encoding parameter
  • w i is the i-th available network characteristic parameter currently received
  • a i is the weight of the i-th available network characteristic parameter
  • N is a natural number indicating the total number of available network property parameters.
  • the weight can be set to 1.0, and only one available network characteristic parameter can be smoothed. In this case, there is not enough available network characteristic parameter for smoothing. Special circumstances.
  • the network characteristic parameters fed back by the video receiving end include multiple parameters such as expected code rate, packet loss rate, and data loopback delay
  • the network characteristic parameters used in the current encoding parameter adjustment respectively include smoothed expectations.
  • a plurality of parameters of rate, packet loss rate of the smoothed and the smoothed data and delay loop the above smooth_X may be represented as a vector of smooth_X j, j denotes the j-th smooth_X parameter smoothing.
  • the at least one available network characteristic parameter currently received before may be the last three available network characteristic parameters.
  • the network characteristic parameters used in the adjustment of the encoding parameter can be calculated.
  • a 0 + a 1 + a 2 1 and a 0 > a 1 > a 2 .
  • the coding parameter adjustment is performed using the network characteristic parameter used in the current coding parameter adjustment calculated by the above formula, and the influence of the random jitter can be eliminated.
  • the target coding parameter required for the adjustment of the coding parameter may be obtained according to the network characteristic parameter used in the current coding parameter adjustment.
  • step 207 or step 103 above includes:
  • the network characteristic parameters that are fed back by the video receiving end include: a desired code rate, a packet loss rate, a packet loopback delay, and the like, and correspondingly, the network characteristic parameters used in the current encoding parameter adjustment include: smoothing The expected expected code rate, the smoothed packet loss rate, and the smoothed packet loopback delay. It is worth noting that the expected code rate is equivalent to the actual available bandwidth of the video receiver.
  • the coding parameter adjustment apparatus may obtain the code rate adjustment step size and code according to the smoothed expected code rate, the smoothed packet loss rate, the smoothed packet loopback delay, and the current code rate used by the video encoder. Rate adjustment direction.
  • the encoding parameter adjusting apparatus may determine the quality of the network according to the smoothed expected code rate and the smoothed packet loopback delay. Specifically, the encoding parameter adjusting device compares the smoothed expected code rate with a preset packet loss rate threshold, and compares the smoothed packet back loop delay with a preset delay threshold; according to the comparison result, determining The status of the network is good or bad.
  • the smoothed packet loss rate is greater than the preset packet loss threshold, and/or the smoothed packet loopback delay is greater than the preset delay threshold, if the network condition is determined to be poor, the coding rate needs to be reduced. Adapt to the network conditions, so determine the direction of the rate adjustment is downward. This high latency or packet loss situation is generally more common in wide area networks (WANs) and wireless networks.
  • WANs wide area networks
  • the truncation ratio can be adaptively set ( Cut_ratio), for example, the cutoff ratio can be 1/10, 1/8, 1/4, and 1/2, etc., to balance the overall video quality.
  • Cut_ratio the code rate currently used by the video encoder can be truncated to obtain a truncated code rate which can be used as a bit rate adjustment step.
  • the product of the truncation ratio determined by the smoothed packet loss rate and the code rate currently used by the video encoder may be used as the first truncation code rate.
  • the encoding parameter adjustment device will smooth the expected code rate with the video encoder currently used.
  • the code rate is compared. If the expected code rate after the smoothing is smaller than the current code rate used by the video encoder, the smaller one of the first code rate difference and the first cut code rate is used as the code rate adjustment step; After the expected code rate is greater than or equal to the code rate currently used by the video encoder, the first truncated code rate is directly used as the code rate adjustment step.
  • the first code rate difference is a difference between a code rate currently used by the video encoder and the smoothed expected code rate.
  • the smoothed packet loss rate is less than or equal to the preset packet loss rate threshold, and the smoothed packet loopback delay is less than or equal to the preset delay threshold, if the network condition is determined to be good, the code code needs to be increased.
  • the rate is adapted to the network condition, so it is determined that the bit rate adjustment direction is upward.
  • the encoding parameter adjusting device compares the smoothed expected code rate with the maximum acceptable code rate of the video encoder, and compares the smoothed packet loss rate with the minimum packet loss rate that the channel coding can resist; if smoothed The expected code rate is greater than or equal to the maximum acceptable code rate of the video encoder, and the smoothed packet loss rate is less than or equal to the minimum packet loss rate that the channel coding can resist, and the second code rate difference and the second truncation code are used. The smaller of the rates is the bit rate adjustment step size.
  • the maximum acceptable bit rate of the video encoder can be obtained by the video encoder allowing multiplication of the upper limit amplitude of the given code rate with the code rate currently used by the video encoder.
  • the minimum packet loss rate that channel coding can resist can be an empirical value.
  • the second code rate difference is the difference between the smoothed expected code rate and the code rate currently used by the video encoder.
  • the second truncated code rate is the larger of the product of the preset up-scaling ratio and the code rate currently used by the video encoder and the preset maximum rate-up-scaling amplitude.
  • the code rate currently adjusted by the video encoder may be adjusted according to the code rate adjustment step size and the code rate adjustment direction, and the matching code rate of the current coding parameter adjustment is obtained; further According to the matching code rate, the target coding parameter of the current coding parameter adjustment is obtained.
  • the foregoing pre-configured coding parameter table includes at least one set of coding parameters, each set of coding parameters includes a code rate range interval; the coding parameter adjustment apparatus may perform matching in a preset coding parameter table according to the matching code rate; The coding parameter of the code rate range interval of the matching code rate is used as the target code parameter.
  • the coding parameters currently used by the video encoder are: kW360P, k20HZ, 480 kbps, and the calculated matching code rate is 430 kbps, which can be used first in the video encoder.
  • the direction is matched to a smaller frame rate to determine whether the matching rate falls within a certain range of the minimum rate, maximum code rate, and the matching result is: kW360P, k15HZ, 350, 416, 450 sets of coding parameters, and finally select kW360P, k15HZ and 430 kbps in the set of coding parameters as target coding parameters.
  • the search may be continued in the lower resolution coding parameters, if still not found.
  • the coding parameter at the lowest frame rate under the lowest resolution defined in the coding parameter table can be taken as the target coding parameter.
  • the coding parameters currently used by the video encoder are: kW360P, k20HZ, 480 kbps, and the calculated matching code rate is 800 kbps, which can be used first in the video encoder.
  • the direction is matched to a larger frame rate to determine whether the matching rate falls within a certain range of the minimum rate, maximum code rate, and the matching result is: kW360P, k25HZ 560, 720, 900 sets of coding parameters, and finally select kW360P, k25HZ and 800 kbps in the set of coding parameters as target coding parameters.
  • the search may be continued in the higher resolution coding parameters, if still not found.
  • the coding parameter at the highest frame rate under the highest resolution defined in the coding parameter table can be taken as the target coding parameter.
  • the matching code rate is matched in the coding parameter table, it can be determined whether the matching code rate is within the maximum code rate and the minimum code rate range supported by the network. If not, the matching code rate needs to be adjusted to The matching code rate is adjusted between the maximum code rate and the minimum code rate that the network can support, so as to provide optimal video quality while ensuring smooth video.
  • the coding parameters used by the video encoder are adjusted to the target coding parameter.
  • the encoding parameter adjusting device when receiving the network characteristic parameter fed back by the video receiving end, performs usability judgment on the network characteristic parameter fed back by the video receiving end, and judges whether the encoding parameter adjustment can be currently performed, only in the The network characteristic parameter fed back by the video receiving end is available, and the coding parameter adjustment can be performed only when the coding parameter adjustment is currently performed, which can avoid the use of the unavailable network characteristic parameter fed back by the video receiving end to perform coding parameter adjustment, and can avoid the inappropriate time.
  • the adjustment of the coding parameters and the like are beneficial to improve the rationality and accuracy of the adjustment of the coding parameters, and provide conditions for improving the video quality and the fluency; in addition, the embodiment uses the received parameters of the at least one available network characteristic parameter to be smoothed.
  • the method can eliminate the influence of factors such as random fluctuation of the network, and can better network the network. State change It should, help improve the quality and fluency video stream the video encoder output when the network status changes.
  • the coding parameter adjustment method proposed in the present application can be applied to various types of networks such as WAN, LAN, 2.5G network, 3G network, 4G network, Wi-Fi network, enterprise network, and home network connected by ADSL, etc. Scenes to improve video quality and fluency, and improve the user's video experience.
  • the inventors have compared the technical solutions of the present application with the prior art solutions through a large number of experiments, and the effect comparisons are shown in FIG. 4 to FIG. 7, respectively.
  • the network characteristic parameters fed back by the video receiving end it can be determined that the network condition is better in the time period corresponding to the first half of the time axis in FIG. 4-7, and the network condition is poor in the corresponding time period in the middle part. .
  • FIG. 4 shows the comparison of the video resolution adjustment results.
  • the abscissa axis represents time and the ordinate axis represents a value of a co-index.
  • this embodiment corresponds to a value of co-index, that is, co-index can be used to represent video resolution, co-index value.
  • the correspondence between the value of co-index and the resolution of video is shown in Table 1 below.
  • the coding parameters are adjusted by the prior art scheme, and the video resolution is maintained at 640x360.
  • the video output quality deviation is found to be fuzzy in the test;
  • the coding parameters are adjusted by using the technical solution of the present application, and the video resolution is mostly maintained at 320 ⁇ 180. Although the video resolution is low, the video output quality is relatively good, and the quality is stable.
  • Figure 5 shows the comparison of video frame rate adjustment results.
  • the abscissa axis represents time and the ordinate axis represents frame rate.
  • the average frame rate adjusted by the present application is higher and smoother than that of the prior art, especially in a time period where the intermediate network conditions are poor, and the effect is more obvious.
  • the video output is compared in a period of poor network conditions, which is only 10 fps.
  • Figure 6 shows the actual output frame rate result alignment of the video encoder.
  • the abscissa axis represents time and the ordinate axis represents the frame rate of the video encoder coded output.
  • the frame rate of the actual output of the video encoder most of the application is maintained at 15 fps and above, even in the time period when the network condition is poor, it falls at 10 fps, and the expectation shown in FIG. 5
  • the 10fps adjustment command is consistent; while the frame rate of the actual output in the prior art scheme is extremely unstable, oscillating up and down, only 4fps is output when the network condition is poor, and the video is stuck.
  • Figure 7 shows the actual output bit rate result comparison of the video encoder.
  • the abscissa axis represents time and the ordinate axis represents the code rate of the video encoder coded output.
  • the code rate output by the video encoder of the present application is relatively stable, has no repeated oscillation phenomenon, and the average output code rate is high, the video is always clear, and the video experience is better. .
  • FIG. 8 is a schematic structural diagram of an apparatus for adjusting a coding parameter according to an embodiment of the present disclosure. As shown in FIG. 8, the apparatus includes: a receiving module 81, a first obtaining module 82, a second acquiring module 83, and an adjusting module 84.
  • the receiving module 81 is configured to receive network characteristic parameters fed back by the video receiving end.
  • the first obtaining module 82 is connected to the receiving module 81, and is configured to perform smoothing processing on at least one available network characteristic parameter currently received by the receiving module 81, and obtain a network characteristic parameter used in the current encoding parameter adjustment.
  • the second obtaining module 83 is connected to the first obtaining module 82, and is configured to adjust the network characteristic parameter used according to the current encoding parameter acquired by the first obtaining module 82, and obtain the target encoding parameter required for the current encoding parameter adjustment.
  • the adjustment module 84 is connected to the second acquisition module 83 for adjusting the coding parameters used by the video encoder to the target coding parameters acquired by the second acquisition module 83.
  • the first obtaining module 82 is specifically configured to: when the network characteristic parameter fed back at the video receiving end is an available network characteristic parameter, and/or, when the parameter is currently in the parameter adjustable time, at least the current previously received A network characteristic parameter can be smoothed to obtain the network characteristic parameters used in the adjustment of the encoding parameters.
  • the apparatus further includes: a first determining module 85, connected to the receiving module 81, configured to determine, by the receiving module 81, the time of receiving the network characteristic parameter fed back by the video receiving end, and Whether the interval between the last time before the last available network characteristic parameter is received is greater than the preset first duration threshold, and when the judgment result is yes, the network characteristic parameter fed back by the video receiving end is determined to be the available network characteristic parameter.
  • a first determining module 85 connected to the receiving module 81, configured to determine, by the receiving module 81, the time of receiving the network characteristic parameter fed back by the video receiving end, and Whether the interval between the last time before the last available network characteristic parameter is received is greater than the preset first duration threshold, and when the judgment result is yes, the network characteristic parameter fed back by the video receiving end is determined to be the available network characteristic parameter.
  • the apparatus further includes: a second judging module 86, connected to the receiving module 81, configured to determine, when the receiving module 81 receives the network characteristic parameter fed back by the video receiving end, Whether the interval between the frequency receiving end and the end of the encoding parameter adjustment device establishes a session is greater than a preset second duration threshold, and the time when the receiving module 81 receives the network characteristic parameter fed back by the video receiving end, and the last encoding Whether the interval between parameter adjustment time is greater than the preset third time duration threshold, and the judgment result is yes, determining that the current parameter is adjustable time.
  • a second judging module 86 connected to the receiving module 81, configured to determine, when the receiving module 81 receives the network characteristic parameter fed back by the video receiving end, Whether the interval between the frequency receiving end and the end of the encoding parameter adjustment device establishes a session is greater than a preset second duration threshold, and the time when the receiving module 81 receives the network characteristic parameter fed back by the video receiving end, and the last
  • the first obtaining module 82 is specifically configured to perform smoothing processing on the currently received at least one available network characteristic parameter according to the foregoing formula (1), to obtain a network characteristic parameter used in the current encoding parameter adjustment.
  • the formula (1) and related parameters refer to the description of the method embodiment above, and details are not described herein again.
  • an implementation structure of the second obtaining module 83 includes: a calculating unit 831, an adjusting unit 832, and an obtaining unit 833.
  • the calculating unit 831 is configured to calculate a code rate adjustment step size and a code rate adjustment direction according to the network characteristic parameter used by the current coding parameter adjustment;
  • the adjusting unit 832 is connected to the calculating unit 831, and is configured to adjust the code rate currently used by the video encoder according to the code rate adjustment step and the code rate adjustment direction calculated by the calculating unit 831 to obtain a matching code rate.
  • the obtaining unit 833 is connected to the adjusting unit 832, and is configured to obtain a target encoding parameter required for the current encoding parameter adjustment according to the matching code rate obtained by the adjusting unit 832.
  • the network characteristic parameters fed back by the video receiving end include: a desired code rate, a packet loss rate, and a data packet loopback delay; correspondingly, the network characteristic parameters used in the current encoding parameter adjustment include: smoothed Expected bit rate, smoothed packet loss rate, and smoothed packet loopback delay.
  • the calculating unit 831 is specifically configured to: obtain a code rate adjustment step size and a code rate adjustment according to the smoothed expected code rate, the smoothed packet loss rate, the smoothed packet loopback delay, and the current code rate used by the video encoder. direction.
  • the calculating unit 831 is further specifically used for:
  • the code rate adjustment direction is determined to be downward, and the smoothed expected code is obtained.
  • the rate is less than the current code rate used by the video encoder, the smaller one of the first code rate difference and the first truncation code rate As the code rate adjustment step, or when the smoothed expected code rate is greater than or equal to the code rate currently used by the video encoder, the first truncated code rate is used as the code rate adjustment step;
  • the first code rate difference is a difference between a code rate currently used by the video encoder and a smoothed expected code rate, and the first truncated code rate is a truncation ratio determined by the smoothed packet loss rate and the video encoder.
  • the code rate adjustment direction is determined to be upward, and after smoothing If the expected code rate is greater than or equal to the maximum acceptable code rate of the video encoder, and the smoothed packet loss rate is less than or equal to the minimum packet loss rate that the channel coding can resist, the second code rate difference and the second truncation code rate are obtained. The smaller of the code rate adjustment steps;
  • the second code rate difference is the difference between the smoothed expected code rate and the current code rate used by the video encoder
  • the second cut rate is the preset up-scaling ratio and the current code rate used by the video encoder. The larger of the product and the preset maximum rate increase.
  • the resolution size ratio supported by the video encoder is pre-configured, such as 16:9, 4:3, and 11:9.
  • the obtaining unit 833 is specifically configured to perform matching in a preset encoding parameter table according to the matching code rate, where the encoding parameter table includes at least one set of encoding parameters, and each group of the at least one encoding parameter includes a code rate. a range interval; a coding parameter in which a code rate range interval including the matched code rate is located is used as a target coding parameter.
  • the encoding parameter adjusting apparatus may be located at the video sending end, and is mainly used to adjust the encoding parameters of the video encoder, so that the video encoder performs encoding processing on the video frame by using the adjusted encoding parameters, specifically, the video.
  • the media optimization module on the sender side is not limited to this.
  • the encoding parameter adjusting apparatus receives the network characteristic parameter fed back by the video receiving end, performs smoothing processing on the currently received at least one network characteristic parameter, and obtains the network characteristic parameter used in the current encoding parameter adjustment, and further according to the present invention.
  • the network characteristic parameter used in the sub-coding parameter adjustment is used to adjust the coding parameter, and the prior art directly receives the network characteristic parameter fed back by the video receiving end.
  • the influence of factors such as random fluctuation of the network can be eliminated, and the network state change can be better responded, which is beneficial to improving the video outputted by the video encoder when the network state changes.
  • the quality and fluency of the code stream is beneficial to improving the video outputted by the video encoder when the network state changes.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional unit described above is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods described in various embodiments of the present application. Part of the steps.
  • the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请提供一种编码参数调整方法及装置。方法包括:接收视频接收端反馈的网络特性参数;对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数;根据所述本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数;将视频编码器使用的编码参数调整为所述目标编码参数。本申请可以提高视频编码输出的视频质量和流畅度。

Description

编码参数调整方法及装置 【技术领域】
本申请涉及通信技术领域,尤其涉及一种编码参数调整方法及装置。
【背景技术】
近些年来,网络的发展促进了通讯手段的变化和革新,人们可以通过网络进行交流。宽带网络的普及,改变了传统网络通讯的质量和形式,使交流不再局限于语言文字,可以通过视频进行沟通和协作,于是出现了视频通讯***。
现有视频通讯***的处理过程为:视频发送端通过摄像头等视频采集设备采集原始视频信息,经过预处理后被送入视频编码器进行编码产生视频码流,再打包形成视频帧,再经过信道编码,将信道编码产生的数据包和冗余包发送至视频接收端。视频接收端接收到数据包,经信道解码,获得完整的视频码流后送入视频解码器进行解码,以产生视频帧,最后被送到视频输出设备展现。
在上述处理过程中,视频接收端周期性统计网络特性参数,例如当前实际可用带宽(Target Bitrate)、链路发生的丢包率(Loss Ratio)和数据包回环时延(Round-Trip Time)等,并反馈到视频发送端。视频发送端直接利用接收端反馈的网络特性参数,周期性的调整视频编码器使用的编码参数。视频编码器采用经该方式调整后的编码参数进行视频编码并输出视频码流,在网络状态发生变化的情况下,视频编码器输出的视频质量较差,模糊失真较大,且流畅度不高,容易出现卡顿等问题。
【发明内容】
本申请的多个方面提供一种编码参数调整方法及装置,用以提高视频编码输出的视频质量和流畅度。
本申请的一方面,提供一种编码参数调整方法,包括:
接收视频接收端反馈的网络特性参数;
对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数;
根据所述本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数;
将视频编码器使用的编码参数调整为所述目标编码参数。
本申请的另一方面,提供一种编码参数调整装置,包括:
接收模块,用于接收视频接收端反馈的网络特性参数;
获取模块,用于对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数;
第二获取模块,用于根据所述本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数;
调整模块,用于将视频编码器使用的编码参数调整为所述目标编码参数。
在本申请中,接收视频接收端反馈的网络特性参数,根据当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数,进而根据本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数,进而实现对视频编码器使用的编码参数的调整。由此可见,本申请使用接收的至少一个网络特性参数平滑处理后的参数进行编码参数调整,与现有技术在接收到视频接收端反馈的网络特性参数后直接根据该网络特性参数进行编码参数调整的方案相比,可以消除网络随机波动等因素的影响,能够更好的对网络状态变化进行响应,有利于提高视频编码器在网络状态变化时输出的视频质量和流畅度。
【附图说明】
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图 是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1a为本申请一实施例提供的编码参数调整方法的流程示意图;
图1b为本申请另一实施例提供的编码参数调整方法的流程示意图;
图2为本申请又一实施例提供的编码参数调整方法的流程示意图;
图3为本申请一实施例提供的步骤207的一种实施方式的流程示意图;
图4-图7为本申请一实施例提供的本申请技术方案与现有技术方案的效果比对示意图;
图8为本申请一实施例提供的编码参数调整装置的结构示意图;
图9为本申请另一实施例提供的编码参数调整装置的结构示意图。
【具体实施方式】
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在现有技术中,在网络状态发生变化的情况下,视频编码器输出的视频质量较差,模糊失真较大,且流畅度不高,容易出现卡顿等问题。针对现有技术存在的缺陷,本申请提供一种编码参数调整方法,如图1a所示,该方法包括以下步骤:
1a、接收视频接收端反馈的网络特性参数。
1b、对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
1c、根据本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数。
1d、将视频编码器使用的编码参数调整为上述目标编码参数。
本实施例的执行主体可以是编码参数调整装置,该装置可位于视频发送端,用于对视频编码器的编码参数进行调整,以便于视频编码器采用调整后的编码参数对视频帧进行编码处理,具体可以是视频发送端的媒体优化模块,但不限于此。本实施例中的视频编码器可以是基于***DSP芯片的硬件视频编码器,或者也可以是采用某种计算机语言,例如C/C++,实现的软件编码器,或者也可以是采用单指令多数据流(Single Instruction Multiple Data,SIMD)代码指令集优化技术实现,或者其它并行技术实现的编码器。相应的,本实施例中的编码参数调整装置也可以是硬件实现,也可以是软件实现。
在本实施例中,视频发送端通过摄像头等视频采集设备采集原始视频信息,对原始视频信息进行预处理、视频编码、信道编码等处理,形成视频数据包后发送给视频接收端。视频接收端接收到视频数据包后,对视频数据包进行信道解码、视频解码等处理,获得视频帧,将视频帧发送到视频输出设备展现。视频接收端可以是与会终端,但不限于此。
在上述过程中,视频接收端周期性统计网络特性参数,例如期望码率、链路发生的丢包率和数据包回环时延等,并将网络特性参数反馈给编码参数调整装置。编码参数调整装置根据视频接收端反馈的网络特性参数对视频编码器采用的编码参数进行调整,以使视频编码器输出的视频码流能够适应网络传输特性,提高视频码流的传输质量和流畅度等。
编码参数调整装置并不像现有技术那样仅根据刚刚接收的网络特性参数进行编码参数调整,而是采用当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数,再根据本次编码参数调整使用的网络特性参数进行编码参数调整。
由于本实施例采用的是接收的至少一个网络特性参数的平滑结果,所以可以在网络状况变化较为频繁时,保证对编码参数的调整较为平缓,并且可以消除网络随机波动等因素的影响,能够更好的对网络状态变化进行响应,有利于提高视频编码器在网络状态变化时输出的视频质量和流畅度。
图1b为本申请另一实施例提供的编码参数调整方法的流程示意图。如图1b所示,该方法包括:
101、接收视频接收端反馈的网络特性参数。
102、若视频接收端反馈的网络特性参数为可用网络特性参数,和/或,当前属于参数可调时间,则对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
103、根据本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数。
104、将视频编码器使用的编码参数调整为上述目标编码参数。
本实施例的执行主体可以是编码参数调整装置,该装置可位于视频发送端,用于对视频编码器的编码参数进行调整,以便于视频编码器采用调整后的编码参数对视频帧进行编码处理,具体可以是视频发送端的媒体优化模块,但不限于此。本实施例中的视频编码器可以是基于***DSP芯片的硬件视频编码器,或者也可以是采用某种计算机语言,例如C/C++,实现的软件编码器,或者也可以是采用SIMD代码指令集优化技术实现,或者其它并行技术实现的编码器。相应的,本实施例中的编码参数调整装置也可以是硬件实现,也可以是软件实现。
在本实施例中,视频发送端通过摄像头等视频采集设备采集原始视频信息,对原始视频信息进行预处理、视频编码、信道编码等处理,形成视频数据包后发送给视频接收端。视频接收端接收到视频数据包后,对视频数据包进行信道解码、视频解码等处理,获得视频帧,将视频帧发送到视频输出设备展现。视频接收端可以是与会终端,但不限于此。
在上述过程中,视频接收端周期性统计网络特性参数,例如期望码率、链路发生的丢包率和数据包回环时延等,并将网络特性参数反馈给编码参数调整装置。编码参数调整装置根据视频接收端反馈的网络特性参数对视频编码器采用的编码参数进行调整,以使视频编码器输出的视频码流能够适应网络传输特性,提高视频码流的传输质量和流畅度等。
具体的,编码参数调整装置接收视频接收端反馈的网络特性参数;在接收到视频接收端反馈的网络特性参数后,对视频接收端反馈的网络特性参数进行可用性判断,即判断该视频接收端反馈的网络特性参数是否为可以用于进行编码参数调整,在本实施例中,将可以用于进行编码参数调整的视频接收端反馈的网络特性参数称为可用网络特性参数,也就是判断视频接收端反馈的网络特性参数是否为可用网络特性参数。这样可以避免使用视频接收端反馈的不适于进行编码参数调整的网络特性参数进行编码参数调整,有利于提高编码参数调整的合理性和准确度,为提高视频质量和流畅度提供条件。
或者,编码参数调整装置可以判断当前是否可以进行编码参数调整,本实施例将可以用来进行编码参数调整的时间称为参数可调时间,因此也就是判断当前是否属于参数可调时间。这样可以在适于进行编码参数调整的时间进行编码参数调整,有利于提高编码参数调整的合理性和准确度,为提高视频质量和流畅度提供条件。
或者,编码参数装置在接收到视频接收端反馈的网络特性参数时,对视频接收端反馈的网络特性参数进行可用性判断,并且对当前是否可以进行编码参数调整进行判断;只有在视频接收端反馈的网络特性参数为可用网络特性参数,并且当前属于参数可调时间时,才确定进行编码参数调整。这样可以避免使用视频接收端反馈的不适于进行编码参数调整的网络特性参数进行编码参数调整,并且只有在适于进行编码参数调整的时间进行编码参数调整,有利于提高编码参数调整的合理性和准确度,为提高视频质量和流畅度提供条件。
当确定可以进行编码参数调整时,编码参数调整装置并不像现有技术那样仅根据刚刚接收的网络特性参数进行编码参数调整,而是采用当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数,再根据本次编码参数调整使用的网络特性参数进行编码参数调整。由于本实施例采用的是接收的至少一个可用网络特性参数的平滑结果,所以可以在网络状况变化较为频繁时,保证对编码参数的调整较为平缓,并且可以消除网络随机波动等因素的影响,能够更好的对网络状态变化进行响应,有利于 提高视频编码器在网络状态变化时输出的视频质量和流畅度。
值得说明的是,若步骤101中接收的网络特性参数为可用网络特性参数,则当前之前接收的至少一个可用网络特性参数包括:步骤101中接收的网络特性参数。
在获得目标特性参数后,编码参数调整装置可以根据目标特性参数获得本次编码参数调整所需的目标编码参数,之后将视频编码器使用的编码参数调整为目标编码参数,实现对编码参数的调整。
在本实施例中,编码参数调整装置在接收到视频接收端反馈的网络特性参数时,对视频接收端反馈的网络特性参数进行可用性判断,和/或,对当前是否可以进行编码参数调整进行判断,一定程度上可以避免使用视频接收端反馈的不可用网络特性参数进行编码参数调整,和/或可避免在不恰当时间进行编码参数调整等情况,有利于提高编码参数调整的合理性和准确度,为提高视频质量和流畅度提供条件;另外,本实施例使用接收的至少一个可用网络特性参数平滑后的参数进行编码参数调整,与现有技术在接收到视频接收端反馈的网络特性参数后直接根据该网络特性参数进行编码参数调整的方案相比,可以消除网络随机波动等因素的影响,能够更好的对网络状态变化进行响应,有利于提高视频编码器在网络状态变化时输出的视频码流的质量和流畅度。
在本申请的另一实施例中,可以预先配置视频编码器所支持的解析度尺寸比例,比如有16:9,4:3和11:9等。另外,需要预先配置每个解析度尺寸比例下的编码参数表,具体包括:表征视频解析度的宽度和高度(单位是像素(pixel))、表征视频流畅度的帧率(单位是帧/秒(fps))、对应解析度和帧率下的码率范围区间和给定的初始码率值。
需要注意的是,在配置码率范围区间时,需要将码率范围区间配置到网络所支持的最大码率和最小码率限定的范围区间内。另外,配置最小码率时,需要保证视频编码器,比如可以是***级芯片(System on Chip,SoC)实现的硬件编码器或者软件实现的编码器,在相应编码条件下输出的视频质量是可以接受的。
上述配置的编码参数表的数据域信息至少包括:视频宽度(pixel)、视频高度(pixel)、帧率(fps)、最小码率(kbps)、初始码率(kbps)和最大码率(kbps)。以解析度尺寸比例16:9为例,则预先配置的编码参数表结构,如下所示:
Figure PCTCN2015089959-appb-000001
Figure PCTCN2015089959-appb-000002
图2为本申请又一实施例提供的编码参数调整方法的流程图。如图2所示,该方法包括:
201、接收视频接收端反馈的网络特性参数。
本实施例的执行主体可以是编码参数调整装置,该装置可位于视频发送端,用于对视频编码器的编码参数进行调整,以便于视频编码器采用调整后的编码参数对视频帧进行编码处理,具体可以是视频发送端的媒体优化模块,但不限于此。本实施例中的视频编码器可以是基于***DSP芯片的硬件视频编码器,或者也可以是采用某种计算机语言,例如C/C++,实现的软件编码器,或者也可以是采用SIMD代码指令集优化技术实现,或者其它并行技术实现的编码器。相应的,本实施例中的编码参数调整装置也可以是硬件实现,也可以是软件实现。
在本实施例中,视频发送端通过摄像头等视频采集设备采集原始视频信息,对原始视频信息进行预处理、视频编码、信道编码等处理,形成视频数据包后 发送给视频接收端。视频接收端接收到视频数据包后,对视频数据包进行信道解码、视频解码等处理,获得视频帧,将视频帧发送到视频输出设备展现。
在上述过程中,视频接收端周期性统计网络特性参数,例如期望码率、链路发生的丢包率和数据包回环时延等,并将网络特性参数反馈给编码参数调整装置。编码参数调整装置根据视频接收端反馈的网络特性参数对视频编码器采用的编码参数进行调整,以使视频编码器输出的视频码流能够适应网络传输特性,提高视频码流的传输质量和流畅度等。
202、判断接收视频接收端反馈的网络特性参数的时间,与当前之前最后一次接收到可用网络特性参数的时间,之间的间隔是否大于预设第一时长门限;若是,执行步骤203;若否,结束操作。
203、确定视频接收端反馈的网络特性参数为可用网络特性参数,并执行步骤204。
204、判断接收视频接收端反馈的网络特性参数的时间,与视频接收端与本端建立会话的时间,之间的间隔是否大于预设第二时长门限,且接收视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔是否大于预设第三时长门限;若是,则执行步骤205;反之,则结束操作。
上述判断为是的情况是指:接收视频接收端反馈的网络特性参数的时间,与视频接收端与本端建立会话的时间,之间的间隔大于预设第二时长门限,且接收视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔大于预设第三时长门限。上述判断为否的情况是指:接收视频接收端反馈的网络特性参数的时间,与视频接收端与本端建立会话的时间,之间的间隔小于或等于预设第二时长门限,和/或,接收视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔小于或等于预设第三时长门限。
205、确定当前属于参数可调时间,并执行步骤206。
在本实施例中,考虑到网络状况不佳或网络随机波动等情况,视频接收端有可能重复反馈相同的网络特性参数,重复的网络特性参数属于不可用网络特 性参数。为了避免重复网络特性参数,在接收到网络特性参数后,通过判断接收视频接收端反馈的网络特性参数的时间,与当前之前最后一次接收到可用网络特性参数的时间,之间的间隔是否大于预设第一时长门限,来判断该视频接收端反馈的网络特性参数是否是在合理反馈间隔内反馈的信息。其中,第一时长门限是预先设定的反馈间隔,例如可以是但不限于:100ms。
若上述判断结果为是,说明视频接收端反馈的网络特性参数是可用的,不属于重复的参数;若上述判断结果为否,则结束操作。
进一步,考虑到视频接收端与本端(即编码参数调整装置所在的一端,例如视频发送端)之间建立会话初期,视频接收端反馈的网络特性参数的数量有可能不足,为了避免在网络特性参数数量不足的情况进行编码参数调整导致调整效果不佳的问题,在会话建立初期最好不进行编码参数调整,即会话建立初始不属于参数可调时间。另外,为了合理的控制编码参数调整的频率,既要防止太过频繁的进行编码参数调整,又要防止长时间不进行编码参数调整,本实施例可以设定编码参数调整的时间间隔,即第三时长门限,每隔该时间间隔之后进行一次编码参数调整,也就是说,在距离上一次编码参数调整时间不到第三时长门限的时间不属于参数可调时间。
基于上述,在接收到视频接收端反馈的网络特性参数后,通过判断接收视频接收端反馈的网络特性参数的时间,与视频接收端与本端建立会话的时间,之间的间隔是否大于预设第二时长门限,来判断是否有足够的可用网络特性参数,并判断接收视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔是否大于预设第三时长门限。其中,第二时长门限可以是但不限于5000ms。相应的,第三时长门限可以是但不限于5000ms。
只有判断结果均为是时,说明当前时间属于参数可调时间,于是进入下面步骤206-208,进行编码参数调整。
206、对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
在一可选实施方式中,可以根据公式(1),获得本次编码参数调整使用的 网络特性参数。
Figure PCTCN2015089959-appb-000003
在上述公式(1)中,smooth_X为本次编码参数调整使用的网络特性参数;wi为当前之前接收到的第i个可用网络特性参数;ai为第i个可用网络特性参数的权重,且
Figure PCTCN2015089959-appb-000004
N是自然数,表示可用网络特性参数的总数。优选的,可用网络特性参数距离当前时间越近,其权重可以越大。
值得说明的是,上述可用网络特性参数可以是一个,则可以将其权重设置为1.0,并进行只有一个可用网络特性参数的平滑处理,这种情况实际上是没有足够可用网络特性参数进行平滑处理的特殊情况。
值得说明的是,若视频接收端反馈的网络特性参数包括期望码率、丢包率和数据回环时延等多个参数,则本次编码参数调整使用的网络特性参数相应地包括平滑后的期望码率、平滑后的丢包率和平滑后的数据回环时延等多个参数,则上述smooth_X可以表示为smooth_Xj的向量,smooth_Xj表示第j个平滑后的参数。
在一优选实施方式中,上述当前之前接收的至少一个可用网络特性参数可以是最近三个可用网络特性参数。则可以根据smooth_X=a0w0+a1w1+a2w2,计算出本次编码参数调整使用的网络特性参数。其中,a0+a1+a2=1,且a0>a1>a2。进一步优选的,若a0=0.6、a1=0.3且a2=0.1,则利用由上述公式计算出的本次编码参数调整使用的网络特性参数进行编码参数调整,能够消除随机抖动的影响。
207、根据本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数。
在获得本次编码参数调整使用的网络特性参数之后,可以根据本次编码参数调整使用的网络特性参数获得本次编码参数调整所需的目标编码参数。
如图3所示,步骤207或上述步骤103的一种可选实施方式包括:
2071、根据本次编码参数调整使用的网络特性参数,计算码率调整步长和码率调整方向;
2072、根据码率调整步长和码率调整方向,对视频编码器当前使用码率进行调整,以获得匹配码率。
2073、根据匹配码率,获得本次编码参数调整所需的目标编码参数。
在一可选实施方式中,视频接收端反馈的网络特性参数包括:期望码率、丢包率、数据包回环时延等参数,相应的,本次编码参数调整使用的网络特性参数包括:平滑后的期望码率、平滑后的丢包率和平滑后的数据包回环时延。值得说明的是,期望码率等价于视频接收端的实际可用带宽。
基于此,编码参数调整装置具体可以根据平滑后的期望码率、平滑后的丢包率、平滑后的数据包回环时延和视频编码器当前使用的码率,获得码率调整步长和码率调整方向。
在一具体实施方式中,编码参数调整装置可以根据平滑后的期望码率和平滑后的数据包回环时延,确定网络状况的好坏。具体的,编码参数调整装置将平滑后的期望码率与预设的丢包率门限进行比较,并将平滑后的数据包回环时延与预设的时延门限进行比较;根据比较结果,确定网络状况的好坏。
若平滑后的丢包率大于预设的丢包率门限,和/或,平滑后的数据包回环时延大于预设的时延门限,则确定网络状况较差,则需要降低编码码率以适应网络状况,因此确定码率调整方向为向下调。这种高延时或丢包的情况一般在广域网(WAN)和无线网络中较为常见。
在网络状况较差的情况下,可能出现的丢包率有8%、12%、20%和50%等不同的值,基于平滑后的丢包率大小的不同,可以适应性设置截断比例(cut_ratio),例如截断比例可以有1/10,1/8,1/4和1/2等,以平衡总体的视频质量。根据截断比例可以对视频编码器当前使用的码率进行截断处理,获得可以作为码率调整步长的截断码率。例如,可以将由平滑后的丢包率所确定的截断比例与视频编码器当前使用的码率的乘积作为第一截断码率。
进一步,编码参数调整装置将平滑后的期望码率与视频编码器当前使用的 码率进行比较,若平滑后的期望码率小于视频编码器当前使用的码率时,将第一码率差值和第一截断码率中较小的一个作为码率调整步长;若平滑后的期望码率大于或等于视频编码器当前使用的码率,则直接将第一截断码率作为码率调整步长。其中,第一码率差值是视频编码器当前使用的码率与所述平滑后的期望码率的差值。
若平滑后的丢包率小于或等于预设的丢包率门限,且平滑后的数据包回环时延小于或等于预设的时延门限,则确定网络状况较好,则需要增大编码码率以适应网络状况,因此确定码率调整方向为向上调。
进一步,编码参数调整装置将平滑后的期望码率与视频编码器最大可承受码率进行比较,并将平滑后的丢包率与信道编码所能抵抗的最小丢包率进行比较;若平滑后的期望码率大于或等于视频编码器最大可承受码率,且平滑后的丢包率小于或等于信道编码所能抵抗的最小丢包率,则将第二码率差值和第二截断码率中较小的作为码率调整步长。
其中,视频编码器最大可承受码率可由视频编码器允许超出给定码率的上限幅度与视频编码器当前使用的码率的相乘获得。信道编码所能抵抗的最小丢包率可以是一经验值。
上述第二码率差值是指平滑后的期望码率与视频编码器当前使用的码率的差值。第二截断码率是预设的上调比例与视频编码器当前使用的码率的乘积和预设的最大码率上调幅度中较大的一个。其中,通过预先设定上调比例和最大码率上调幅度,可以在上调码率情况下,防止因上调幅度过大导致调整比较频繁,进而引起视频质量反复振荡的问题。
在获得码率调整步长和码率调整方向后,可以根据码率调整步长和码率调整方向对视频编码器当前使用的码率进行调整,获得本次编码参数调整的匹配码率;进一步,根据匹配码率,获得本次编码参数调整的目标编码参数。
在上述预先配置的编码参数表中,包括至少一组编码参数,每组编码参数包括码率范围区间;编码参数调整装置可以根据匹配码率,在预设的编码参数表中进行匹配;将包括匹配码率的码率范围区间所在的编码参数作为目标编码 参数。
例如,以上述预先配置的编码参数表为例,假设视频编码器当前使用的编码参数为:kW360P,k20HZ,480kbps,而计算出的匹配码率为430kbps,则可以先在视频编码器当前使用的相同解析度下,向较小的帧率方向匹配,以判断是否匹配到码率落在某个[最小码率,最大码率]这个码率范围区间,匹配得到的结果是:kW360P,k15HZ,350,416,450这组编码参数,最终选定该组编码参数中的kW360P,k15HZ和430kbps作为目标编码参数。值得说明的是,若在视频编码器当前使用的相同解析度下没查找到包括匹配码率的码率范围区间,可以依序往较低解析度的编码参数中继续查找,若仍然无法查找到,可以取到编码参数表中定义的最低解析度下的最低帧率下的编码参数作为目标编码参数。
又例如,以上述预先配置的编码参数表为例,假设视频编码器当前使用的编码参数为:kW360P,k20HZ,480kbps,而计算出的匹配码率为800kbps,则可以先在视频编码器当前使用的相同解析度下,向较大的帧率方向匹配,以判断是否匹配到码率落在某个[最小码率,最大码率]这个码率范围区间,匹配得到的结果是:kW360P,k25HZ,560,720,900这组编码参数,最终选定该组编码参数中的kW360P,k25HZ和800kbps作为目标编码参数。值得说明的是,若在视频编码器当前使用的相同解析度下没查找到包括匹配码率的码率范围区间,可以依序往较高解析度的编码参数中继续查找,若仍然无法查找到,可以取到编码参数表中定义的最高解析度下的最高帧率下的编码参数作为目标编码参数。
进一步,在将匹配码率在编码参数表中进行匹配之前,可以判断匹配码率是否在网络所支持的最大码率和最小码率范围之内,若不在,需要对匹配码率进行调整,以将匹配码率调整到网络所能支持的最大码率和最小码率之间,以便于在保证视频流畅的前提下提供最优的视频质量。
208、将视频编码器使用的编码参数调整为目标编码参数。
在获得目标编码参数之后,将视频编码器使用的编码参数调整为目标编码 参数。
在本实施例中,编码参数调整装置在接收到视频接收端反馈的网络特性参数时,对视频接收端反馈的网络特性参数进行可用性判断,并对当前是否可以进行编码参数调整进行判断,只有在视频接收端反馈的网络特性参数可用,且当前可以进行编码参数调整时,才进行编码参数调整,可以避免使用视频接收端反馈的不可用网络特性参数进行编码参数调整,并可避免在不恰当时间进行编码参数调整等情况,有利于提高编码参数调整的合理性和准确度,为提高视频质量和流畅度提供条件;另外,本实施例使用接收的至少一个可用网络特性参数平滑后的参数进行编码参数调整,与现有技术在接收到视频接收端反馈的网络特性参数后直接根据该网络特性参数进行编码参数调整的方案相比,可以消除网络随机波动等因素的影响,能够更好的对网络状态变化进行响应,有利于提高视频编码器在网络状态变化时输出的视频码流的质量和流畅度。
本申请提出的编码参数调整方法可以应用于WAN、LAN,2.5G网络、3G网络、4G网络、Wi-Fi网络、企业网络、以及以ADSL等方式接入的家庭网络等各种不同类型的网络场景,以便于提高视频质量和流畅度,提高用户的视频体验。
为使本申请的技术效果更具说服力,发明人经过大量实验将本申请技术方案和现有技术方案进行比对,效果比对分别如图4-图7所示。首先说明,根据视频接收端反馈的网络特性参数,可以确定在图4-图7中时间轴的前半部分对应的时间段内网络状况较好,而在中间部分对应的时间段内网络状况较差。
其中,图4所示为视频解析度调整结果比对。在图4中,横坐标轴表示时间,纵坐标轴表示关联特征值(co-index)的数值。由于视频解析度由宽度和高度两个维度组成,为便于表示,本实施例将其对应到co-index这一个值,也就是说,co-index可用于表示视频解析度,co-index的数值越大,视频解析度越小。co-index的数值与视频解析度的对应关系如下表1所示。在调整曲线的前半部分(1-13对应的时间段内),采用现有技术方案进行编码参数调整,其视频解析度都维持在640x360大小,在测试中发现其视频输出质量偏差,较模糊; 而采用本申请技术方案进行编码参数调整,其视频解析度大部分维持在320x180大小,虽然视频解析度较低,但视频输出质量比较好,而且质量一直稳定。
表1
解析度 co-index的数值
1280x720 0
640x360 1
480x270 2
320x180 3
160x90 4
图5所示为视频帧率调整结果比对。在图5中,横坐标轴表示时间,纵坐标轴表示帧率。由图5可见,本申请调整的平均帧率比现有技术的要高,更流畅一些,尤其是中间网络条件较差的时间段内,效果更明显。现有技术在网络条件较差的时间段内视频输出比较卡顿,仅有10fps。
图6所示为视频编码器实际输出帧率结果比对。在图6中,横坐标轴表示时间,纵坐标轴表示视频编码器编码输出的帧率。如图6所示,关于视频编码器实际输出的帧率,本申请大部分都维持在15fps及以上,即使在网络状况较差的时间段,也落在10fps,与图5中所示的预期10fps调整指令吻合;而现有技术方案中实际输出的帧率极不稳定,上下振荡,在网络状况较差时仅输出4fps,视频较卡顿。
图7所示为视频编码器实际输出码率结果比对。在图7中,横坐标轴表示时间,纵坐标轴表示视频编码器编码输出的码率。如图7所示,关于视频编码实际输出的码率,本申请的视频编码器输出的码率较平稳,无反复振荡现象,且平均输出码率较高,视频始终较清晰,视频体验较好。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。 其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
图8为本申请一实施例提供的编码参数调整装置的结构示意图。如图8所示,该装置包括:接收模块81、第一获取模块82、第二获取模块83和调整模块84。
接收模块81,用于接收视频接收端反馈的网络特性参数。
第一获取模块82,与接收模块81连接,用于对当前之前接收模块81接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
第二获取模块83,与第一获取模块82连接,用于根据第一获取模块82获取的本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数。
调整模块84,与第二获取模块83连接,用于将视频编码器使用的编码参数调整为第二获取模块83获取的目标编码参数。
在一可选实施方式中,第一获取模块82具体可用于:在视频接收端反馈的网络特性参数为可用网络特性参数,和/或,当前属于参数可调时间时,对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
在一可选实施方式中,如图9所示,该装置还包括:第一判断模块85,与接收模块81连接,用于判断接收模块81接收视频接收端反馈的网络特性参数的时间,与当前之前最后一次接收到可用网络特性参数的时间,之间的间隔是否大于预设第一时长门限,并在判断结果为是时,确定视频接收端反馈的网络特性参数为可用网络特性参数。
进一步,如图9所示,该装置还包括:第二判断模块86,与接收模块81连接,用于判断接收模块81接收视频接收端反馈的网络特性参数的时间,与视 频接收端和该编码参数调整装置所在端建立会话的时间,之间的间隔是否大于预设第二时长门限,以及判断接收模块81接收视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔是否大于预设第三时长门限,并在判断结果为是,确定当前属于参数可调时间。
在一可选实施方式中,第一获取模块82具体可用于根据上述公式(1),对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。关于公式(1)及有关参数可参见上述方法实施例的描述,在此不再赘述。
在一可选实施方式中,如图9所示,第二获取模块83的一种实现结构包括:计算单元831、调整单元832和获取单元833。
计算单元831,用于根据本次编码参数调整使用的网络特性参数,计算码率调整步长和码率调整方向;
调整单元832,与计算单元831连接,用于根据计算单元831计算出的码率调整步长和码率调整方向,对视频编码器当前使用的码率进行调整,以获得匹配码率。
获取单元833,与调整单元832连接,用于根据调整单元832获得的匹配码率,获得本次编码参数调整所需的目标编码参数。
在一可选实施方式中,视频接收端反馈的网络特性参数包括:期望码率、丢包率和数据包回环时延;相应的,本次编码参数调整使用的网络特性参数包括:平滑后的期望码率、平滑后的丢包率和平滑后的数据包回环时延。
计算单元831具体用于:根据平滑后的期望码率、平滑后的丢包率、平滑后的数据包回环时延和视频编码器当前使用的码率,获得码率调整步长和码率调整方向。
计算单元831进一步具体用于:
若平滑后的丢包率大于预设的丢包率门限,和/或平滑后的数据包回环时延大于预设时延门限,确定码率调整方向为向下调,并在平滑后的期望码率小于视频编码器当前使用的码率时,将第一码率差值和第一截断码率中较小的一个 作为码率调整步长,或者在平滑后的期望码率大于或等于视频编码器当前使用的码率时,将第一截断码率作为码率调整步长;
其中,第一码率差值是指视频编码器当前使用的码率与平滑后的期望码率的差值,第一截断码率是由平滑后的丢包率确定的截断比例与视频编码器当前使用的码率的乘积;
若平滑后的丢包率小于或等于预设的丢包率门限,且平滑后的数据包回环时延小于或等于预设时延门限,确定码率调整方向为向上调,并在平滑后的期望码率大于或等于视频编码器最大可承受码率,且平滑后的丢包率小于或等于信道编码所能抵抗的最小丢包率时,将第二码率差值和第二截断码率中较小的作为码率调整步长;
其中,第二码率差值是指平滑后的期望码率与视频编码器当前使用的码率的差值,第二截断码率是预设的上调比例与视频编码器当前使用的码率的乘积和预设的最大码率上调幅度中较大的一个。
在一可选实施方式中,预先配置视频编码器所支持的解析度尺寸比例,比如有16:9,4:3和11:9等。另外,需要预先配置每个解析度尺寸比例下的编码参数表。
基于此,获取单元833具体可用于:根据匹配码率,在预设的编码参数表中进行匹配,编码参数表包括至少一组编码参数,至少一组编码参数中的每组编码参数包括码率范围区间;将包括所述匹配码率的码率范围区间所在的编码参数作为目标编码参数。
本实施例提供的编码参数调整装置可以位于视频发送端,主要用于对视频编码器的编码参数进行调整,以便于视频编码器采用调整后的编码参数对视频帧进行编码处理,具体可以是视频发送端的媒体优化模块,但不限于此。
本实施例提供的编码参数调整装置,接收到视频接收端反馈的网络特性参数,对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数,进而根据本次编码参数调整使用的网络特性参数进行编码参数调整,与现有技术在接收到视频接收端反馈的网络特性参数后直 接根据该网络特性参数进行编码参数调整的方案相比,可以消除网络随机波动等因素的影响,能够更好的对网络状态变化进行响应,有利于提高视频编码器在网络状态变化时输出的视频码流的质量和流畅度。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以 存储程序代码的介质。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (18)

  1. 一种编码参数调整方法,其特征在于,包括:
    接收视频接收端反馈的网络特性参数;
    对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数;
    根据所述本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数;
    将视频编码器使用的编码参数调整为所述目标编码参数。
  2. 根据权利要求1所述的方法,其特征在于,所述对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数,包括:
    若所述视频接收端反馈的网络特性参数为可用网络特性参数,和/或,当前属于参数可调时间,则对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
  3. 根据权利要求2所述的方法,其特征在于,所述对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的本次编码参数调整使用的网络特性参数之前,还包括:
    判断接收所述视频接收端反馈的网络特性参数的时间,与当前之前最后一次接收到可用网络特性参数的时间,之间的间隔是否大于预设第一时长门限;
    若判断结果为是,确定所述视频接收端反馈的网络特性参数为可用网络特性参数。
  4. 根据权利要求2所述的方法,其特征在于,所述对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的本次编码参数调整使用的网络特性参数之前,还包括:
    判断接收所述视频接收端反馈的网络特性参数的时间,与所述视频接收端和本端建立会话的时间,之间的间隔是否大于预设第二时长门限,且接收所述 视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔是否大于预设第三时长门限;
    若判断结果为是,确定当前属于参数可调时间。
  5. 根据权利要求2所述的方法,其特征在于,所述对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数,包括:
    根据公式
    Figure PCTCN2015089959-appb-100001
    对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得所述本次编码参数调整使用的网络特性参数;
    其中,smooth_X为所述本次编码参数调整使用的网络特性参数;
    wi为当前之前接收到的第i个可用网络特性参数;
    ai为第i个可用网络特性参数的权重,且
    Figure PCTCN2015089959-appb-100002
    N是自然数,表示所述可用网络特性参数的总数。
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述根据所述本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数,包括:
    根据所述本次编码参数调整使用的网络特性参数,计算码率调整步长和码率调整方向;
    根据所述码率调整步长和码率调整方向,对所述视频编码器当前使用的码率进行调整,以获得匹配码率;
    根据所述匹配码率,获得本次编码参数调整所需的所述目标编码参数。
  7. 根据权利要求6所述的方法,其特征在于,所述视频接收端反馈的网络特性参数包括:期望码率、丢包率和数据包回环时延;所述本次编码参数调整使用的网络特性参数包括:平滑后的期望码率、平滑后的丢包率和平滑后的数据包回环时延;
    所述根据所述本次编码参数调整使用的网络特性参数,计算码率调整步长 和码率调整方向,包括:
    根据所述平滑后的期望码率、所述平滑后的丢包率、所述平滑后的数据包回环时延和所述视频编码器当前使用的码率,获得所述码率调整步长和码率调整方向。
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述平滑后的期望码率、所述平滑后的丢包率、所述平滑后的数据包回环时延和所述视频编码器当前使用的码率,获得所述码率调整步长和码率调整方向,包括:
    若所述平滑后的丢包率大于预设的丢包率门限,和/或,所述平滑后的数据包回环时延大于预设时延门限,确定所述码率调整方向为向下调,并在所述平滑后的期望码率小于所述视频编码器当前使用的码率时,将第一码率差值和第一截断码率中较小的一个作为所述码率调整步长,或者在所述平滑后的期望码率大于或等于所述视频编码器当前使用的码率时,将所述第一截断码率作为所述码率调整步长;
    其中,所述第一码率差值是指所述视频编码器当前使用的码率与所述平滑后的期望码率的差值,所述第一截断码率是由所述平滑后的丢包率确定的截断比例与所述视频编码器当前使用的码率的乘积;
    若所述平滑后的丢包率小于或等于预设的丢包率门限,且所述平滑后的数据包回环时延小于或等于预设时延门限,确定所述码率调整方向为向上调,并在所述平滑后的期望码率大于或等于所述视频编码器最大可承受码率,且所述平滑后的丢包率小于或等于信道编码所能抵抗的最小丢包率时,将第二码率差值和第二截断码率中较小的作为所述码率调整步长;
    其中,所述第二码率差值是指所述平滑后的期望码率与所述视频编码器当前使用的码率的差值,所述第二截断码率是预设的上调比例与所述视频编码器当前使用的码率的乘积和预设的最大码率上调幅度中较大的一个。
  9. 根据权利要求6所述的方法,其特征在于,所述根据所述匹配码率,获得本次编码参数调整所需的所述目标编码参数,包括:
    根据所述匹配码率,在预设的编码参数表中进行匹配,所述编码参数表包 括至少一组编码参数,所述至少一组编码参数中的每组编码参数包括码率范围区间;
    将包括所述匹配码率的码率范围区间所在的编码参数作为所述目标编码参数。
  10. 一种编码参数调整装置,其特征在于,包括:
    接收模块,用于接收视频接收端反馈的网络特性参数;
    第一获取模块,用于对当前之前接收的至少一个网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数;
    第二获取模块,用于根据所述本次编码参数调整使用的网络特性参数,获得本次编码参数调整所需的目标编码参数;
    调整模块,用于将视频编码器使用的编码参数调整为所述目标编码参数。
  11. 根据权利要求10所述的装置,其特征在于,所述第一获取模块具体用于:
    在所述视频接收端反馈的网络特性参数为可用网络特性参数,和/或,当前属于参数可调时间时,对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得本次编码参数调整使用的网络特性参数。
  12. 根据权利要求11所述的装置,其特征在于,还包括:
    第一判断模块,用于判断接收所述视频接收端反馈的网络特性参数的时间,与当前之前最后一次接收到可用网络特性参数的时间,之间的间隔是否大于预设第一时长门限,并在判断结果为是时,确定所述视频接收端反馈的网络特性参数为可用网络特性参数。
  13. 根据权利要求11所述的装置,其特征在于,还包括:
    第二判断模块,用于判断接收所述视频接收端反馈的网络特性参数的时间,与所述视频接收端和所述编码参数调整装置所在端建立会话的时间,之间的间隔是否大于预设第二时长门限,以及判断接收所述视频接收端反馈的网络特性参数的时间,与上一次编码参数调整的时间,之间的间隔是否大于预设第三时长门限,并在判断结果为是,确定当前属于参数可调时间。
  14. 根据权利要求11所述的装置,其特征在于,所述第一获取模块具体用于:
    根据公式
    Figure PCTCN2015089959-appb-100003
    对当前之前接收的至少一个可用网络特性参数进行平滑处理,获得所述本次编码参数调整使用的网络特性参数;
    其中,smooth_X为所述本次编码参数调整使用的网络特性参数;
    wi为当前之前接收到的第i个可用网络特性参数;
    ai为第i个可用网络特性参数的权重,且
    Figure PCTCN2015089959-appb-100004
    N是自然数,表示所述可用网络特性参数的总数。
  15. 根据权利要求10-14任一项所述的装置,其特征在于,所述第二获取模块包括:
    计算单元,用于根据所述本次编码参数调整使用的网络特性参数,计算码率调整步长和码率调整方向;
    调整单元,用于根据所述码率调整步长和码率调整方向,对所述视频编码器当前使用的码率进行调整,以获得匹配码率;
    获取单元,用于根据所述匹配码率,获得本次编码参数调整所需的所述目标编码参数。
  16. 根据权利要求15所述的装置,其特征在于,所述视频接收端反馈的网络特性参数包括:期望码率、丢包率和数据包回环时延;所述本次编码参数调整使用的网络特性参数包括:平滑后的期望码率、平滑后的丢包率和平滑后的数据包回环时延;
    所述计算单元具体用于:根据所述平滑后的期望码率、所述平滑后的丢包率、所述平滑后的数据包回环时延和所述视频编码器当前使用的码率,获得所述码率调整步长和码率调整方向。
  17. 根据权利要求16所述的装置,其特征在于,所述计算单元进一步具体用于:
    若所述平滑后的丢包率大于预设的丢包率门限,和/或,所述平滑后的数据包回环时延大于预设时延门限,确定所述码率调整方向为向下调,并在所述平滑后的期望码率小于所述视频编码器当前使用的码率时,将第一码率差值和第一截断码率中较小的一个作为所述码率调整步长,或者在所述平滑后的期望码率大于或等于所述视频编码器当前使用的码率时,将所述第一截断码率作为所述码率调整步长;
    其中,所述第一码率差值是指所述视频编码器当前使用的码率与所述平滑后的期望码率的差值,所述第一截断码率是由所述平滑后的丢包率确定的截断比例与所述视频编码器当前使用的码率的乘积;
    若所述平滑后的丢包率小于或等于预设的丢包率门限,且所述平滑后的数据包回环时延小于或等于预设时延门限,确定所述码率调整方向为向上调,并在所述平滑后的期望码率大于或等于所述视频编码器最大可承受码率,且所述平滑后的丢包率小于或等于信道编码所能抵抗的最小丢包率时,将第二码率差值和第二截断码率中较小的作为所述码率调整步长;
    其中,所述第二码率差值是指所述平滑后的期望码率与所述视频编码器当前使用的码率的差值,所述第二截断码率是预设的上调比例与所述视频编码器当前使用的码率的乘积和预设的最大码率上调幅度中较大的一个。
  18. 根据权利要求15所述的装置,其特征在于,所述获取单元具体用于:
    根据所述匹配码率,在预设的编码参数表中进行匹配,所述编码参数表包括至少一组编码参数,所述至少一组编码参数中的每组编码参数包括码率范围区间;
    将包括所述匹配码率的码率范围区间所在的编码参数作为所述目标编码参数。
PCT/CN2015/089959 2014-09-30 2015-09-18 编码参数调整方法及装置 WO2016050145A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410522294.4 2014-09-30
CN201410522294.4A CN105530449B (zh) 2014-09-30 2014-09-30 编码参数调整方法及装置

Publications (1)

Publication Number Publication Date
WO2016050145A1 true WO2016050145A1 (zh) 2016-04-07

Family

ID=55629421

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/089959 WO2016050145A1 (zh) 2014-09-30 2015-09-18 编码参数调整方法及装置

Country Status (3)

Country Link
CN (1) CN105530449B (zh)
HK (1) HK1222277A1 (zh)
WO (1) WO2016050145A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225209A (zh) * 2018-11-23 2020-06-02 北京字节跳动网络技术有限公司 视频数据推流方法、装置、终端及存储介质
CN113037697A (zh) * 2019-12-25 2021-06-25 深信服科技股份有限公司 一种视频帧处理方法、装置和电子设备及可读存储介质
CN113315773A (zh) * 2021-05-31 2021-08-27 浙江大华技术股份有限公司 一种码率调整方法、装置、电子设备及存储介质
CN113660459A (zh) * 2021-08-02 2021-11-16 西安万像电子科技有限公司 图像数据的传输方法、装置、存储介质以及处理器
CN114390320A (zh) * 2022-02-18 2022-04-22 百果园技术(新加坡)有限公司 数据编码码率自适应调节方法、装置、设备和存储介质
CN117596234A (zh) * 2023-09-28 2024-02-23 书行科技(北京)有限公司 一种多人会话方法及装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106982371B (zh) * 2016-12-09 2020-08-11 上海谐桐信息技术有限公司 码流控制方法和***、码流管理方法和***,及终端设备
CN108229391B (zh) * 2018-01-02 2021-12-24 京东方科技集团股份有限公司 手势识别装置及其服务器、手势识别***、手势识别方法
CN110611789A (zh) * 2018-06-14 2019-12-24 杭州海康威视数字技术股份有限公司 视频流传输控制方法、装置、电子设备及存储介质
CN111105778A (zh) * 2018-10-29 2020-05-05 阿里巴巴集团控股有限公司 语音合成方法、装置、计算设备和存储介质
CN109495660B (zh) * 2018-11-29 2021-05-18 广州市百果园信息技术有限公司 一种音频数据的编码方法、装置、设备和存储介质
CN110072011B (zh) * 2019-04-24 2021-07-20 Oppo广东移动通信有限公司 调整码率方法及相关产品
CN111246262A (zh) * 2020-01-09 2020-06-05 西安万像电子科技有限公司 编码调度控制方法及调度控制器
CN111163318B (zh) * 2020-01-09 2021-05-04 北京大学 一种基于反馈优化的人机视觉编码方法和装置
CN111277864B (zh) 2020-02-18 2021-09-10 北京达佳互联信息技术有限公司 直播数据的编码方法、装置、流转***及电子设备
CN113194340B (zh) * 2021-04-08 2023-01-13 广州市奥威亚电子科技有限公司 视频传输调整方法及装置
CN113923480A (zh) * 2021-09-27 2022-01-11 西安万像电子科技有限公司 用于图像传输的宽带确定方法、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1819503A (zh) * 2005-02-07 2006-08-16 乐金电子(惠州)有限公司 有线/无线网络设备的编码比率调整设备及其方法
CN101123606A (zh) * 2007-07-13 2008-02-13 上海广电(集团)有限公司中央研究院 基于实时传输协议或实时控制协议的avs传输控制方法
CN101340575A (zh) * 2007-07-03 2009-01-07 英华达(上海)电子有限公司 动态调整视频编码的方法及终端
CN101510998A (zh) * 2009-02-24 2009-08-19 山东大学 用于无线视频监控***数据传输的自适应流量控制方法
CN103118241A (zh) * 2012-02-24 2013-05-22 金三立视频科技(深圳)有限公司 基于3g网络的移动视频监控流媒体传输自适应调整算法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120106520A (ko) * 2011-03-16 2012-09-26 한국전자통신연구원 신호세기정보를 이용한 채널 레이트 예측 방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1819503A (zh) * 2005-02-07 2006-08-16 乐金电子(惠州)有限公司 有线/无线网络设备的编码比率调整设备及其方法
CN101340575A (zh) * 2007-07-03 2009-01-07 英华达(上海)电子有限公司 动态调整视频编码的方法及终端
CN101123606A (zh) * 2007-07-13 2008-02-13 上海广电(集团)有限公司中央研究院 基于实时传输协议或实时控制协议的avs传输控制方法
CN101510998A (zh) * 2009-02-24 2009-08-19 山东大学 用于无线视频监控***数据传输的自适应流量控制方法
CN103118241A (zh) * 2012-02-24 2013-05-22 金三立视频科技(深圳)有限公司 基于3g网络的移动视频监控流媒体传输自适应调整算法

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225209A (zh) * 2018-11-23 2020-06-02 北京字节跳动网络技术有限公司 视频数据推流方法、装置、终端及存储介质
CN113037697A (zh) * 2019-12-25 2021-06-25 深信服科技股份有限公司 一种视频帧处理方法、装置和电子设备及可读存储介质
CN113315773A (zh) * 2021-05-31 2021-08-27 浙江大华技术股份有限公司 一种码率调整方法、装置、电子设备及存储介质
CN113660459A (zh) * 2021-08-02 2021-11-16 西安万像电子科技有限公司 图像数据的传输方法、装置、存储介质以及处理器
CN113660459B (zh) * 2021-08-02 2023-11-14 西安万像电子科技有限公司 图像数据的传输方法、装置、存储介质以及处理器
CN114390320A (zh) * 2022-02-18 2022-04-22 百果园技术(新加坡)有限公司 数据编码码率自适应调节方法、装置、设备和存储介质
CN114390320B (zh) * 2022-02-18 2024-02-13 百果园技术(新加坡)有限公司 数据编码码率自适应调节方法、装置、设备和存储介质
CN117596234A (zh) * 2023-09-28 2024-02-23 书行科技(北京)有限公司 一种多人会话方法及装置
CN117596234B (zh) * 2023-09-28 2024-05-28 书行科技(北京)有限公司 一种多人会话方法及装置

Also Published As

Publication number Publication date
CN105530449B (zh) 2019-01-22
HK1222277A1 (zh) 2017-06-23
CN105530449A (zh) 2016-04-27

Similar Documents

Publication Publication Date Title
WO2016050145A1 (zh) 编码参数调整方法及装置
EP3357209B1 (en) User equipment and media streaming network assistance node
US10218761B2 (en) Method and device for adjusting bit rate in video calling based on voice over long-term evolution and video over long-term evolution, and mobile terminal
CN108881780A (zh) 视频通话中动态调整清晰度模式的方法、服务器
WO2017148260A1 (zh) 语音编码发送方法和装置
US20160050246A1 (en) Quality-aware rate adaptation techniques for dash streaming
CN102802089A (zh) 一种基于体验质量预测的移动视频码率调整方法
CN110769296B (zh) 一种传输时基于本地缓存的视频码率自适应调节方式
WO2008014707A1 (fr) Procédé, système et écran de réglage de qualité vidéo
WO2015101092A1 (zh) 一种传输机制调整方法和服务端、客户端
CN103986914B (zh) 无线视频监控***中基于客户端数量的码率自适应方法
US10021653B2 (en) Transmit power determining method and apparatus
TW201505427A (zh) 一種通信視頻品質調節方法和相關設備及系統
CN104333728B (zh) 音视频传输调控方法、装置、***和计算机可读存储介质
WO2019144802A1 (zh) 一种数据的传输方法及其相关设备
CN110012324A (zh) 一种嵌入式无线视频传输的码率自适应方法及***
CN105900481A (zh) 一种无线保真技术的带宽选择方法及接入点ap
CN104253967A (zh) 一种实时视频通信传输控制方法
CN103780869A (zh) 一种视频会话中动态调整视频传输效率的方法
WO2017167224A1 (zh) 调整视频编码速率的方法及装置
US9882822B2 (en) Data frame sending method and apparatus
CN115209189B (zh) 一种视频流传输方法、***、服务器及存储介质
US11611970B2 (en) Adaptive resource allocation for media streams over wireless
CN115208861A (zh) 基于值函数优化的视频通信网络
WO2018081937A1 (zh) 一种确定音视频数据编码速率的方法、终端以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15847050

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15847050

Country of ref document: EP

Kind code of ref document: A1