CN114205577A - Video playing pause detection method and device - Google Patents

Video playing pause detection method and device Download PDF

Info

Publication number
CN114205577A
CN114205577A CN202010987081.4A CN202010987081A CN114205577A CN 114205577 A CN114205577 A CN 114205577A CN 202010987081 A CN202010987081 A CN 202010987081A CN 114205577 A CN114205577 A CN 114205577A
Authority
CN
China
Prior art keywords
video
decoding
video frames
pause
video frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010987081.4A
Other languages
Chinese (zh)
Inventor
黄耿星
魏雪
姜宏维
赖晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010987081.4A priority Critical patent/CN114205577A/en
Publication of CN114205577A publication Critical patent/CN114205577A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4425Monitoring of client processing errors or hardware failure

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application provides a video playing stuck detection method and device. The video playing stuck detection method in the embodiment of the application comprises the following steps: decoding the video frame data to obtain decoded data; extracting the sending time of sending two adjacent video frames by a sending end from the decoded data; generating decoding time of two adjacent video frames based on the time of the two adjacent video frames when decoding is completed; and determining the pause condition of the next video frame in the two adjacent video frames during playing based on the first difference between the decoding time and the second difference between the sending time. The technical scheme of the embodiment of the application has higher accuracy when detecting the video playing pause condition.

Description

Video playing pause detection method and device
Technical Field
The application relates to the technical field of computers, in particular to a video playing stuck detection method and device.
Background
In various real-time video playing scenes, higher requirements exist for the fluency of videos, so that the detection of the video playing jam condition is particularly important.
In the related art, by adopting the method for judging the video playing jam condition by using the frame rate, when network fluctuation occurs, the accuracy of judging the video playing jam condition by using the frame rate is influenced because the frame rate jumps, so that the video playing jam detection method in the related art has the problem of low accuracy.
Disclosure of Invention
The embodiment of the application provides a video playing stuck detection method and device, which can solve the technical problem of low accuracy in detecting the stuck condition of video playing in various real-time video playing scenes.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a method for detecting video playing pause, including: decoding the video frame data to obtain decoded data; extracting the sending time of sending two adjacent video frames by a sending end from the decoded data; generating decoding time of the two adjacent video frames based on the time of the two adjacent video frames when decoding is completed; and determining the pause condition of the next video frame in the two adjacent video frames during playing based on the first difference value between the decoding time and the second difference value between the sending time.
According to an aspect of the embodiments of the present application, there is provided a video playing pause detection apparatus, including: the decoding unit is used for decoding the video frame data to obtain decoded data; an extracting unit, configured to extract, from the decoded data, transmission time for a transmitting end to transmit two adjacent video frames; a generating unit, configured to generate decoding times of the two adjacent video frames based on the times of the two adjacent video frames when decoding is completed; and the first execution unit is used for determining the pause condition of the next video frame in the two adjacent video frames during playing based on a first difference value between the decoding time and a second difference value between the sending time.
In some embodiments of the present application, based on the foregoing solution, the first execution unit is configured to: if the difference between the first difference value between the decoding time and the second difference value between the sending time is larger than a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is blocked during playing; and if the difference between the first difference value between the decoding time and the second difference value between the sending time is less than or equal to a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is not blocked during playing.
In some embodiments of the present application, based on the foregoing solution, the detecting of video playing pause further includes: a first adjusting unit, configured to perform an operation of adjusting a predetermined parameter of the video player if a subsequent video frame of the two adjacent video frames is jammed during playing, where the predetermined parameter includes at least one of the following parameters: decoding parameters of a decoder and a maximum data amount of video frame data which can be buffered by a buffer queue, wherein the decoding parameters comprise at least one of the following parameters: frame rate, code rate, and resolution.
In some embodiments of the present application, based on the foregoing, the first adjusting unit is configured to: and if the subsequent video frame in the two adjacent video frames is blocked during playing, adjusting the preset parameters of the video player to be target parameter values.
In some embodiments of the present application, based on the foregoing solution, the video playing stuck detection apparatus further includes: the third execution unit is used for determining the sum of time differences between the video frame with the pause condition and the decoding time corresponding to the previous video frame of the video frame with the pause condition as the pause duration of the video frame contained in the decoded data in the preset decoding time period when the video frame is played; and the fourth execution unit is used for determining the pause rate of the video frame contained in the decoded data in the preset decoding time period when the video frame is played based on the ratio of the pause time period to the total time period corresponding to the preset decoding time period.
In some embodiments of the present application, based on the foregoing solution, the video playing stuck detection apparatus further includes: a fifth execution unit, configured to determine the number of video frames in which the decoded data has a stuck condition within a predetermined decoding time period; a sixth performing unit, configured to determine a total number of video frames included in the decoded data within a predetermined decoding time period; a seventh execution unit, configured to determine a pause rate of video frames included in the decoded data in a predetermined decoding time period when the video frames are played based on a ratio of the number of video frames in which the decoded data is paused in the predetermined decoding time period to the total number of video frames included in the decoded data in the predetermined decoding time period.
In some embodiments of the present application, based on the foregoing solution, the video playing stuck detection apparatus further includes: a second adjusting unit for performing an operation of adjusting a predetermined parameter of the video player based on the katton rate.
In some embodiments of the present application, based on the foregoing, the second adjusting unit is configured to: if the pause rate is greater than a first preset threshold and less than a second preset threshold, adjusting the maximum data volume of the video frame data which can be cached by a cache queue, wherein the first preset threshold is less than the second preset threshold; and if the pause rate is greater than or equal to a second preset threshold value, adjusting the decoding parameters of the decoder.
In some embodiments of the present application, based on the foregoing, the second adjusting unit is configured to: determining an adjusting value when the preset parameter of the video player is adjusted based on the corresponding relation among the pause rate, the pause rate and the adjusting value corresponding to the preset parameter of the video player; adjusting a predetermined parameter of the video player based on the determined adjustment value.
According to an aspect of the embodiments of the present application, there is provided a computer readable medium, on which a computer program is stored, the computer program, when being executed by a processor, implements the video playback stuck detection method as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the video playback stuck detection method as described in the above embodiments.
In the technical solutions provided in some embodiments of the present application, by comparing a first difference between decoding times of two adjacent video frames with a second difference between sending times of two adjacent video frames sent by a sending end, because the decoding times of two adjacent video frames can more accurately reflect playing times of two adjacent video frames, and a difference between the first difference between the decoding times of two adjacent video frames and the second difference between the sending times of two adjacent video frames sent by the sending end is larger, a situation that two adjacent video frames will be stuck can be accurately determined.
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 application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
Fig. 2 shows a flow diagram of a video playback stuck detection method according to an embodiment of the present application.
Fig. 3 shows a flow diagram of a video playback stuck detection method according to an embodiment of the present application.
Fig. 4 shows a flow diagram of a video playback stuck detection method according to an embodiment of the present application.
Fig. 5 shows a flow diagram of a video playback stuck detection method according to an embodiment of the present application.
Fig. 6 shows a block diagram of a video playback stuck detection apparatus according to an embodiment of the present application.
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a sender 101, a network 102, and a receiver 103. The transmitting end 101 and the receiving end 103 are connected via a network 102, and perform data interaction based on the network 102, and the network may include various connection types, such as a wired communication link, a wireless communication link, and the like.
It should be understood that the number of the transmitting end 101, the network 102, and the receiving end 103 in fig. 1 is merely illustrative. There may be any number of senders 101, networks 102, and receivers 103, as desired for an implementation.
The receiving end 103 receives video frame data from the sending end 101, and the receiving end 103 decodes the video frame data to obtain decoded data; extracting the sending time of sending two adjacent video frames by the sending end 101 from the decoded data; generating decoding time of two adjacent video frames based on the time of the two adjacent video frames when decoding is completed; determining the blocking condition of the next video frame in the two adjacent video frames during playing based on the first difference between the decoding times and the second difference between the sending times, comparing the first difference between the decoding times of the two adjacent video frames with the second difference between the sending times of the sending end 201 sending the two adjacent video frames, because the decoding times of the two adjacent video frames can reflect the playing times of the two adjacent video frames more accurately, and the difference between the first difference between the decoding times of the two adjacent video frames and the second difference between the sending times of the sending end 201 sending the two adjacent video frames is larger, the blocking condition of the two adjacent video frames can be determined accurately, compared with the method of determining the blocking condition according to the frame rate, the technical solution in this embodiment is not affected by the network fluctuation condition, the accuracy is higher when the video playing pause condition is detected.
It should be noted that the video playing stuck detection method provided in the embodiment of the present application is generally executed by the receiving end 103, and accordingly, the video playing stuck detection apparatus is generally disposed in the receiving end 103.
The technical solution in this embodiment may be applicable to various scenarios, and two application scenarios applied in this embodiment are described below, and it should be noted that these application scenarios are only exemplary. Those skilled in the art, having the benefit of the teachings of the embodiments of this application, may apply the present application to other scenarios.
In an application scenario, the sending end 101 may be a game server, the receiving end 103 is a game client used by a user, and the video frame data received by the receiving end 103 is game screen data displayed on the game client.
In another application scenario, the sending end 101 may be a live video server, the receiving end 103 is a video client used by a user to watch live video, and video frame data received by the receiving end 103 is live picture data displayed at the video client.
The details of implementation of the technical solution of the embodiments of the present application are set forth in the following.
Fig. 2 shows a flowchart of a video playback stuck detection method according to an embodiment of the present application, which may be performed by a receiving end, which may be the receiving end 103 shown in fig. 1. Referring to fig. 2, the method for detecting video playing stuck at least includes:
step S210, decoding the video frame data to obtain decoded data;
step S220, extracting the sending time of the sending end for sending two adjacent video frames from the decoded data;
step S230, based on the time of the two adjacent video frames when the decoding is completed, generating the decoding time of the two adjacent video frames;
step S240 determines a pause condition of a subsequent video frame in the two adjacent video frames during playing based on a first difference between the decoding times and a second difference between the sending times.
In step S210, the video frame data is decoded to obtain decoded data.
In one embodiment, the video frame data is data received by the receiving end from the transmitting end through the network, and when the video frame data is played in a video player of the receiving end, decoding processing and rendering processing need to be performed first, so as to facilitate playing in the video player of the receiving end.
The decoding data is data obtained by decoding video frame data at a receiving end, and it should be noted that, because a large number of video frames are required during video playing, the decoding data refers specifically to decoding data corresponding to a plurality of video frames obtained by decoding a plurality of video frames.
In step S220, the transmission time at which the transmitting end transmits two adjacent video frames is extracted from the decoded data.
In an embodiment, when the sending end sends video frame data, sending time for sending the video frame may be added to the video frame data in a form of a timestamp, and after the receiving end decodes the video frame data to obtain decoded data, the receiving end may extract the timestamp from the decoded data to determine the sending time of the video frame. The two adjacent video frames refer to two video frames in a front-back relationship determined according to the playing sequence of the video frames.
In step S230, decoding times of the adjacent two video frames are generated based on the times of the adjacent two video frames when decoding is completed.
In one embodiment, when the video frame data is decoded, the time when the video frame data is decoded may be recorded, and the decoding time of the video frame may be generated according to the recorded time.
In step S240, based on the first difference between the decoding times and the second difference between the sending times, the pause condition of the next video frame in the two adjacent video frames during playing is determined.
In one embodiment, after the decoding time of two adjacent video frames and the sending time of the sending end sending the two adjacent video frames are obtained, a first difference value between the decoding time of the two adjacent video frames and a second difference value between the sending time of the two adjacent video frames are calculated, the first difference value and the second difference value are compared, and the pause condition of the next video frame in the two adjacent video frames during playing is determined.
In an embodiment, step S240 may specifically include:
if the difference between the first difference value between the decoding time and the second difference value between the sending time is larger than a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is blocked during playing; and if the difference between the first difference value between the decoding time and the second difference value between the sending time is less than or equal to a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is not blocked during playing.
In this embodiment, in an ideal situation where there is no pause in video playback, a second difference between transmission times of the transmitting end in transmitting two adjacent video frames is equivalent to a first difference between decoding times of the two adjacent video frames. Thus, in the present embodiment, the predetermined time threshold may be set to 0. It should be noted that, due to the influence of hardware devices or network environment, a certain error may be allowed for determining whether the video playing is in the stuck state, and the predetermined time threshold may be set to a parameter greater than 0.
After a first difference value between decoding time of two adjacent video frames and a second difference value between sending time of the two adjacent video frames are obtained, if the difference between the first difference value between the decoding time and the second difference value between the sending time is greater than a preset time threshold, it is determined that a pause condition exists in the next video frame in the two adjacent video frames during playing, and if the difference between the first difference value between the decoding time and the second difference value between the sending time is less than or equal to the preset time threshold, it is determined that the pause condition does not exist in the next video frame in the two adjacent video frames during playing.
As can be seen from the above, by comparing the first difference between the decoding times of two adjacent video frames with the second difference between the sending times of the sending end sending the two adjacent video frames, since the decoding times of the two adjacent video frames can more accurately reflect the playing times of the two adjacent video frames, and the difference between the first difference between the decoding times of the two adjacent video frames and the second difference between the sending times of the sending end sending the two adjacent video frames is larger, the situation that the two adjacent video frames will be stuck can be accurately determined.
Optionally, the method for detecting video playing stuck in this embodiment may further include: if the subsequent video frame in the two adjacent video frames is in a pause condition during playing, executing an operation of adjusting predetermined parameters of the video player, wherein the predetermined parameters include at least one of the following parameters: decoding parameters of a decoder and the maximum data quantity of video frame data which can be buffered by a buffer queue, wherein the decoding parameters comprise at least one of the following parameters: frame rate, code rate, and resolution.
In one embodiment, when it is detected that a subsequent video frame of two adjacent video frames is stuck during playing, in order to avoid a continuous stuck condition during playing of the video, an operation of adjusting predetermined parameters of the video player may be performed. The predetermined parameter of the video player may include at least one of a decoding parameter of the decoder, and a maximum data amount of the video frame data that can be buffered by the buffer queue, where the decoding parameter of the decoder may include a frame rate, a code rate, and a resolution. The operation of adjusting the predetermined parameter of the video player is specifically an operation of adjusting the predetermined parameter of the video player from a current parameter value to a certain target parameter value smaller than the current parameter value. It should be understood that, since there are a plurality of predetermined parameters of the video player that can be adjusted, the adjustment may be performed only for one of the predetermined parameters, or, of course, two or more of the predetermined parameters may be simultaneously adjusted, which is not limited herein.
Optionally, if there is a pause condition in the subsequent video frame of the two adjacent video frames during playing, the step of executing the operation of adjusting the predetermined parameter of the video player may specifically include: and if the subsequent video frame in the two adjacent video frames is blocked during playing, adjusting the preset parameters of the video player to the target parameter values.
In an embodiment, when the predetermined parameter of the video player needs to be adjusted if there is a pause condition in the playing of the next video frame of the two adjacent video frames, the current parameter value corresponding to the predetermined parameter of the video player may be directly adjusted to a certain fixed target parameter value lower than the current parameter value.
Taking the predetermined parameter of the video player as the frame rate, if the current frame rate of the video player is 60FPS and the predetermined parameter value of the frame rate is 45FPS, the frame rate is directly adjusted from 60FPS to 45 FPS. It will be appreciated that other predetermined parameters of the video player may also be preset with corresponding target parameter values for adjusting to the target parameter values when there is a stuck condition during playing.
Referring to fig. 3, fig. 3 is a flowchart illustrating a video playback stuck detection method according to an embodiment of the present application, where the video playback stuck detection method in this embodiment may further include:
step S310, determining that video frames with a pause condition exist in the decoded data within a preset decoding time period;
step S320, determining the sum of the time difference values between the video frame with the pause condition and the decoding time corresponding to the previous video frame of the video frame with the pause condition as the pause time length of the video frame contained in the decoded data in the preset decoding time period when the video frame is played;
step S330, based on the ratio of the pause time length to the total time length corresponding to the preset decoding time period, determining the pause rate of the decoded data in the preset decoding time period.
These steps are described in detail below.
In step S310, since the decoded data is data information containing a large number of decoded video frames, the pause rate of the video frames contained in the decoded data within the predetermined decoding period during playing can be determined by the pause condition of the video frames contained in the decoded data within the predetermined decoding period during playing.
When the pause rate of the video frames contained in the decoded data in the preset decoding time period during playing is determined, the pause condition of the next video frame in the two adjacent video frames contained in the decoded data in the preset decoding time period during playing can be determined through a first difference value between the decoding time of the two adjacent video frames contained in the decoded data in the preset decoding time period and a second difference value between the sending time of the two adjacent video frames contained in the decoded data in the preset decoding time period, and all the video frames of which the decoded data is in the pause condition in the preset decoding time period are further determined.
In step S320, the sum of the time differences between the video frame with the pause condition and the decoding time corresponding to the video frame before the video frame with the pause condition is determined as the pause duration of the video frame when the decoded data is played in the predetermined decoding time period.
After determining that all video frames of the decoded data have a stuck condition in the predetermined decoding time period, a time difference between the video frame having the stuck condition and the decoding time corresponding to the previous video frame of the video frame having the stuck condition may be calculated, and a sum of the calculated time differences may be used as a stuck duration of the video frame included in the decoded data in the predetermined decoding time period when the video frame is played.
In step S330, a stuck rate of the decoded data in the predetermined decoding time period is determined based on a ratio of the stuck time period to a total time period corresponding to the predetermined decoding time period.
Since the total duration corresponding to the predetermined decoding time period is the total playing duration of the decoded data in the predetermined decoding time period, the ratio between the pause duration of the video frame contained in the decoded data in the predetermined decoding time period when playing and the total duration corresponding to the predetermined decoding time period is the pause rate of the video frame contained in the decoded data in the predetermined decoding time period when playing.
Referring to fig. 4, fig. 4 is a flowchart illustrating a video playback stuck detection method according to an embodiment of the present application, where the video playback stuck detection method in this embodiment may further include:
step S410, determining the number of video frames of the decoded data with the pause condition in a preset decoding time period;
step S420, determining the total number of video frames contained in the decoded data in a preset decoding time period;
step S430, based on a ratio of the number of video frames in which the decoded data is stuck in the predetermined decoding time period to the total number of video frames included in the decoded data in the predetermined decoding time period, a sticking rate of the video frames included in the decoded data in the predetermined decoding time period when playing is performed.
These steps are described in detail below.
In step S410, the number of video frames in which the decoded data has a stuck condition within a predetermined decoding period is determined.
When the pause rate of the video frames contained in the decoded data in the preset decoding time period is determined, the pause condition of the next video frame in the two adjacent video frames contained in the decoded data in the preset decoding time period can be determined by a first difference value between the decoding time of the two adjacent video frames contained in the decoded data in the preset decoding time period and a second difference value between the sending time of the two adjacent video frames contained in the preset decoding time period, the video frame of which the decoded data is in the pause condition in the preset decoding time period is further determined, and the video frame of which the pause condition exists is calculated.
In step S420, the total number of video frames contained in the decoded data within a predetermined decoding period is determined.
The total number of video frames included in the decoded data in the predetermined decoding period may be calculated by the number of decoded video frames in the predetermined decoding period, so as to determine the total number of video frames included in the decoded data in the predetermined decoding period.
In step S430, a stutter rate of the video frames contained in the decoded data in the predetermined decoding period when playing is determined based on a ratio of the number of video frames in which the decoded data has a stutter condition in the predetermined decoding period to the total number of video frames contained in the decoded data in the predetermined decoding period.
The ratio of the number of video frames in which the decoded data is stuck in the predetermined decoding time period to the total number of video frames contained in the decoded data in the predetermined decoding time period is the sticking rate of the video frames contained in the decoded data in the predetermined decoding time period when the video frames are played.
In the technical solution of the embodiment shown in fig. 4, the jam rate of the video frames contained in the decoded data in the predetermined decoding time period during playing can be determined only by calculating the number of the video frames in which the decoded data is jammed in the predetermined decoding time period and the total number of the video frames contained in the decoded data in the predetermined decoding time period, and compared with a method for determining the jam rate according to the ratio of the jam duration of the video frames contained in the decoded data in the predetermined decoding time period during playing to the total duration corresponding to the predetermined decoding time period, the calculation of the time difference between the video frames in which the jam occurs and the decoding time corresponding to the previous video frame in which the jam occurs is not required, the calculation amount can be effectively reduced, and the occupation of system resources can be reduced.
Optionally, the method for detecting video playing stuck in this embodiment further includes: an operation of adjusting a predetermined parameter of the video player is performed based on the katton rate.
After determining the pause rate of the video frames contained in the decoded data during the predetermined decoding time period when playing, an operation of adjusting predetermined parameters of the video player may be performed. It is understood that the operation of adjusting the predetermined parameter of the video player is performed when the chucking rate is high.
As in the previous embodiment, the predetermined parameter includes at least one of the following parameters: decoding parameters of a decoder and a maximum data amount of video frame data which can be buffered by a buffer queue, wherein the decoding parameters comprise at least one of the following parameters: frame rate, code rate, and resolution. The operation of adjusting the predetermined parameter of the video player may specifically be an operation of adjusting the predetermined parameter of the video player from a current parameter value to a certain target parameter value smaller than the current parameter value.
It should be understood that, since there are a plurality of predetermined parameters of the video player that can be adjusted, the adjustment may be performed only for one of the predetermined parameters, or, of course, two or more of the predetermined parameters may be simultaneously adjusted, which is not limited herein.
Compared with the mode of directly executing the operation of adjusting the preset parameters of the video player when the video frame is determined to be in the pause condition during playing, when the adjusted preset parameters are the frame rate or the resolution, the higher frequency adjustment of the parameter adjustment can seriously affect the experience of the user when the user watches the video, and the operation of adjusting the preset parameters of the video player is executed according to the pause rate of the video frame contained in the decoding data in the preset decoding time period during playing, so that the fluency in the video playing process is realized, the frequency of adjusting the preset parameters of the video player can be reduced, the occupation of system resources is reduced, and the influence on the experience of the user when the user watches the video is reduced.
Optionally, in an embodiment of the present application, the step of performing an operation of adjusting a predetermined parameter of the video player based on the katton rate may specifically include: if the pause rate is greater than a first preset threshold and less than a second preset threshold, adjusting the maximum data volume of the video frame data which can be cached by the cache queue, wherein the first preset threshold is less than the second preset threshold; and if the pause rate is greater than or equal to a second preset threshold value, adjusting the decoding parameters of the decoder.
The first preset threshold and the second preset threshold are both preset thresholds used for determining the degree of clamping, wherein the first preset threshold is smaller than the second preset threshold. When the pause rate is greater than the first predetermined threshold and less than the second predetermined threshold, it can be determined that the pause degree of the video during playing is low, and at this time, the maximum data volume of the video frame data that can be cached by the cache queue can be adjusted, so that the fluency of video playing can be improved, and the influence on the viewing experience of the user when the user views the video during adjusting the decoding parameters of the decoder can be avoided. When the pause rate is greater than or equal to the second predetermined threshold, it can be determined that the video is played with a higher pause degree, and at this time, one or more decoding parameters of the decoder can be adjusted to improve the fluency of video playing. It should be noted that when the katton rate is greater than or equal to the second predetermined threshold, the maximum data amount of the video frame data that can be buffered by the buffer queue and one or more decoding parameters of the decoder may also be adjusted simultaneously.
Referring to fig. 5, fig. 5 is a flowchart illustrating a video player stuck detection method according to an embodiment of the present application, where the step of performing an operation of adjusting a predetermined parameter of a video player based on a stuck rate may specifically include:
step S510, determining an adjusting value when the preset parameter of the video player is adjusted based on the corresponding relation among the pause rate, the pause rate and the adjusting value corresponding to the preset parameter of the video player;
in step S520, predetermined parameters of the video player are adjusted based on the determined adjustment value.
These steps are described in detail below.
In step S510, an adjustment value when adjusting a predetermined parameter of the video player is determined based on a correspondence relationship between the katon rate, and an adjustment value corresponding to the predetermined parameter of the video player.
The size of the pause rate reflects the pause degree of the video during playing, and the pause rate is higher, so that the video is paused during playing. After determining the pause rate of the video frame contained in the decoded data in the predetermined decoding time period during playing, the adjustment value during adjusting the predetermined parameter of the video player may also be determined based on the corresponding relationship between the pause rate and the adjustment value corresponding to the predetermined parameter of the video player. It is noted that the higher the cadence rate, the larger the adjustment value when adjusting the predetermined parameters of the video player.
In step S520, predetermined parameters of the video player are adjusted based on the determined adjustment value.
After the adjustment value for adjusting the predetermined parameter of the video player is determined, the predetermined parameter of the video player is adjusted based on the determined adjustment value, specifically, an adjusted parameter value may be obtained by subtracting the determined adjustment value from a current reference value corresponding to the predetermined parameter of the video player, where the adjusted parameter value is the parameter value obtained by adjusting the predetermined parameter of the video player.
Taking the frame rate adjustment as an example, the predetermined frame rate of the video player is 60fps, the currently calculated calorie rate is 10%, and the correspondence between the calorie rate and the adjustment value corresponding to the frame rate can be as follows.
Figure BDA0002689615710000131
Figure BDA0002689615710000141
Table 1 shows an example of a correspondence relationship between the cadence rate and the adjustment value corresponding to the frame rate.
As shown in table 1, if the frame rate is adjusted to 5, and the predetermined frame rate of the video player is 60fps, the frame rate of the adjusted video player is 55 fps.
The following describes embodiments of the apparatus of the present application, which can be used to perform the video playback stuck detection method in the above embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the video playback pause detection method described above in the present application.
Fig. 6 shows a block diagram of a video playback stuck detection apparatus according to an embodiment of the present application.
Referring to fig. 6, a video playback stuck detection apparatus 600 according to an embodiment of the present application includes: a decoding unit 610, an extracting unit 620, a generating unit 630, and a first executing unit 640. The decoding unit 610 is configured to perform decoding processing on video frame data to obtain decoded data; an extracting unit 620, configured to extract, from the decoded data, transmission time for a transmitting end to transmit two adjacent video frames; a generating unit 630, configured to generate decoding times of the two adjacent video frames based on the times of the two adjacent video frames when decoding is completed; a first executing unit 640, configured to determine a pause condition of a subsequent video frame in the two adjacent video frames during playing based on a first difference between the decoding times and a second difference between the sending times.
In some embodiments of the present application, based on the foregoing scheme, the first executing unit 640 is configured to: if the difference between the first difference value between the decoding time and the second difference value between the sending time is larger than a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is blocked during playing; and if the difference between the first difference value between the decoding time and the second difference value between the sending time is less than or equal to a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is not blocked during playing.
In some embodiments of the present application, based on the foregoing solution, the detecting of video playing pause further includes: a first adjusting unit, configured to perform an operation of adjusting a predetermined parameter of the video player if a subsequent video frame of the two adjacent video frames is jammed during playing, where the predetermined parameter includes at least one of the following parameters: decoding parameters of a decoder and a maximum data amount of video frame data which can be buffered by a buffer queue, wherein the decoding parameters comprise at least one of the following parameters: frame rate, code rate, and resolution.
In some embodiments of the present application, based on the foregoing, the first adjusting unit is configured to: and if the subsequent video frame in the two adjacent video frames is blocked during playing, adjusting the preset parameters of the video player to be target parameter values.
In some embodiments of the present application, based on the foregoing solution, the video playing stuck detection apparatus further includes: the third execution unit is used for determining the sum of time differences between the video frame with the pause condition and the decoding time corresponding to the previous video frame of the video frame with the pause condition as the pause duration of the video frame contained in the decoded data in the preset decoding time period when the video frame is played; and the fourth execution unit is used for determining the pause rate of the video frame contained in the decoded data in the preset decoding time period when the video frame is played based on the ratio of the pause time period to the total time period corresponding to the preset decoding time period.
In some embodiments of the present application, based on the foregoing solution, the video playing stuck detection apparatus further includes: a fifth execution unit, configured to determine the number of video frames in which the decoded data has a stuck condition within a predetermined decoding time period; a sixth performing unit, configured to determine a total number of video frames included in the decoded data within a predetermined decoding time period; a seventh execution unit, configured to determine a pause rate of video frames included in the decoded data in a predetermined decoding time period when the video frames are played based on a ratio of the number of video frames in which the decoded data is paused in the predetermined decoding time period to the total number of video frames included in the decoded data in the predetermined decoding time period.
In some embodiments of the present application, based on the foregoing solution, the video playing stuck detection apparatus further includes: a second adjusting unit for performing an operation of adjusting a predetermined parameter of the video player based on the katton rate.
In some embodiments of the present application, based on the foregoing, the second adjusting unit is configured to: if the pause rate is greater than a first preset threshold and less than a second preset threshold, adjusting the maximum data volume of the video frame data which can be cached by a cache queue, wherein the first preset threshold is less than the second preset threshold; and if the pause rate is greater than or equal to a second preset threshold value, adjusting the decoding parameters of the decoder.
In some embodiments of the present application, based on the foregoing, the second adjusting unit is configured to: determining an adjusting value when the preset parameter of the video player is adjusted based on the corresponding relation among the pause rate, the pause rate and the adjusting value corresponding to the preset parameter of the video player; adjusting a predetermined parameter of the video player based on the determined adjustment value.
FIG. 7 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 700 of the electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the computer system 710 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for system operation are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An Input/Output (I/O) interface 705 is also connected to the bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A video playing pause detection method is characterized by comprising the following steps:
decoding the video frame data to obtain decoded data;
extracting the sending time of sending two adjacent video frames by a sending end from the decoded data;
generating decoding time of the two adjacent video frames based on the time of the two adjacent video frames when decoding is completed;
and determining the pause condition of the next video frame in the two adjacent video frames during playing based on the first difference value between the decoding time and the second difference value between the sending time.
2. The method of claim 1, wherein determining the video display pause condition of the next video frame of the two adjacent video frames during the playing process based on a first difference between the decoding times and a second difference between the sending times comprises:
if the difference between the first difference value between the decoding time and the second difference value between the sending time is larger than a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is blocked during playing;
and if the difference between the first difference value between the decoding time and the second difference value between the sending time is less than or equal to a preset time threshold, determining that the subsequent video frame in the two adjacent video frames is not blocked during playing.
3. The method of claim 2, wherein the method further comprises:
if the subsequent video frame in the two adjacent video frames is in a pause condition during playing, executing an operation of adjusting predetermined parameters of the video player, wherein the predetermined parameters include at least one of the following parameters: decoding parameters of a decoder and a maximum data amount of video frame data which can be buffered by a buffer queue, wherein the decoding parameters comprise at least one of the following parameters: frame rate, code rate, and resolution.
4. The method of claim 3, wherein if there is a pause condition in playing the subsequent video frame of the two adjacent video frames, performing an operation of adjusting the predetermined parameter of the video player, comprising:
and if the subsequent video frame in the two adjacent video frames is blocked during playing, adjusting the preset parameters of the video player to be target parameter values.
5. The method of claim 2, wherein the method further comprises:
determining a video frame of the decoded data with a stuck condition in a preset decoding time period;
determining the sum of time differences between the video frame with the pause condition and the decoding time corresponding to the previous video frame of the video frame with the pause condition as the pause time length of the video frame contained in the decoding data in the preset decoding time period when the video frame is played;
and determining the pause rate of the video frame contained in the decoded data in the preset decoding time period when the video frame is played based on the ratio of the pause time period to the total time period corresponding to the preset decoding time period.
6. The method of claim 2, wherein the method further comprises:
determining the number of video frames of the decoded data with a pause condition in a preset decoding time period;
determining a total number of video frames contained by the decoded data within a predetermined decoding period;
and determining the pause rate of the video frames contained in the decoded data in the preset decoding time period when the video frames are played based on the ratio of the number of the video frames in which the decoded data are paused in the preset decoding time period to the total number of the video frames contained in the decoded data in the preset decoding time period.
7. The method for detecting video playback stuck in accordance with claim 5 or 6, wherein said method for detecting video playback stuck in further comprises:
and performing an operation of adjusting a predetermined parameter of the video player based on the katton rate.
8. The method of claim 7, wherein the operation of adjusting the predetermined parameter of the video player based on the pause rate comprises:
if the pause rate is greater than a first preset threshold and less than a second preset threshold, adjusting the maximum data volume of the video frame data which can be cached by a cache queue, wherein the first preset threshold is less than the second preset threshold;
and if the pause rate is greater than or equal to a second preset threshold value, adjusting the decoding parameters of the decoder.
9. The method of claim 7, wherein the operation of adjusting the predetermined parameter of the video player based on the pause rate comprises:
determining an adjusting value when the preset parameter of the video player is adjusted based on the corresponding relation among the pause rate, the pause rate and the adjusting value corresponding to the preset parameter of the video player;
adjusting a predetermined parameter of the video player based on the determined adjustment value.
10. A video playback stuck detection apparatus, comprising:
the decoding unit is used for decoding the video frame data to obtain decoded data;
an extracting unit, configured to extract, from the decoded data, transmission time for a transmitting end to transmit two adjacent video frames;
a generating unit, configured to generate decoding times of the two adjacent video frames based on the times of the two adjacent video frames when decoding is completed;
and the first execution unit is used for determining the pause condition of the next video frame in the two adjacent video frames during playing based on a first difference value between the decoding time and a second difference value between the sending time.
CN202010987081.4A 2020-09-18 2020-09-18 Video playing pause detection method and device Pending CN114205577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010987081.4A CN114205577A (en) 2020-09-18 2020-09-18 Video playing pause detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010987081.4A CN114205577A (en) 2020-09-18 2020-09-18 Video playing pause detection method and device

