CN111432283A - Video playback time determination method and device - Google Patents
Video playback time determination method and device Download PDFInfo
- Publication number
- CN111432283A CN111432283A CN201911178981.8A CN201911178981A CN111432283A CN 111432283 A CN111432283 A CN 111432283A CN 201911178981 A CN201911178981 A CN 201911178981A CN 111432283 A CN111432283 A CN 111432283A
- Authority
- CN
- China
- Prior art keywords
- time
- video
- playback
- starting
- played back
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47217—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8455—Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The embodiment of the invention provides a method and a device for determining video playback time. The method comprises the following steps: acquiring the starting time of a video clip; determining real time corresponding to a played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments; and determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame. The real-time corresponding to the currently played back video frame may be determined without reading the timestamp of the video frame.
Description
Technical Field
The invention relates to the technical field of web front ends, in particular to a method and a device for determining video playback time.
Background
In the related art, a user can access video data stored in a target device through a web side and play back the video data. In some application scenarios, a user may need to synchronize some data with the played back video data in the time domain, e.g., to synchronize the time displayed in a time bar with the recording time of the played back video, so that the OSD information displayed in the video can correspond to the time bar. It is therefore necessary to determine the real-time corresponding to the currently played back video frame.
However, the web side often plays back the video data by using a self-contained video tag, and the video tag does not provide an API for reading the time stamp, so that the time stamp cannot be read from the video data by the video tag, which makes it difficult to determine the real time corresponding to the currently played video frame.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method and an apparatus for determining video playback time, so as to determine real time corresponding to a currently played back video frame without reading a timestamp of the video frame. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, there is provided a method for determining a time for video playback, the method including:
acquiring the starting time of a video clip;
determining real time corresponding to a played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments;
and determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame.
In one possible implementation manner, the video segments include a first video segment, and the first video segment is a video segment played back first when playback is started;
the determining the real time corresponding to the played back starting video frame when the playback is started according to the designated playback starting time and the starting time of at least one of the video segments includes:
if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the real time corresponding to the starting video frame;
and if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
In one possible implementation, the method further includes: acquiring the ending time of the video clip;
the first video segment is determined by:
according to the time sequence, determining the precedence relationship between the appointed playback start time and the end time of the video clip for each video clip in the video clips in sequence, and determining the video clip as a first video clip until the appointed playback start time is earlier than the end time of the video clip.
In one possible implementation, the method further includes: acquiring the ending time of the video clip;
the determining the real time corresponding to the played back starting video frame when the playback is started according to the designated playback starting time and the starting time of at least one of the video segments includes:
and determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the ending time of at least one video segment in the video segments.
In one possible implementation, the method further includes: acquiring the ending time of the video clip;
determining the real time corresponding to the video frame currently being played back according to the accumulated playback duration and the real time corresponding to the starting video frame, including:
and determining the real time corresponding to the video frame which is played back currently according to the accumulated playback time length, the real time corresponding to the starting video frame and at least one of the starting time and the ending time of the video segment.
In a possible implementation manner, the determining, according to the accumulated playback time, the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment, the real time corresponding to the video frame currently being played back includes:
determining a currently played video segment according to the accumulated playback duration, the actual time corresponding to the initial video frame and at least one of the initial time and the end time of the video segment;
if the video segment which is played back currently is the first played back video segment, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame;
and if the video segment which is currently played back is not the first played back video segment, determining the real time corresponding to the video frame which is currently played back according to the accumulated playback time length, the real time corresponding to the starting video frame and the blank time length of the video segment which does not exist between the starting moment of the video segment which is currently played back and the real time corresponding to the starting video frame.
In a possible implementation manner, the determining, according to the accumulated playback time, the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment, the video segment currently being played back includes:
determining whether the remaining time from the real time corresponding to the starting video frame to the ending time of the first played back video segment is greater than the accumulated playback time;
if the remaining time length is larger than the accumulated playback time length, determining the first played back video clip as the video clip currently being played back;
if the residual time length is less than the accumulated playback time length, sequentially overlapping the difference value between the ending time and the starting time of one of the video segments on the residual time length from the next video segment adjacent to the first played back video segment in time domain according to the time sequence until the overlapped time length is greater than the accumulated playback time length;
the last superimposed video segment is determined as the video segment currently being played back.
In one possible implementation, the method further includes:
acquiring accumulated playback time length after playback is started through a timeupdate event of the video tag; or determining the accumulated playback time length through the reading of a preset timer, wherein the preset counter starts counting when the playback starts;
displaying the real time corresponding to the video frame which is played back currently at a preset position of a video playback interface;
acquiring the ending time of the video clip;
determining whether a video clip with a starting time not later than a specified playback ending time and an ending time later than the real time corresponding to the currently played back video frame exists in the video clips;
if not, playback is ended.
In a second aspect of embodiments of the present invention, there is provided a time determination apparatus, including:
the video information acquisition module is used for acquiring the starting time of the video clip;
the starting video frame time determining module is used for determining the real time corresponding to the starting video frame played back when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments;
and the current frame time determining module is used for determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame.
In one possible implementation manner, the video segments include a first video segment, and the first video segment is a video segment played back first when playback is started;
the starting video frame time determining module is specifically configured to,
if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the real time corresponding to the starting video frame;
and if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
In a possible implementation manner, the video information obtaining module is further configured to obtain an end time of the video segment;
the starting video frame time determining module is further configured to determine, according to a time sequence, a precedence relationship between a specified playback start time and an end time of each of the video segments in turn, until the specified playback start time is earlier than the end time of the video segment, and determine the video segment as a first video segment.
In a possible implementation manner, the video information obtaining module is further configured to obtain an end time of the video segment;
the starting video frame time determining module is specifically configured to determine, according to a specified playback start time and a start time and an end time of at least one of the video segments, a real time corresponding to a starting video frame played back when playback is started.
In a possible implementation manner, the video information obtaining module is further configured to obtain an end time of the video segment;
the current frame time determining module is specifically configured to determine the real time corresponding to the currently played back video frame according to the accumulated playback duration, the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment.
In a possible implementation manner, the current frame time determining module is specifically configured to determine a video segment currently being played back according to an accumulated playback duration, a real time corresponding to the starting video frame, and at least one of a starting time and an ending time of a video segment in the at least one video segment;
if the video segment which is played back currently is the first played back video segment, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame;
and if the video segment which is currently played back is not the first played back video segment, determining the real time corresponding to the video frame which is currently played back according to the accumulated playback time length, the real time corresponding to the starting video frame and the blank time length of the video segment which does not exist between the starting moment of the video segment which is currently played back and the real time corresponding to the starting video frame.
In a possible implementation manner, the current frame time determining module is specifically configured to determine whether a remaining time period from a real time corresponding to the starting video frame to an end time of the first played back video segment is greater than an accumulated playback time period;
if the remaining time length is larger than the accumulated playback time length, determining the first played back video clip as the video clip currently being played back;
if the residual time length is less than the accumulated playback time length, sequentially overlapping the difference value between the ending time and the starting time of one of the video segments on the residual time length from the next video segment adjacent to the first played back video segment in time domain according to the time sequence until the overlapped time length is greater than the accumulated playback time length;
the last superimposed video segment is determined as the video segment currently being played back.
In a possible implementation manner, the video information obtaining module is further configured to obtain an end time of the video segment;
the device also comprises a video playback module, a video playback module and a video playing module, wherein the video playback module is used for acquiring the accumulated playback time length after the playback is started through the timeupdate event of the video tag; or determining the accumulated playback time length through the reading of a preset timer, wherein the preset counter starts counting when the playback starts;
displaying the real time corresponding to the video frame which is played back currently at a preset position of a video playback interface;
determining whether a video clip with a starting time not later than a specified playback ending time and an ending time later than the real time corresponding to the currently played back video frame exists in the at least one video clip;
if not, playback is ended.
In a third aspect of embodiments of the present invention, there is provided an electronic device, including:
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out the method steps of any one of the above-mentioned first aspects.
In a fifth aspect of embodiments of the present invention, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any one of the above-described first aspects.
The method, the device, the electronic device, the computer-readable storage medium and the computer program product for determining the video playback time provided by the embodiments of the present invention can determine the real time corresponding to the currently played back video frame without reading the timestamp of the video frame. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a video playback time determination method according to an embodiment of the present invention;
fig. 2 is another schematic flow chart of a video playback time determination method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a video playback time determination apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Referring to fig. 1, fig. 1 illustrates a method for determining video playback time according to an embodiment of the present invention, which may include:
s101, acquiring the starting time of the video clip.
The start time of a video segment may represent the real time when the recording of the video segment is started. For example, if a video segment starts to be recorded at 8:00 a.m., the video segment starts at 8:00 a. It will be appreciated that, for convenience of description herein, time may be expressed in terms of time-minutes, and in other possible embodiments, time may be expressed in other forms, such as year-month-day-time-minutes, time-minute-seconds, etc., and the present embodiment is not limited thereto.
For convenience of description, the start time of one video segment is recorded as L, and the end time is recorded as N, for example, L1 represents the start time of a first video segment, N1 represents the end time of the first video segment, L2 represents the start time of a second video segment, and N2 represents the end time of the second video segment ….
S102, determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments.
The specified playback start time may be the start of a user-input period of time for which playback is desired. For example, assuming that the user wishes to play back a video within 8:00-20:00 a day, it may be to input an operation instruction to take 8:00 as a specified playback start time.
It will be appreciated that, assuming that the user wishes to play back video for a certain day 8:00-20:00, there may be some periods of time during that day 8:00-20:00 when no video is recorded, for example, all recorded segments recorded during that day may be recorded at 3:00-7:00, 9:00-13:00, 15: 00-19:00, 21:00-23:00, the user wishes to play back video within 8:00-20:00, the actual played back video being 9:00-13:00, 15: 00-19:00, therefore, the video played back when actually starting playback is the video recorded at 9:00, but not the video recorded at 8:00, i.e. the actual time corresponding to the starting video frame and the designated playback start time may be different.
Assuming that the start times of the plurality of video segments are acquired in S101, in some application scenarios, the real time corresponding to the start video frame played back when playback is started may be determined according to all the acquired start times and the designated playback start time. In other application scenarios, the real time corresponding to the starting video frame played back when the playback is started may also be determined according to the acquired partial (one or more) starting time and the specified playback starting time.
In a possible embodiment, the video segment includes a first video segment, which may be a video segment that is played back first when playback is started, and the specified playback start time and the start time of the first video segment are determined in sequence. The first video segment may be the only one video segment that needs to be played back; the first video segment may also be one of a plurality of video segments that need to be played back, and the determination manner of the first video segment may be different according to different playback manners used for video playback, which will be described in detail in the subsequent embodiments and will not be described herein again.
And if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the real time corresponding to the starting video frame. And if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
For the case where the specified playback start time is equal to the start time of the first video segment, since the specified playback start time is the same as the start time of the first video segment, the specified playback start time may be determined as the real time corresponding to the start video frame, and the start time of the first video segment may also be determined as the real time corresponding to the start video frame.
For example, assuming that the start time of the first video segment is 8:00 and the specified playback start time is 9:00, the real time corresponding to the start video frame is 9: 00. For another example, if the starting time of the first video segment is 10:00 and the specified playback starting time is 9:00, the real time corresponding to the starting video frame is 10: 00. For another example, if the starting time of the first video segment is 9:00 and the specified playback starting time is 9:00, the real time corresponding to the starting video frame is 9: 00.
The real time corresponding to a video frame may be the real time for recording the video frame, that is, the recording time, or the real time of other data corresponding to the video frame, for example, the real time displayed in the OSD information corresponding to the video frame. The present embodiment does not limit this.
And S103, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame.
The cumulative playback time length is used to indicate the time length of the video that has been played back, and for example, it is assumed that the playback is started at 9:00 am and continues to be played back to 10:00 am, and the cumulative playback time length is 1 hour. The determination manner of the accumulated playback time length may be different according to different application scenarios, and for example, in one possible embodiment, the accumulated playback time length may be obtained through a timeupdate event of the video tag as the accumulated playback time length. In another possible embodiment, the accumulated playback time period may be determined by reading a preset timer, and the preset counter starts counting when the playback starts.
By adopting the embodiment, the real time corresponding to the currently played back video frame can be determined under the condition that the time stamp of the video frame is not read, so that the user can synchronize the data and the played back video data in a time domain according to actual requirements.
For example, in one possible embodiment, after determining the real-time corresponding to the video frame currently being played back, the real-time corresponding to the video frame currently being played back may be displayed at a preset position of the video playback interface, and the displayed time may be updated synchronously as the video playback progresses. With this embodiment, it is possible to enable the displayed time to be synchronized with the OSD time information in the played back video data in the case where the video data is played back through the video tag of the web side. According to practical requirements, the method for determining the video playback time provided by the embodiment of the present invention can also be used in other application scenarios, and this example does not limit this.
The mode of displaying the real time corresponding to the currently played back video frame may be different according to different application scenes, and may be, for example, displaying in a character string of a preset format or displaying in a time bar form. So that the user can more clearly know the current playback progress.
The triggering condition for ending the playback may also be different according to different application scenarios, and for example, in one possible embodiment, the playback may be ended after receiving an instruction for ending the playback input by the user. In another possible embodiment, it may also be determined whether there is a video segment whose start time is not later than the specified playback end time and whose end time is later than the real time corresponding to the video frame currently being played back, and if not, the playback is ended. The specified playback end time may be preset by a user, or may be calculated according to a preset rule. For example, suppose that the playback end time is 22:30, the real time corresponding to the currently played back video frame is 22:00, and the video segment includes 4 video segments 1-4, where the start time of the video segment 1 is 9:000, the end time is 12:00, the start time of the video segment 2 is 13:00, the end time is 18:00, the start time of the video segment 3 is 19:00, the end time is 22:00, the start time of the video segment 4 is 23:00, and the end time is 24: 00. Playback is ended because the video segment 1, the video segment 2, and the video segment 3 end time are no later than the real time corresponding to the video frame currently being played back, and the start time of the video segment 4 is later than the specified playback end time. It can be understood that the end time of the video segment may be obtained simultaneously with the start time of the video segment, or may be obtained separately from the start time, which is not limited in this embodiment.
And if the video clips have the video clips of which the starting time is not later than the designated playback ending time and the ending time is later than the real time corresponding to the currently played back video frame. There are two possible cases:
in case one, there exists a video segment whose start time is earlier than a specified playback end time and whose end time is later than the real time corresponding to the currently played back video frame in the video segment. Playback can continue at this point.
And in the second case, no video clip with the starting time earlier than the specified playback ending time and the ending time later than the real time corresponding to the currently played back video frame exists in the video clips. At this time, there is a video segment whose start time is equal to the specified playback end time and whose end time is later than the real time corresponding to the video frame currently being played back. At this time, the playback can be continued or ended according to actual needs.
Illustratively, assume that the video segment includes 4 video segments 1-4, wherein the start time of video segment 1 is 9:000, the end time is 12:00, the start time of video segment 2 is 13:00, the end time is 18:00, the start time of video segment 3 is 19:00, the end time is 22:00, the start time of video segment 4 is 23:00, and the end time is 24:00, if the playback end time is specified to be 23: 00. When the playback is performed, when the last video frame of the video segment 3 is played back, the video segment of real time corresponding to the video frame currently being played back is 22:00, and the playback may be ended, that is, the first video frame of the video segment 4 is not played back. Playback may also continue, i.e., playback of the first video frame of video segment 4 and end after playback of the first video frame of video segment 4.
In order to more clearly describe the method for determining the video playback time provided by the embodiment of the present invention, the following description will separately describe the methods for determining the real time corresponding to the video frame currently being played back in different situations.
For the case that the video segment is a video segment, or no blank time duration exists between all the video segments adjacent to each other in the time domain in the video segment, the real time corresponding to the starting video frame and the accumulated playback time duration may be added to obtain the real time corresponding to the currently played back video frame. Temporally adjacent video segments may refer to the absence of other video segments between two video segments in the temporal domain. For example, assuming that the start time of video segment a is 8:00, the end time is 9:00, the start time of video segment B is 10:00, the end time is 12:00, the start time of video segment C is 12:00, and the end time is 15:00, video segment a and video segment B are adjacent in time domain, but video segment a and video segment C are not adjacent in time domain. The absence of a blank duration between video segments means that the ending time of one video segment is equal to the starting time of another video segment, for example, there is no blank duration between video segment B and video segment C, and there is a blank duration of one hour between video segment a and video segment B.
For a plurality of video segments, and for a plurality of video segments, there is a blank time duration between temporally adjacent video segments. The real time corresponding to the video frame currently being played back can be determined according to the accumulated playback time length, the real time corresponding to the initial video frame, and at least one of the initial time and the end time of the video segment.
For example, the video segment currently being played back may be determined according to the accumulated playback time and the real-time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment. If the currently played back video segment is the first played back video segment, the real time corresponding to the currently played back video frame may be determined only according to the real time corresponding to the starting video frame and the accumulated playback time length, for example, the real time corresponding to the starting video frame and the accumulated playback time length are added to obtain the real time corresponding to the currently played back video frame.
If the currently playing back video segment is not the first played back video segment, the real time corresponding to the start video frame may be determined according to the accumulated playback time length, the real time corresponding to the start video frame, and the blank time length between the start time of the currently playing back video segment and the real time corresponding to the start video frame, for example, the real time corresponding to the currently playing back video frame, the accumulated playback time length, and the blank time length between the start time of the currently playing back video segment and the real time corresponding to the start video frame may be added to obtain the real time corresponding to the currently playing back video frame, where L is 3:00, N1 is 7:00, L is 9:00, N2 is 13:00, 64 is 15:00, N3 is 19:00, L is 21:00, N4 is 23:00, and the application start time specified as 8:00 is an example, the start time of the currently playing back video segment is an example, the real time length corresponding to the real time frame is 19:00, and the current playback time length is 3600, and the current playback time length is 3:00, the current playback time length is accordingly, the accumulated playback time length is 3600.
In a possible embodiment, it may be determined whether the video segment currently being played back is the first played back video segment according to a remaining time from a real time corresponding to the starting video frame to an end time of the first played back video segment and the accumulated playback time.
And if the remaining time length is greater than the accumulated playback time length, the video segment currently being played back is the first played back video segment. If the remaining time period is less than the accumulated playback time period, the video segment currently being played back is not the first played back video segment. The difference between the ending time and the starting time of one of the video segments can be sequentially overlapped on the remaining time length from the next video segment adjacent to the time domain of the first played back video segment according to the time sequence until the time length obtained by overlapping is greater than the accumulated playback time length. The last superimposed video segment is determined as the video segment currently being played back.
For example, assume that L1 is 3:00, N1 is 7:00, L2 is 9:00, N2 is 13:00, L3 is 15:00, N3 is 19:00, L4 is 21:00, N4 is 23:00, and the playback start time is 8:00, and the real time corresponding to the start video frame is 9:00, and the relevant calculation process may be referred to the description in S102, which is not repeated here.
When the duration of the third video clip is superposed on the remaining duration, the superposed duration is 4+ N3-L3-8 hours, which is greater than the accumulated playback duration, so that the currently played back video clip can be determined to be the third video clip.
If the remaining time length is equal to the accumulated playback time length, according to different application scenarios, the first played back video segment may be determined as the video segment currently being played back, or the subsequent video segment temporally adjacent to the first played back video segment may be determined as the video segment currently being played back. It can be understood that if the remaining time length is equal to the accumulated playback time length, it indicates that the playback of the last video frame in the first played back video segment has been completed, if the new frame has not been refreshed at the current time, the video frame played back at the current time is the last video frame in the first played back video segment, and if the new frame has been refreshed at the current time, the video frame played back at the current time is the first video frame in the subsequent video segment adjacent to the time domain of the first played back video segment.
Assuming that the update of the accumulated playback time length is triggered by the refresh new frame (for example, the accumulated playback time length is obtained through a timeupdate event of the video tag), that is, the update of the accumulated playback time length is synchronous with the refresh new frame, it can be considered that when the remaining time length is equal to the accumulated playback time length, the new frame has been refreshed, and then the subsequent video segment temporally adjacent to the first played back video segment is determined as the video segment currently being played back. Assuming that the update frequency of the accumulated playback time is not synchronized with refreshing the new frame, the remaining time is equal to the accumulated playback time, the new frame may or may not have been refreshed.
If the remaining duration is equal to the cumulative playback duration, after the cumulative playback duration is updated, the cumulative playback duration is greater than the remaining duration, so that in a case where the remaining duration is equal to the cumulative playback duration, only one update period of the cumulative playback duration is continued, and the cumulative playback duration update period is often short, taking the case where the cumulative playback duration is obtained through a timeupdate event of the video tag, assuming that the frame rate of the played back video clip is 30fps, one update period of the cumulative playback duration is 0.03s, so even if the remaining duration is equal to the cumulative playback duration, it is determined that there is an error in the real time corresponding to the currently played back video frame, and the influence on the user experience is small (since 0.03s is less than the shortest reaction time of a normal person, the influence can even be ignored).
It is understood that there is no blank time period between video segments adjacent in the time domain for the case where the video segments are multiple video segments. If the currently played back video segment is the first played back video segment, the real time corresponding to the currently played back video frame may also be determined according to the real time corresponding to the starting video frame, the accumulated playback time, and the blank time between the starting time of the currently played back video segment and the real time corresponding to the starting video frame, where the blank time is zero.
For convenience of description, the following description will be given by taking an application scenario in which the terminal device accesses the server through the web end to play back the video data stored in the server as an example, and the principle is the same for other possible application scenarios, and therefore, the description is not repeated.
In a possible embodiment, the terminal device may access the server through the web server, search for video segments in the server, of which all end times are later than the specified playback start time and start times are earlier than the specified playback end time, sort the searched video segments according to the chronological order, and determine that the video segment located at the first position is the first video segment.
In another possible embodiment, the terminal device may access the server through the web side and search all video clips in the server. And determining the precedence relationship between the appointed playback starting time and the ending time of the video clip for each searched video clip in turn according to the time precedence order, and determining the video clip as the first video clip until the appointed playback starting time is earlier than the ending time of the video clip.
For example, assume that L1 is 3:00, N1 is 7:00, L2 is 9:00, N2 is 13:00, L3 is 15:00, N3 is 19:00, L4 is 21:00, N4 is 23:00, and the designated playback start time is 8:00, then the end time of the first video segment is 7:00 prior to the designated playback start time in chronological order, so the comparison continues between the end time of the second video segment and the designated playback start time, and the comparison stops because the end time of the second video segment is 13:00 and the designated playback start time later.
For more clearly explaining the method for determining time for video playback provided by the embodiment of the present invention, the following description is made in conjunction with a flow of video playback, and referring to fig. 2, fig. 2 shows a method for determining time for video playback based on a video tag provided by an embodiment of the present invention, where the method may include:
s201, accessing the specified device through the web end, searching the video information of the specified device, and acquiring the video list stored in the specified device.
The specific device may be determined according to a device selection instruction input by a user, and for example, may be a storage device in which video is stored in the monitoring system or a front-end camera. Ideally, at least one video clip should be included in a given device. The video list comprises the starting time and the ending time of the video clip.
And S202, starting video playback by using the video tag through the web end.
Assume that the playback start time is designated as s1 and the playback end time is designated as e1, i.e., the user may need to play back video recorded in the time period of s1 to e 1. For the video tag on the web side, although the time stamp cannot be directly read, since the time stamp is included in the video data, the video tag can acquire intermediate data capable of indirectly representing the time stamp by parsing the video data, and determine a video frame when video playback is started according to the intermediate data.
S203, the cumulative playback time length of the cumulative playback is obtained according to the timeupdate event of the video tag.
For convenience of description, this time period is denoted as T. In other possible embodiments, the accumulated playback time period may be determined by reading a preset timer, the preset timer starts counting when the video playback is started, and the difference between the current reading of the preset timer and the reading at the start of counting may indicate the accumulated playback time period.
S204, the index value is initialized to 0.
For convenience of description, the index value is denoted as x hereinafter.
And S205, adding 1 to the index value.
I.e. let x be x + 1.
S206, determining whether the first index value video segment is satisfied, the start time is not later than the specified playback start time, and the end time is later than the specified playback start time, if so, executing S207, and if not, executing S208.
That is, it is determined whether L x ≦ s1 < Nx is satisfied.
S207, the designated playback start time is determined as the real time corresponding to the start video frame.
For convenience of description, hereinafter, the real time corresponding to the starting video frame is denoted as R, and then the step is to assign the value of S1 to R, that is, R is S1, and perform S210.
And S208, determining whether the video segments with the first index value meet, wherein the starting time is later than the specified playback starting time, if so, executing S209, and if not, returning to the step S205.
I.e., whether s1 < L x is satisfied.
S209, determine the start time of the video segment with the first index value as the real time corresponding to the start video frame.
That is, R is L x, since L x is smaller than Nx, if S1 < L x is satisfied, and S1 < Nx is also satisfied, S207, S209 can be regarded as steps executed when S1 < Nx, and return to executing S205, it is a step executed when S1 ≧ Nx.
S210, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time length, the actual time corresponding to the initial video frame, and the initial time and the end time of the video segment.
For convenience of description, assume that the first played back video segment is the f-th video segment, and record the real time corresponding to the currently played back video frame as P, and record the accumulated playback time as T. It may be a determination of whether T is satisfied<Nf-R, if T is satisfied<Nf-R, then P ═ R + T.
If not, determining whether the following inequality is satisfied:
Nf-R≤T<Nf-R+Nf+1-Lf+1
if the inequality is satisfied, then P ═ R + T + Lf+1-Nf。
If not, starting from K ═ 3, it is determined whether the following inequality is satisfied:
if the inequality is not satisfied, let K be K +1, and when the inequality is satisfied, let K be K +1 For example, when f is 1 and K is 3, P is R + T + L2-N1 + L3-N2.
In a possible embodiment, P may be displayed in real time at a preset position of the video playback interface, and a display manner of P may be different according to different application scenarios, which is not limited in this embodiment.
S211, if the real time corresponding to the video frame currently being played back does not have video between the appointed playback ending time, the playback ending is prompted.
In one possible embodiment, it may be determined whether there is a video segment of the at least one video segment having a start time no later than a specified playback end time and an end time later than a real time corresponding to a video frame currently being played back. May be traversing a video segment, determining whether the following holds:
L≤e1&&N>P
if the inequality is true, the playback is prompted to end, wherein L is the start time of the currently traversed video segment, N is the end time of the currently traversed video segment, and & & is the logical AND operator.
L<e1&&N>P
In one possible embodiment, playback is continued if the inequality is true, and playback is stopped if the inequality is false.
By adopting the embodiment, the real time corresponding to the currently played back video frame can be determined by less calculation under the condition of not reading the timestamp of the video frame, so that the user can synchronize the data and the played back video data in the time domain according to the actual requirement and simultaneously effectively save the consumption of calculation resources.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a time determination apparatus for video playback according to an embodiment of the present invention, which may include:
a video information obtaining module 301, configured to obtain a start time of a video segment;
a starting video frame time determining module 302, configured to determine, according to a specified playback start time and a start time of at least one of the video segments, a real time corresponding to a starting video frame played back when playback is started;
the current frame time determining module 303 is configured to determine, according to the accumulated playback time and the real time corresponding to the starting video frame, the real time corresponding to the video frame being currently played back.
By adopting the embodiment, the real time corresponding to the currently played back video frame can be determined under the condition that the time stamp of the video frame is not read, so that the user can synchronize the data and the played back video data in a time domain according to actual requirements.
In one possible implementation manner, the video segments include a first video segment, and the first video segment is a video segment played back first when playback is started;
the start video frame time determination module 302, in particular,
if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the actual time corresponding to the starting video frame;
and if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
In a possible implementation manner, the video information obtaining module 301 is further configured to obtain an end time of the video segment;
the starting video frame time determining module 302 is further configured to determine, according to a chronological order, a precedence relationship between the specified playback start time and the end time of the video segment for each of the video segments in turn, and determine the video segment as the first video segment until the specified playback start time is earlier than the end time of the video segment.
In a possible implementation manner, the video information obtaining module 301 is further configured to obtain an end time of the video segment;
the starting video frame time determining module 302 is specifically configured to determine, according to the specified playback start time and the end time of at least one of the video segments, a real time corresponding to a starting video frame played back when playback is started.
In a possible implementation manner, the video information obtaining module 301 is further configured to obtain an end time of the video segment;
the current frame time determining module 303 is specifically configured to determine the real time corresponding to the video frame being currently played back according to the accumulated playback time, the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment.
In a possible implementation manner, the current frame time determining module 303 is specifically configured to determine a video segment currently being played back according to the accumulated playback time and the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment;
if the video segment which is played back currently is the first played back video segment, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the initial video frame;
and if the video segment which is currently played back is not the first played back video segment, determining the real time corresponding to the video frame which is currently played back according to the accumulated playback time length, the corresponding real time of the initial video frame and the blank time length of the video segment which does not exist between the initial moment of the video segment which is currently played back and the corresponding real time of the initial video frame.
In a possible implementation manner, the current frame time determining module 303 is specifically configured to determine whether a remaining time duration from a real time corresponding to a starting video frame to an end time of a first played back video segment is greater than an accumulated playback time duration;
if the remaining time length is greater than the accumulated playback time length, determining the video clip played back firstly as the video clip played back currently;
if the residual time length is less than the accumulated playback time length, sequentially overlapping the difference value between the ending time and the starting time of one of the video segments on the residual time length from the next video segment adjacent to the time domain of the first played back video segment according to the time sequence until the time length obtained by overlapping is more than the accumulated playback time length;
the last superimposed video segment is determined as the video segment currently being played back.
In a possible implementation manner, the video information obtaining module 301 is further configured to obtain an end time of the video segment;
the device also comprises a video playback module, a video playback module and a video playback module, wherein the video playback module is used for acquiring the accumulated playback time length after the playback is started through the timeupdate event of the video tag; or determining the accumulated playback time length through the reading of a preset timer, and starting counting by a preset counter when the playback is started;
displaying the real time corresponding to the video frame which is played back currently at a preset position of a video playback interface;
determining whether a video clip with a starting time not later than a specified playback ending time and an ending time later than the real time corresponding to the currently played back video frame exists in at least one video clip;
if not, playback is ended.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including:
a memory 401 for storing a computer program;
the processor 402, when executing the program stored in the memory 301, implements the following steps:
acquiring the starting time of a video clip;
determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments;
and determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the initial video frame.
By adopting the embodiment, the real time corresponding to the currently played back video frame can be determined under the condition that the time stamp of the video frame is not read, so that the user can synchronize the data and the played back video data in a time domain according to actual requirements.
In one possible implementation manner, the video segments include a first video segment, and the first video segment is a video segment played back first when playback is started;
determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments, wherein the real time comprises the following steps:
if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the actual time corresponding to the starting video frame;
and if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
In one possible implementation, the method further includes: acquiring the end time of the video clip;
the first video segment is determined by:
according to the time sequence, determining the precedence relationship between the appointed playback start time and the end time of the video clip for each video clip in the video clips in sequence until the appointed playback start time is earlier than the end time of the video clip, and determining the video clip as a first video clip.
In one possible implementation, the method further includes: acquiring the end time of the video clip;
determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments, wherein the real time comprises the following steps:
and determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the ending time of at least one video segment in the video segments.
In one possible implementation, the method further includes: acquiring the end time of the video clip;
determining the real time corresponding to the video frame currently being played back according to the accumulated playback time and the real time corresponding to the initial video frame, including:
and determining the real time corresponding to the video frame which is played back currently according to the accumulated playback time length, the real time corresponding to the initial video frame and at least one of the initial time and the end time of the video segment.
In a possible implementation manner, determining the real time corresponding to the video frame currently being played back according to the accumulated playback time, the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment includes:
determining the currently played video clip according to the accumulated playback time length, the actual time corresponding to the initial video frame and at least one of the initial time and the end time of the video clip;
if the video segment which is played back currently is the first played back video segment, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the initial video frame;
and if the video segment which is currently played back is not the first played back video segment, determining the real time corresponding to the video frame which is currently played back according to the accumulated playback time length, the corresponding real time of the initial video frame and the blank time length of the video segment which does not exist between the initial moment of the video segment which is currently played back and the corresponding real time of the initial video frame.
In a possible implementation manner, determining a currently played back video segment according to the accumulated playback time and the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment includes:
determining whether the remaining time length from the actual time corresponding to the starting video frame to the ending time of the first played back video segment is greater than the accumulated playback time length or not;
if the remaining time length is greater than the accumulated playback time length, determining the video clip played back firstly as the video clip played back currently;
if the residual time length is less than the accumulated playback time length, sequentially overlapping the difference value between the ending time and the starting time of one of the video segments on the residual time length from the next video segment adjacent to the time domain of the first played back video segment according to the time sequence until the time length obtained by overlapping is more than the accumulated playback time length;
the last superimposed video segment is determined as the video segment currently being played back.
In one possible implementation, the method further includes:
acquiring accumulated playback time length after playback is started through a timeupdate event of the video tag; or determining the accumulated playback time length through the reading of a preset timer, and starting counting by a preset counter when the playback is started;
displaying the real time corresponding to the video frame which is played back currently at a preset position of a video playback interface;
acquiring the end time of the video clip;
determining whether a video clip with a starting time not later than a specified playback ending time and an ending time later than the real time corresponding to the currently played back video frame exists in the video clip;
if not, playback is ended.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute any one of the above-mentioned video playback time determination methods.
By adopting the embodiment, the real time corresponding to the currently played back video frame can be determined under the condition that the time stamp of the video frame is not read, so that the user can synchronize the data and the played back video data in a time domain according to actual requirements.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for determining the time for playback of a video according to any of the above embodiments.
By adopting the embodiment, the real time corresponding to the currently played back video frame can be determined under the condition that the time stamp of the video frame is not read, so that the user can synchronize the data and the played back video data in a time domain according to actual requirements.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website site, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DS L)) or wireless (e.g., infrared, wireless, microwave, etc.) manner to another website site, computer, server, or data center.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, the computer-readable storage medium, and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (16)
1. A method for timing playback of video, the method comprising:
acquiring the starting time of a video clip;
determining real time corresponding to a played back starting video frame when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments;
and determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame.
2. The method of claim 1, wherein the video segment comprises a first video segment, and the first video segment is a video segment played back first at the beginning of playback;
the determining the real time corresponding to the played back starting video frame when the playback is started according to the designated playback starting time and the starting time of at least one of the video segments includes:
if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the real time corresponding to the starting video frame;
and if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
3. The method of claim 2, further comprising: acquiring the ending time of the video clip;
the first video segment is determined by:
according to the time sequence, determining the precedence relationship between the appointed playback start time and the end time of the video clip for each video clip in the video clips in sequence, and determining the video clip as a first video clip until the appointed playback start time is earlier than the end time of the video clip.
4. The method of claim 1, further comprising: acquiring the ending time of the video clip;
the determining the real time corresponding to the played back starting video frame when the playback is started according to the designated playback starting time and the starting time of at least one of the video segments includes:
and determining the real time corresponding to the played back starting video frame when the playback is started according to the appointed playback starting time and the ending time of at least one video segment in the video segments.
5. The method of claim 1, further comprising: acquiring the ending time of the video clip;
determining the real time corresponding to the video frame currently being played back according to the accumulated playback duration and the real time corresponding to the starting video frame, including:
and determining the real time corresponding to the video frame which is played back currently according to the accumulated playback time length, the real time corresponding to the starting video frame and at least one of the starting time and the ending time of the video segment.
6. The method according to claim 5, wherein the determining the real-time corresponding to the currently played back video frame according to the accumulated playback time, the real-time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment comprises:
determining a currently played video segment according to the accumulated playback duration, the actual time corresponding to the initial video frame and at least one of the initial time and the end time of the video segment;
if the video segment which is played back currently is the first played back video segment, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame;
and if the video segment which is currently played back is not the first played back video segment, determining the real time corresponding to the video frame which is currently played back according to the accumulated playback time length, the real time corresponding to the starting video frame and the blank time length of the video segment which does not exist between the starting moment of the video segment which is currently played back and the real time corresponding to the starting video frame.
7. The method according to claim 6, wherein the determining the currently played back video segment according to the accumulated playback time and the real-time corresponding to the starting video frame and at least one of the starting time and the ending time of the video segment comprises:
determining whether the remaining time from the real time corresponding to the starting video frame to the ending time of the first played back video segment is greater than the accumulated playback time;
if the remaining time length is larger than the accumulated playback time length, determining the first played back video clip as the video clip currently being played back;
if the residual time length is less than the accumulated playback time length, sequentially overlapping the difference value between the ending time and the starting time of one of the video segments on the residual time length from the next video segment adjacent to the first played back video segment in time domain according to the time sequence until the overlapped time length is greater than the accumulated playback time length;
the last superimposed video segment is determined as the video segment currently being played back.
8. The method of claim 1, further comprising:
acquiring accumulated playback time length after playback is started through a timeupdate event of the video tag; or determining the accumulated playback time length through the reading of a preset timer, wherein the preset counter starts counting when the playback starts;
displaying the real time corresponding to the video frame which is played back currently at a preset position of a video playback interface;
acquiring the ending time of the video clip;
determining whether a video clip with a starting time not later than a specified playback ending time and an ending time later than the real time corresponding to the currently played back video frame exists in the video clips;
if not, playback is ended.
9. An apparatus for timing playback of video, the apparatus comprising:
the video information acquisition module is used for acquiring the starting time of the video clip;
the starting video frame time determining module is used for determining the real time corresponding to the starting video frame played back when the playback is started according to the appointed playback starting time and the starting time of at least one video segment in the video segments;
and the current frame time determining module is used for determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame.
10. The apparatus of claim 9, wherein the video segment comprises a first video segment, and the first video segment is a video segment played back first when playback is started;
the starting video frame time determining module is specifically configured to,
if the specified playback starting time is earlier than the starting time of the first video segment, determining the starting time of the first video segment as the real time corresponding to the starting video frame;
and if the specified playback starting time is later than the starting time of the first video segment, determining the specified playback starting time as the real time corresponding to the starting video frame.
11. The apparatus according to claim 10, wherein the video information obtaining module is further configured to obtain an end time of the video segment;
the starting video frame time determining module is further configured to determine, according to a time sequence, a precedence relationship between a specified playback start time and an end time of each of the video segments in turn, until the specified playback start time is earlier than the end time of the video segment, and determine the video segment as a first video segment.
12. The apparatus according to claim 9, wherein the video information obtaining module is further configured to obtain an end time of the video segment;
the starting video frame time determining module is specifically configured to determine, according to a specified playback start time and a start time and an end time of at least one of the video segments, a real time corresponding to a starting video frame played back when playback is started.
13. The apparatus according to claim 9, wherein the video information obtaining module is further configured to obtain an end time of the video segment;
the current frame time determining module is specifically configured to determine the real time corresponding to the currently played back video frame according to the accumulated playback duration, the real time corresponding to the starting video frame, and at least one of the starting time and the ending time of the video segment.
14. The apparatus according to claim 13, wherein the current frame time determining module is specifically configured to determine a video segment currently being played back according to an accumulated playback duration, a real time corresponding to the starting video frame, and at least one of a starting time and an ending time of the video segment;
if the video segment which is played back currently is the first played back video segment, determining the actual time corresponding to the video frame which is played back currently according to the accumulated playback time and the actual time corresponding to the starting video frame;
and if the video segment which is currently played back is not the first played back video segment, determining the real time corresponding to the video frame which is currently played back according to the accumulated playback time length, the real time corresponding to the starting video frame and the blank time length of the video segment which does not exist between the starting moment of the video segment which is currently played back and the real time corresponding to the starting video frame.
15. The apparatus according to claim 14, wherein the current frame time determining module is specifically configured to determine whether a remaining time duration from a real time corresponding to the starting video frame to an end time of the first played back video segment is greater than an accumulated playback time duration;
if the remaining time length is larger than the accumulated playback time length, determining the first played back video clip as the video clip currently being played back;
if the residual time length is less than the accumulated playback time length, sequentially overlapping the difference value between the ending time and the starting time of one of the video segments on the residual time length from the next video segment adjacent to the first played back video segment in time domain according to the time sequence until the overlapped time length is greater than the accumulated playback time length;
the last superimposed video segment is determined as the video segment currently being played back.
16. The apparatus according to claim 9, wherein the video information obtaining module is further configured to obtain an end time of the video segment;
the device also comprises a video playback module, a video playback module and a video playing module, wherein the video playback module is used for acquiring the accumulated playback time length after the playback is started through the timeupdate event of the video tag; or determining the accumulated playback time length through the reading of a preset timer, wherein the preset counter starts counting when the playback starts;
displaying the real time corresponding to the video frame which is played back currently at a preset position of a video playback interface;
determining whether a video clip with a starting time not later than a specified playback ending time and an ending time later than the real time corresponding to the currently played back video frame exists in the at least one video clip;
if not, playback is ended.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911178981.8A CN111432283B (en) | 2019-11-27 | 2019-11-27 | Video playback time determination method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911178981.8A CN111432283B (en) | 2019-11-27 | 2019-11-27 | Video playback time determination method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111432283A true CN111432283A (en) | 2020-07-17 |
CN111432283B CN111432283B (en) | 2022-04-05 |
Family
ID=71546847
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911178981.8A Active CN111432283B (en) | 2019-11-27 | 2019-11-27 | Video playback time determination method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111432283B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113259739A (en) * | 2021-05-13 | 2021-08-13 | 四川长虹网络科技有限责任公司 | Video display method, video display device, computer equipment and readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105338297A (en) * | 2014-08-11 | 2016-02-17 | 杭州海康威视系统技术有限公司 | Video data storage and playback system, device and method |
US20170372750A1 (en) * | 2014-10-17 | 2017-12-28 | Panasonic Intellectual Property Corporation Of America | Recording medium, playback method, and playback device |
CN108600803A (en) * | 2018-04-10 | 2018-09-28 | 普联技术有限公司 | Back method, device, terminal device and the storage medium of multi-channel video code stream |
-
2019
- 2019-11-27 CN CN201911178981.8A patent/CN111432283B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105338297A (en) * | 2014-08-11 | 2016-02-17 | 杭州海康威视系统技术有限公司 | Video data storage and playback system, device and method |
US20170372750A1 (en) * | 2014-10-17 | 2017-12-28 | Panasonic Intellectual Property Corporation Of America | Recording medium, playback method, and playback device |
CN108600803A (en) * | 2018-04-10 | 2018-09-28 | 普联技术有限公司 | Back method, device, terminal device and the storage medium of multi-channel video code stream |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113259739A (en) * | 2021-05-13 | 2021-08-13 | 四川长虹网络科技有限责任公司 | Video display method, video display device, computer equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111432283B (en) | 2022-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104994425B (en) | A kind of video identifier method and apparatus | |
CN107277594B (en) | Method and device for synchronizing video and audio with bullet screen | |
US8606077B2 (en) | Method, system, user equipment, and server equipment for video file playback | |
US6487564B1 (en) | Multimedia playing apparatus utilizing synchronization of scenario-defined processing time points with playing of finite-time monomedia item | |
EP3193509B1 (en) | Video advertisement filtering method, device and equipment | |
US9300997B2 (en) | Consumption likelihood of linear content streams | |
CN108874826B (en) | Video segment sequencing method and cloud storage system | |
CN111026625A (en) | Method, device and storage medium for calculating page rendering time | |
US20230421859A1 (en) | Systems and methods for recommending content using progress bars | |
US20170272793A1 (en) | Media content recommendation method and device | |
CN111432283B (en) | Video playback time determination method and device | |
CN109558297A (en) | EMS memory management process and device | |
CN104853251A (en) | Online collection method and device for multimedia data | |
CN106385613B (en) | Control the method and device that barrage plays | |
CN103702218A (en) | Video playing method and device | |
CN113297317A (en) | Data table synchronization method and device, electronic equipment and storage medium | |
JP6649745B2 (en) | Content data management device, program, and content data management method | |
CN113596582A (en) | Video preview method and device and electronic equipment | |
JP2008219608A (en) | Method and apparatus for displaying information with content, program therefor and recording medium | |
JP7218198B2 (en) | Video playback device, video playback method and program | |
CN112040321A (en) | Method and system for integrally previewing and accurately skipping video content and electronic equipment | |
CN110839178A (en) | Content prediction method and device and computer readable storage medium | |
CN110740385A (en) | Audio or video circulating playing method, storage medium and electronic equipment | |
CN114697722B (en) | Video playing method and device, electronic equipment and storage medium | |
WO2024001785A1 (en) | Content pushing method, terminal, server, and computer readable 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |