CN108900863B - Video image generation method and device and electronic equipment - Google Patents

Video image generation method and device and electronic equipment Download PDF

Info

Publication number
CN108900863B
CN108900863B CN201810737727.6A CN201810737727A CN108900863B CN 108900863 B CN108900863 B CN 108900863B CN 201810737727 A CN201810737727 A CN 201810737727A CN 108900863 B CN108900863 B CN 108900863B
Authority
CN
China
Prior art keywords
video
video sequence
sequence length
idr frame
retransmission times
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810737727.6A
Other languages
Chinese (zh)
Other versions
CN108900863A (en
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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201810737727.6A priority Critical patent/CN108900863B/en
Publication of CN108900863A publication Critical patent/CN108900863A/en
Application granted granted Critical
Publication of CN108900863B publication Critical patent/CN108900863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving MPEG packets from an IP network
    • H04N21/4383Accessing a communication channel
    • H04N21/4384Accessing a communication channel involving operations to reduce the access time, e.g. fast-tuning for reducing channel switching latency

Abstract

The invention discloses a method and a device for generating a video image and electronic equipment, wherein the method comprises the following steps: acquiring the retransmission times of the instantaneous decoding refreshing IDR frame in a preset time period; the length of the video sequence of the video image to be transmitted is determined based on the retransmission times of the IDR frame, the length of the video sequence of the video image to be transmitted can be adjusted based on the retransmission times of the IDR frame due to the fact that the retransmission times of the IDR frame are considered when the length of the video sequence of the video image to be transmitted is determined, the length of the video sequence of the video image to be transmitted can be shortened when the retransmission times of the IDR frame are determined to be large, long-time waiting caused by the fact that a user cannot receive the video of a user at a video transmitting end under the condition is avoided, and user experience is improved.

Description

Video image generation method and device and electronic equipment
Technical Field
The invention relates to the technical field of video calls, in particular to a method and a device for generating a video image and electronic equipment.
Background
Currently, an IP Multimedia Subsystem (IMS) video call uses an H264 coding Protocol to complete encoding and decoding of a video stream, and a video frame is often packaged in a Real-time Transport Protocol (RTP) data packet to perform Real-time transmission of the video stream. In the prior art, a first frame in a video sequence is often an Instantaneous Decoding Refresh (IDR) frame, and the IDR frame is used for Decoding resynchronization.
In the prior art, a video sequence generates an IDR frame, and a video sequence is often a series of data streams generated by encoding a picture with small content difference. When the motion change of the video acquisition object is less, the corresponding video sequence can be very long (because the content of the image picture is very small when the motion change of the video acquisition object is less); when the motion of the video capture object changes more, the corresponding video sequence is relatively short.
However, in the prior art, an IDR frame is often lost, and after the IDR frame is lost, the video receiving end cannot decode the subsequent video frame, so that the image of the video sequence cannot be decoded, and thus the video picture at the video receiving end is in a stuck or even black screen state, and the state can be maintained until the video receiving end receives a new IDR frame again. If the motion change of the video acquisition object (i.e., the user at the video sending end) is very small at this time, and the corresponding video sequence may be very long, the user at the video receiving end may not receive the video of the user at the video sending end for a long time, thereby causing a problem of poor user experience.
Disclosure of Invention
The embodiment of the invention provides a method and a device for generating a video image and electronic equipment, and aims to solve the problem that in the prior art, a user at a video receiving end often cannot receive a video of a user at a video sending end for a long time, so that the user experience is poor.
The embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for generating a video image, where the method includes:
acquiring the retransmission times of the IDR instant decoding refresh frame in a preset time period;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
Further, determining the video sequence length of the video image to be transmitted based on the number of retransmissions of the IDR frame comprises:
acquiring the motion change level of a video acquisition object;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame and the motion change level of the video acquisition object.
Further, determining the video sequence length of the video image to be transmitted based on the number of retransmissions of the IDR frame and the motion change level of the video capture object, including:
determining a first video sequence length corresponding to the retransmission times of the IDR frame from a first preset corresponding relation, wherein the first preset corresponding relation is the corresponding relation between the retransmission times of the IDR frame and the video sequence length;
determining a second video sequence length corresponding to the motion change level of the video acquisition object from a second preset corresponding relation, wherein the second preset corresponding relation is the corresponding relation between the motion change level of the video acquisition object and the video sequence length;
determining a length of the video sequence based on the first video sequence length and the second video sequence length.
Further, determining a video sequence length of the video image to be transmitted based on the first video sequence length and the second video sequence length comprises:
determining a video sequence length with a smaller value from the first video sequence length and the second video sequence length;
and determining the video sequence length with the smaller value as the video sequence length of the video image to be transmitted.
Further, after the determining a video sequence length of a video image to be transmitted based on the number of retransmissions of the IDR frame and the motion change level of the video capture object, the method further comprises:
generating a corresponding video frame of the video image to be transmitted based on the video sequence length of the video image to be transmitted;
encapsulating the video frame of the video image to be transmitted in an RTP real-time transmission protocol data packet;
and sending the RTP data packet.
Further, after the sending the RTP data packet, the method further includes:
monitoring the retransmission times of IDR frames in the RTP data packets;
and updating the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame in the RTP data packet.
In a second aspect, an embodiment of the present invention provides an apparatus for generating a video image, including:
the acquisition unit is used for acquiring the retransmission times of the IDR instant decoding refresh frame in the preset time period;
and the determining unit is used for determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
Further, the determining unit is configured to:
acquiring the motion change level of a video acquisition object;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame and the motion change level of the video acquisition object.
Further, the determining unit is configured to:
determining a first video sequence length corresponding to the retransmission times of the IDR frame from a first preset corresponding relation, wherein the first preset corresponding relation is the corresponding relation between the retransmission times of the IDR frame and the video sequence length;
determining a second video sequence length corresponding to the motion change level of the video acquisition object from a second preset corresponding relation, wherein the second preset corresponding relation is the corresponding relation between the motion change level of the video acquisition object and the video sequence length;
determining a length of the video sequence based on the first video sequence length and the second video sequence length.
Further, the determining unit is configured to:
determining a video sequence length with a smaller value from the first video sequence length and the second video sequence length;
and determining the video sequence length with the smaller value as the video sequence length of the video image to be transmitted.
Further, after the determining unit determines the video sequence length of the video image to be transmitted based on the number of retransmissions of the IDR frame and the motion change level of the video capture object, the apparatus further includes:
the generating unit is used for generating a corresponding video frame of the video image to be transmitted based on the video sequence length of the video image to be transmitted;
the packaging unit is used for packaging the video frame of the video image to be transmitted in an RTP real-time transmission protocol data packet;
and the sending unit is used for sending the RTP data packet.
Further, after the sending unit sends the RTP packet, the apparatus further includes:
a monitoring unit, configured to monitor the number of retransmissions of an IDR frame in the RTP packet;
and the updating unit is used for updating the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame in the RTP data packet.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring the retransmission times of the IDR instant decoding refresh frame in a preset time period;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
In a fourth aspect, the present invention provides a storage medium storing computer-executable instructions that, when executed, implement the following:
acquiring the retransmission times of the IDR instant decoding refresh frame in a preset time period;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
The embodiment of the invention adopts at least one technical scheme which can achieve the following beneficial effects:
according to the method and the device, the retransmission times of the IDR frame are considered when the length of the video sequence of the video image to be transmitted is determined, the length of the video sequence of the video image to be transmitted can be adjusted based on the retransmission times of the IDR frame, the length of the video sequence of the video image to be transmitted can be shortened when the retransmission times of the IDR frame are determined to be large, long-time waiting caused by the fact that a user cannot receive the video of a user at a video transmitting end under the condition is avoided, and user experience is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a video image generation method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a video image generation apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present invention and the accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
In order to solve the problem that in the prior art, a user at a video receiving end often cannot receive a video of a user at a video sending end for a long time, so that user experience is poor, the embodiment of the invention provides a method for generating a video image. An execution subject of the video image generation method provided by the embodiment of the present invention may be, but is not limited to, a mobile phone, a tablet computer, a wearable device, and the like, which can be configured to execute at least one of the user terminals of the method provided by the embodiment of the present invention, or the execution subject of the method may also be a client itself capable of executing the method.
For convenience of description, the following description will be made of an embodiment of the method taking as an example that an execution subject of the method is a terminal device capable of executing the method. It is understood that the implementation of the method by the terminal device is only an exemplary illustration, and should not be construed as a limitation of the method.
Fig. 1 shows a schematic flowchart of a method provided by an embodiment of the present invention, where the method in fig. 1 may be performed by a video sending end in a terminal device, and as shown in fig. 1, the method includes:
step 110, obtaining the retransmission times of the IDR frame in a preset time period;
in the prior art, the first frame in a video sequence is usually an IDR frame, which is used for decoding resynchronization, and when the decoder decodes the IDR frame, the reference frame queue is emptied immediately, the decoded data is output in its entirety, and the parameter set is searched again, and a new video sequence starts to be decoded. However, as described in the background art, in the prior art, when a video call is performed between a video sending end and a video receiving end, an IDR frame is often lost, and since the length of a video sequence in the prior art is related to the motion change of a video capture object, when the motion change of the video capture object is small, the length of the corresponding video sequence is often long.
Under the above situation, if the video sending end loses the IDR frame when transmitting the video sequence, the video sending end fails to send the video sequence or the video receiving end cannot receive the video sequence, and both of the situations may cause the video picture seen by the user of the video receiving end from the video receiving end to be blocked or even to be blank. When these two situations occur, there are often two ways of handling: one processing mode is that when the video sending end fails to send, the video sequence is sent again; another processing method is that when the video receiving end cannot receive the video sequence, an error occurs during decoding of the video sequence, and the video transmitting end is also required to retransmit the video sequence through a real-Time Transport Control Protocol (RTCP).
Obviously, in the two cases, the video sending end has a process of retransmitting the IDR frame, and based on this point, the embodiment of the present invention obtains the retransmission times of the IDR frame in the preset time period by taking the retransmission times of the IDR frame in the local end into consideration when the video sending end sends the video sequence, and judges the reliability of the current IDR frame transmission based on the retransmission times of the IDR frame, and the more the retransmission times, the worse the reliability, the less the retransmission times, and the better the reliability. If the number of retransmission times of the IDR frame is determined to be large, the length of a video sequence to be sent to a video receiving end can be shortened, so that the phenomenon that a user waits for a long time due to the fact that an error is spread for a long time is avoided, and user experience is improved.
Step 120, determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
Because the video sequence length of the video image to be transmitted in the existing scheme is related to the motion change degree of the video acquisition object, the embodiment of the invention can also take the motion change level of the video acquisition object into account when determining the video sequence length of the video image to be transmitted, and the motion change level of the video acquisition object and the retransmission times of IDR frames in a preset time period are integrated to determine the video sequence length of the video image to be transmitted.
Then, the length of the video sequence of the video image to be transmitted is determined based on the number of retransmissions of the IDR frame, and specifically, the motion change level of the video acquisition object may be first obtained; then, based on the number of retransmissions of the IDR frame and the level of change in motion of the video capture object, the video sequence length of the video image to be transmitted is determined.
Optionally, determining a video sequence length of a video image to be transmitted based on the number of retransmissions of the IDR frame and the motion change level of the video acquisition object, and first determining a first video sequence length corresponding to the number of retransmissions of the IDR frame from a first preset corresponding relationship, wherein the first preset corresponding relationship is the corresponding relationship between the number of retransmissions of the IDR frame and the video sequence length; then, determining a second video sequence length corresponding to the motion change level of the video acquisition object from a second preset corresponding relation, wherein the second preset corresponding relation is the corresponding relation between the motion change level of the video acquisition object and the video sequence length; finally, the length of the video sequence of the video images to be transmitted is determined based on the first video sequence length and the second video sequence length.
As shown in table 1, which is a schematic table of a first preset correspondence relationship, in table 1, the motion change level includes 5 motion change levels 1 to 5, where the video sequence length corresponding to the motion change level 1 is 20 seconds, the video sequence length corresponding to the motion change level 2 is 15 seconds, the video sequence length corresponding to the motion change level 3 is 10 seconds, the video sequence length corresponding to the motion change level 4 is 5 seconds, the video sequence length corresponding to the motion change level 5 is 3 seconds, and if it is determined that the motion change level of the video capture object is 3, the corresponding video sequence length may be determined to be 10 seconds.
As shown in table 2, which is a schematic table of a second preset corresponding relationship, in table 2, the retransmission times of the IDR frame may be defined as multiple retransmission level intervals, where level 1 is 0-2/T, that is, the retransmission times of the IDR frame in the T time period is less than or equal to 2 times, and the corresponding video sequence length may be consistent with that in table 1; the level 2 is 2/T to 4/T, namely the retransmission times of the IDR frame in the T time period are more than 2 times and less than or equal to 4 times, and the length of the corresponding video sequence can be consistent with that in the table 1; the level 3 is 4/T-7/T, namely the retransmission times of the IDR frame in the T time period are more than 4 times and less than or equal to 7 times, and the length of the corresponding video sequence is less than or equal to 10; the 4-level is 7/T-10/T, namely the retransmission times of the IDR frame in the T time period are more than 7 times and less than or equal to 10 times, and the length of the corresponding video sequence is less than or equal to 5; level 5 is >10/T, i.e. the number of retransmissions of an IDR frame within a T period is greater than 10, and the corresponding video sequence length is less than or equal to 2.
As can be seen from table 2, when the number of IDR frame retransmission stages is smaller (e.g., the number of IDR frame retransmission stages is 1 stage or 2 stages), the video sequence length can be determined according to the motion change level in table 1. When the number of IDR frame retransmission stages is large (e.g., 2 stages, 3 stages, or 4 stages), a video sequence length as in table 2 is defined, and the final video sequence length can be determined based on the values of the video sequence length in table 2 and the values of the video sequence length in table 1.
TABLE 1 correspondence table of motion change levels and video sequence lengths
Figure BDA0001722460110000081
TABLE 2IDR frame retransmission times and video sequence length corresponding relation table
Figure BDA0001722460110000091
It should be understood that the specific values of T, the motion change level and the corresponding video sequence length in tables 1 and 2, and the retransmission number division of the IDR frame and the video sequence length corresponding to the number of IDR frame retransmissions are only an exemplary illustration, and the specific values refer to the current network experience values.
Optionally, the video sequence length of the video image to be transmitted is determined based on the first video sequence length and the second video sequence length, and a video sequence length with a smaller value is determined from the first video sequence length and the second video sequence length; then, the video sequence length with a smaller value is determined as the video sequence length of the video image to be transmitted. Or, performing an and operation on the numerical value of the length of the first video sequence and the numerical value of the length of the second video sequence, and determining the result of the and operation as the length of the video sequence of the video image to be transmitted.
As shown in table 3, the table is a correspondence table between the motion change level and the video sequence length when the number of retransmission stages of the IDR frame is 1 or 2, and since the number of retransmission stages of the IDR frame is low and the requirement on the video sequence length is not high when the number of retransmission stages of the IDR frame is 1 or 2, the corresponding video sequence length can be determined according to the correspondence table between the motion change level and the video sequence length in table 1.
Table 3 table of correspondence between the level of motion change and the length of video sequence when the number of retransmission steps of an IDR frame is 1 or 2
Figure BDA0001722460110000092
As shown in table 4, the table is a table of correspondence between the motion change level and the video sequence length when the number of retransmission stages of the IDR frame is 3, the video sequence length corresponding to the number of retransmission stages of the IDR frame can be determined to be 10 according to table 2, the video sequence length corresponding to the motion change levels 1 to 5 can be determined according to table 1, and as 10<15<20, it is obvious that when the number of retransmission stages of the IDR frame is 3, the table of correspondence between the motion change level and the video sequence length is shown in table 4. That is, if it is determined that the motion change level of the video capture object is 2 at this time, the video sequence length corresponding to the motion change level 2 may be determined to be 15 according to table 1, and the retransmission level of the IDR frame is 4 at this time, and the video sequence length corresponding to the IDR frame is 10, and since 10<15, the video sequence length corresponding to the motion change level 2 may be determined to be 10.
Table 4 table of correspondence between the level of motion change and the length of video sequence when the number of retransmission steps of an IDR frame is 3
Figure BDA0001722460110000101
As shown in table 5, the table is a table of correspondence between the motion change level and the video sequence length when the number of retransmission stages of the IDR frame is 4, the video sequence length corresponding to the number of retransmission stages of the IDR frame is determined to be 5 according to table 2, and the video sequence lengths corresponding to the motion change levels 1 to 5 can be determined according to table 1, and as 5<10<15<20, it is obvious that when the number of retransmission stages of the IDR frame is 4, the table of correspondence between the motion change level and the video sequence length is shown in table 5. That is, if it is determined that the motion change level of the video capture object is 3 at this time, it may be determined according to table 1 that the video sequence length corresponding to the motion change level 3 is 10, and at this time, the retransmission level of the IDR frame is 4, and the video sequence length corresponding to the IDR frame is 5, and since 5<10, it may be determined that the video sequence length corresponding to the motion change level 3 is 5.
Table 5 table of correspondence between the level of change in motion and the length of video sequence when the number of retransmission steps of an IDR frame is 4
Figure BDA0001722460110000102
As shown in table 6, the table is a table of correspondence between the motion change level and the video sequence length when the number of retransmission stages of an IDR frame is 5, the video sequence length corresponding to the number of retransmission stages of the IDR frame can be determined to be 2 according to table 2, and the video sequence lengths corresponding to the motion change levels 1 to 5 can be determined according to table 1, and as 2<3<5<10<15<20, it is obvious that when the number of retransmission stages of an IDR frame is 5, the table of correspondence between the motion change level and the video sequence length is shown in table 6. That is, if it is determined that the motion change level of the video capture object is 3 at this time, it may be determined that the video sequence length corresponding to the motion change level 3 is 10 according to table 1, and the retransmission level of the IDR frame is 5 at this time, and the video sequence length corresponding to the IDR frame is 2, and since 2<10, it may be determined that the video sequence length corresponding to the motion change level 3 is 2.
Table 6 table of correspondence between the level of motion change and the length of video sequence when the number of retransmission steps of an IDR frame is 5
Figure BDA0001722460110000111
After the video sequence length of the video image to be transmitted is determined, the video sequence is sent to a video receiving end, so that after the video sequence length of the video image to be transmitted is determined based on the retransmission times of the IDR frame and the motion change level of the video acquisition object, a corresponding video frame of the video image to be transmitted can be generated based on the video sequence length of the video image to be transmitted; then, packaging the video frame of the video image to be transmitted in an RTP real-time transmission protocol data packet; and finally, transmitting the RTP data packet.
In order to monitor the retransmission times of the IDR frame in real time and adjust the video sequence length of the video image to be transmitted in real time based on the retransmission times of the IDR frame, the retransmission times of the IDR frame in the RTP data packet can be monitored after the RTP data packet is sent; then, the video sequence length of the video image to be transmitted is updated based on the number of retransmissions of the IDR frame in the RTP packet. That is, if it is determined that the retransmission level corresponding to the retransmission number of the IDR frame in the RTP packet is higher, the length of the video sequence of the video image to be transmitted may be shortened, and if it is determined that the retransmission level corresponding to the retransmission number of the IDR frame in the RTP packet is lower, the length of the video sequence of the video image to be transmitted may be increased.
According to the method and the device, the retransmission times of the IDR frame are considered when the length of the video sequence of the video image to be transmitted is determined, the length of the video sequence of the video image to be transmitted can be adjusted based on the retransmission times of the IDR frame, the length of the video sequence of the video image to be transmitted can be shortened when the retransmission times of the IDR frame are determined to be large, long-time waiting caused by the fact that a user cannot receive the video of a user at a video transmitting end under the condition is avoided, and user experience is improved.
The method for generating a video image according to the embodiment of the present invention is described in detail above with reference to fig. 1, and the apparatus for generating a video image according to the embodiment of the present invention is described in detail below with reference to fig. 2.
Fig. 2 is a schematic structural diagram of a video image generation apparatus 200 according to an embodiment of the present invention, and as shown in fig. 2, the video image generation apparatus 200 is based on the same inventive concept as the video image generation method according to the embodiment of the present invention, and the video image generation apparatus 200 includes:
an obtaining unit 201, configured to obtain retransmission times of an instantaneous decoding refresh IDR frame within a preset time period;
a determining unit 202, configured to determine a video sequence length of a video image to be transmitted based on the number of retransmissions of the IDR frame.
In an embodiment, the determining unit 202 is configured to:
acquiring the motion change level of a video acquisition object;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame and the motion change level of the video acquisition object.
In an embodiment, the determining unit 202 is configured to:
determining a first video sequence length corresponding to the retransmission times of the IDR frame from a first preset corresponding relation, wherein the first preset corresponding relation is the corresponding relation between the retransmission times of the IDR frame and the video sequence length;
determining a second video sequence length corresponding to the motion change level of the video acquisition object from a second preset corresponding relation, wherein the second preset corresponding relation is the corresponding relation between the motion change level of the video acquisition object and the video sequence length;
determining the length of the video sequence of the video images to be transmitted based on the first video sequence length and the second video sequence length.
In one embodiment, after the determining unit 202 determines the video sequence length of the video image to be transmitted based on the number of retransmissions of the IDR frame and the motion change level of the video capture object, the apparatus further includes:
a generating unit 203, configured to generate a corresponding video frame of the video image to be transmitted based on the video sequence length of the video image to be transmitted;
an encapsulating unit 204, configured to encapsulate the video frame of the video image to be transmitted in an RTP real-time transport protocol data packet;
a sending unit 205, configured to send the RTP packet.
In one embodiment, after the sending unit 205 sends the RTP packet, the apparatus further includes:
a monitoring unit 206, configured to monitor the number of retransmission times of an IDR frame in the RTP data packet;
an updating unit 207, configured to update the video sequence length of the video image to be transmitted based on the number of retransmissions of the IDR frame in the RTP data packet.
According to the method and the device, the retransmission times of the IDR frame are considered when the length of the video sequence of the video image to be transmitted is determined, the length of the video sequence of the video image to be transmitted can be adjusted based on the retransmission times of the IDR frame, the length of the video sequence of the video image to be transmitted can be shortened when the retransmission times of the IDR frame are determined to be large, long-time waiting caused by the fact that a user cannot receive the video of a user at a video transmitting end under the condition is avoided, and user experience is improved.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Referring to fig. 3, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the network coverage performance characterization device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
acquiring the retransmission times of the instantaneous decoding refreshing IDR frame in a preset time period;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
According to the method and the device, the retransmission times of the IDR frame are considered when the length of the video sequence of the video image to be transmitted is determined, the length of the video sequence of the video image to be transmitted can be adjusted based on the retransmission times of the IDR frame, the length of the video sequence of the video image to be transmitted can be shortened when the retransmission times of the IDR frame are determined to be large, long-time waiting caused by the fact that a user cannot receive the video of a user at a video transmitting end under the condition is avoided, and user experience is improved.
The method performed by the electronic device according to the embodiment of the invention shown in fig. 3 can be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, where the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to perform the method performed by the channel detection apparatus in the embodiment shown in fig. 3, and are specifically configured to perform:
acquiring the retransmission times of the instantaneous decoding refreshing IDR frame in a preset time period;
and determining the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame.
According to the method and the device, the retransmission times of the IDR frame are considered when the length of the video sequence of the video image to be transmitted is determined, the length of the video sequence of the video image to be transmitted can be adjusted based on the retransmission times of the IDR frame, the length of the video sequence of the video image to be transmitted can be shortened when the retransmission times of the IDR frame are determined to be large, long-time waiting caused by the fact that a user cannot receive the video of a user at a video transmitting end under the condition is avoided, and user experience is improved.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (6)

1. A method of generating a video image, the method comprising:
acquiring the retransmission times of the instantaneous decoding refreshing IDR frame in a preset time period;
acquiring the motion change level of a video acquisition object;
determining the length of a video sequence of a video image to be transmitted based on the retransmission times of the IDR frame and the motion change level of the video acquisition object, wherein the first frame of the video sequence is the IDR frame;
generating a corresponding video frame of the video image to be transmitted based on the video sequence length of the video image to be transmitted;
encapsulating the video frame of the video image to be transmitted in an RTP real-time transmission protocol data packet;
and sending the RTP data packet.
2. The method of claim 1, wherein determining the video sequence length of the video image to be transmitted based on the number of retransmissions of the IDR frame and the level of motion change of the video acquisition object comprises:
determining a first video sequence length corresponding to the retransmission times of the IDR frame from a first preset corresponding relation, wherein the first preset corresponding relation is the corresponding relation between the retransmission times of the IDR frame and the video sequence length;
determining a second video sequence length corresponding to the motion change level of the video acquisition object from a second preset corresponding relation, wherein the second preset corresponding relation is the corresponding relation between the motion change level of the video acquisition object and the video sequence length;
determining the length of the video sequence of the video images to be transmitted based on the first video sequence length and the second video sequence length.
3. The method of claim 1, wherein after the sending the RTP packet, the method further comprises:
monitoring the retransmission times of IDR frames in the RTP data packets;
and updating the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame in the RTP data packet.
4. An apparatus for generating a video image, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the retransmission times of the instantaneous decoding refreshing IDR frame in a preset time period;
the determining unit is used for acquiring the motion change level of the video acquisition object; determining the video sequence length of a video image to be transmitted based on the retransmission times of the IDR frame and the motion change level of the video acquisition object;
the generating unit is used for generating a corresponding video frame of the video image to be transmitted based on the video sequence length of the video image to be transmitted;
the packaging unit is used for packaging the video frame of the video image to be transmitted in an RTP real-time transmission protocol data packet;
and the sending unit is used for sending the RTP data packet.
5. The apparatus of claim 4, wherein the determination unit is to:
determining a first video sequence length corresponding to the retransmission times of the IDR frame from a first preset corresponding relation, wherein the first preset corresponding relation is the corresponding relation between the retransmission times of the IDR frame and the video sequence length;
determining a second video sequence length corresponding to the motion change level of the video acquisition object from a second preset corresponding relation, wherein the second preset corresponding relation is the corresponding relation between the motion change level of the video acquisition object and the video sequence length;
determining the length of the video sequence of the video images to be transmitted based on the first video sequence length and the second video sequence length.
6. The apparatus of claim 4, wherein after the transmitting unit transmits the RTP packet, the apparatus further comprises:
a monitoring unit, configured to monitor the number of retransmissions of an IDR frame in the RTP packet;
and the updating unit is used for updating the video sequence length of the video image to be transmitted based on the retransmission times of the IDR frame in the RTP data packet.
CN201810737727.6A 2018-07-02 2018-07-02 Video image generation method and device and electronic equipment Active CN108900863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810737727.6A CN108900863B (en) 2018-07-02 2018-07-02 Video image generation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810737727.6A CN108900863B (en) 2018-07-02 2018-07-02 Video image generation method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108900863A CN108900863A (en) 2018-11-27
CN108900863B true CN108900863B (en) 2021-01-15

Family

ID=64348411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810737727.6A Active CN108900863B (en) 2018-07-02 2018-07-02 Video image generation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108900863B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7747921B2 (en) * 2005-08-05 2010-06-29 Sony Corporation Systems and methods for transmitting data over lossy networks
CN102170554B (en) * 2010-02-25 2016-04-27 无锡中感微电子股份有限公司 Based on network camera device and the network shooting method of power network
WO2015082763A1 (en) * 2013-12-02 2015-06-11 Nokia Technologies Oy Video encoding and decoding
CN103945281B (en) * 2014-04-29 2018-04-17 中国联合网络通信集团有限公司 Transmission of video processing method, device and system
CN105263066A (en) * 2014-06-13 2016-01-20 珠海全志科技股份有限公司 Mobile equipment video stream transmission control method and system

Also Published As

Publication number Publication date
CN108900863A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
US20210377575A1 (en) Live streaming method and system, server, and storage medium
US10320552B2 (en) Multicast broadcast multimedia service-assisted content distribution
CN110557655B (en) Video picture display method and device, electronic equipment and storage medium
WO2019242559A1 (en) Data processing method and apparatus, electronic device, system, and storage medium
CN111372128A (en) Video playing method and device, computer equipment and readable storage medium
US10476928B2 (en) Network video playback method and apparatus
WO2021082299A1 (en) Video playback method and device
EP3384493A1 (en) Method and apparatus for transmitting video data
WO2014183478A1 (en) Video encoding method and apparatus
KR102434958B1 (en) Indications for Partial Segments
US10200433B2 (en) Client device, a method for receiving a streaming media data and a streaming media data transmission system
CN108235111B (en) Information sharing method and intelligent set top box
US20140341269A1 (en) Video encoding method and apparatus
CN108900863B (en) Video image generation method and device and electronic equipment
CN110545486B (en) Video signal transmission method, device, medium and terminal equipment
WO2015042767A1 (en) Method for inserting an advertisement into a video stream of an application on demand (aod) service, aod processing device and aod server
US11463493B2 (en) Method and apparatus for playing media file
CN115942000B (en) H.264 format video stream transcoding method, device, equipment and medium
CN116567321A (en) Data processing method, device, equipment and medium
CN114401445B (en) Video processing control method, device, monitoring equipment, client and storage medium
CN109831701B (en) Digital television equipment browser and method for expanding cross-page system event
CN113992980A (en) Generation method, device and equipment of attack code stream
CN114338624A (en) Wireless screen projection data processing method, intelligent terminal and readable storage medium
CN106201387B (en) Method, application controller, device and system for displaying application data
CN116866676A (en) Cross-network screen throwing method and system

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
GR01 Patent grant
GR01 Patent grant