Publications (1)

Publication Number Publication Date
CN114205577A true CN114205577A (en) 2022-03-18

Family

ID=80645041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010987081.4A Pending CN114205577A (en) 2020-09-18 2020-09-18 Video playing pause detection method and device

Country Status (1)

Country Link
CN (1) CN114205577A (en)

Similar Documents

Publication Publication Date Title
CN109257631B (en) Video carousel playing method and device, computer equipment and storage medium
CN111135569A (en) Cloud game processing method and device, storage medium and electronic equipment
WO2018000624A1 (en) Video playing control method and device
CN109819322A (en) Video transmission method, device, computer readable storage medium and electronic equipment
US10178143B2 (en) Selecting bitrate to stream encoded media based on tagging of important media segments
CN108235075B (en) Video quality grade matching method, computer readable storage medium and terminal
CN113490055A (en) Data processing method and device
CN108259998B (en) Player, play control method and device, electronic equipment and play system
CN114584835B (en) Video processing method, device, equipment and storage medium
CN114584826B (en) Video dynamic downloading method and device, electronic equipment and storage medium
CN104053002A (en) Video decoding method and device
CN113422980B (en) Video data processing method and device, electronic equipment and storage medium
CN114040245A (en) Video playing method and device, computer storage medium and electronic equipment
US12015834B2 (en) Methods, systems, and media for streaming video content using adaptive buffers
US20240040147A1 (en) Data processing method and apparatus, computer device, and storage medium
CN114205577A (en) Video playing pause detection method and device
CN109218809B (en) Streaming media playing method and device
CN112055174B (en) Video transmission method and device and computer readable storage medium
CN110855645B (en) Streaming media data playing method and device
US11463493B2 (en) Method and apparatus for playing media file
CN111669539A (en) Video playing method and device and electronic equipment
US11457287B2 (en) Method and system for processing video
CN115955597B (en) Multi-format video self-adaptive switching method, system and storage medium
CN115460189B (en) Processing equipment testing method and device, computer and storage medium
CN115134666B (en) Live broadcast card pause detection method, system, equipment and storage medium

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