CN110505426B - Video playback method and device, electronic equipment and readable storage medium - Google Patents

Video playback method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN110505426B
CN110505426B CN201810482929.0A CN201810482929A CN110505426B CN 110505426 B CN110505426 B CN 110505426B CN 201810482929 A CN201810482929 A CN 201810482929A CN 110505426 B CN110505426 B CN 110505426B
Authority
CN
China
Prior art keywords
video
played back
time
label
system time
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
CN201810482929.0A
Other languages
Chinese (zh)
Other versions
CN110505426A (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 CN201810482929.0A priority Critical patent/CN110505426B/en
Publication of CN110505426A publication Critical patent/CN110505426A/en
Application granted granted Critical
Publication of CN110505426B publication Critical patent/CN110505426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/78Television signal recording using magnetic recording
    • H04N5/781Television signal recording using magnetic recording on disks or drums

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)

Abstract

The application provides a video playback method, a video playback device, an electronic device and a readable storage medium, wherein the method comprises the following steps: when the system time needs to be recalled, determining a repeated target time interval according to the moment of recalling the system time and the callback duration; setting a first label for the video segments in the target time interval before the system time is adjusted back, and setting a second label for the video segments in the target time interval after the system time is adjusted back; and when video playback is required, sequencing the video clips to be played back according to the label setting state of the video clips to be played back and the actual video recording time. The method can optimize the video playback effect.

Description

