CN106792109B - Video playing method and device and terminal - Google Patents

Video playing method and device and terminal Download PDF

Info

Publication number
CN106792109B
CN106792109B CN201611110164.5A CN201611110164A CN106792109B CN 106792109 B CN106792109 B CN 106792109B CN 201611110164 A CN201611110164 A CN 201611110164A CN 106792109 B CN106792109 B CN 106792109B
Authority
CN
China
Prior art keywords
cache data
detectable
data volume
current period
actual
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
CN201611110164.5A
Other languages
Chinese (zh)
Other versions
CN106792109A (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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201611110164.5A priority Critical patent/CN106792109B/en
Publication of CN106792109A publication Critical patent/CN106792109A/en
Application granted granted Critical
Publication of CN106792109B publication Critical patent/CN106792109B/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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/44004Processing 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 video buffer management, e.g. video decoder buffer or video display buffer
    • 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/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a video playing method, a video playing device and a video playing terminal, wherein the method comprises the following steps: detecting the detectable cache data amount of the current period; determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period; and determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period. The method determines the actual cache data volume of the current period by combining the detectable cache data volume of the current period and the detectable cache data volume and the actual cache data volume of the previous period, so that the unknown cache data volume is considered, the accuracy of the cache data volume is greatly improved, the buffering times are reduced, and the user experience is improved.

Description

Video playing method and device and terminal
Technical Field
The present invention relates to communications technologies, and in particular, to a video playing method, an apparatus, and a terminal.
Background
With the continuous increase of network bandwidth, users can directly watch network videos through terminals. In the playing process of the network video, when the network downloading speed is lower than the film source code rate and the cache data in the terminal is continuously reduced, the playing will be blocked.
In the prior art, a terminal determines the amount of network video data cached in the terminal through a specific algorithm, and when the amount of the network video data cached is lower than a preset buffering start threshold, the terminal suspends playing and starts buffering. And when the data volume cached by the buffering reaches a preset buffering ending threshold, the terminal ends the buffering and continues playing.
However, the amount of network video data cached in the terminal determined by using the method in the prior art is not accurate enough, so that the buffering times are too many, and the user experience is influenced.
Disclosure of Invention
The invention provides a video playing method, a video playing device and a video playing terminal, which are used for solving the problem that in the prior art, the user experience is influenced due to the fact that the number of buffering times is too large because the determined network video data amount cached in the terminal is not accurate enough.
A first aspect of the present invention provides a video playing method, including:
detecting the detectable cache data amount of the current period;
determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period;
and determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period.
A second aspect of the present invention provides a video playback apparatus, including:
the detection module is used for detecting the detectable cache data volume of the current period;
a determining module, configured to determine an actual cache data amount of the current cycle according to the detectable cache data amount of the current cycle, the detectable cache data amount of the previous cycle of the current cycle, and the actual cache data amount of the previous cycle of the current cycle;
and the playing module is used for determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period.
A third aspect of the present invention provides a terminal, including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
detecting the detectable cache data amount of the current period;
determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period;
and determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period.
According to the video playing method, the video playing device and the video playing terminal, after the detectable cache data volume of the current period is detected, the terminal determines the actual cache data volume of the current period by combining the detectable cache data volume of the current period, the detectable cache data volume of the previous period and the actual cache data volume, namely, the actual cache data volume of the current period is determined based on the cache condition of the previous period, so that the unknown cache data volume is taken into consideration, the accuracy of the cache data volume is greatly improved, the buffering times are reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without inventive labor.
Fig. 1 is an exemplary partitioning of modules for video processing in a terminal;
fig. 2 is a schematic flowchart of a video playing method according to a first embodiment of the present invention;
fig. 3 is a schematic flowchart of a second embodiment of a video playing method according to the present invention;
fig. 4 is a block diagram of a first embodiment of a video player according to the present invention;
fig. 5 is a block diagram of a second embodiment of a video player according to the present invention;
fig. 6 is a physical structure diagram of a first embodiment of a terminal according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present 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.
Fig. 1 is an exemplary module division for performing video processing in a terminal, and as shown in fig. 1, the terminal includes a data downloading module, an audio/video separation module, a decoder, and an output module, where the data downloading module is configured to download video data to be played from a network and send the data to the audio/video separation module, the audio/video separation module performs audio/video separation, sends the separated audio data and video data to the decoder, and the decoder decodes the audio data and video data, and then outputs the decoded audio data and video data to the output module for playing. In the above video processing process, there may be buffer data amount in a plurality of modules, but the buffer data amount in all the modules is not directly detected by using the scheme in the prior art. For example, for the above module division, there may be buffer data amounts in the audio/video separation module, the decoder, and the output module, where the buffer data amount of the audio/video separation module may be directly detected by judging the playing time, but the buffer data amounts in the decoder and the output module may not be detected or are difficult to detect, and then the buffer data amounts in the two modules are unknown buffer data amounts.
In the prior art, the detected cache data volume is directly used as the total cache data volume in the terminal, and the unknown cache data volume is not considered. In this processing manner, the amount of cache data used as a basis for determining whether to buffer is smaller than the actual amount of cache data in the terminal, so that there may be a case where buffering is performed when buffering is not required, which may result in too many buffering times and affect user experience.
Based on the above problems, the present invention provides a video playing method, which determines the actual buffer data amount of the current period by combining the detectable buffer data amounts of the previous period and the current period, so as to ensure the accuracy of the actual buffer data amount of the current period, reduce the buffering times of the video in the playing process, and improve the user experience.
It should be noted that the module division shown in fig. 1 is only an example, and the following embodiment of the present invention is described by taking the module division as an example, but the module division shown in fig. 1 is only used to more clearly explain the technical solution of the present invention, and should not be taken as a limitation of the present invention, and the technical solution of the present invention can also be applied to any terminal that does not use the module division shown in fig. 1.
Fig. 2 is a schematic flowchart of a first embodiment of a video playing method provided by the present invention, where an execution subject of the method is a terminal having a video playing function, as shown in fig. 1, the method includes:
s201, detecting the detectable cache data amount of the current period.
The method of the invention needs to be executed periodically according to a certain time interval, and the calculation needs to be carried out on the basis of the result determined in the previous period in the processing process of each period.
In the processing of each period, first, a detectable buffer data amount of the current period is detected, that is, the detectable buffer data amount may be detected, for example, in the module shown in fig. 1, the audio and video separation module may separate audio data and video data, both the separated audio data and video data have a Presentation Time Stamp (PTS for short), and the buffer data amount in the audio and video separation module may be detected according to the PTS of the audio data and the PTS of the video data, that is, the detectable buffer data amount may be detected.
S202, determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period.
The actual cache data amount indicates the data amount actually cached in the terminal, that is, the sum of the detectable cache data amount and the unknown cache data amount is the cache data amount which needs to be finally obtained in each period.
The detectable buffer data amount of the previous period of the current period and the actual buffer data amount of the previous period are determined in the processing process of the previous period, and the terminal saves the detectable buffer data amount and the actual buffer data amount. In the current period, the terminal determines the actual buffer data volume of the current period by combining the detectable buffer data volume of the previous period, the actual buffer data volume of the previous period and the detectable buffer data volume detected in the current period.
S203, determining to pause playing the video or continue playing the video according to the actual buffer data amount of the current period.
Specifically, in each period, after the actual cache data volume is determined, if the video is played normally at present, comparing the acquired actual cache data volume with a preset cache start threshold, and if the actual cache data volume is smaller than the preset cache start threshold, pausing the playing of the video; and if the video is paused currently, comparing the acquired actual buffer data volume with a preset buffer ending threshold, and if the actual buffer data volume is larger than the preset buffer ending threshold, continuing to play the video.
In this embodiment, after detecting the detectable cache data amount of the current period, the terminal determines the actual cache data amount of the current period by combining the detectable cache data amount of the current period and the detectable cache data amount and the actual cache data amount of the previous period, that is, the actual cache data amount of the current period is determined based on the cache condition of the previous period, so that the unknown cache data amount is considered, thereby greatly improving the accuracy of the cache data amount, reducing the number of times of buffering, and improving user experience.
On the basis of the foregoing embodiment, this embodiment relates to a specific method for determining an actual buffer data size of a current period by a terminal, that is, fig. 3 is a schematic flow diagram of a second embodiment of a video playing method provided by the present invention, as shown in fig. 3, where step S202 specifically includes:
s301, judging whether the detectable cache data volume of the current period is larger than that of the previous period of the current period, if so, executing S302, otherwise, executing S303.
In this embodiment, the play duration is used as a unit of the buffer data volume, that is, the buffer data volume can be detected to be represented by the play duration, and meanwhile, the actual buffer data volume is also represented by the play duration.
Specifically, taking the module of fig. 1 as an example, after the audio data and the video data are separated by the audio and video separation module, the PTS of the audio data and the PTS of the video data may be obtained, and according to the PTS, the terminal may calculate the playing time of the audio data and the playing time of the video data, and if the playing time of the audio data is different from the playing time of the video data, select a time with a shorter playing time as the detectable buffer data amount in the audio and video separation module.
S302, calculating a difference value between the detectable cache data amount of the current period and the detectable cache data amount of the previous period of the current period, and taking the sum of the difference value and the actual cache data amount of the previous period of the current period as a first actual cache data amount.
And S303, taking the actual buffer data volume of the previous period of the current period as a first actual buffer data volume.
The first actual buffer data amount is temporary data in the algorithm processing process of this embodiment, that is, the calculation in S302 or S303 is performed first, the calculation result is represented by the first actual buffer data amount, and then the next calculation is performed based on the first actual buffer data amount.
S304, judging whether the video starts to play and the video is played normally, if so, executing S305, otherwise, executing S306.
S305, subtracting the preset time length from the first actual cache data amount to obtain a calculation result, and taking the calculation result as a new first actual cache data amount. Execution continues with S306.
And if the video is normally played in the current period, subtracting a preset time length from the first actual cache data volume, wherein the value of the preset time length is equal to the period length of the actual cache data volume determined by the terminal. For example, if the terminal determines the actual buffer data amount every 30ms, the preset duration value is 30 ms.
S306, judging whether the first actual cache data volume is smaller than the detectable cache data volume of the current period, if so, executing S307, and otherwise, executing S308.
And S307, taking the detectable cache data volume of the current period as the actual cache data volume of the current period.
And S308, taking the first actual cache data amount as the actual cache data amount of the current period.
The above process is explained in the form of a formula below:
assuming that the detectable cache data amount is bufferK and the actual cache data amount is bufferT, the detectable cache data amount in the current period is bufferK (x), and the actual cache data amount in the current period is bufferT (x), where x is a period identifier and x is an integer greater than or equal to 1.
The first step is as follows: and detecting to obtain buffer K (x).
The second step is that: if bufferK (x) > bufferK (x-1), then
bufferT(x)=bufferT(x-1)+(bufferK(x)-bufferK(x-1))
If bufferK (x) < ═ bufferK (x-1), then
bufferT(x)=bufferT(x-1)
The buffer t (x) obtained in this step is a temporary value, that is, the first actual buffer data size.
In this step, if the detectable buffer data amount is larger than the previous period, which indicates that the downloaded data amount is larger than the played data amount, the difference between the two periods and the actual buffer data amount of the previous period are used as the temporary buffer data amount of the current period. If the detectable buffer data amount is less than or equal to the previous period, which indicates that the download data amount is less than or equal to the play data amount, the actual buffer data amount of the previous period is temporarily used as the actual buffer data amount of the current period.
The third step: if the video has started playing and the playing is normal, then
bufferT(x)=bufferT(x)–30ms
In this step, it is determined whether the video is being played normally, and if so, the temporary actual buffer data amount calculated in the second step is subtracted by a preset time length, that is, by the detection period interval time, to serve as a new temporary buffer (x).
If the conditions in this step are not satisfied, buffer (x) in this step keeps the calculation result of the second step unchanged. The 30ms is a preset time length and can be changed according to the preset time length.
The fourth step: if bufferT (x) < bufferK (x), then
bufferT(x)=bufferK(x)
If the temporary buffer T (x) is smaller than the buffer K (x) after the calculation, the buffer T (x) is considered to be equal to the buffer K (x).
If the conditions of the present step are not satisfied, the result of the third step is directly taken as the final buffer (x).
In another embodiment, the initial value of the actual buffer data amount is an initial value of a detectable buffer data amount, and the initial value of the detectable buffer data amount is detected and obtained by the terminal before the video is played.
Specifically, before playing the video, after the preparation is completed, the terminal performs an initial buffer data amount detection, which is denoted as buffer k (0), and takes the buffer k as an initial value buffer t (0) of the actual buffer data amount, which is expressed by the following formula:
bufferT(0)=bufferK(0)
on the basis of the buffer T (0), the actual cache data volume is continuously updated in each period according to the algorithm, so that the accuracy of the actual cache data volume is ensured.
In another embodiment, when detecting the detectable amount of cache data in the current cycle, the following method may be specifically used to detect:
and detecting the detectable cache data amount of the current period by using a first thread, wherein the first thread is started before the video is played.
And starting a first thread before the video playing is started, wherein the first thread runs all the time in the video playing process, and the first thread detects the detectable cache data amount in each period according to the period set in the terminal. The period is a period for determining the actual amount of the cached data in the foregoing embodiment, that is, the first thread detects the detectable amount of the cached data at a fixed time interval, where the time interval is equal to the length of the period for determining the actual amount of the cached data by the terminal, and specifically is the preset time length in the foregoing embodiment.
When the first thread runs, the PTS information of the data received in the current period is firstly acquired, the playing time length of the data received in the current period is calculated according to the PTS information, and the calculated playing time length of the data received in the current period is used as the detectable cache data volume of the current period.
Specifically, taking the module shown in fig. 1 as an example, in each period, after the audio and video separation module separates the audio data and the video data, the first thread first obtains the PTS of the audio data and the PTS of the video data, calculates the play duration according to the PTS, selects the smaller value of the play duration of the audio data and the play duration of the video data, and uses the smaller value as the detectable buffer data amount in the period.
Optionally, the preset time length, i.e. the periodic interval time, is 30 ms.
Fig. 4 is a block diagram of a video playing apparatus according to a first embodiment of the present invention, as shown in fig. 4, the apparatus includes:
the detecting module 401 is configured to detect a detectable amount of cache data in a current cycle.
The determining module 402 is configured to determine an actual buffer data amount of the current cycle according to the detectable buffer data amount of the current cycle, the detectable buffer data amount of the previous cycle of the current cycle, and the actual buffer data amount of the previous cycle of the current cycle.
The playing module 403 is configured to determine to pause playing the video or continue playing the video according to the actual buffer data amount of the current period.
The device is used for realizing the method embodiments, the realization principle and the technical effect are similar, and the details are not repeated here.
Fig. 5 is a block diagram of a second embodiment of a video playing apparatus according to the present invention, and as shown in fig. 5, the detecting buffer data amount is represented by a playing time duration, and the determining module 402 includes:
the first calculating unit 4021 is configured to determine whether the detectable cache data amount of the current cycle is greater than the detectable cache data amount of the previous cycle of the current cycle, and if so, calculate a difference between the detectable cache data amount of the current cycle and the detectable cache data amount of the previous cycle of the current cycle, and use a sum of the difference and an actual cache data amount of the previous cycle of the current cycle as a first actual cache data amount; and if not, taking the actual cache data volume of the previous period of the current period as the first actual cache data volume.
The second calculating unit 4022 is configured to determine whether the video has started to be played and is played normally, and if so, subtract a preset time length from the first actual cache data amount to obtain a calculation result, and use the calculation result as a new first actual cache data amount.
A third calculating unit 4023, configured to determine whether the first actual cache data amount is smaller than the detectable cache data amount of the current cycle, and if so, take the detectable cache data amount of the current cycle as the actual cache data amount of the current cycle; and if not, taking the first actual cache data volume as the actual cache data volume of the current period.
In another embodiment, the initial value of the actual buffer data amount is the initial value of the detectable buffer data amount, and the initial value of the detectable buffer data amount is detected and obtained by the terminal before the video is played.
In another embodiment, the detection module 401 is specifically configured to:
and detecting the detectable cache data amount of the current period by using a first thread, wherein the first thread is started before the video is played.
In another embodiment, the detection module 401 is further specifically configured to:
and obtaining PTS information of the data received in the current period by using the first thread, calculating the playing time of the data received in the current period according to the PTS information, and taking the calculated playing time of the data received in the current period as the detectable cache data volume of the current period.
Fig. 6 is an entity structure diagram of a first embodiment of a terminal provided by the present invention, and as shown in fig. 6, the terminal includes:
a processor 61;
a memory 62 for storing executable instructions of the processor 61;
wherein the processor 61 is configured to:
detecting the detectable cache data amount of the current period;
determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period;
and determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A video playback method, comprising:
detecting the detectable cache data amount of the current period;
determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period; the actual cache data volume is the sum of the detectable cache data volume and the unknown cache data volume;
determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period;
the detectable cache data volume is represented by a play time length;
the determining the actual buffer data volume of the current period according to the detectable buffer data volume of the current period, the detectable buffer data volume of the previous period of the current period, and the actual buffer data volume of the previous period of the current period includes:
judging whether the detectable cache data amount of the current period is larger than the detectable cache data amount of the previous period of the current period, if so, calculating a difference value between the detectable cache data amount of the current period and the detectable cache data amount of the previous period of the current period, and taking the sum of the difference value and the actual cache data amount of the previous period of the current period as a first actual cache data amount; if not, taking the actual cache data volume of the previous period of the current period as a first actual cache data volume;
judging whether the video starts to be played and the video is played normally, if so, subtracting a preset time length from the first actual cache data volume to obtain a calculation result, and taking the calculation result as a new first actual cache data volume;
judging whether the first actual cache data volume is smaller than the detectable cache data volume of the current period, if so, taking the detectable cache data volume of the current period as the actual cache data volume of the current period; if not, taking the first actual cache data volume as the actual cache data volume of the current period;
the initial value of the actual buffer data amount is the initial value of the detectable buffer data amount, and the initial value of the detectable buffer data amount is detected and obtained by a video playing terminal before video playing.
2. The method of claim 1, wherein detecting the detectable amount of buffered data for the current cycle comprises:
and detecting the detectable cache data amount of the current period by using a first thread, wherein the first thread is started before the video is played.
3. The method of claim 2, wherein detecting the detectable amount of cache data for the current cycle using the first thread comprises:
the method comprises the steps of obtaining display time stamp (PTS) information of data received in a current period by using a first thread, calculating the playing time length of the data received in the current period according to the PTS information, and taking the calculated playing time length of the data received in the current period as the detectable cache data volume of the current period.
4. A video playback apparatus, comprising:
the detection module is used for detecting the detectable cache data volume of the current period; the detectable cache data volume is represented by a play time length;
a determining module, configured to determine an actual cache data amount of the current cycle according to the detectable cache data amount of the current cycle, the detectable cache data amount of the previous cycle of the current cycle, and the actual cache data amount of the previous cycle of the current cycle; the actual cache data volume is the sum of the detectable cache data volume and the unknown cache data volume
The playing module is used for determining whether to pause playing the video or continue playing the video according to the actual cache data volume of the current period;
the determining module comprises:
a first calculating unit, configured to determine whether the detectable cache data amount of the current period is greater than the detectable cache data amount of the previous period of the current period, and if so, calculate a difference between the detectable cache data amount of the current period and the detectable cache data amount of the previous period of the current period, and use a sum of the difference and an actual cache data amount of the previous period of the current period as a first actual cache data amount; if not, taking the actual cache data volume of the previous period of the current period as a first actual cache data volume;
the second calculation unit is used for judging whether the video starts to be played and is played normally, if so, subtracting a preset time length from the first actual cache data volume to obtain a calculation result, and taking the calculation result as a new first actual cache data volume;
a third calculating unit, configured to determine whether the first actual cache data amount is smaller than the detectable cache data amount of the current cycle, and if so, take the detectable cache data amount of the current cycle as the actual cache data amount of the current cycle; if not, taking the first actual cache data volume as the actual cache data volume of the current period;
the initial value of the actual buffer data amount is the initial value of the detectable buffer data amount, and the initial value of the detectable buffer data amount is detected and obtained by a video playing terminal before video playing.
5. The apparatus of claim 4, wherein the detection module is specifically configured to:
and detecting the detectable cache data amount of the current period by using a first thread, wherein the first thread is started before the video is played.
6. A terminal, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
detecting the detectable cache data amount of the current period; the detectable cache data volume is represented by a play time length;
determining the actual cache data volume of the current period according to the detectable cache data volume of the current period, the detectable cache data volume of the previous period of the current period and the actual cache data volume of the previous period of the current period; the actual cache data volume is the sum of the detectable cache data volume and the unknown cache data volume
Determining to pause playing the video or continue playing the video according to the actual buffer data volume of the current period;
the processor is specifically configured to:
judging whether the detectable cache data amount of the current period is larger than the detectable cache data amount of the previous period of the current period, if so, calculating a difference value between the detectable cache data amount of the current period and the detectable cache data amount of the previous period of the current period, and taking the sum of the difference value and the actual cache data amount of the previous period of the current period as a first actual cache data amount; if not, taking the actual cache data volume of the previous period of the current period as a first actual cache data volume;
judging whether the video starts to be played and the video is played normally, if so, subtracting a preset time length from the first actual cache data volume to obtain a calculation result, and taking the calculation result as a new first actual cache data volume;
judging whether the first actual cache data volume is smaller than the detectable cache data volume of the current period, if so, taking the detectable cache data volume of the current period as the actual cache data volume of the current period; if not, taking the first actual cache data volume as the actual cache data volume of the current period;
the initial value of the actual buffer data amount is the initial value of the detectable buffer data amount, and the initial value of the detectable buffer data amount is detected and obtained by a video playing terminal before video playing.
CN201611110164.5A 2016-12-06 2016-12-06 Video playing method and device and terminal Active CN106792109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611110164.5A CN106792109B (en) 2016-12-06 2016-12-06 Video playing method and device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611110164.5A CN106792109B (en) 2016-12-06 2016-12-06 Video playing method and device and terminal

Publications (2)

Publication Number Publication Date
CN106792109A CN106792109A (en) 2017-05-31
CN106792109B true CN106792109B (en) 2021-02-26

Family

ID=58878329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611110164.5A Active CN106792109B (en) 2016-12-06 2016-12-06 Video playing method and device and terminal

Country Status (1)

Country Link
CN (1) CN106792109B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107087210B (en) * 2017-03-30 2020-04-14 青岛海信电器股份有限公司 Method and terminal for judging video playing state based on cache time
CN109561347B (en) * 2017-09-27 2022-01-25 ***通信集团山东有限公司 Internet video playing quality judgment method and system
CN108259998B (en) * 2018-03-01 2021-01-22 海信视像科技股份有限公司 Player, play control method and device, electronic equipment and play system
CN111327956A (en) * 2020-02-13 2020-06-23 杭州海康威视***技术有限公司 Video playing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442307A (en) * 2013-08-20 2013-12-11 深圳市融创天下科技股份有限公司 Method and device for playing video streaming media
CN104038846A (en) * 2013-03-05 2014-09-10 华为技术有限公司 Cache status estimation method and cache status estimation equipment
CN105872576A (en) * 2016-04-25 2016-08-17 乐视控股(北京)有限公司 Video playing method and device
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device
CN105992043A (en) * 2015-10-15 2016-10-05 乐视致新电子科技(天津)有限公司 Data processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188236B (en) * 2011-12-30 2015-12-16 华为技术有限公司 The appraisal procedure of media transmission quality and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038846A (en) * 2013-03-05 2014-09-10 华为技术有限公司 Cache status estimation method and cache status estimation equipment
CN103442307A (en) * 2013-08-20 2013-12-11 深圳市融创天下科技股份有限公司 Method and device for playing video streaming media
CN105992043A (en) * 2015-10-15 2016-10-05 乐视致新电子科技(天津)有限公司 Data processing method and device
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device
CN105872576A (en) * 2016-04-25 2016-08-17 乐视控股(北京)有限公司 Video playing method and device

Also Published As

Publication number Publication date
CN106792109A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106658133B (en) Audio and video synchronous playing method and terminal
CN106792109B (en) Video playing method and device and terminal
US11217279B2 (en) Method and device for adjusting video playback speed
WO2017067489A1 (en) Set-top box audio-visual synchronization method, device and storage medium
US10482568B2 (en) Information processor and information processing method
US20100226624A1 (en) Information processing apparatus, playback device, recording medium, and information generation method
CN107205160A (en) A kind of player method and device of the video issued for server
US9615130B2 (en) Method and device for processing multimedia frame and storage medium
US10231005B2 (en) Operation instructing method and apparatus for remote controller of intelligent television
CN110022498B (en) Method and device for realizing code rate switching
US9584787B1 (en) Performance optimization for streaming video
EP3142381A1 (en) Network video playing method and device
EP3073754A1 (en) Systems and methods for video play control
US10389785B2 (en) Method for adaptively streaming an audio/visual material
US10873775B2 (en) Staggered key frame video encoding
CN112104909A (en) Interactive video playing method and device, computer equipment and readable storage medium
CN112601127A (en) Video display method and device, electronic equipment and computer readable storage medium
CN108259998B (en) Player, play control method and device, electronic equipment and play system
CN113490055A (en) Data processing method and device
CN107087210B (en) Method and terminal for judging video playing state based on cache time
CN115460458B (en) Video frame loss method and device
CN107040826B (en) Video loading method and device, computer device and computer readable storage medium
CN106060583B (en) Cloud game delay process method and device
CN107798718B (en) Animation playback method and device
US8644691B1 (en) Adaptively and accurately seeking a video frame of a video sequence rendered on a data processing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co., Ltd

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: HISENSE ELECTRIC Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant