CN111954001A - Image coding method, device, coding end equipment and storage medium - Google Patents
Image coding method, device, coding end equipment and storage medium Download PDFInfo
- Publication number
- CN111954001A CN111954001A CN202010757267.0A CN202010757267A CN111954001A CN 111954001 A CN111954001 A CN 111954001A CN 202010757267 A CN202010757267 A CN 202010757267A CN 111954001 A CN111954001 A CN 111954001A
- Authority
- CN
- China
- Prior art keywords
- image
- frame
- transmission
- transmission delay
- determining
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention provides an image coding method, an image coding device, coding end equipment and a storage medium, relates to the technical field of image processing, and can solve the problem that the discarding of a coded image is randomly discarded along with the transmission delay of a network, so that a frame skipping occurs in a picture, and the watching experience of a user is poor. The specific technical scheme is as follows: acquiring a first image, wherein the first image is at least one frame of image to be sent currently; encoding the first image and sending the first image to a decoding end device; if it is determined that the first transmission delay of the first image in a preset time duration is greater than a preset time threshold, determining an image acquisition interval according to the first transmission delay; and acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image. The method and the device are used for ensuring that the second image acquired by the encoding end equipment is uniformly distributed, so that the watching experience of a user is ensured.
Description
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image encoding method and apparatus, an encoding end device, and a storage medium.
Background
In the process of image encoding and decoding, encoding end equipment usually performs image acquisition at a fixed frame rate, and all acquired images are encoded. After the coding is completed, the network transmission delay of the image is counted in the image transmission process, and whether the subsequent coded image needs to be discarded or not is judged according to the network transmission delay obtained by counting. The discarding of the image is completely determined according to the network transmission delay, and the network transmission delay is randomly changed under the influence of the network state, so that the discarding of the coded image is random in practice. Under the condition, frame loss is probably not generated in some time periods, and frame loss continuously occurs in some time periods, so that frame skipping occurs in the picture, and the watching experience of a user is poor.
Disclosure of Invention
The embodiment of the disclosure provides an image coding method and device, a coding end device and a storage medium, which can solve the problem that the discarding of a coded image is randomly discarded along with the network transmission delay, so that the frame skipping occurs in a picture, and the watching experience of a user is poor. The technical scheme is as follows:
according to a first aspect of embodiments of the present disclosure, there is provided an image encoding method, including:
acquiring a first image, wherein the first image is at least one frame of image to be sent currently;
encoding the first image and sending the first image to a decoding end device;
if it is determined that the first transmission delay of the first image in a preset time duration is greater than a preset time threshold, determining an image acquisition interval according to the first transmission delay;
and acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image.
The image coding method provided by the embodiment of the disclosure can acquire a first image, wherein the first image is at least one frame of image to be currently sent; encoding the first image and sending the first image to a decoding end device; if the first transmission delay of the first image in the preset time length is larger than the preset time threshold, determining an image acquisition interval according to the first transmission delay; and acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image, and then the acquired second image is encoded, so that the encoding frame rate of the acquired second image can be adjusted, and the second image acquired by encoding end equipment can be uniformly distributed, thereby ensuring the viewing experience of a user. The image coding method provided by the embodiment can perform frame dropping processing on the second image which is not acquired before coding, thereby reducing the transmission delay of the second image and also reducing the video blocking condition of the second image; moreover, frame dropping processing is carried out before encoding, all second images do not need to be acquired, and all second images do not need to be encoded, so that the load of encoding operation of encoding end equipment is reduced.
In one embodiment, the determining the first transmission delay of the first image within a preset time length includes:
determining the transmission time delay of each frame of image in the first image within a preset time length;
determining the sum of the transmission delays of all the images in the first image within the preset time according to the transmission delay of each frame of image;
determining the average transmission time delay of each frame of image in the first image according to the frame number of the first image and the sum value;
and taking the average transmission delay as the first transmission delay.
The method comprises the steps of determining the sum of transmission time delays of all images in a first image in a preset time length, and determining the average transmission time delay of each frame of image in the first image according to the number of frames of the first image and the sum, so that the first transmission time delay of the first image can be accurately determined.
In one embodiment, the determining the transmission delay of each frame of the first image within a preset time period includes:
sending the each frame of image to the decoding end equipment and generating a first time stamp of the each frame of image;
receiving a second timestamp of each frame of image sent by the decoding end device within the preset time length, wherein the second timestamp is generated when the decoding end device receives each frame of image;
and taking the time difference value of the second time stamp and the first time stamp as the transmission time delay of each frame of image.
By calculating the time difference between the second time stamp and the first time stamp, the transmission delay of each frame of image can be accurately determined.
In one embodiment, the acquiring the first image comprises:
acquiring the first image according to a preset image acquisition frame rate;
the determining an image acquisition interval according to the first transmission delay comprises:
determining an image transmission frame rate corresponding to the first transmission delay;
and determining the image acquisition interval according to the preset image acquisition frame rate and the image transmission frame rate.
By determining the image acquisition interval according to the preset image acquisition frame rate and the image transmission frame rate, the second image can be ensured to be uniformly acquired according to the image acquisition interval, and the watching experience of a user is further ensured.
In one embodiment, after acquiring the second image according to the image acquisition interval, the method further comprises:
encoding the second image and sending the second image to decoding end equipment;
if it is determined that the second transmission delay of the second image in the preset time duration is smaller than the preset time threshold, acquiring each frame of third image and coding the each frame of third image, wherein the third image is at least one frame of image behind the second image.
When the second transmission delay of the second image in the preset time duration is determined to be smaller than the preset time threshold, each frame of third image is obtained and is coded, so that the transmission delay of the third image can be effectively reduced, and the video blocking condition of the third image is avoided.
According to a second aspect of the embodiments of the present disclosure, there is provided an image encoding device including:
the first image acquisition module is used for acquiring a first image, wherein the first image is at least one frame of image to be sent currently;
the first image sending module is used for coding the first image and sending the first image to decoding end equipment;
the image acquisition interval determining module is used for determining an image acquisition interval according to a first transmission delay of the first image in a preset time length if the first transmission delay is larger than a preset time threshold;
and the second image acquisition module is used for acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image.
In one embodiment, the image acquisition interval determination module is to:
determining the transmission time delay of each frame of image in the first image within a preset time length;
determining the sum of the transmission delays of all the images in the first image within the preset time according to the transmission delay of each frame of image;
determining the average transmission time delay of each frame of image in the first image according to the frame number of the first image and the sum value;
and taking the average transmission delay as the first transmission delay.
In one embodiment, the image acquisition interval determination module is to:
sending the each frame of image to the decoding end equipment and generating a first time stamp of the each frame of image;
receiving a second timestamp of each frame of image sent by the decoding end device within the preset time length, wherein the second timestamp is generated when the decoding end device receives each frame of image;
and taking the time difference value of the second time stamp and the first time stamp as the transmission time delay of each frame of image.
In one embodiment, the first image acquisition module is to:
acquiring the first image according to a preset image acquisition frame rate;
the image acquisition interval determination module is to:
determining an image transmission frame rate corresponding to the first transmission delay;
and determining the image acquisition interval according to the preset image acquisition frame rate and the image transmission frame rate.
In one embodiment, the apparatus further comprises:
the second image sending module is used for coding the second image and sending the second image to decoding end equipment;
and the third image acquisition module is used for acquiring each frame of third image and coding each frame of third image if it is determined that the second transmission delay of the second image in the preset time duration is smaller than the preset time threshold, wherein the third image is at least one frame of image behind the second image.
According to a third aspect of the embodiments of the present disclosure, there is provided an encoding end device, the encoding end device comprising a processor and a memory, the memory having at least one computer instruction stored therein, the instruction being loaded by the processor and executing the steps executed in the image encoding method according to any one of the first aspect.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein at least one computer instruction, which is loaded and executed by a processor to implement the steps performed in the image encoding method of any one of the first aspects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a diagram illustrating a frame loss situation of a coded image provided by the prior art;
fig. 2 is a first flowchart of an image encoding method provided by an embodiment of the present disclosure;
fig. 3 is a flowchart ii of an image encoding method provided in the embodiment of the present disclosure;
fig. 4 is a flowchart of an image interval determining method provided by an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an image acquisition method provided by an embodiment of the present disclosure;
FIG. 6 is a first block diagram of an image encoding apparatus according to an embodiment of the present disclosure;
fig. 7 is a second structural diagram of an image encoding device according to an embodiment of the present disclosure;
fig. 8 is a structural diagram of an encoding-side device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic diagram of a frame loss situation of an encoded image provided in the prior art. As shown in fig. 1, the frames 1 to 15 are 15 frames of images obtained after being encoded by the encoding end device, and for the 15 frames of images, the frames 1 to 5, the frames 8 and the frames 15 with larger transmission delay are discarded according to the calculated transmission delay of each frame of image.
It can be seen that the discarding of the coded pictures is irregular, and the discarding is performed as long as the transmission delay of the pictures is large. Therefore, in the whole image, the number of images transmitted in some periods is large (frame loss is small or none), and the number of images transmitted in some periods is small (frame loss is large), in this case, especially in the periods with large frame loss or frequent frame loss, the user feels that the picture jumps, and the user experience is very poor.
The inventor notices the problem and proposes an image coding method, which specifically comprises the following steps:
fig. 2 is a first flowchart of an image encoding method provided in an embodiment of the present disclosure, where the method is applied to an encoding-side device. As shown in fig. 2, the method includes:
s201, acquiring a first image, wherein the first image is at least one frame of image to be sent currently.
Illustratively, the first image is acquired at a preset image acquisition frame rate. For example, in the present embodiment, the preset image acquisition frame rate is P, that is, P frames of the first image are acquired per second, where P is an integer greater than or equal to 1.
S202, encoding the first image and sending the first image to a decoding end device;
s203, if it is determined that the first transmission delay of the first image in the preset time duration is greater than the preset time threshold, determining an image acquisition interval according to the first transmission delay.
Further, after the first image is obtained, the first image is encoded and sent to a decoding end device, and whether a first transmission delay of the first image in a preset time duration is greater than a preset time threshold is determined. For example, the preset time period may be set as needed, for example, to 1 minute, 30 seconds, 20 seconds, 10 seconds, and the like.
The preset time threshold is a preset value, and may be set empirically, for example, it may be set to 100ms, 90ms, 80ms, etc., or may be set to another value. The higher the set time threshold value is, the higher the tolerance to the time delay is, so the setting of the preset time threshold value may depend on the usage scenario.
How to determine the first image determines the first transmission delay within the preset time period is described below.
Exemplarily, determining the transmission delay of each frame of image in the first image within a preset time length, and determining the sum of the transmission delays of all images in the first image within the preset time length according to the transmission delay of each frame of image; and determining the average transmission delay of each frame of image in the first image according to the frame number of the first image and the sum value, and taking the average transmission delay as the first transmission delay.
For example, the first image includes 5 frames of images, that is, the number of frames of the first image is 5, and the transmission delays of each frame of image in the first image are 100ms, 120ms, 90ms, 110ms and 80ms, respectively, so that the sum of the transmission delays of all images in the first image in the preset time duration is 100ms +120ms +90ms +110ms +80ms, that is, the sum is 500ms, the average transmission delay of each frame of image in the first image is 500/5ms, that is, 100ms, and the first transmission delay is 100 ms.
How to determine the transmission delay of each frame of image is explained below.
Illustratively, the method includes sending each frame of image to the decoding end device and generating a first time stamp of each frame of image; receiving a second time stamp of each frame of image sent by the decoding end equipment within the preset time length, wherein the second time stamp is generated when the decoding end equipment receives each frame of image; and taking the time difference value of the second time stamp and the first time stamp as the transmission time delay of each frame of image.
For example, RtxA second time stamp, St, indicating that the decoding device receives the x-th frame of the first imagexRepresents a first timestamp generated by the encoding side equipment when the x frame image in the first image is transmitted, then ^ tx=Rtx-StxWherein ^ txIs the transmission delay of the x frame image in the first image.
Further, if the first image comprises N frames of images, the first transmission delay of the first image in a preset time duration is TAverage=(▽t1+....+▽tN) N; wherein, TAverageThe average delay of each frame of the first image is the first transmission delay.
Illustratively, if it is determined that a first transmission delay of the first image within a preset time period is greater than a preset time threshold, the image acquisition interval is determined according to the first transmission delay.
How to determine the image acquisition interval based on the first time delay is explained below.
Exemplarily, determining an image transmission frame rate corresponding to the first transmission delay; and determining the image acquisition interval according to the image acquisition frame rate and the image transmission frame rate.
Illustratively, the image acquisition frame rate refers to the number of frames per second of the first image acquired by the encoding end device, and is generally set to a fixed value, such as 60, although other values may also be set.
The image transmission frame rate refers to the number of frames for transmitting the first image per second, and the transmission frame rate corresponding to the first transmission delay is a set empirical value, and since the image transmission frame rates in the network environments corresponding to the first transmission delays are different, the numerical value is used to identify the image transmission frame rate in the network environment corresponding to the current first transmission delay. The value may be obtained by calculating a certain amount of experimental data in a statistical manner, for example, during the image transmission process, continuously counting the first transmission delay and the change of the image transmission frame rate within a plurality of preset durations, counting the image transmission frame rates under various first transmission delay conditions, and performing weighted average on the obtained plurality of image transmission frame rates to obtain the final image transmission frame rate. If the final image transmission frame rate is determined to be Q and the image acquisition interval is P, the image acquisition interval M is [ P/Q ]; or, M ═ P/Q ] + 1; alternatively, the result of the calculation of M ═ P/Q is rounded. The image obtaining interval M means that a frame of second image is obtained every M frames of images, and the second image is at least one frame of image after the first image.
And S204, acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image.
Illustratively, after the image acquisition interval is determined, a second image is acquired at the image acquisition interval. For example, the image acquisition interval is 2, i.e., one frame of the second image is acquired every 2 frames of the image. And acquiring a second image of one frame every two frames of images, namely acquiring the frame images which are not acquired equivalently to frame loss.
Further, after the second image is obtained, the second image is coded and sent to the decoding end device; and if the second transmission delay of the second image in the preset time duration is determined to be smaller than the preset time threshold, acquiring each frame of third image and coding each frame of third image, wherein the third image is at least one frame of image behind the second image. The method for determining the second transmission delay of the second image in the preset time duration is similar to the method for determining the first transmission delay of the first image in the preset time duration, and details are not repeated here.
The image coding method provided by the embodiment of the disclosure can acquire a first image, wherein the first image is at least one frame of image to be currently sent; encoding the first image and sending the first image to a decoding end device; if the first transmission delay of the first image in the preset time length is larger than the preset time threshold, determining an image acquisition interval according to the first transmission delay; and acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image, and further encoding the acquired second image, so that the encoding frame rate of the acquired second image can be adjusted, and the second image acquired by encoding end equipment can be uniformly distributed, thereby ensuring the viewing experience of a user. The image coding method provided by the embodiment can perform frame dropping processing on the second image which is not acquired before coding, thereby reducing the transmission delay of the second image and also reducing the video blocking condition of the second image; moreover, frame dropping processing is carried out before encoding, all second images do not need to be acquired, and all second images do not need to be encoded, so that the load of encoding operation of encoding end equipment is reduced.
The following describes the image encoding method provided by the embodiments of the present disclosure in further detail with reference to the embodiments of fig. 3 to 5. Fig. 3 is a flowchart ii of an image encoding method according to an embodiment of the present disclosure. As shown in fig. 3, the method includes:
s301, in the image transmission process, counting the average value of network transmission time delay (namely, first transmission time delay) of a first image transmitted within a preset time length in real time;
the preset time period may be set as required, for example, set to 1 minute, 30 seconds, 20 seconds, 10 seconds, etc., that is, the average value tmaver of the network transmission delays of the N frames of the first images transmitted in the latest period is counted, and the calculation formula is as follows:
Taverage=(▽t1+....+▽tN)/N;
Wherein ^ txNetwork transmission delay of the first image of the x frame; v tx=Rtx-StxWherein Rt isxTime stamp, St, representing the transmission of the first image of the x-th frame to the receiving endxWhich represents the timestamp of the first image of the xth frame when it was transmitted at the transmitting end.
S302, judging whether the average value of the network transmission delay is larger than a preset threshold value or not, if so, turning to S303, and if not, turning to S301 to continue to count the average value of the network transmission delay;
in this step, the statistical average value of the network transmission delay is compared with a preset time threshold, where the preset time threshold is a preset value and can be set according to experience, for example, 100ms, 90ms, 80ms, and the like, and can also be set to other values. The higher the set threshold value is, the higher the tolerance to the delay is, and thus the setting of the threshold value may depend on the usage scenario.
S303, determining an image interval (namely an image acquisition interval) for acquiring a second image according to the determined network transmission delay average value;
specifically, the image interval for acquiring the second image refers to an interval for acquiring one frame of the second image every how many frames of the second image are acquired. That is, the encoding-side apparatus acquires the second image at the determined image interval.
How to determine the image interval is described below with reference to the embodiment of fig. 4. Fig. 4 is a flowchart of an image interval determining method provided by an embodiment of the present disclosure. As shown in fig. 4, the method includes:
s401, determining a frame rate P (namely a preset image acquisition frame rate) for acquiring a first image and a transmission frame rate Q (namely an image transmission frame rate) corresponding to a current network transmission delay average value;
specifically, the frame rate P of the first image refers to the number of frames of the first image acquired per second, and is generally set to a fixed value, such as 60, although other values may be set.
The frame rate of transmission generally refers to the number of images of the first image transmitted per second, and the frame rate of transmission corresponding to the average value of the current network transmission delay is a set empirical value. The value can be obtained by calculating a certain amount of experimental data in a statistical manner, for example, in the network image transmission process, the variation conditions of the network transmission delay average value and the transmission frame rate within a period of time are continuously observed, the transmission frame rates under various network transmission delay average values are counted, and after the obtained transmission frame rates are weighted and averaged, the obtained result is the transmission frame rate corresponding to the current network transmission delay average value. Based on the method, the transmission frame rate corresponding to each network transmission delay average value when the transmission frame rate is larger than the preset time threshold value can be obtained, after the data are obtained, the transmission frame rates corresponding to different network transmission delay average values can be recorded locally in a data table mode, and when needed, the data are directly read from the local.
S402, determining an image interval M for acquiring a second image according to the frame rate P and the transmission frame rate Q for acquiring the first image.
Illustratively, the image interval M at which the second image is acquired may be calculated according to the following calculation formula:
m ═ P/Q ]; alternatively, the first and second electrodes may be,
m ═ P/Q ] + 1; alternatively, the first and second electrodes may be,
the result of the calculation of M ═ P/Q is rounded.
And S304, acquiring a second image according to the determined image interval.
The step of acquiring the second image according to the determined image interval M is: taking a second image every M frames of images;
assuming that the determined image interval is 2, that is, taking a second image of every 2 frames of images, the manner of obtaining the second image can refer to fig. 5. Fig. 5 is a schematic diagram of an image acquisition method according to an embodiment of the present disclosure. As shown in fig. 5, the second image of one frame is taken every other two frames, and so on, and in fig. 5, the second image that is not taken corresponds to frame loss. And acquiring the second image according to the rule until the average value of the network transmission delay of the second image in a period of time is less than or equal to a preset threshold, and processing the acquired third image according to the following mode, namely: and acquiring a third image of each frame, and coding and transmitting the third image.
In summary, the technical solution provided by the present invention has at least the following advantages:
1) the frame rate (also called coding frame rate) of the obtained second image can be adjusted according to the calculated network transmission delay average value of the first image in the preset time length, so that the purpose of frame loss processing on the second image before coding is achieved, the transmission delay of the second image is reduced, and the video blocking condition of the second image is also reduced; in addition, in the method, the second image is subjected to frame loss processing before encoding, so that all the second images do not need to be acquired, and all the second images do not need to be encoded, thereby reducing the load of encoding operation of encoding end equipment.
2) The specific way of adjusting the encoding frame rate of the second image in the invention is as follows: and acquiring a second image according to the determined image interval, and encoding the acquired second image, so that the encoding frame rate of the second image can be adjusted, and the acquired second image can be uniformly distributed, thereby ensuring the watching experience of a user.
Based on the image encoding method described in the corresponding embodiments above, the following are embodiments of the apparatus of the present disclosure, which may be used to perform the embodiments of the method of the present disclosure. Fig. 6 is a first structural diagram of an image encoding device according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus 60 includes:
a first image obtaining module 601, configured to obtain a first image, where the first image is at least one frame of image to be currently sent;
a first image sending module 602, configured to encode the first image and send the first image to a decoding-end device;
an image acquisition interval determining module 603, configured to determine an image acquisition interval according to a first transmission delay of the first image within a preset time period if it is determined that the first transmission delay is greater than a preset time threshold;
a second image obtaining module 604, configured to obtain a second image according to the image obtaining interval, where the second image is at least one frame of image after the first image.
In one embodiment, the image acquisition interval determination module 603 is configured to:
determining the transmission time delay of each frame of image in the first image within a preset time length;
determining the sum of the transmission delays of all the images in the first image within the preset time according to the transmission delay of each frame of image;
determining the average transmission time delay of each frame of image in the first image according to the frame number of the first image and the sum value;
and taking the average transmission delay as the first transmission delay.
In one embodiment, the image acquisition interval determination module 603 is configured to:
sending the each frame of image to the decoding end equipment and generating a first time stamp of the each frame of image;
receiving a second timestamp of each frame of image sent by the decoding end device within the preset time length, wherein the second timestamp is generated when the decoding end device receives each frame of image;
and taking the time difference value of the second time stamp and the first time stamp as the transmission time delay of each frame of image.
In one embodiment, the first image acquisition module 601 is configured to:
acquiring the first image according to a preset image acquisition frame rate;
the image acquisition interval determination module 603 is configured to:
determining an image transmission frame rate corresponding to the first transmission delay;
and determining the image acquisition interval according to the preset image acquisition frame rate and the image transmission frame rate.
In one embodiment, as shown in fig. 7, the apparatus 60 further comprises:
a second image sending module 605, configured to encode the second image and send the second image to a decoding-end device;
a third image obtaining module 606, configured to obtain each frame of third image and encode the each frame of third image if it is determined that a second transmission delay of the second image in the preset time duration is smaller than the preset time threshold, where the third image is at least one frame of image after the second image.
The implementation process and technical effects of the image encoding device provided in the embodiment of the present disclosure can be seen in the embodiments of fig. 2 to 4, which are not described herein again.
Fig. 8 is a structural diagram of an encoding-side device according to an embodiment of the present disclosure, and as shown in fig. 8, the encoding-side device 80 includes:
a processor 801 and a memory 802, the memory 802 having stored therein at least one computer instruction, the instruction being loaded and executed by the processor 801 to implement the image encoding method described in the above method embodiments.
Based on the image encoding method described in the embodiments corresponding to fig. 2 to fig. 4, the embodiments of the present disclosure further provide a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the image encoding method described in the embodiment corresponding to fig. 2 to 4, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (10)
1. An image encoding method, comprising:
acquiring a first image, wherein the first image is at least one frame of image to be sent currently;
encoding the first image and sending the first image to a decoding end device;
if it is determined that the first transmission delay of the first image in a preset time duration is greater than a preset time threshold, determining an image acquisition interval according to the first transmission delay;
and acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image.
2. The method of claim 1, wherein the determining the first transmission delay of the first image within a preset time duration comprises:
determining the transmission time delay of each frame of image in the first image within a preset time length;
determining the sum of the transmission delays of all the images in the first image within the preset time according to the transmission delay of each frame of image;
determining the average transmission time delay of each frame of image in the first image according to the frame number of the first image and the sum value;
and taking the average transmission delay as the first transmission delay.
3. The method of claim 2, wherein the determining the transmission delay of each frame of the first image within a preset time period comprises:
sending the each frame of image to the decoding end equipment and generating a first time stamp of the each frame of image;
receiving a second timestamp of each frame of image sent by the decoding end device within the preset time length, wherein the second timestamp is generated when the decoding end device receives each frame of image;
and taking the time difference value of the second time stamp and the first time stamp as the transmission time delay of each frame of image.
4. The method of claim 1, wherein the acquiring the first image comprises:
acquiring the first image according to a preset image acquisition frame rate;
the determining an image acquisition interval according to the first transmission delay comprises:
determining an image transmission frame rate corresponding to the first transmission delay;
and determining the image acquisition interval according to the preset image acquisition frame rate and the image transmission frame rate.
5. The method of claim 1, wherein after acquiring the second image at the image acquisition interval, the method further comprises:
encoding the second image and sending the second image to decoding end equipment;
if it is determined that the second transmission delay of the second image in the preset time duration is smaller than the preset time threshold, acquiring each frame of third image and coding the each frame of third image, wherein the third image is at least one frame of image behind the second image.
6. An image encoding device characterized by comprising:
the first image acquisition module is used for acquiring a first image, wherein the first image is at least one frame of image to be sent currently;
the first image sending module is used for coding the first image and sending the first image to decoding end equipment;
the image acquisition interval determining module is used for determining an image acquisition interval according to a first transmission delay of the first image in a preset time length if the first transmission delay is larger than a preset time threshold;
and the second image acquisition module is used for acquiring a second image according to the image acquisition interval, wherein the second image is at least one frame of image behind the first image.
7. The apparatus of claim 6, wherein the image acquisition interval determination module is configured to:
determining the transmission time delay of each frame of image in the first image within a preset time length;
determining the sum of the transmission delays of all the images in the first image within the preset time according to the transmission delay of each frame of image;
determining the average transmission time delay of each frame of image in the first image according to the frame number of the first image and the sum value;
and taking the average transmission delay as the first transmission delay.
8. The apparatus of claim 7, wherein the image acquisition interval determination module is configured to:
sending the each frame of image to the decoding end equipment and generating a first time stamp of the each frame of image;
receiving a second timestamp of each frame of image sent by the decoding end device within the preset time length, wherein the second timestamp is generated when the decoding end device receives each frame of image;
and taking the time difference value of the second time stamp and the first time stamp as the transmission time delay of each frame of image.
9. An encoding-side device, comprising a processor and a memory, wherein the memory stores at least one computer instruction, and the instruction is loaded and executed by the processor to implement the steps executed in the image encoding method according to any one of claims 1 to 5.
10. A computer-readable storage medium having stored thereon at least one computer instruction, which is loaded and executed by a processor to perform the steps performed in the image encoding method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010757267.0A CN111954001A (en) | 2020-07-31 | 2020-07-31 | Image coding method, device, coding end equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010757267.0A CN111954001A (en) | 2020-07-31 | 2020-07-31 | Image coding method, device, coding end equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111954001A true CN111954001A (en) | 2020-11-17 |
Family
ID=73338969
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010757267.0A Pending CN111954001A (en) | 2020-07-31 | 2020-07-31 | Image coding method, device, coding end equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111954001A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113489745A (en) * | 2021-07-29 | 2021-10-08 | 百果园技术(新加坡)有限公司 | Video data transmitting method, device, equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043618A (en) * | 2006-03-24 | 2007-09-26 | 腾讯科技(深圳)有限公司 | Apparatus and method for controlling frame rate in multi-way video communication |
KR20160109771A (en) * | 2015-03-13 | 2016-09-21 | 주식회사 유니시스 | Method and system for processing variable bit rate multiplexing data in mpeg ts transport frame |
CN106231353A (en) * | 2016-07-22 | 2016-12-14 | 北京小米移动软件有限公司 | VoIP communication means and device |
CN109729437A (en) * | 2017-10-30 | 2019-05-07 | 中国电信股份有限公司 | Streaming media self-adapting transmission method, terminal and system |
CN110381316A (en) * | 2019-07-17 | 2019-10-25 | 腾讯科技(深圳)有限公司 | A kind of method for controlling video transmission, device, equipment and storage medium |
US20200045096A1 (en) * | 2018-08-02 | 2020-02-06 | Canon Kabushiki Kaisha | Video data transmission apparatus, video data transmitting method, and storage medium |
CN111083431A (en) * | 2018-10-18 | 2020-04-28 | 北京松果电子有限公司 | Method, device, medium and electronic device for adjusting image acquisition time |
CN111147893A (en) * | 2018-11-02 | 2020-05-12 | 华为技术有限公司 | Video self-adaption method, related equipment and storage medium |
-
2020
- 2020-07-31 CN CN202010757267.0A patent/CN111954001A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101043618A (en) * | 2006-03-24 | 2007-09-26 | 腾讯科技(深圳)有限公司 | Apparatus and method for controlling frame rate in multi-way video communication |
KR20160109771A (en) * | 2015-03-13 | 2016-09-21 | 주식회사 유니시스 | Method and system for processing variable bit rate multiplexing data in mpeg ts transport frame |
CN106231353A (en) * | 2016-07-22 | 2016-12-14 | 北京小米移动软件有限公司 | VoIP communication means and device |
CN109729437A (en) * | 2017-10-30 | 2019-05-07 | 中国电信股份有限公司 | Streaming media self-adapting transmission method, terminal and system |
US20200045096A1 (en) * | 2018-08-02 | 2020-02-06 | Canon Kabushiki Kaisha | Video data transmission apparatus, video data transmitting method, and storage medium |
CN111083431A (en) * | 2018-10-18 | 2020-04-28 | 北京松果电子有限公司 | Method, device, medium and electronic device for adjusting image acquisition time |
CN111147893A (en) * | 2018-11-02 | 2020-05-12 | 华为技术有限公司 | Video self-adaption method, related equipment and storage medium |
CN110381316A (en) * | 2019-07-17 | 2019-10-25 | 腾讯科技(深圳)有限公司 | A kind of method for controlling video transmission, device, equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
Y.L. LIANG, ET AL: "Low-latency video transmission over lossy packet networks using rate-distortion optimized reference picture selection", 《PROCEEDINGS. INTERNATIONAL CONFERENCE ON IMAGE PROCESSING》 * |
荆晶: "无线视频监控中的帧率控制设计与实现", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113489745A (en) * | 2021-07-29 | 2021-10-08 | 百果园技术(新加坡)有限公司 | Video data transmitting method, device, equipment and storage medium |
CN113489745B (en) * | 2021-07-29 | 2024-04-05 | 百果园技术(新加坡)有限公司 | Video data transmission method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5768533A (en) | Video coding using segmented frames and retransmission to overcome channel errors | |
EP3606050A1 (en) | Video frame coding method, terminal, and storage medium | |
CN110708570B (en) | Video coding rate determining method, device, equipment and storage medium | |
JP2015528264A (en) | Method and apparatus for obtaining video encoding compression quality | |
CN113037697B (en) | Video frame processing method and device, electronic equipment and readable storage medium | |
CN109040830B (en) | Live broadcast pause prediction method, switching method and device | |
CN112087627A (en) | Image coding control method, device, equipment and storage medium | |
CN111949237A (en) | Image display method and device | |
EP3522534A1 (en) | Video code rate processing method and apparatus, storage medium and electronic device | |
EP3595304A1 (en) | Code rate allocation method, device, and storage medium | |
CN113411218B (en) | Method and device for evaluating instant messaging quality and electronic equipment | |
CN111954001A (en) | Image coding method, device, coding end equipment and storage medium | |
CN106454348B (en) | A kind of video coding-decoding method and device | |
CN111225254A (en) | Video transmission method, device, terminal equipment and storage medium | |
DE112009002346T5 (en) | Processing video data in devices with limited resources | |
EP2908522B1 (en) | Method and device for evaluating video freeze distortion degree | |
US20120106632A1 (en) | Method and apparatus for error resilient long term referencing block refresh | |
CN107566795A (en) | A kind of method, apparatus and system for improving real-time pictures fluency | |
CN113766261A (en) | Method and device for determining pre-pulling duration, electronic equipment and storage medium | |
CN111654699B (en) | Image transmission method and device | |
CN114513651A (en) | Video equipment key frame collision detection method, data transmission method and related device | |
CN110620939B (en) | Network state determination method and device, electronic equipment and storage medium | |
CN116962613A (en) | Data transmission method and device, computer equipment and storage medium | |
CN112153413B (en) | Method and server for processing screen splash in one-screen broadcast | |
CN113573142A (en) | Resolution adjustment method and device |
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 |