Video playback method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to video monitoring technologies, and in particular, to a video playback method and apparatus, an electronic device, and a readable storage medium.
Background
The hard disk video recorder can be used for recording monitoring videos in a video monitoring system. When the time (system time) of the hard disk recorder is adjusted during the recording process of the hard disk recorder, the recording of the repeated time intervals may occur.
For example, for a hard disk recorder supporting the daylight savings time (taking the example of 2:00 for the last sunday of march to 3:00 for the last sunday of october) function, if the hard disk recorder starts recording when the time is adjusted back when daylight savings time ends (i.e., the time is adjusted back to 2:00 for 3:00 for the last sunday of october), then two 2: 00-3: 00 time intervals will be recorded.
When the videos in the repeated time interval need to be played back, the playing sequence may be incorrect due to the fact that the real time sequence of the videos cannot be distinguished.
Disclosure of Invention
In view of the above, the present application provides a video playback method, a video playback apparatus, an electronic device, and a readable storage medium.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of an embodiment of the present application, there is provided a video playback method, including:
when the system time needs to be recalled, determining a repeated target time interval according to the moment of recalling the system time and the callback duration;
setting a first label for the video segments in the target time interval before the system time is adjusted back, and setting a second label for the video segments in the target time interval after the system time is adjusted back;
when video playback is required, sequencing the video clips to be played back according to the label setting state of the video clips to be played back and the actual video time; and for the video clips to be played back in the same target time interval, the actual video recording time of the video clips to be played back provided with the first label is earlier than the actual video recording time of the video clips to be played back provided with the second label.
Optionally, the setting a first tag for the video segment in the target time interval before the system time is recalled includes:
before the system time is recalled, when the system time reaches the starting time of the target time interval and is currently recorded, ending the current video recording segment and starting a new video recording segment;
before the system time is recalled, when the system time reaches the time of system time callback and is currently recorded, ending the current video clip, and starting a new video clip after the system time is recalled;
and setting a first label for the video clip in the target time interval.
Optionally, the setting a second tag for the video clip in the target time interval after the system time is recalled includes:
after the system time is adjusted back, when the system time reaches the end time of the target time interval and is currently recording, ending the current video recording segment and starting a new video recording segment;
and setting a second label for the video clip without the first label in the target time interval.
Optionally, the sorting the video clips to be played back according to the tag setting state and the actual video recording time of the video clips to be played back includes:
when the two video clips to be played back are not provided with the label, or the same label is provided, or one of the two video clips to be played back is provided with the label, and the other one of the two video clips to be played back is not provided with the label, sequencing the two video clips to be played back according to the starting time of the two videos to be played back;
when the two video clips to be played back are provided with different labels, the two video clips to be played back are sequenced according to the principle that the starting time of the clip to be played back provided with the first label is earlier than the starting time of the clip to be played back provided with the second label.
Optionally, after sorting the video clips to be played back according to the tag setting state and the actual video time of the video clips to be played back, the method further includes:
determining overlapped time blocks according to the video clip to be played back with the first label and the video clip to be played back with the second label;
and when the video progress bar is drawn, rendering the progress bar corresponding to the overlapped time blocks by using a preset color.
Optionally, after sequencing the video clips to be played back according to the tag setting state of the video clips to be played back and the actual video recording time, the method further includes:
displaying the information of the sequenced video clips to be played back in the playback file list, and identifying the video clips to be played back, which are provided with the first label or the second label.
According to a second aspect of the embodiments of the present application, there is provided a video recording and playback apparatus including:
the system time adjusting unit is used for determining a repeated target time interval according to the system time callback time and the callback duration when the system time needs to be recalled;
the video processing unit is used for setting a first label for the video fragment in the target time interval before the system time is adjusted back, and setting a second label for the video fragment in the target time interval after the system time is adjusted back;
the video playback unit is used for sequencing the video clips to be played back according to the label setting state of the video clips to be played back and the actual video recording time when the video playback is required; and for the video clips to be played back in the same target time interval, the actual video recording time of the video clips to be played back provided with the first label is earlier than the actual video recording time of the video clips to be played back provided with the second label.
Optionally, before the system time is adjusted back, when the system time reaches the start time of the target time interval and is currently being recorded, the recording processing unit is specifically configured to end the current recording segment and start a new recording segment; before the system time is recalled, when the system time reaches the time of system time callback and is currently recorded, ending the current video clip, and starting a new video clip after the system time is recalled; and setting a first label for the video clip in the target time interval.
Optionally, the video processing unit is further specifically configured to, after the system time is adjusted back, when the system time reaches an end time of the target time interval and is currently being video recorded, end the current video clip and start a new video clip; and setting a second label for the video clip without the first label in the target time interval.
Optionally, the video playback unit is specifically configured to, when neither of the two video segments to be played back is provided with a tag, or is provided with the same tag, or one of the two video segments to be played back is provided with a tag, and the other one of the two video segments to be played back is not provided with a tag, sort the two video segments to be played back according to the start times of the two video segments to be played back; when the two video clips to be played back are provided with different labels, the two video clips to be played back are sequenced according to the principle that the starting time of the clip to be played back provided with the first label is earlier than the starting time of the clip to be played back provided with the second label.
Optionally, the video playback unit is further configured to determine an overlapped time block according to the video segment to be played back provided with the first tag and the video segment to be played back provided with the second tag; and when the video progress bar is drawn, rendering the progress bar corresponding to the overlapped time blocks by using a preset color.
Optionally, the video playback unit is further configured to display information of the sequenced video segments to be played back in the playback file list, and identify the video segments to be played back, where the video segments to be played back are provided with the first tag or the second tag.
According to a third aspect of the embodiments of the present application, there is provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the video playback method when executing the program stored in the memory.
According to a fourth aspect of the embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing the above-mentioned video playback method.
According to the video playback method, when the system time needs to be recalled, the repeated target time interval is determined, different labels are set for the video segments in the target time interval before the system time is recalled and the video segments in the target time interval after the system time is recalled respectively, furthermore, when the video playback needs to be carried out, the video segments to be replayed in the same target time interval can be sequenced according to the labels set for the video to be replayed, the situation that the playing sequence of the video segments in the repeated time interval is incorrect due to the fact that the system time is recalled is avoided, and the video playback effect is optimized.
Drawings
FIG. 1 is a flow chart illustrating a video playback method according to an exemplary embodiment of the present application;
fig. 2A to 2D are schematic diagrams illustrating an implementation flow of inserting a searched video segment to be played back into a result linked list by a hard disk recorder according to an exemplary embodiment of the present application;
fig. 3 is a schematic structural diagram of a video recording and playback apparatus according to an exemplary embodiment of the present application;
fig. 4 is a schematic diagram of a hardware structure of a video recording and playback apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In order to make the technical solutions provided in the embodiments of the present application better understood and make the above objects, features and advantages of the embodiments of the present application more comprehensible, the technical solutions in the embodiments of the present application are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, a schematic flow chart of a video playback method according to an embodiment of the present disclosure is shown, where the video playback method may be applied to a monitoring device with a video recording function in a video monitoring system, such as a hard disk recorder, and as shown in fig. 1, the video playback method may include the following steps:
for ease of understanding and description, the following description will take the execution of steps S100 to S120 as an example of a hard disk recorder.
And S100, when the system time needs to be recalled, determining a repeated target time interval according to the time for recalling the system time and the callback duration.
In the embodiment of the application, the situation that the hard disk video recorder needs to perform system time callback may occur in an actual application scenario, for example, for a hard disk video recorder supporting daylight savings time, when daylight savings time ends, the hard disk video recorder needs to call back the system time by 1 hour, and when the hard disk video recorder starts video recording during the system time callback period, video recording in a repeated time interval may occur.
In order to identify the recording of the repeated time interval caused by the system time callback, the repeated time interval caused by the system time callback (referred to as a target time interval herein) needs to be determined.
Correspondingly, in the embodiment of the application, when the system time needs to be recalled, the hard disk video recorder can determine the repeated target time interval according to the system time callback time and the callback duration.
For example, assume that the system time callback is performed at time TaCallback duration of TThen the target time interval is [ T ]a-T,Ta]。
For convenience of description, the starting time of the target time interval is denoted as T hereinafterSAnd the end time is denoted as TW
And the ending time of the target time interval is consistent with the time of system time callback. For example, when the system time callback is performed, the time is TaWhen, TW=Ta
Step S110, a first label is set for the video segment in the target time interval before the system time is recalled, and a second label is set for the video segment in the target time interval after the system time is recalled.
In the embodiment of the application, when the hard disk video recorder starts the video recording in the memory of the target time interval before and after the system time is recalled, the hard disk video recorder can set different labels for the video recording fragment in the target time interval before the system time is recalled and the video recording in the target time interval after the system time is recalled respectively so as to distinguish the repeated video recording fragments in the target interval.
Herein, the video segment in the target time interval before the system time is recalled is referred to as a first label, and the video segment in the target time interval after the system time is recalled is referred to as a second label.
In an embodiment of the present application, the setting a first tag for the video clip in the target time interval before the system time is recalled may include:
before the system time is recalled, when the system time reaches the starting time of the target time interval and is currently recorded, ending the current video recording segment and starting a new video recording segment;
and when the system time reaches the time for carrying out system time callback and the current video is being recorded, ending the current video clip, carrying out time callback, and starting a new video clip after the system time is recalled.
In this embodiment, for a system time callback with a callback plan, such as a system time callback at the end of daylight savings time, the dvr may determine, according to the callback plan, a time at which the system time callback is performed and a callback duration, and before the system time callback, when the system time reaches a start time of a target time interval (i.e., T;) when the system time reaches a start time of the target time intervalS) If the hard disk video recorder starts the video, the hard disk video recorder can process the video slice segment, namely, the current video segment is ended, and a new video segment is started; before the system time is recalled, when the system time reaches the time of recalling the system time (and the end time T of the target time interval)WConsistent), if the hard disk video recorder starts the video, the hard disk video recorder can perform the processing of the video slice segment again, namely, the current video segment is ended, and a new video segment is started after the system time is adjusted back, so as to obtain the video segment in the target time interval before the system time is adjusted back, and therefore the video segment in the target time interval before the system time is adjusted back can be separated from the video segments of other times, and the processing efficiency in the subsequent flow is improved.
In this embodiment, the DVR obtains a target time interval before the system time is recalled (i.e., [ T ]S,TW]) After the video segment in the video segment, a first tag may be set for the video segment.
Similarly, in this embodiment, the setting of the second tag for the video clip in the target time interval after the system time is recalled may include:
after the system time is adjusted back, when the system time reaches the ending time of the target time interval after the system time is adjusted back and the current video is being recorded, ending the current video clip and starting a new video clip;
and setting a second label for the video clip without the first label in the target time interval.
In this embodiment, the target time interval appears again after the system time is recalled by the hard disk recorder, and the system time reaches the end time of the target time interval after the system time is recalled (i.e., the system time reaches T againW) And then, the hard disk video recorder can perform video recording section processing again, namely, the current video recording section is finished, and a new video recording section is started to obtain the video recording section in the target time interval after the system time is adjusted back, so that the video recording section in the target time interval after the system time is adjusted back can be separated from the video recording sections in other times, and the processing efficiency in the subsequent flow is improved.
In this embodiment, two target time intervals (i.e., [ T ] may exist in the hard disk recorder when the system time reaches the end of the target time interval after the system time is recalledS,TW]) And at this time, the hard disk video recorder may set a second tag for the video clip in which the first tag is not set (i.e., the video clip obtained after the system time is recalled).
It should be noted that, in the embodiment of the present application, when the hard disk recorder sets a tag for a video segment in a target time interval, it is also not necessary to perform video segment processing in the above manner, for example, when the hard disk recorder completes system time callback, the hard disk recorder may query a local video, intercept the video segment in the target time interval, and set a first tag for the video segment; after the system time is recalled, when the system time reaches the end time of the target time interval, local video is inquired, the video fragment with the first label is filtered, the video fragment in the target time interval is intercepted, and a second label is set for the video fragment.
S120, when video playback is required, sequencing the video clips to be played back according to the label setting state of the video clips to be played back and the actual video recording time; for the video segments to be played back in the same target time interval, the actual video recording time of the video segments to be played back provided with the first label is earlier than the actual video recording time of the video segments to be played back provided with the second label.
In the embodiment of the present application, when video playback needs to be performed, the hard disk video recorder may search a video clip (referred to as a video clip to be played back) that meets the condition according to the input video search parameter.
After the hard disk video recorder obtains the video clip to be played back, the video clip to be played back can be sequenced according to the label setting state and the actual video recording time of the video clip to be played back.
The setting state of the tag of the video clip to be played back may include, but is not limited to: the label is provided with a first label, provided with a second label and not provided with a label.
It should be noted that, in the embodiment of the present application, the not-set tag refers to that the video segment is not set with the first tag or the second tag, and the embodiment of the present application is not repeated in the following.
The actual recording time of the video segment to be played back can be determined according to the starting time or/and the ending time of the video segment to be played back.
For ease of understanding and description, the actual recording time of the recorded segment to be played back will be referred to below as an example by the recording start time.
In the embodiment of the application, it is considered that, for the video segments in the same target time interval, since the video segment provided with the first tag is the video before the system time is adjusted back, and the video segment provided with the second tag is the video after the system time is adjusted back, the actual video time of the video segment provided with the first tag is earlier than the actual video time of the video segment provided with the second tag.
Correspondingly, for the video segments to be played back in the same target time interval, the actual video recording time of the video segments to be played back provided with the first label is earlier than the actual video recording time of the video segments to be played back provided with the second label.
It can be seen that, in the method flow shown in fig. 1, when the system time needs to be recalled, the repeated target time interval is determined, and different tags are respectively set for the video segments in the target time interval before the system time is recalled and the video segments in the target time interval after the system time is recalled, so that when the video playback needs to be performed, the video segments to be played back in the same target time interval can be sequenced according to the tags set for the video to be played back, the situation that the playing order of the video segments in the repeated time interval is incorrect due to the system time being recalled is avoided, and the video playback effect is optimized.
In an embodiment of the present application, the sorting the video clips to be played back according to the tag setting state and the actual recording time of the video clip to be played back may include:
when the two video clips to be played back are not provided with the label, or the same label is provided, or one of the two video clips to be played back is provided with the label, and the other one of the two video clips to be played back is not provided with the label, sequencing the two video clips to be played back according to the starting time of the two videos to be played back;
when the two video clips to be played back are provided with different labels, the two video clips to be played back are sequenced according to the principle that the starting time of the clip to be played back provided with the first label is earlier than the starting time of the clip to be played back provided with the second label.
For ease of understanding and description, the following description will be given by taking as an example the video clips to be played back sorted in order of their start times from morning to evening.
In this embodiment, when there are a plurality of video clips to be played back, for any two video clips to be played back, the hard disk recorder may obtain the tag setting states of the two video clips to be played back.
When the two video clips to be played back are not provided with the labels, the hard disk video recorder can sequence the two video clips to be played back according to the starting time of the two video clips to be played back; in the video queue to be played back, the video segment to be played back with the early start time is arranged in front of the video segment to be played back with the later start time.
When one of the two video clips to be played back is provided with a tag and the other one is not provided with a tag, the hard disk video recorder can also sequence the two video clips to be played back according to the starting time of the two video clips to be played back.
When the two video clips to be played back are both provided with the tags, the hard disk video recorder can further determine whether the tags set by the two video clips to be played back are the same.
If the two video clips to be played back are provided with the same label (i.e. both are provided with the same label, and the set labels are the same, if both are the first label or both are the second label), the hard disk video recorder may also sequence the two video clips to be played back according to the start times of the two video clips to be played back.
If the two video clips to be played back are provided with different tags (i.e. both are provided with tags, but the set tags are different, one of the tags is a first tag, and the other tag is a second tag), the hard disk video recorder may arrange the video clip to be played back provided with the first tag in front of the video clip to be played back provided with the second tag.
Further, in the embodiment of the present application, in consideration that in an existing video recording playback scheme, when there is a video recording with a repeated time interval, the repeated time interval will appear in the playback progress bar, which causes confusion to the user, therefore, in order to more intuitively display the video recording segment information of the repeated time interval generated due to the system time callback, and further optimize the video recording playback effect, a color (referred to as a preset color herein) may be preset to identify an overlapped time block of the video recording segment to be played back provided with the first tag and the video recording segment to be played back provided with the second tag.
Accordingly, in an embodiment of the present application, after the sorting the video segments to be played back according to the tag setting state of the video segments to be played back and the actual video recording time, the method may further include:
determining overlapped time blocks according to the video clip to be played back with the first label and the video clip to be played back with the second label;
and when the video progress bar is drawn, rendering the progress bar corresponding to the overlapped time blocks by using a preset color.
In this embodiment, after the hard disk recorder determines the video segment to be played back, the overlapped time blocks may be determined according to the video segment to be played back in which the first tag is set and the video segment to be played back in which the second tag is set (the specific implementation of which may be described below with reference to the example).
After the hard disk video recorder determines the overlapped time blocks, when a video progress bar (used for identifying whether a video is to be played back at a certain moment) is drawn, the progress bar corresponding to the overlapped time blocks can be rendered by using a preset color, and then, a user can visually determine whether the video to be played back and a specific repeated time interval of the repeated time interval generated by the system time callback exist according to the color of the progress bar.
The preset color is different from the color of the progress bar used for identifying the fact that the video to be played back exists at a certain moment and the color of the progress bar used for identifying the fact that the video to be played back does not exist at a certain moment.
Further, in one embodiment of the present application, after the hard disk video recorder sorts the video clips to be played back, the information of the sorted video clips to be played back is displayed in the playback file list, the video clips to be played back provided with the first tag or the second tag may be identified, and for example, the tags provided by the video clips to be played back are added to the displayed information of the video clips to be played back, so that a user can more intuitively know whether the video clips to be played back in the repeated time interval are acquired before the system time is adjusted back or after the system time is adjusted back, and further, the video clips to be played selectively according to the needs of the user.
In the embodiment of the present application, the display device for performing video playback may be a display screen (if any) of the hard disk recorder itself, or may be a display screen of another terminal that requests the hard disk recorder to perform video playback.
In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below with reference to specific examples.
In this embodiment, a hard disk recorder supporting daylight saving time adjusts the system time according to a preset daylight saving time mechanism.
In this embodiment, the hard disk recorder provides daylight savings time configurations, options may include, but are not limited to, whether daylight savings time is on, daylight savings time start time, daylight savings time end time, time alignment bias, and the like.
In the following, the summer time is started, the starting time of the summer time is 2:00 of the last sunday of march, the ending time of the summer time is 3:00 of the last sunday of october, and the time correction deviation is 1 hour.
According to the summer time configuration information, the hard disk video recorder can determine that the repeated target time interval is [2:00, 3:00] of the last sunday of October, namely the starting time of the repeated target time interval is 2:00 of the last sunday of October and the ending time is 3:00 of the last sunday of October.
In this embodiment, the hard disk recorder may monitor the system Time (e.g., RTC (Real-Time Clock), and when the system Time reaches an hour, the hard disk recorder may determine whether the system Time reaches the Time when the system Time enters daylight savings (i.e., 2:00 of the last sunday of march); if not, judging when the system time is waited for the whole point again; if yes, ending the current video recording segment, adjusting the system time backwards for 1 hour (namely, adjusting to 3:00), and starting a new video recording segment.
After entering daylight savings time, before the daylight savings time is finished, when the system time reaches the whole point, the hard disk video recorder can judge whether the system time reaches the starting time of the target time interval (namely 2:00 of the last sunday of october);
if the starting time of the target time interval is not reached, repeatedly judging when the system time is waited for reaching the integral point again;
if the starting time of the target time interval is reached, the current video recording segment is ended, a new video recording segment is started, and when the system time reaches the integral point, whether the system time reaches the summer time ending time or not is judged (namely the ending time of the target time interval before the system time is adjusted back, and the 3:00 of the last Sunday of October is obtained).
If the end time of the daylight saving time is not reached, repeatedly judging when the system time is waited for reaching the integral point again;
if the ending time of summer time is reached, the current video recording segment is ended, the time is adjusted forward by 1 hour (namely, adjusted to 2:00), and a new video recording segment is started.
At this time, the hard disk recorder may search for the video segments [2:00, 3:00] of the last sunday of october in the hard disk, read the segment information in the hard disk corresponding to the video segments, set the label (i.e., the first label) of daylight saving time, and rewrite the label into the hard disk.
After the summer time is over, when the system time reaches the hour, the hard disk video recorder can judge whether the system time reaches the end time of the target time interval (the end time of the target time interval after the system time is recalled, 3:00 of the last sunday of october).
If the end time of the target time interval is not reached, repeatedly judging when the system time is waited for an integral point again;
and if the ending time of the target time interval is reached, ending the current video clip and starting a new video clip.
At this time, the hard disk recorder may search for the video segments of [2:00, 3:00] of the last sunday of october in the hard disk, filter the video segments with the daylight savings time tags, read the segment information in the hard disk corresponding to these video segments, set the winter time tags (i.e., the second tags), and rewrite into the hard disk.
Further, in this embodiment, when the hard disk recorder receives the video playback request, the hard disk recorder may search for a video clip (i.e., a video clip to be played back) that meets the condition according to the input video search parameter, and sort the searched video clips to be played back from the beginning to the end according to the video start time.
In this embodiment, when the hard disk video recorder searches for a video segment to be played back, the video files in each hard disk may be traversed according to the hard disk number, and the searched video segment to be played back may be inserted into the result linked list (the result linked list may store index information of the video to be played back).
Specifically, in this embodiment, a compare pointer (denoted as P) may be set in the result linked listtmp) The video segment pointed by the comparison pointer is recorded as RStmpThe start time of the video segment is recorded as Ttmp. In the initial state, the result linked list is empty, and at this time, the start time of the video segment pointed by the comparison pointer and the video segment is empty.
When the hard disk video recorder searches the video clip (recorded as RS) to be played backiAnd the start time of the video clip is recorded as Ti) And then, the hard disk video recorder determines whether video clips exist in the result linked list.
If not, the hard disk video recorder records the video clip RSiAnd inserting the result linked list, and continuing searching the video clip to be played back.
It should be noted that, each time the video clip is inserted into the result linked list by the hard disk recorder, P is inserted into the result linked listtmpPointing to the tail of the result linked list.
If the result linked list has video segments:
1. if RSiIf no tag is set (i.e. no summer time tag or no winter time tag is set), the hard disk recorder compares TiAnd Ttmp
i) If Ti>TtmpThen the hard disk video recorder will RSiInserting RStmpAnd then, finishing the comparison;
ii) if Ti<TtmpThen the hard disk video recorder will PtmpMove forward and repeat the comparison.
Wherein, PtmpMoved forward once, PtmpPointing to the video segment that is previous to the video segment pointed before the move.
For example, if the result linked list sequentially includes video segments 1-3 from front to back, then when the video segment 4 needs to be inserted into the result linked list, P istmpInitial pointing video clip 3, TtmpThe start time of the video clip 3; if PtmpThe operation is carried out once in a forward direction,then P istmpPoint to video clip 2; if PtmpMoving forward once more, then PtmpPointing to the video clip 1.
If the video segment 4 is inserted behind the video segment 2, the video segment 4 is between the video segment 2 and the video segment 3, that is, the video segments are ordered as video segment 1, video segment 2, video segment 4 and video segment 3.
Wherein, if PtmpPoints to the head of the result chain table, and Ti<TtmpThen RSiInsert the result linked list foremost and end this comparison.
2. If RSiBe provided with daylight saving time label:
i) if R istmpBe provided with daylight savings time label or not set up the label, then:
a) if Ti>TtmpThen the hard disk video recorder will RSiInserting RStmpAnd then, finishing the comparison;
b) if Ti<TtmpThen the hard disk video recorder will PtmpMove forward and repeat the comparison.
ii) if RtmpIf the label of winter time is set, the hard disk video recorder will send PtmpMove forward and repeat the comparison.
Wherein when P istmpWhen pointing to the head of the result chain table, if RtmpWith or without a summer time tag, and Ti<Ttmp(ii) a Or, RtmpIf the label of winter time is set, the hard disk video recorder will send RSiInsert the result linked list foremost and end this comparison.
3) If RSiIs provided with a winter season label:
i) if R istmpIf the label is set or not set in winter, then:
a) if Ti>TtmpThen the hard disk video recorder will RSiInserting RStmpAnd then, finishing the comparison;
b) if Ti<TtmpThen the hard disk video recorder will PtmpMove forward and repeat the comparison.
ii) if RtmpIf summer time label is set, then the hard disk video recorder will send RSiInserting RStmpThereafter, the comparison is ended.
Wherein when P istmpWhen pointing to the head of the result chain table, if RtmpIs provided with or without a label for winter time, and Ti<TtmpThen the hard disk video recorder will RSiInsert the result linked list foremost and end this comparison.
In this embodiment, a schematic flow chart of an implementation process of inserting the searched video segment to be played back into the result linked list by the hard disk recorder may be as shown in fig. 2A to fig. 2D.
In this embodiment, after the hard disk recorder sequences the video segments to be played back, the overlapped time blocks of the video segment with the summer time tag and the video segment (possibly multiple) with the winter time tag in the video segments to be played back may be calculated.
For example, if the video segments to be played back include 2: 10-2: 20 (same date, the same below) video segments provided with daylight saving time tags and video segments provided with winter time tags, and include 2: 40-2: 50 video segments provided with daylight saving time tags and video segments provided with winter time tags, the overlapped time blocks include [2:10, 2:20] and [2:40, 2:50 ].
When the video progress bar is drawn, the overlapped time blocks are drawn by using preset color blocks, the playback file list displays the correctly sequenced video clip information list to be played back, the video clip provided with the summer time tag or the winter time tag is identified, and a user can double click the file to play back.
In the embodiment of the application, when the system time is required to be recalled, the repeated target time interval is determined, different labels are set for the video segments in the target time interval before the system time is recalled and the video segments in the target time interval after the system time is recalled respectively, furthermore, when the video playback is required, the video segments to be played back in the same target time interval can be sequenced according to the labels set for the video to be played back, the situation that the playing sequence of the video segments in the repeated time interval is incorrect due to the system time callback is avoided, and the video playback effect is optimized.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
referring to fig. 3, a schematic structural diagram of a video recording and playback apparatus provided in an embodiment of the present application is shown, where the video recording and playback apparatus may be applied to a monitoring device in the foregoing method embodiment, and as shown in fig. 3, the video recording and playback apparatus may include:
the system time adjusting unit 310 is configured to, when the system time needs to be recalled, determine a repeated target time interval according to a time at which the system time is recalled and a callback duration;
the video processing unit 320 is configured to set a first tag for a video segment in the target time interval before the system time is adjusted back, and set a second tag for a video segment in the target time interval after the system time is adjusted back;
the video playback unit 330 is configured to, when video playback needs to be performed, sort the video segments to be played back according to the tag setting state of the video segments to be played back and the actual video recording time; and for the video clips to be played back in the same target time interval, the actual video recording time of the video clips to be played back provided with the first label is earlier than the actual video recording time of the video clips to be played back provided with the second label.
In an optional implementation manner, the video recording processing unit 320 is specifically configured to, before the system time is adjusted back, when the system time reaches the start time of the target time interval and is currently being recorded, end the current video recording segment and start a new video recording segment; before the system time is recalled, when the system time reaches the time of system time callback and is currently recorded, ending the current video clip, and starting a new video clip after the system time is recalled; and setting a first label for the video clip in the target time interval.
In an optional implementation manner, the video recording processing unit 320 is further specifically configured to, after the system time is adjusted back, when the system time reaches an end time of the target time interval and is currently recording, end the current video recording segment and start a new video recording segment; and setting a second label for the video clip without the first label in the target time interval.
In an optional implementation manner, the video playback unit 330 is specifically configured to, when neither of the two video segments to be played back is provided with a tag, or is provided with the same tag, or one of the two video segments to be played back is provided with a tag, and the other is not provided with a tag, sort the two video segments to be played back according to the start times of the two video segments to be played back; when the two video clips to be played back are provided with different labels, the two video clips to be played back are sequenced according to the principle that the starting time of the clip to be played back provided with the first label is earlier than the starting time of the clip to be played back provided with the second label.
In an optional implementation manner, the video playback unit 330 is further configured to determine overlapping time blocks according to the video segment to be played back with the first tag and the video segment to be played back with the second tag; and when the video progress bar is drawn, rendering the progress bar corresponding to the overlapped time blocks by using a preset color.
In an optional implementation manner, the video playback unit 330 is further configured to display information of the sorted video segments to be played back in a playback file list, and identify the video segments to be played back, where the first tag or the second tag is set.
Fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402 and memory 403 communicate with each other via a communication bus 404. Wherein the memory 403 stores a computer program; the processor 401 may execute the video playback method described above by executing the program stored in the memory 403.
Memory 403, as referred to herein, may be any electronic, magnetic, optical, or other physical storage device that may contain or store information such as executable instructions, data, and the like. For example, the memory 402 may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present application also provide a machine-readable storage medium, such as the memory 403 in fig. 4, storing a computer program, which can be executed by the processor 401 in the electronic device shown in fig. 4 to implement the video playback method described above.
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.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (12)

