CN117082245A - Video encoding method, video encoding device, storage medium and electronic device - Google Patents

Video encoding method, video encoding device, storage medium and electronic device Download PDF

Info

Publication number
CN117082245A
CN117082245A CN202311046994.6A CN202311046994A CN117082245A CN 117082245 A CN117082245 A CN 117082245A CN 202311046994 A CN202311046994 A CN 202311046994A CN 117082245 A CN117082245 A CN 117082245A
Authority
CN
China
Prior art keywords
coding
target
coding rate
rate
video
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
CN202311046994.6A
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.)
Zhejiang Huachuang Video Signal Technology Co Ltd
Original Assignee
Zhejiang Huachuang Video Signal 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 Zhejiang Huachuang Video Signal Technology Co Ltd filed Critical Zhejiang Huachuang Video Signal Technology Co Ltd
Priority to CN202311046994.6A priority Critical patent/CN117082245A/en
Publication of CN117082245A publication Critical patent/CN117082245A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/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/17Methods 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 an image region, e.g. an object
    • H04N19/172Methods 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 an image region, e.g. an object the region being a picture, frame or field

Abstract

The application provides a video coding method, a video coding device, a storage medium and an electronic device, wherein the video coding method comprises the following steps: determining a target coding rate of a target video; determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and coding parameters, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels; and encoding the target video according to the target encoding parameters. The method and the device solve the problems of poor video quality and low user experience caused by the fact that the coding parameters cannot be effectively adjusted in the related technology.

Description

