CN111432283B - Video playback time determination method and device - Google Patents

Video playback time determination method and device Download PDF

Info

Publication number
CN111432283B
CN111432283B CN201911178981.8A CN201911178981A CN111432283B CN 111432283 B CN111432283 B CN 111432283B CN 201911178981 A CN201911178981 A CN 201911178981A CN 111432283 B CN111432283 B CN 111432283B
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.)
Active
Application number
CN201911178981.8A
Other languages
Chinese (zh)
Other versions
CN111432283A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201911178981.8A priority Critical patent/CN111432283B/en
Publication of CN111432283A publication Critical patent/CN111432283A/en
Application granted granted Critical
Publication of CN111432283B publication Critical patent/CN111432283B/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/47End-user applications
    • H04N21/472End-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/47217End-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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring 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

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

Video playback time determination method and device
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.
According to different application scenes, the starting time of acquiring one video clip may be the starting time of acquiring a plurality of video clips. Illustratively, a specific device is accessed, and a video list stored in the device is read to determine the starting time of each video segment stored in the specific device. For convenience of description, the start time of a video segment is denoted as L, the end time is denoted as N, for example, L1 denotes the start time of the first video segment, N1 denotes the end time of the first video segment, L2 denotes the start time of the second video segment, N2 denotes the end time … of the second video segment, and so on.
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 played back video segment is not the first played back video segment, the real time corresponding to the currently played back video frame may be determined according to the accumulated playback time length, the real time corresponding to the starting video frame, and the blank time length between the starting time of the currently played back video segment and the real time corresponding to the starting video frame. For example, the real time corresponding to the starting video frame, the accumulated playback time, and the blank time between the starting time of the video segment currently being played back and the real time corresponding to the starting video frame may be added to obtain the real time corresponding to the video frame currently being played back. With L1 ═ 3:00, N1 ═ 7:00, L2 ═ 9:00, N2 ═ 13:00, L3 ═ 15:00, N3 is 19:00, L4 is 21:00, N4 is 23:00, and an application scene with a playback start time of 8:00 is specified as an example, the real time corresponding to the starting video frame is 9:00, if the current playback is a video segment with a start time of L3, the cumulative playback time length is 5 hours, and the blank time length is 2 hours, so the real time corresponding to the video frame currently being played back is 16: 00.
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 ═ 19:00, L4 ═ 21:00, N4 ═ 23:00, and the playback start time is specified to be 8:00, and the real time corresponding to the start video frame is 9:00 at this time, and the related calculation process can be referred to the description in S102, and will not be described herein again. Assuming that the cumulative playback time duration is 5 hours, the first played back video segment is the second video segment, and therefore the real time corresponding to the starting video frame is 9: the time period from 00 to the end time 13:00 of the second video segment is 4 hours in duration, so that the remaining time period is less than the accumulated playback time period.
Then, the duration of each video segment is superimposed on the remaining duration in chronological order, starting with a video segment subsequent to the second video segment (i.e. the third video segment). When the duration of the third video segment is superimposed on the remaining duration, the superimposed duration is 4+ N3-L3-8 hours, which is greater than the cumulative playback duration, and thus the currently played back video segment can be determined to be the third video segment.
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 ═ 19:00, L4 ═ 21:00, N4 ═ 23:00, and the playback start time is specified to be 8: 00. According to the time sequence, the end time of the first video segment is 7:00 and is prior to the appointed playback start time, so that the precedence relationship between the end time of the second video segment and the appointed playback start time is continuously compared, and the comparison is stopped because the end time of the second video segment is 13:00 and is subsequent to the appointed playback start time, and the second video segment is the first video segment.
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 Lx. ltoreq. 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 < Lx 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.
I.e., R ═ Lx. Since Lx is smaller than Nx, if S1 < Lx is satisfied, S1 < Nx is also satisfied, and thus S207, S209 can be regarded as steps performed when S1 < Nx. And returning to the step of executing S205, if S1 ≧ Nx. Therefore, in this embodiment, the precedence relationship between s1 and the end time of the video segment is determined sequentially for each video segment in chronological order, and until s1 is earlier than the end time of the video segment, the video segment is determined as the first video segment (that is, when s1 < Nx is satisfied, the xth video segment is the first video segment). After the execution of S209, S210 is executed.
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:
Figure BDA0002290756170000161
if the inequality is not satisfied, let K be K +1, and when the inequality is satisfied, let K be K +1
Figure BDA0002290756170000162
Figure BDA0002290756170000163
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 not, the playback is prompted to be finished. 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. If so, playback may continue. When the inequality is established, the following inequality may or may not be established:
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 also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
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.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
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 (14)

1. A method for timing playback of video, the method comprising:
reading a video list stored in equipment, and acquiring the starting time of a video clip according to the video list;
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;
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;
the method further comprises the following steps: 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.
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;
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.
5. The method according to claim 4, 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.
6. The method according to claim 5, 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.
7. 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.
8. An apparatus for timing playback of video, the apparatus comprising:
the video information acquisition module is used for reading a video list stored in equipment and acquiring the starting time of a video clip according to the video list;
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;
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 duration and the actual time corresponding to the initial video frame;
the video information acquisition module is further used for acquiring the ending time of the video clip;
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.
9. The apparatus of claim 8, 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.
10. 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 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.
11. The apparatus according to claim 8, 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.
12. The apparatus according to claim 11, 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.
13. The apparatus according to claim 12, 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.
14. The apparatus according to claim 8, 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.
CN201911178981.8A 2019-11-27 2019-11-27 Video playback time determination method and device Active CN111432283B (en)

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 CN111432283A (en) 2020-07-17
CN111432283B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113259739B (en) * 2021-05-13 2022-06-03 四川长虹网络科技有限责任公司 Video display method, video display device, computer equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
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
CN108600803A (en) * 2018-04-10 2018-09-28 普联技术有限公司 Back method, device, terminal device and the storage medium of multi-channel video code stream

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MY188309A (en) * 2014-10-17 2021-11-27 Panasonic Ip Corp America Recording medium, playback method, and playback device

Patent Citations (2)

* Cited by examiner, † Cited by third party
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
CN108600803A (en) * 2018-04-10 2018-09-28 普联技术有限公司 Back method, device, terminal device and the storage medium of multi-channel video code stream

Also Published As

Publication number Publication date
CN111432283A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN104994425B (en) A kind of video identifier method and apparatus
US8606077B2 (en) Method, system, user equipment, and server equipment for video file playback
CN107277594B (en) Method and device for synchronizing video and audio with bullet screen
RU2731837C1 (en) Determining search requests to obtain information during user perception of event
US10911802B2 (en) Media file pushing method, media file server, and media file pushing system
EP3193509B1 (en) Video advertisement filtering method, device and equipment
US20210117400A1 (en) Efficient production and consumption for data changes in a database under high concurrency
US9300997B2 (en) Consumption likelihood of linear content streams
US20230421859A1 (en) Systems and methods for recommending content using progress bars
CN111432283B (en) Video playback time determination method and device
CN111163336B (en) Video resource pushing method and device, electronic equipment and computer readable medium
US20190238911A1 (en) System and method for synchronized playing of media items on a plurality of remote devices
CN111541927A (en) Video playing method and device
CN115167966A (en) Information prompting method, device, equipment, medium and product based on lyrics
CN112463746B (en) File storage and generation method and device and electronic equipment
CN110839178B (en) Content prediction method and device and computer readable storage medium
JP6649745B2 (en) Content data management device, program, and content data management method
JP4937795B2 (en) Content-associated information display method, content-associated information display device, program thereof, and recording medium
US11361797B2 (en) Moving image reproduction apparatus, moving image reproduction method, moving image reproduction system, and storage medium
WO2016161953A1 (en) Alarm reminding method and intelligent terminal
CN113297317A (en) Data table synchronization method and device, electronic equipment and storage medium
CN111683215A (en) Video playback method and device, electronic equipment and computer readable storage medium
CN110740385A (en) Audio or video circulating playing method, storage medium and electronic equipment
CN115665483B (en) Video playing method and device and hard disk video recorder
CN112584239B (en) Program preview method and program preview 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
GR01 Patent grant
GR01 Patent grant