1. A video playback method, comprising:
when the system time needs to be recalled, determining a repeated target time interval according to the moment of recalling the system time and the callback duration;
setting a first label for the video segments in the target time interval before the system time is adjusted back, and setting a second label for the video segments in the target time interval after the system time is adjusted back;
when video playback is required, sequencing the video clips to be played back according to the label setting state of the video clips to be played back and the actual video time; for the video segments to be played back in the same target time interval, the actual video recording time of the video segments to be played back provided with the first label is earlier than the actual video recording time of the video segments to be played back provided with the second label;
wherein, after ordering the video clips to be played back according to the tag setting state and the actual video time of the video clips to be played back, the method further comprises the following steps:
determining overlapped time blocks according to the video clip to be played back with the first label and the video clip to be played back with the second label;
when the video progress bar is drawn, rendering the progress bar corresponding to the overlapped time blocks by using a preset color; the preset color is different from the color of the progress bar used for identifying the video to be played back at a certain moment and the color of the progress bar used for identifying the video not to be played back at a certain moment.
2. The method of claim 1, wherein the setting a first tag for the video segment in the target time interval before the system time is adjusted back comprises:
before the system time is recalled, when the system time reaches the starting time of the target time interval and is currently recorded, ending the current video recording segment and starting a new video recording segment;
before the system time is recalled, when the system time reaches the time of system time callback and is currently recorded, ending the current video clip, and starting a new video clip after the system time is recalled;
and setting a first label for the video clip in the target time interval.
3. The method of claim 2, wherein the setting a second tag for the video segment in the target time interval after the system time is adjusted back comprises:
after the system time is adjusted back, when the system time reaches the end time of the target time interval and is currently recording, ending the current video recording segment and starting a new video recording segment;
and setting a second label for the video clip without the first label in the target time interval.
4. The method of claim 1, wherein the sorting the video clips to be played back according to the tag setting status and the actual recording time of the video clips to be played back comprises:
when the two video clips to be played back are not provided with the label, or the same label is provided, or one of the two video clips to be played back is provided with the label, and the other one of the two video clips to be played back is not provided with the label, sequencing the two video clips to be played back according to the starting time of the two videos to be played back;
when the two video clips to be played back are provided with different labels, the two video clips to be played back are sequenced according to the principle that the starting time of the clip to be played back provided with the first label is earlier than the starting time of the clip to be played back provided with the second label.
5. The method of claim 1, wherein after sequencing the video segments to be played back according to the tag setting status and the actual recording time of the video segments to be played back, the method further comprises:
displaying the information of the sequenced video clips to be played back in the playback file list, and identifying the video clips to be played back, which are provided with the first label or the second label.
6. A video playback apparatus, comprising:
the system time adjusting unit is used for determining a repeated target time interval according to the system time callback time and the callback duration when the system time needs to be recalled;
the video processing unit is used for setting a first label for the video fragment in the target time interval before the system time is adjusted back, and setting a second label for the video fragment in the target time interval after the system time is adjusted back;
the video playback unit is used for sequencing the video clips to be played back according to the label setting state of the video clips to be played back and the actual video recording time when the video playback is required; for the video segments to be played back in the same target time interval, the actual video recording time of the video segments to be played back provided with the first label is earlier than the actual video recording time of the video segments to be played back provided with the second label;
the video playback unit is further configured to determine an overlapped time block according to the video segment to be played back provided with the first tag and the video segment to be played back provided with the second tag; when the video progress bar is drawn, rendering the progress bar corresponding to the overlapped time blocks by using a preset color; the preset color is different from the color of the progress bar used for identifying the video to be played back at a certain moment and the color of the progress bar used for identifying the video not to be played back at a certain moment.
7. The apparatus of claim 6,
the video processing unit is specifically configured to, before the system time is recalled, end the current video clip and start a new video clip when the system time reaches the start time of the target time interval and is currently being video recorded; before the system time is recalled, when the system time reaches the time of system time callback and is currently recorded, ending the current video clip, and starting a new video clip after the system time is recalled; and setting a first label for the video clip in the target time interval.
8. The apparatus of claim 7,
the video processing unit is further specifically configured to, after the system time is recalled, end the current video clip and start a new video clip when the system time reaches the end time of the target time interval and is currently recording; and setting a second label for the video clip without the first label in the target time interval.
9. The apparatus of claim 6,
the video playback unit is specifically configured to sort the two video segments to be played back according to the start times of the two video segments to be played back when neither of the two video segments to be played back is provided with a tag, or one of the two video segments to be played back is provided with a tag, and the other one of the two video segments to be played back is not provided with a tag; when the two video clips to be played back are provided with different labels, the two video clips to be played back are sequenced according to the principle that the starting time of the clip to be played back provided with the first label is earlier than the starting time of the clip to be played back provided with the second label.
10. The apparatus of claim 6,
the video playback unit is further configured to display information of the sequenced video clips to be played back in the playback file list, and identify the video clips to be played back, which are provided with the first tag or the second tag.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 5.
CN201810482929.0A 2018-05-18 2018-05-18 Video playback method and device, electronic equipment and readable storage medium Active CN110505426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810482929.0A CN110505426B (en) 2018-05-18 2018-05-18 Video playback method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810482929.0A CN110505426B (en) 2018-05-18 2018-05-18 Video playback method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110505426A CN110505426A (en) 2019-11-26
CN110505426B true CN110505426B (en) 2022-03-01

Family

ID=68584112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810482929.0A Active CN110505426B (en) 2018-05-18 2018-05-18 Video playback method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110505426B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294633B (en) * 2019-12-03 2021-11-23 海信视像科技股份有限公司 EPG user interface display method and display equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1734655A (en) * 2004-08-13 2006-02-15 上海乐金广电电子有限公司 Data recording/playing method
CN103425537A (en) * 2012-05-25 2013-12-04 中兴通讯股份有限公司 Time adjusting method and time adjusting device
CN104469486A (en) * 2013-09-18 2015-03-25 晶睿通讯股份有限公司 Pre-processing method for playing video data and playing interface device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3615498B2 (en) * 2001-05-16 2005-02-02 三洋電機株式会社 Surveillance camera device
US7676288B2 (en) * 2006-06-23 2010-03-09 Invensys Systems, Inc. Presenting continuous timestamped time-series data values for observed supervisory control and manufacturing/production parameters
CN101873456B (en) * 2009-04-24 2012-02-08 上海乐金广电电子有限公司 Video recording data reproduction device on digital video recorder and method thereof
JP5577689B2 (en) * 2009-12-18 2014-08-27 船井電機株式会社 Recording device
US9723347B2 (en) * 2015-10-01 2017-08-01 Sorenson Media, Inc Frequency capping for media content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1734655A (en) * 2004-08-13 2006-02-15 上海乐金广电电子有限公司 Data recording/playing method
CN103425537A (en) * 2012-05-25 2013-12-04 中兴通讯股份有限公司 Time adjusting method and time adjusting device
CN104469486A (en) * 2013-09-18 2015-03-25 晶睿通讯股份有限公司 Pre-processing method for playing video data and playing interface device