Video encoding method, video encoding device, storage medium and electronic device
Technical Field
The present application relates to the field of image processing, and in particular, to a video encoding method, apparatus, storage medium, and electronic apparatus.
Background
With the development of network technology and statistical technology, cloud video conferencing has become an important conference and communication mode at present. The video transmission technology is used as a core technology of the video conference, and has the main functions of: after the sending end encodes the video data, the receiving end receives the encoded data and decodes the encoded data so as to complete the transmission of the video. However, the cloud video conference is deployed on the public network, the network state is unstable, the fixed coding parameters are difficult to adapt to the conditions of network congestion or packet loss, and the like, the sending end needs to dynamically adjust the video coding so as to adapt to the network conditions between the sending end and the receiving end, and meanwhile, the quality, the smoothness and the user watching experience of the coded video can be ensured to the greatest extent under different network states.
In the related art, a relatively common dynamic adjustment mode of video coding is mainly to acquire a network prediction bandwidth through a network transmission module, and adjust the coding rate according to the prediction bandwidth. Before adjusting the coding rate, the resolution levels corresponding to different coding rates are divided, the video coding rate is adjusted by predicting the bandwidth through the network, and then the coding resolution level is adjusted according to the video coding rate.
However, if the network prediction bandwidth just fluctuates up and down at the code rates corresponding to the two different resolution levels, the coding resolution will change continuously, which brings possible challenges to the processing logic of the sender encoder and the receiver decoder, and meanwhile, if the network prediction bandwidth is switched between the coding resolutions of different aspect ratio embodiments, the viewing experience for the receiver user is poor;
in summary, in the video transmission technology, the current coding adjustment method cannot adapt to the network condition between the transmitting end and the receiving end, and simultaneously ensure the quality and smoothness of the coded video picture and the user viewing experience to the maximum extent, that is, cannot realize effective adjustment of the coding parameters.
In view of the above problems in the related art, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a video coding method, a video coding device, a storage medium and an electronic device, which at least solve the problems that the video quality is poor and the user experience is low due to the fact that coding parameters cannot be effectively adjusted in the related technology.
According to an embodiment of the present application, there is provided a video encoding method including: determining a target coding rate of a target video; determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and coding parameters, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels; and encoding the target video according to the target encoding parameters.
In an alternative embodiment, before determining the target coding parameter corresponding to the target coding rate from the correspondence between the preconfigured coding rate interval and the coding parameter, the method further includes at least one of: configuring the corresponding relation; and acquiring the corresponding relation from a receiving end for receiving the coded video.
In an alternative embodiment, configuring the correspondence includes: configuring the correspondence based on at least one of the following configuration reference conditions: the coding parameters of adjacent levels contain the same or different coding formats; the coding parameters of adjacent levels contain the same or different resolutions; the coding parameters of adjacent levels contain the same or different frame rates.
In an alternative embodiment, in the correspondence, in a case that the first coding rate exceeds a predetermined code rate value, a first resolution included in a first coding parameter corresponding to the first coding rate is higher than a second resolution included in a second coding parameter, where the coding rate corresponding to the second coding parameter is a second coding rate, and the second coding rate is lower than the first coding rate.
In an alternative embodiment, after configuring the correspondence, the method further includes: and reducing the frame rate included in the third coding parameter corresponding to the third coding rate under the condition that the network performance is detected to be reduced.
In an optional embodiment, determining, from a correspondence between a preconfigured coding rate interval and a coding parameter, a target coding parameter corresponding to the target coding rate includes: comparing the target coding rate with the current coding rate; and under the condition that the comparison result is used for indicating that the target coding rate and the current coding rate are not in the same interval, determining a target coding parameter corresponding to the target coding rate from the corresponding relation between the pre-configured coding rate interval and the coding parameter.
In an alternative embodiment, after determining the target coding rate of the target video, the method further comprises: under the condition that the corresponding relation is determined to have no coding rate interval to which the target coding rate belongs, determining the coding rate interval closest to the target coding rate from the corresponding relation; and encoding the target video according to the encoding parameters corresponding to the encoding rate interval nearest to the target encoding rate.
According to another embodiment of the present application, there is provided a video encoding apparatus including: the first determining module is used for determining a target coding rate of the target video; the second determining module is used for determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and the coding parameter, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels; and the encoding module is used for encoding the target video according to the target encoding parameters.
When video is required to be transmitted, the coding rate of the video is predicted first, and then the coding parameter corresponding to the predicted coding rate is determined, and it is required to be explained that in the embodiment of the application, the coding rate intervals corresponding to adjacent coding parameters are crossed in reality, that is, the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels, so that when the predicted coding rate is positioned in the crossed interval, the original coding parameter is not required to be changed, thereby avoiding the problem of back-and-forth conversion of the coding parameters caused by oscillation of the coding rate on a certain amplitude, realizing effective adjustment of the coding parameters, maximally ensuring the picture quality, smoothness and user watching experience of the coded video, and effectively solving the problem that the coding parameters cannot be effectively adjusted in the related technology, thereby resulting in low quality of the video and poor user experience.
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 specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a video encoding method according to an embodiment of the present application;
fig. 2 is a flowchart of a video encoding method according to an embodiment of the present application;
FIG. 3 is a chart of coding parameter levels corresponding to different bit rate intervals according to an embodiment of the present application;
fig. 4 is a flow chart of a method for dynamic adjustment of video coding in a video conferencing system in accordance with an embodiment of the present application;
fig. 5 is a block diagram of a video encoding apparatus according to an embodiment of the present application.
Detailed Description
The application will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method according to the first embodiment of the present application may be implemented in a mobile terminal, a computer terminal or a similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal of the video encoding method according to an embodiment of the present application. As shown in fig. 1, the mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a video encoding method in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a video encoding method running on the terminal is provided, fig. 2 is a flowchart of a video encoding method according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, determining a target coding rate of a target video;
step S204, determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and coding parameters, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels;
step S206, the target video is encoded according to the target encoding parameters.
The method is implemented by a video sending end, which may be a terminal in a video conference system, a master control in the video conference system, other processors, processing systems, servers, etc. having association with the video conference system, and other devices having similar processing capabilities.
In the above embodiment, the target coding rate of the target video is actually the desired coding rate determined in a predetermined manner, and the determination manner may be various, for example, may be obtained according to a network adaptive algorithm, including, but not limited to, BBR (Bottleneck Bandwidth and Round-trip time, bottleneck bandwidth and round trip propagation time), and may be determined in other manners, for example, determined based on the desired coding rate determined by a terminal in the same network, determined based on an indication of a receiving end, or determined based on factors such as self-computing power, a computer type, and the like.
In the above embodiment, the total code rate or the partial code rate may be divided into a plurality of sections, and a certain overlapping area exists between adjacent sections or becomes an intersecting section, where the size of the intersecting section may be set based on a specific situation, for example, determined based on the size of the divided sections, or determined based on the requirement of the video conference system on the picture quality, or determined based on the capability of the devices included in the video conference system, etc., fig. 3 is an exemplary coding rate division manner, and of course, in practical application, more or less coding rate sections may be divided, and in addition, the coding parameters corresponding to the respective coding rates may also be other, not limited to the correspondence shown in fig. 3.
In the above embodiment, encoding the target video according to the target encoding parameter may include configuring the target encoding parameter to an encoder, where the configured encoder is configured to encode the target video according to the target encoding parameter, and send the encoded target video to a receiving end.
By means of the embodiment, when video is required to be transmitted, the coding rate of the video is predicted first, and then the coding parameter corresponding to the predicted coding rate is determined, and it is required to be explained that in the embodiment of the application, the coding rate intervals corresponding to adjacent coding parameters are crossed in reality, that is, the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels, so that when the predicted coding rate is located in the crossed interval, the original coding parameter is not required to be changed, the problem that the coding parameters are changed back and forth due to the fact that the coding rate oscillates in a certain amplitude is avoided, the effective adjustment of the coding parameters is realized, the picture quality, the smoothness and the user watching experience of the coded video are guaranteed to the greatest extent, and the problem that the quality of the coded parameters cannot be effectively adjusted in the related technology is effectively solved, and the video is poor in user experience is caused.
In an alternative embodiment, before determining the target coding parameter corresponding to the target coding rate from the correspondence between the preconfigured coding rate interval and the coding parameter, the method further includes at least one of: configuring the corresponding relation; and acquiring the corresponding relation from a receiving end for receiving the coded video. In this embodiment, the corresponding relationship may be configured by the transmitting end, and the transmitting end may acquire the corresponding relationship from another device side, for example, the receiving end may acquire the corresponding relationship from another device, which is not limited herein. It should be further noted that, after the determining, the corresponding relationship may be further adjusted based on the actual situation, so as to adapt to the actual video conference requirement.
In an alternative embodiment, configuring the correspondence includes: configuring the correspondence based on at least one of the following configuration reference conditions: the coding parameters of adjacent levels contain the same or different coding formats; the coding parameters of adjacent levels contain the same or different resolutions; the coding parameters of adjacent levels contain the same or different frame rates. In this embodiment, the encoding parameters may include an encoding format, a resolution, and a frame rate, for example, the encoding parameters may be a format similar to h.264_720p_30 frames, further, the encoding parameters may be other formats, for example, 1080p_25 frames_h.265, etc., the present application is not limited to a specific format, and further, the encoding parameters may include more or less contents, for example, only resolution and frame rate, and the encoding formats may be in a fixed format.
In an alternative embodiment, in the correspondence, in a case that the first coding rate exceeds a predetermined code rate value, a first resolution included in a first coding parameter corresponding to the first coding rate is higher than a second resolution included in a second coding parameter, where the coding rate corresponding to the second coding parameter is a second coding rate, and the second coding rate is lower than the first coding rate. Generally, the higher the bit rate configured during video coding, the higher the video picture quality and the clearer the picture, but simply adjusting the bit rate can not obtain the best video coding effect under certain video coding format, for example, when the bit rate is continuously increased to a certain size under the condition of better network condition, the video picture quality change is not large when the bit stream is continuously increased, so that the network can not be fully utilized to improve the conference picture quality feeling. For example, when the code rate reaches a certain value (for example, greater than 2000kb, or greater than 2200kb, etc.), the code rate is encoded according to the current resolution, and the improvement of the code rate is not great for the improvement of the video picture quality, and at this time, the improvement of the resolution encoding can improve the picture quality, so that a relatively large resolution can be configured for a relatively high code rate, thereby effectively improving the picture quality.
In an alternative embodiment, after configuring the correspondence, the method further includes: and reducing the frame rate included in the third coding parameter corresponding to the third coding rate under the condition that the network performance is detected to be reduced. In this embodiment, there may be a case where the network environment is poor, and in this case, higher encoding parameters cannot be provided, so, under the condition that the resolution is unchanged, the frame rate of encoding is properly reduced, and the overall code stream size can be reduced while the video picture quality is unchanged, so that the low code stream can also be ensured to meet the basic video viewing experience. It should be noted that whether the frame rate needs to be adjusted may be determined based on the video content, for example, for a video with relatively low real-time requirements, such as a PPT presentation, or a picture presentation, or the like, the manner in this embodiment may be adopted.
In an optional embodiment, determining, from a correspondence between a preconfigured coding rate interval and a coding parameter, a target coding parameter corresponding to the target coding rate includes: comparing the target coding rate with the current coding rate; and under the condition that the comparison result is used for indicating that the target coding rate and the current coding rate are not in the same interval, determining a target coding parameter corresponding to the target coding rate from the corresponding relation between the pre-configured coding rate interval and the coding parameter. In this embodiment, the encoding parameters of the video may be updated continuously to adapt to the current network environment or video viewing requirement, and the update frequency may be flexibly set, for example, may be set to be updated every 5s, or updated every 10s, or updated according to other periods. The current coding rate may be the previously predicted coding rate, the coding rate obtained during the re-prediction may be different from the previously predicted coding rate, or may not be in the same interval, and the coding parameters may need to be adjusted correspondingly if the difference between the two is large. Naturally, there may be a case where the coding rate obtained at the time of the re-prediction is the same as the coding rate previously predicted, or the current coding parameters may be kept unchanged in the same section.
The application is illustrated below with reference to specific examples:
fig. 4 is a flowchart of a method for dynamic adjustment of video coding in a video conferencing system according to an embodiment of the application, as shown in fig. 4, comprising the steps of:
s001, dividing coding parameter levels corresponding to different code rate intervals;
in this step, the transmitting end may divide the coding parameter levels of the different code rate intervals, where there is a cross section between the lower limit of the nth coding parameter corresponding to the code rate interval and the upper limit of the n+1th coding parameter corresponding to the code rate interval. In an alternative embodiment, the size of the cross section is set according to the specific situation, and the present disclosure is not limited. In a possible embodiment, as shown in fig. 3, a coding parameter level diagram of different code rate intervals may be divided, where a first coding parameter corresponds to a lower limit of code rate and a second coding parameter corresponds to an upper limit of code rate, a second coding parameter corresponds to a lower limit of code rate and a third coding parameter corresponds to an upper limit of code rate, a third coding parameter corresponds to a lower limit of code rate and a fourth coding parameter corresponds to an upper limit of code rate, and a fourth coding parameter corresponds to a lower limit of code rate and a fifth coding parameter corresponds to an upper limit of code rate. In an alternative embodiment, the partitioning is not limited to 5 coding parameter levels, which the embodiments of the present application do not limit in number.
Furthermore, the different coding parameters may comprise the same coding format, possibly different resolutions, and possibly different frame rates. In an alternative embodiment, the encoding format, resolution and frame rate are set according to the specific situation, and the present disclosure is not limited. In a possible embodiment, as shown in fig. 3, a coding parameter level diagram of different code rate intervals is divided, where the first coding parameter is 1080p_30 frames, the second coding parameter is 1080p_25 frames, the third coding parameter is 720p_30 frames, the fourth coding parameter is 720p_25 frames, and the fifth coding parameter is 540p_25 frames, which are all encoded using the h.264 coding format. In a possible embodiment, other encoding formats may be used, such as h.265, and embodiments of the present application do not limit the video format.
In general, the higher the code rate configured in video coding, the higher the video picture quality and the clearer the picture.
When the code rate reaches a certain value, the code rate is continuously increased according to the current resolution, the increase of the code rate is not large for the video picture quality, and the picture quality can be improved by increasing the resolution code at the moment, for example, the picture quality of the H264_720P_30 frame code stream with the 2000kb code rate is encoded by a part of encoder, which is different from the picture quality of the H264_1080P_30 frame code stream with the 2000kb code rate, and the picture quality is improved by switching 720P to 1080P codes at the moment of continuously increasing the code rate.
When the fixed resolution coding is performed, the coding frame rate is properly reduced, the overall code stream size can be reduced while the picture quality is kept unchanged, for example, when the 2000kb code rate is performed, the video picture smoothness can also meet the video conference picture smoothness experience by reducing the coding frame rate to 25 frames, and the video code rate is reduced to about 1700 kb. In addition, when the network environment is extremely bad, the frame rate can be adjusted to 15 frames, 10 frames and other coding parameters according to specific services, and under the condition, the basic video watching experience of the conference can be ensured. Even for the demonstration flow in the video conference, if the demonstration content is ppt, the frame rate can be adjusted to be within 5 frames, and the basic function use of the demonstration flow can be ensured under the extremely bad network environment.
S002, obtaining the coding rate expected to be adjusted and the current coding parameter level;
in the step, the transmitting end can record the obtained coding parameter grade of the first statistical time point as the current coding parameter grade; in addition, the sending end obtains the expected coding rate of the second statistical time point; it should be noted that the two statistical time points may be flexibly set, and the interval between the two points is not limited. The expected coding rate is obtained by the transmitting end according to a network adaptive algorithm, including but not limited to BBR, and of course, the current coding parameter level may also be obtained by the transmitting end at a second statistical time point.
In order to facilitate the transmission of the code stream and the signaling between the sending end and the receiving end, a media channel and a signaling channel can be established between the sending end and the receiving end, wherein the media channel is used for sending the code stream to the receiving end, and the signaling channel is used for signaling message interaction; the transmitting end obtains the initial coding rate, searches the first coding parameter level which contains the initial coding rate in the corresponding code rate interval from the divided coding parameter levels, configures the encoder according to the coding parameter corresponding to the coding parameter level, and transmits the coding stream to the receiving end through the media channel; the initial coding rate can be obtained from the receiving end through a signaling channel by using a preset value of the sending end; the above-mentioned searching coding parameter grade can be according to from big grade to the little grade find the first and meet the code rate interval match, can also according to from little grade to the big grade find the first and meet the code rate interval match.
S003, adjusting coding parameters;
in this step, the transmitting end may compare the code rate interval corresponding to the current coding parameter level with the expected coding code rate, and adjust the coding parameters, including possible situations and processing methods:
if the expected coding rate is still in the code rate interval corresponding to the current coding parameter level, the current coding parameter is kept, and only the coding rate is adjusted;
if the expected coding rate is not in the coding rate interval corresponding to the current coding parameter level, selecting one coding parameter level which corresponds to the coding rate and meets the expected coding rate from other coding parameter levels, taking the corresponding coding parameter as an adjusted coding parameter, and simultaneously adjusting the coding rate;
if no code rate interval corresponding to the divided code parameter levels meets the expected code rate, selecting one code parameter level with the minimum difference value between the boundary value of the corresponding code rate interval and the expected code rate from the maximum or minimum parameter levels, taking the corresponding code parameter as the adjusted code parameter, and simultaneously adjusting the code rate.
S004, configuring an encoder and sending encoded data;
in this step, the transmitting end may configure the encoder after determining the coding parameters to be adjusted, so that the encoder starts to code and transmits the coded data to the receiving end.
Through the embodiment, the possibility of switching the coding resolution can be reduced when the expected adjustment code rate obtained for many times jumps up and down at the code rate corresponding to the two coding parameter intervals; after the code rate is required to be adjusted, if the code rate is required to be reduced, the mode of reducing only the frame rate in a part of the code rate intervals is provided, so that the resolution is unchanged while the code rate is reduced, and the picture quality is unchanged; in addition, after obtaining the desired adjustment code rate, the scheme in the embodiment of the application can not only adjust the code rate based on the current coding parameter, but also consider the quality of the coded picture, and uses the resolution of higher coding quality under the same code rate.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
In this embodiment, a video encoding device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and will not be described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of a video encoding apparatus according to an embodiment of the present application, as shown in fig. 5, the apparatus including:
a first determining module 52, configured to determine a target coding rate of a target video; the second determining module 54 is configured to determine a target coding parameter corresponding to the target coding rate from a pre-configured correspondence between a coding rate interval and a coding parameter, where, among two adjacent levels of coding parameters, a lower limit of the coding rate interval corresponding to a high level of coding parameter is lower than an upper limit of the coding rate interval corresponding to a low level of coding parameter; an encoding module 56 for encoding the target video according to the target encoding parameters.
In an alternative embodiment, the apparatus further comprises at least one of the following modules: the configuration module is used for configuring the corresponding relation before determining the target coding parameter corresponding to the target coding rate from the corresponding relation between the pre-configured coding rate interval and the coding parameter; the receiving module is used for acquiring the corresponding relation from a receiving end for receiving the coded video before determining the target coding parameter corresponding to the target coding rate from the corresponding relation between the pre-configured coding rate interval and the coding parameter.
In an alternative embodiment, the configuration module includes: a configuration unit configured to configure the correspondence relationship based on at least one of the following configuration reference conditions: the coding parameters of adjacent levels contain the same or different coding formats; the coding parameters of adjacent levels contain the same or different resolutions; the coding parameters of adjacent levels contain the same or different frame rates.
In an alternative embodiment, in the correspondence, in a case that the first coding rate exceeds a predetermined code rate value, a first resolution included in a first coding parameter corresponding to the first coding rate is higher than a second resolution included in a second coding parameter, where the coding rate corresponding to the second coding parameter is a second coding rate, and the second coding rate is lower than the first coding rate.
In an optional embodiment, the apparatus further includes an adjustment module, configured to reduce, after configuring the correspondence, a frame rate included in a third coding parameter corresponding to a third coding rate if a decrease in network performance is detected.
In an alternative embodiment, the second determining module 54 includes: the comparison unit is used for comparing the target coding rate with the current coding rate; the determining unit is used for determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a preconfigured coding rate interval and the coding parameter under the condition that the comparison result is used for indicating that the target coding rate and the current coding rate are not in the same interval.
In an alternative embodiment, the apparatus further comprises: the third determining module is used for determining a code rate interval closest to the target code rate from the corresponding relation after determining the target code rate of the target video and under the condition that the code rate interval to which the target code rate belongs does not exist in the corresponding relation; and the processing module is used for encoding the target video according to the encoding parameters corresponding to the encoding rate interval nearest to the target encoding rate.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
An embodiment of the application also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, determining a target coding rate of a target video;
s2, determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and coding parameters, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels;
s3, encoding the target video according to the target encoding parameters.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, determining a target coding rate of a target video;
s2, determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and coding parameters, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels;
s3, encoding the target video according to the target encoding parameters.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A video encoding method, comprising:
determining a target coding rate of a target video;
determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and coding parameters, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels;
and encoding the target video according to the target encoding parameters.
2. The method of claim 1, wherein before determining a target coding parameter corresponding to the target coding rate from a pre-configured correspondence between coding rate intervals and coding parameters, the method further comprises at least one of:
configuring the corresponding relation;
and acquiring the corresponding relation from a receiving end for receiving the coded video.
3. The method of claim 2, wherein configuring the correspondence comprises:
configuring the correspondence based on at least one of the following configuration reference conditions:
the coding parameters of adjacent levels contain the same or different coding formats;
the coding parameters of adjacent levels contain the same or different resolutions;
the coding parameters of adjacent levels contain the same or different frame rates.
4. A method according to claim 3, characterized in that in the correspondence, in case the first coding rate exceeds a predetermined code rate value, a first resolution included in a first coding parameter corresponding to the first coding rate is higher than a second resolution included in a second coding parameter, wherein the coding rate corresponding to the second coding parameter is a second coding rate, and the second coding rate is lower than the first coding rate.
5. The method of claim 2, wherein after configuring the correspondence, the method further comprises:
and reducing the frame rate included in the third coding parameter corresponding to the third coding rate under the condition that the network performance is detected to be reduced.
6. The method of claim 1, wherein determining a target coding parameter corresponding to the target coding rate from a pre-configured correspondence of coding rate intervals and coding parameters comprises:
comparing the target coding rate with the current coding rate;
and under the condition that the comparison result is used for indicating that the target coding rate and the current coding rate are not in the same interval, determining a target coding parameter corresponding to the target coding rate from the corresponding relation between the pre-configured coding rate interval and the coding parameter.
7. The method of claim 1, wherein after determining the target coding rate for the target video, the method further comprises:
under the condition that the corresponding relation is determined to have no coding rate interval to which the target coding rate belongs, determining the coding rate interval closest to the target coding rate from the corresponding relation;
and encoding the target video according to the encoding parameters corresponding to the encoding rate interval nearest to the target encoding rate.
8. A video encoding apparatus, comprising:
the first determining module is used for determining a target coding rate of the target video;
the second determining module is used for determining a target coding parameter corresponding to the target coding rate from the corresponding relation between a pre-configured coding rate interval and the coding parameter, wherein the lower limit of the coding rate interval corresponding to the coding parameter of a high level is lower than the upper limit of the coding rate interval corresponding to the coding parameter of a low level in the coding parameters of two adjacent levels;
and the encoding module is used for encoding the target video according to the target encoding parameters.
9. A storage medium having stored therein a computer program, wherein the program is executable by a terminal device or a computer to perform the method of any of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 7.
CN202311046994.6A 2023-08-16 2023-08-16 Video encoding method, video encoding device, storage medium and electronic device Pending CN117082245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311046994.6A CN117082245A (en) 2023-08-16 2023-08-16 Video encoding method, video encoding device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311046994.6A CN117082245A (en) 2023-08-16 2023-08-16 Video encoding method, video encoding device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117082245A true CN117082245A (en) 2023-11-17

Family

ID=88709249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311046994.6A Pending CN117082245A (en) 2023-08-16 2023-08-16 Video encoding method, video encoding device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN117082245A (en)

Similar Documents

Publication Publication Date Title
US10911506B2 (en) Methods for quality-aware adaptive streaming over hypertext transfer protocol and reporting quality of experience
US9137530B2 (en) Video communication method and system for dynamically modifying video encoding
US9398337B2 (en) Method and apparatus for assigning video bitrate in mobile communication system
EP3247121B1 (en) Streaming media data transmission method, client and server
CN112437122A (en) Communication method, communication device, computer readable medium and electronic equipment
KR102286957B1 (en) Method for distributing available bandwidth of a network amongst ongoing traffic sessions run by devices of the network, corresponding device
US11206298B2 (en) Method and system utilizing event specific priority in a network controlled uplink media transmission for a collaborative media production
CN111107382A (en) Data flow control method, device and system
CN113242436B (en) Live broadcast data processing method and device and electronic equipment
CN105556922A (en) Dash representations adaptations in network
CN111617466A (en) Method and device for determining coding format and method for realizing cloud game
WO2013165812A1 (en) Data transfer reduction during video broadcasts
CN112929704B (en) Data transmission method, device, electronic equipment and storage medium
AU2019201095A1 (en) System and method for automatic encoder adjustment based on transport data
EP3841722B1 (en) Method and system for utilizing network conditions feedback for improving quality of a collaborative media production
CN109660826B (en) Video transmission method, device, equipment and storage medium
CN112236986B (en) Network controlled upstream media delivery for collaborative media production in network capacity limited scenarios
CN111742530B (en) Method for streaming data, method for providing network assistance and user equipment
CN117082245A (en) Video encoding method, video encoding device, storage medium and electronic device
US11973814B2 (en) Method and controller for audio and/or video content delivery
EP4002793A1 (en) Method and controller for audio and/or video content delivery
Vandana et al. Quality of service enhancement for multimedia applications using scalable video coding
CN107135171B (en) Multimedia stream transmission method and media stream sending equipment
CN114650420A (en) Communication control method, apparatus, device, and computer-readable storage medium
CN117978789A (en) Data processing method and device, nonvolatile storage medium and electronic equipment

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