Also Published As

Publication number Publication date
CN110505426A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN103999158B (en) For the lantern slide interface of search video
JPH08249348A (en) Method and device for video retrieval
CN110505426B (en) Video playback method and device, electronic equipment and readable storage medium
EP4351150A1 (en) Video processing method and apparatus, and device and storage medium
CN110677735A (en) Video positioning method and device
JP2004348744A5 (en)
CN105872797A (en) Live broadcast time shifting method and device
US20150324128A1 (en) Efficient use of metadata accompanying file writing to media
CN113518187B (en) Video editing method and device
JP2008165512A5 (en)
EP3979208B1 (en) Timeline system for monitoring a culture media protocol
CN110876090B (en) Video abstract playback method and device, electronic equipment and readable storage medium
JP2002007019A5 (en)
US20050096864A1 (en) Method and system for managing a testing task
JP2014230003A5 (en)
CN110730358B (en) Live video time shifting control method, terminal and storage medium
CN114979743B (en) Method, device, equipment and medium for displaying audiovisual works
CN101141602A (en) Image recording and reproducing apparatus
JP2006279304A (en) Image searching apparatus
KR20090054023A (en) Method and computer program recording medium for perpetual data deleting
US10692536B1 (en) Generation and use of multiclips in video editing
US8655870B2 (en) Apparatus and method for retrieving data at high speed to perform post-processing on satellite telemetry data
US9456191B2 (en) Reproduction apparatus and reproduction method
EP0724211A2 (en) Computer system with decentralised storage of video sequences
KR20140039756A (en) Data storage device and operating method thereof

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