CN108174132B - Video file playback method and device - Google Patents

Video file playback method and device Download PDF

Info

Publication number
CN108174132B
CN108174132B CN201611115821.5A CN201611115821A CN108174132B CN 108174132 B CN108174132 B CN 108174132B CN 201611115821 A CN201611115821 A CN 201611115821A CN 108174132 B CN108174132 B CN 108174132B
Authority
CN
China
Prior art keywords
playback
video
target video
channel
file
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
CN201611115821.5A
Other languages
Chinese (zh)
Other versions
CN108174132A (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 CN201611115821.5A priority Critical patent/CN108174132B/en
Publication of CN108174132A publication Critical patent/CN108174132A/en
Application granted granted Critical
Publication of CN108174132B publication Critical patent/CN108174132B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/432Content retrieval operation from a local storage medium, e.g. hard-disk
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Abstract

The invention discloses a playback method and device of a video file, and belongs to the field of video monitoring. The method comprises the following steps: determining a playback time point corresponding to the intelligent playback mode; acquiring video files of N channels corresponding to the intelligent playback mode; retrieving at least one target video clip from the video files of the N channels according to the sequence of the video time by taking the playback time point as a retrieval starting point, wherein the target video clip is a video clip marked with intelligent event information; intercepting a target video clip from a video file of a corresponding channel; and each target video clip is played back in the playback area corresponding to the channel in the playback interface. The method and the device solve the problem that the intelligent playback mode only supports single-path playback because the corresponding time periods of the intelligent event information in the video files of a plurality of channels are different and even crossed in the related technology, and achieve the effect of supporting multi-path intelligent playback.

Description

Video file playback method and device
Technical Field
The embodiment of the invention relates to the field of video monitoring, in particular to a method and a device for playing back a video file.
Background
The monitoring system generally comprises: a plurality of Network cameras (IP cameras, IPC) and a Network Video Recorder (NVR). Each video file shot by the IPC corresponds to one video channel, and one video channel can be called as one video. NVRs have the ability to store and playback video files.
There are two modes for playing back a video file: a normal playback mode and a smart playback mode. In a conventional playback mode, sequentially playing back the video files according to the sequence of the video time from morning to evening; in the intelligent playback mode, only the video clip identified with the intelligent event information in the video file is played back, where the intelligent event information is identified by IPC when an event such as a moving object or a target face is identified in the monitored picture, for example: and identifying a moving object in the video file within the period of 3:00-3:02, identifying intelligent event information on the video segment corresponding to 3:00-3:02 of the video file by the IPC, and only playing back the video segment corresponding to 3:00-3:02 in the intelligent playback mode.
The current normal playback mode supports multi-path playback, for example, normal playback is performed on 4-path video files at the same time, but because the respective corresponding time periods of the intelligent event information in the video files of multiple channels are different and even cross, the current intelligent playback mode only supports single-path playback.
Disclosure of Invention
In order to solve the technical problem that the current intelligent playback mode only supports one-way playback, the embodiment of the invention provides a playback method and a playback device for video files. The technical scheme is as follows:
in a first aspect, a method for playing back a video file is provided, where the method includes:
determining a playback time point corresponding to the intelligent playback mode;
acquiring video files of N channels corresponding to the intelligent playback mode, wherein N is an integer greater than 1;
retrieving at least one target video segment from the video files of the N channels according to the sequence of the video time by taking the playback time point as a retrieval starting point, wherein the target video segment is a video segment marked with intelligent event information, and the intelligent event information is a mark for indicating that a preset event exists in a video picture of the video segment;
intercepting the target video clip from the video file of the corresponding channel;
and playing back each target video clip in a playback interface in a corresponding playback area according to a channel to which the target video clip belongs, wherein the playback interface comprises N playback areas, and each channel corresponds to the corresponding playback area.
Optionally, the playing back each target video segment in the playback interface in the playback area corresponding to the channel to which the target video segment belongs includes:
determining the playback sequence of each target video clip according to the sequence of the video recording time;
starting playback from the 1 st target video segment in the playback sequence;
if the i-th target video segment and the i + 1-th target video segment in the playback sequence have an intersection in the video recording time, when the non-intersection part in the i-th target video segment and the i + 1-th target video segment is played back, the non-intersection part is played back in the corresponding playback area according to the channel to which the non-intersection part belongs; when the intersection part of the ith target video segment and the (i + 1) th target video segment is played back, the intersection part is played back synchronously in the corresponding playback area according to the channel to which the intersection part belongs, wherein i is a positive integer;
if there is no intersection between the ith target video recording segment and the (i + 1) th target video recording segment in the playback sequence in the video recording time, the (i + 1) th target video recording segment is played back in the corresponding playback area according to the channel to which the target video recording segment belongs, and then the (i + 1) th target video recording segment is played back in the corresponding playback area according to the channel to which the target video recording segment belongs.
Optionally, the number of the target video segments is two or more;
before intercepting the target video clip from the video file of the corresponding channel, the method further includes:
detecting whether the ith target video segment and the (i + 1) th target video segment belong to the same channel or not and intersection exists between the video time periods corresponding to the ith target video segment and the (i is a positive integer);
and if the target video segments belong to the same channel and the video time periods corresponding to the target video segments are intersected, merging the ith target video segment and the (i + 1) th target video segment.
Optionally, the determining a playback time point corresponding to the intelligent playback mode includes:
receiving a first switching instruction, wherein the first switching instruction is used for indicating switching from a normal playback mode to the intelligent playback mode;
closing the video files played back in the conventional playback mode;
and determining the first playback time when the video file is closed as the playback time point corresponding to the intelligent playback mode.
Optionally, after each target video segment is played back in the playback interface in the corresponding playback area according to the channel to which the target video segment belongs, the method further includes:
receiving a second switching instruction, wherein the second switching instruction is used for indicating switching from the intelligent playback mode to a conventional playback mode;
closing the target video clip;
retrieving the latest video file of each channel in the N channels by taking the second playback moment when the target video clip is closed as a retrieval starting point;
and synchronously playing back the latest video recording file of each channel in the playback area corresponding to each channel in the playback interface.
Optionally, before the synchronously playing back the latest video recording file of each channel in the playback interface in the corresponding playback area, the method further includes:
and when the starting time of the latest video recording file is earlier than the second playback time, intercepting the video recording file from the second playback time.
Optionally, the obtaining the video files of the N channels corresponding to the intelligent playback mode includes:
for any channel in the N channels, acquiring a video file corresponding to the playback time point;
after the video file is searched, acquiring a next video file;
when the next video file is failed to be acquired, detecting whether the next video file exists or not at intervals of preset time, wherein the preset time is less than the refreshing time of the video file;
and if the next video file exists, acquiring the next video file.
Optionally, the detecting whether the next video recording file exists every predetermined time includes:
detecting whether an index file corresponding to the channel in a hard disk is refreshed or not, wherein the index file is used for uniquely identifying the corresponding video file and at least comprises duration information, channel information and intelligent event information of the video file;
and if the index file is refreshed, determining that the next video file exists.
Optionally, after the obtaining of the next video file, the method further includes:
when the next video file is failed to be acquired, acquiring the next video file again;
and when the next video file is not acquired again, executing the step of detecting whether the next video file exists or not at preset time intervals.
Optionally, the playback interface includes a playback progress bar, where the playback progress bar includes a time axis, a moving cursor, a total progress bar, and N channel progress bars corresponding to the N channels, respectively;
wherein the moving cursor is to indicate playback progress based on the timeline; the total progress bar and each channel progress bar comprise a conventional video recording part and an intelligent video recording part; the intelligent video part of the total progress bar is used for representing union information of the target video clips of all the channels, and the conventional video part of the total progress bar is used for representing complement information of the intelligent video part of the total progress bar; the intelligent video recording part of each channel progress bar is used for representing union information of the target video recording segments of the corresponding channel, and the conventional video recording part of each channel progress bar is used for representing complement information of the intelligent video recording part of the channel progress bar.
In a second aspect, there is provided an apparatus for playing back a video file, the apparatus comprising:
the determining module is used for determining a playback time point corresponding to the intelligent playback mode;
the acquisition module is used for acquiring the video files of N channels corresponding to the intelligent playback mode, wherein N is an integer greater than 1;
a first retrieval module, configured to retrieve, from the video files of the N channels, at least one target video clip according to a sequence of video recording times with the playback time point determined by the determination module as a retrieval starting point, where the target video clip is a video clip identified with intelligent event information, and the intelligent event information is an identifier used to indicate that a preset event exists in a video picture of the video clip;
the intercepting module is used for intercepting the target video clip retrieved by the first retrieving module from the video file of the corresponding channel;
the first playback module is configured to play back, in a playback interface, each target video segment intercepted by the intercepting module in a corresponding playback area according to a channel to which the target video segment belongs, where the playback interface includes N playback areas, and each channel corresponds to a corresponding playback area.
Optionally, the first playback module includes:
a first determining unit, configured to determine a playback order of each target video segment according to the sequence of the video recording time;
a first playback unit configured to start playback from a 1 st target video clip in the playback order determined by the first determination unit;
a second playback unit, configured to, if there is an intersection between an i-th target video segment and an i + 1-th target video segment in the playback order determined by the first determination unit in the video recording time, playback the non-intersection portion separately in a corresponding playback area according to a channel to which the non-intersection portion belongs when playing back to the non-intersection portion in the i-th target video segment and the i + 1-th target video segment; when the intersection part of the ith target video segment and the (i + 1) th target video segment is played back, the intersection part is played back synchronously in the corresponding playback area according to the channel to which the intersection part belongs, wherein i is a positive integer;
a third playback unit, configured to, if there is no intersection between the ith target video segment and the (i + 1) th target video segment in the playback order determined by the first determination unit in the video recording time, play back the ith target video segment in the corresponding playback area according to the channel to which the ith target video segment belongs, and then play back the (i + 1) th target video segment in the corresponding playback area according to the channel to which the ith target video segment belongs.
Optionally, the number of the target video segments is two or more;
the device further comprises:
the detection module is used for detecting whether the ith target video segment and the (i + 1) th target video segment belong to the same channel and the corresponding video time periods of the ith target video segment and the (i + 1) th target video segment have intersection, wherein i is a positive integer;
and the merging module is used for merging the ith target video clip and the (i + 1) th target video clip if the detection module detects that the target video clips belong to the same channel and the video time periods corresponding to the channel and the video time periods have intersection.
Optionally, the determining module includes:
a receiving unit, configured to receive a first switching instruction, where the first switching instruction is used to instruct to switch from a normal playback mode to the smart playback mode;
a closing unit, configured to close the video file played back in the normal playback mode;
and the second determining unit is used for determining the first playback time when the video file is closed by the closing unit as the playback time point corresponding to the intelligent playback mode.
Optionally, the apparatus further comprises:
a receiving module, configured to receive a second switching instruction, where the second switching instruction is used to instruct to switch from the smart playback mode to a conventional playback mode;
a closing module, configured to close the target video segment;
a second retrieval module, configured to retrieve a latest video file of each channel of the N channels using a second playback time when the closing module closes the target video clip as a retrieval starting point;
and the second playback module is used for synchronously playing back the latest video file of each channel in the playback area corresponding to each channel in the playback interface.
Optionally, the second retrieving module is further configured to intercept the video file from the second playback time when the start time of the latest video file is earlier than the second playback time.
Optionally, the obtaining module includes:
an obtaining unit, configured to obtain, for any one of the N channels, a video file corresponding to the playback time point, and obtain a next video file after the video file is retrieved;
the detecting unit is used for detecting whether the next video file exists or not at intervals of preset time when the acquiring unit fails to acquire the next video file, and the preset time is less than the refreshing time of the video file;
the obtaining unit is configured to obtain the next video file if the detecting unit detects that the next video file exists.
Optionally, the detecting unit is further configured to detect whether an index file corresponding to the channel in a hard disk has been refreshed, where the index file is used to uniquely identify the corresponding video file, and the index file at least includes duration information of the video file, channel information, and the intelligent event information; and if the index file is refreshed, determining that the next video file exists.
Optionally, the obtaining unit is further configured to, when obtaining the next video file fails, obtain the next video file again;
the detecting unit is further configured to detect whether the next video file exists every predetermined time when reacquiring the next video file fails.
Optionally, the playback interface includes a playback progress bar, where the playback progress bar includes a time axis, a moving cursor, a total progress bar, and N channel progress bars corresponding to the N channels, respectively;
wherein the moving cursor is to indicate playback progress based on the timeline; the total progress bar and each channel progress bar comprise a conventional video recording part and an intelligent video recording part; the intelligent video part of the total progress bar is used for representing union information of the target video clips of all the channels, and the conventional video part of the total progress bar is used for representing complement information of the intelligent video part of the total progress bar; the intelligent video recording part of each channel progress bar is used for representing union information of the target video recording segments of the corresponding channel, and the conventional video recording part of each channel progress bar is used for representing complement information of the intelligent video recording part of the channel progress bar.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the intelligent playback mode, at least one target video segment with intelligent event information is retrieved from the video files of the N channels according to the video time sequence according to the playback time point, the target video segment is cut out, and the playback is performed in the playback areas corresponding to the channels to which the target video segment belongs on the playback interface, so that in the intelligent playback mode, multiple paths of target video segments with the intelligent event information are played back in the playback areas corresponding to the channels, and the multi-path intelligent playback can be realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic illustration of an implementation environment provided by some embodiments of the invention;
fig. 2 is a flowchart of a method for playing back a video recording file according to an embodiment of the present invention;
fig. 3A is a flowchart of a method for playing back a video recording file according to another embodiment of the present invention;
fig. 3B is a flowchart of a method for playing back a video recording file according to another embodiment of the present invention;
FIG. 3C is a schematic diagram of a display interface for four-way playback provided by one embodiment of the present invention;
FIG. 3D is a schematic diagram of a capture scene provided by one embodiment of the invention;
FIG. 3E is a schematic diagram of mode switching provided by one embodiment of the present invention;
FIG. 3F is a schematic diagram of mode switching provided by another embodiment of the present invention;
FIG. 3G is a schematic diagram of a video file update method according to an embodiment of the present invention;
FIG. 3H is a diagram of a playback progress bar provided by an embodiment of the invention;
fig. 4 is a block diagram showing a configuration of a playback apparatus for a video file according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 is a schematic illustration of an implementation environment provided by some embodiments of the invention. As shown in FIG. 1, the environment includes a video capture device 110, a video storage and playback device 120, and a communication network 130.
The video capture device 110 is configured to capture and encode the compressed video signal, and transmit the encoded and compressed video signal to the video storage and playback device 120 through the communication network 130. Optionally, the video capture device 110 is further configured to capture and compress the audio signal, and transmit the compressed audio signal to the video storage and playback device 120 through the communication network 130, so as to implement real-time audio playback or recording. In practical applications, the video capture device 110 may be an IPC or other types of cameras.
Optionally, the video recording and collecting device 110 includes at least one IPC, and illustratively, the video recording and collecting device 110 shown in fig. 1 includes 4 IPCs, which are a first IPC 111, a second IPC 112, a third IPC 113, and a fourth IPC 114, respectively, where each video recording file shot by the IPCs corresponds to one video channel.
The video storage and playback device 120 includes a video storage device 121 and a display device 122 for storing and playing back video files. Alternatively, the video storage device 121 and the display device 122 may be distributed, or may be integrated into the same device. In practical applications, the Video storage and playback device 120 may be an NVR or a Digital Video Recorder (DVR). The display device 122 may be external to the DVR or NVR when the display device 122 is not integrated into the DVR or NVR. The external display device 122 may be a television, a monitor, a computer display, etc.
Optionally, the video storage device 121 has two storage mechanisms when storing the video file. One is to store the video file according to the size of the video file, and when the video reaches a predetermined size, for example, 1GB, the video file is stored as a video file; and the other one is that a preset event exists in the video recording video, and the video recording video corresponding to the preset event from the beginning to the end is stored as a video recording file.
The video storage and playback device 120 supports real-time display and playback of video files. For the playback of the video files, a conventional playback mode and an intelligent playback mode are supported, and in the conventional playback mode, the video files are sequentially played back according to the sequence of the video time from morning to night; and in the intelligent playback mode, only the video clip marked with the intelligent event information in the video file is played back.
For example, in fig. 1, the video acquisition device 110 includes a first IPC 111, a second IPC 112, a third IPC 113, and a fourth IPC 114, and the display interface of the video storage and playback device 120 may include 4 display areas, and the 4 display areas respectively and correspondingly display the video files shot by the IPCs.
Optionally, when the video storage and playback device 120 receives the selection instruction, the selection instruction may include one video channel selected by the user or may include multiple video channels selected by the user at the same time, and the display interface displays the video file of the corresponding channel on the display interface according to the selection instruction. When the video storage and playback device 120 plays back a video file, the playback mode can be controlled to switch between the normal playback mode and the intelligent playback mode through menu options.
The video capture device 110 is connected to the video storage and playback device 120 via a communication network 130. Optionally, the communication network 130 may be a wired communication network or a wireless communication network, and the present solution does not limit the physical implementation manner of the communication network 130.
In the intelligent playback mode, the video storage and playing device 120 plays back only the video segments identified with the intelligent event information in the video files, and the time periods corresponding to the intelligent event information in the video files of different channels are different and even are crossed, so the current intelligent playback mode only supports one-way playback. In order to realize multi-channel playback in the intelligent playback mode and meet more requirements of users for playing back and viewing video files, reference may be made to the playback method of video files shown in fig. 2.
Fig. 2 is a flowchart of a method for playing back a video file according to an embodiment of the present invention. The method is exemplified by being applied to the video storage and playing device 120 shown in fig. 1, and as shown in fig. 2, the method for playing back the video file includes:
step 201, determining a playback time point corresponding to the intelligent playback mode.
The playback time point refers to a start time selected before playback is performed.
Step 202, acquiring video files of N channels corresponding to the intelligent playback mode, where N is an integer greater than 1.
And step 203, taking the playback time point as a retrieval starting point, and retrieving at least one target video clip from the video files of the N channels according to the sequence of the video time.
The target video clip is a video clip marked with intelligent event information, the intelligent event information is a mark used for indicating that a preset event exists in a video picture of the video clip, and the preset event comprises events such as a moving object or a target human face in the video picture.
Each stored video file corresponds to an index file, and the index file at least comprises the duration information, channel information and intelligent event information of the video file. And retrieving the video clip with the intelligent event information according to the index file and the playback time point.
The smart event information generally includes a type of the smart event, and a start time and an end time corresponding to the smart event, where the type of the smart event includes: motion detection, intrusion detection, line drawing detection and infrared detection. The motion detection is to detect a moving object; the intrusion detection is to detect the object entering the target area; the line drawing detection is to draw a warning line in a monitoring area and detect an object crossing the warning line; infrared detection is the detection of living beings in a target area by infrared light. And determining a video file with the intelligent event according to the type of the intelligent event contained in the index file, and determining a start time and an end time corresponding to the target video segment according to the start time and the end time.
And step 204, intercepting the target video clip from the video file of the corresponding channel.
And step 205, playing back each target video clip in the playback interface in the corresponding playback area according to the channel to which the target video clip belongs.
The playback interface comprises N playback zones, and each channel corresponds to a respective playback zone.
In summary, in the playback method of the video recording file provided in the embodiment of the present invention, when in the intelligent playback mode, at least one target video clip with intelligent event information is retrieved from the video files of the N channels according to the playback time point and the target video clip is cut out, the target video clip belongs to the channel on the playback interface and plays back in the playback area corresponding to the target video clip, in the intelligent playback mode, multiple paths of target video clips with intelligent event information are played back in the playback areas corresponding to the target video clips, so that the multiple paths of intelligent playback can be realized, the problem that the intelligent playback mode only supports single-path playback due to different time periods and even cross of the intelligent event information in the video files of multiple channels in the related art is solved, and the effect of supporting the multiple paths of intelligent playback is achieved.
If the smart playback mode supports multi-channel playback, the playback mode can be switched between the normal playback mode and the smart playback mode during the multi-channel playback, specifically referring to the description shown in fig. 3A.
Fig. 3A is a flowchart of a method for playing back a video file according to another embodiment of the present invention. The method is exemplified by being applied to the video storage and playing device 120 shown in fig. 1, and as shown in fig. 3A, the method for playing back the video file includes:
step 301, determining a playback time point corresponding to the intelligent playback mode.
Alternatively, when the video recording and playing device 120 turns on the playback function, the normal playback mode is defaulted. And under the normal playback mode, simultaneously playing back the corresponding video files by each channel.
When the playback mode is switched from the normal playback mode to the smart playback mode, the normal playback files in the respective channels need to be replaced with playback files of video clips containing only smart event information. When the normal playback mode is switched to the intelligent playback mode, the playback time point corresponding to the intelligent playback mode is determined, and the steps shown in fig. 3B may be replaced with:
in step 301a, a first switch command is received.
The first switching instruction is used for instructing to switch from the normal playback mode to the smart playback mode.
Step 301b, close the video file played back in the normal playback mode.
The video files played back in the normal mode are the normal playback files described above.
Step 301c, determining the first playback time when the video file is closed as the playback time point corresponding to the intelligent playback mode.
The first playback time refers to the corresponding time of the video file played back on the time axis when the video file is closed. Since the recorded video before the first playback time has already been played back, it is not necessary to play back the recorded video again, and therefore the first playback time is determined as the playback time point corresponding to the intelligent playback mode.
Step 302, acquiring video files of N channels corresponding to the intelligent playback mode, where N is an integer greater than 1.
In practical application, the acquisition of the video files refers to that the video files with the corresponding time maximum value are found from the playback time point backward, then the predetermined number of the video files are acquired for playback, the predetermined number of the video files are played back, and then the predetermined number of the video files are acquired for playback. For example, 1000 video files are acquired at a time.
Due to the multi-channel playback, the video files in the N channels need to be acquired, and the channel information corresponding to the video files can be determined according to the index files of the video files.
And step 303, retrieving at least one target video clip from the video files of the N channels according to the sequence of the video time by taking the playback time point as a retrieval starting point.
The target video clip is a video clip marked with intelligent event information, the intelligent event information is a mark used for indicating that a preset event exists in a video picture of the video clip, and the preset event comprises events such as a moving object or a target human face in the video picture.
When the video files are stored, an index file is correspondingly stored, and the index file at least comprises the time length information, the channel information and the intelligent event information of the video files. And retrieving the video clip with the intelligent event information according to the index file and the playback time point.
The smart event information generally includes a type of the smart event, and a start time and an end time corresponding to the smart event, where the type of the smart event includes: motion detection, intrusion detection, line drawing detection and infrared detection. The motion detection is to detect a moving object; the intrusion detection is to detect the object entering the target area; the line drawing detection is to draw a warning line in a monitoring area and detect an object crossing the warning line; infrared detection is the detection of living beings in a target area by infrared light. And determining a video file with the intelligent event according to the type of the intelligent event contained in the index file, and determining a start time and an end time corresponding to the target video segment according to the start time and the end time. For example, if the type of the intelligent event is motion detection, the year, month, day, hour, minute and second corresponding to the start time is 2016-11-30-20-08-00, and the year, month, day, hour, minute and second corresponding to the end time is 2016-11-30-20-15-22, the video segment corresponding to the time between 2016-11-30-20-08-00 and 2016-11-30-20-15-22 in the video file corresponding to the intelligent event information is the target video segment.
Optionally, the retrieving of the target video segment may be specifically implemented by the following steps:
the first step, with the playback time point as the first retrieval starting point, the 1 st target video clip is retrieved from the video files of the N channels.
The ending time of the 1 st target video segment is later than the first retrieval starting point, and the starting time of the 1 st target video segment is earlier than or later than the first retrieval starting point.
And secondly, searching the (i + 1) th target video segment from the video files of the N channels by taking the end time of the (i) th target video segment as the (i + 1) th search starting point, wherein i is an integer larger than 0.
The end time of the (i + 1) th target video recording fragment is later than the (i + 1) th retrieval starting point, and the start time of the (i + 1) th target video recording fragment is earlier than or later than the (i + 1) th retrieval starting point.
Optionally, when the target video segments are two or more than two and the target video segments belong to the same channel or different channels, it is required to detect whether the target video files belong to the same channel and whether there is an intersection in the video time periods corresponding to different target video segments, which is specifically shown in step 304 and step 305.
Step 304, detecting whether the ith target video segment and the (i + 1) th target video segment belong to the same channel and the video time periods corresponding to the ith target video segment and the (i + 1) th target video segment have an intersection, wherein i is a positive integer.
The retrieved recording time periods of the target recording segments of the same channel may intersect, for example: the moment when the first target face enters the IPC shooting range is the starting moment of the first target video clip, and the moment when the first target face leaves the IPC shooting range is the ending moment of the first target video clip; the moment when the second target face enters the IPC shooting range is the starting moment of the second target video clip, and the moment when the second target face leaves the IPC shooting range is the ending moment of the second target video clip. Before the first target face leaves the IPC shooting range, the second target face enters the IPC shooting range, the starting time of the second target video recording segment is earlier than the ending time of the first target video recording segment, and in this case, the video recording time periods of the first target video recording segment and the second target video recording segment have intersection.
For the case that two target video segments in the same channel intersect, the video segments in the intersection portion will not be played back repeatedly during the playback process, so the target video segments in the same channel that intersect need to be merged in step 305.
And 305, if the target video segments belong to the same channel and the corresponding video time periods of the channel and the video time periods of the channel have intersection, merging the ith target video segment and the (i + 1) th target video segment.
And merging the ith target video segment and the (i + 1) th target video segment to obtain a video segment with the starting time being the earlier one of the ith target video segment and the (i + 1) th target video segment and the ending time being the later one of the ith target video segment and the (i + 1) th target video segment.
As another branch of step 304, if the ith target video segment and the (i + 1) th target video segment do not belong to the same channel, or if the ith target video segment and the (i + 1) th target video segment belong to the same channel but there is no intersection between the corresponding video periods, step 306 is directly executed.
And step 306, intercepting the target video clip from the video file of the corresponding channel.
The target video clip which does not need to be merged can be directly intercepted, and the target video clip which needs to be merged is intercepted by the merged video clip.
In a possible implementation manner, the searched starting time of the target video segment is earlier than the playback time point, and the target video segment is intercepted from the playback time point to the end time of the target video segment.
And 307, playing back each target video clip in the playback area corresponding to the channel in the playback interface.
The playback interface comprises N playback zones, and each channel corresponds to a respective playback zone.
Because each video file has a corresponding channel, the intercepted target video clip is played back in the corresponding playback area according to the corresponding channel.
Optionally, in the playback interface, each target video segment is played back in the playback area corresponding to the channel to which the target video segment belongs, and the steps shown in fig. 3B may be replaced with:
and 307a, determining the playback sequence of each target video clip according to the sequence of the video recording time.
Step 307b, playback is started from the 1 st target video segment in the playback sequence.
Step 307c, if the i-th target video segment and the (i + 1) -th target video segment in the playback sequence have an intersection in the video recording time, when playing back to the non-intersection part in the i-th target video segment and the (i + 1) -th target video segment, playing back the non-intersection part in the corresponding playback area according to the channel to which the non-intersection part belongs; and when the intersection part of the ith target video segment and the (i + 1) th target video segment is played back, synchronously playing back the intersection part in the corresponding playback area according to the channel to which the intersection part belongs, wherein i is a positive integer.
Step 307d, if there is no intersection between the ith target video segment and the (i + 1) th target video segment in the playback sequence in the video recording time, playing back the ith target video segment in the corresponding playback area according to the channel to which the ith target video segment belongs, and then playing back the (i + 1) th target video segment in the corresponding playback area according to the channel to which the ith target video segment belongs.
In a possible implementation manner, corresponding to the time axis of playback, when no target video clip is played back in all channels within a period of time on the time axis, the period of time is skipped, and playback is performed from the start time of the nearest target video clip in any channel behind.
For example, fig. 3C shows a schematic diagram of a display interface for four-way playback corresponding to the first IPC 111, the second IPC 112, the third IPC 113, and the fourth IPC 114 shown in fig. 1. As shown in fig. 3C, the display interface 30 includes a first playback zone 31, a second playback zone 32, a third playback zone 33, and a fourth playback zone 34. The first playback area 31 is used for playing back the video files shot by the first IPC 111, the second playback area 32 is used for playing back the video files shot by the second IPC 112, the third playback area 33 is used for playing back the video files shot by the third IPC 113, and the fourth playback area 34 is used for playing back the video files shot by the fourth IPC 114.
With reference to fig. 3D, four IPCs are respectively disposed on an annular road composed of a road 35, a road 36, a road 37, and a road 38, a first IPC 111 is disposed at an intersection of the road 35 and the road 36, a second IPC 112 is disposed at an intersection of the road 35 and the road 38, a third IPC 113 is disposed at an intersection of the road 36 and the road 37, and a fourth IPC 114 is disposed at an intersection of the road 37 and the road 38. The photographing range of each IPC is two roads constituting the IPC intersection, for example, the photographing range of the first IPC 111 is the road 35 and the road 36, the photographing range of the second IPC 112 is the road 35 and the road 38, the photographing range of the third IPC 113 is the road 36 and the road 37, and the photographing range of the fourth IPC 114 is the road 37 and the road 38.
In one possible application scenario, the target person 300 moves along the sequence of road 35, road 36, road 37, and road 38. When the target person 300 moves on the road 35, the first IPC 111 and the second IPC 112 capture a video clip containing the smart event information; when the target person 300 moves on the road 36, the first IPC 111 and the third IPC 113 capture a video clip containing the smart event information; when the target person 300 moves on the road 37, the third IPC 113 and the fourth IPC 114 capture a video clip containing the smart event information; when the target person moves on the road 38, the second IPC 112 and the fourth IPC 114 photograph the video clip containing the smart event information.
Correspondingly, referring to fig. 3C in combination, when performing the multi-channel smart mode playback, in a first time period, the playback of the target video segment is performed in the first playback zone 31 and the second playback zone 32, and the playback of no target video segment is performed in the third playback zone 33 and the fourth playback zone 34; in a second time period, the first playback zone 31 and the third playback zone 33 perform playback of the target video segment, and the second playback zone 32 and the fourth playback zone 34 perform playback of no target video segment; in a third time period, the third playback zone 33 and the fourth playback zone 34 play back the target video segment, and the first playback zone 31 and the second playback zone 32 play back no target video segment; in the fourth period, the playback of the target video segment is performed in the second playback zone 32 and the fourth playback zone 34, and the playback of no target video segment is performed in the first playback zone 31 and the third playback zone 33.
That is to say, in the first time period, the video recording sections shot by the first IPC 111 and the second IPC 112 are target video recording sections, and the target video recording sections shot by the first IPC 111 and the second IPC 112 have an intersection; in a second time period, the video recording sections shot by the first IPC 111 and the third IPC 113 are target video recording sections, and the target video recording sections shot by the first IPC 111 and the third IPC 113 have intersection; in a third time period, the video recording sections shot by the third IPC 113 and the fourth IPC 114 are target video recording sections, and the target video recording sections shot by the third IPC 113 and the fourth IPC 114 have intersection; in the fourth time period, the video clips shot by the second IPC 112 and the fourth IPC 114 are target video clips, and an intersection exists between the target video clips shot by the second IPC 112 and the fourth IPC 114.
As illustrated with reference to fig. 3D, the shooting range of the first IPC 111 is from position 38a through position 35b, position 35a, position 36a, and position 36b to position 37a, the shooting range of the second IPC 112 is from position 36a through position 35a, position 35b, position 38a, and position 38b to position 37b, the shooting range of the third IPC is from position 35a through position 36a, position 36b, position 37a, and position 37b to position 38b, and the shooting range of the fourth IPC is from position 35b through position 38a, position 38b, position 37a to position 36 b. Assume that target person 300 appears at position 35b at 9:00, moves counterclockwise along the road, moves to position 35a at 9:10, moves to position 36a at 9:15, moves to position 36b at 9:25, moves to position 37a at 9:30, moves to position 37b at 9:40, moves to position 38b at 9:45, moves to position 38a at 9:55, and returns to position 35b at 10: 00. The first IPC 111 photographs the target video clip from 9:00 to 9:30 and from 9:55 to 10: 00; the second IPC 112 shoots the target video clip from 9:00 to 9:15, and from 9:40 to 10: 00; the third IPC 113 shoots the target video clip from 9:10 to 9: 45; the fourth IPC 114 photographs the target video clip from 9:25 to 10: 00. Intersection parts of the target video clips shot by the first IPC 111 and the second IPC 112 are from 9:00 to 9:15, and from 9:55 to 10: 00; the intersection part of the target video recording sections shot by the first IPC 111 and the third IPC 113 is 9:10 to 9: 30; the intersection part of the target video recording sections shot by the third IPC 113 and the fourth IPC 114 is 9:25 to 9: 45; the intersection part of the target video recording sections shot by the second IPC 112 and the fourth IPC 114 is 9:40 to 10: 00; the intersection parts of the target video clips shot by the second IPC 112 and the third IPC 113 are 9:10 to 9:15, and 9:40 to 9: 45; the intersection of the target video clips captured by the first IPC 111 and the fourth IPC 114 is 9:25 to 9:30, and 9:55 to 10: 00.
When playing back a video recording segment of 9:00 to 10:00 in the smart playback mode, from 9:00 to 9:10, playback of the target video recording segment is performed in the first playback zone 31 and the second playback zone 32, from 9:10 to 9:15, playback of the target video recording segment is performed in the first playback zone 31, the second playback zone 32, and the third playback zone 33, from 9:15 to 9:25, playback of the target video recording segment is performed in the first playback zone 31 and the third playback zone 33, from 9:25 to 9:30, playback of the target video recording segment is performed in the first playback zone 31, the third playback zone 33, and the fourth playback zone 34, from 9:30 to 9:40, playback of the target video recording segment is performed in the third playback zone 33 and the fourth playback zone 34, from 9:40 to 9:45, playback of the target video recording segment is performed in the second playback zone 32, the third playback zone 33, and the fourth playback zone 34, the playback of the target video segment is performed in the second playback zone 32 and the fourth playback zone 34 from 9:45 to 9:55, and the playback of the target video segment is performed in the first playback zone 31, the second playback zone 32, and the fourth playback zone 34 from 9:55 to 10: 00.
Therefore, when multi-path intelligent playback is carried out, the intelligent events can be highlighted in multi-path mode, and the moving paths of the intelligent events can be seen according to the playback sequence.
In the intelligent playback process, when the playback mode is switched from the intelligent playback mode to the normal playback mode, the playback file that only contains the video segment with the intelligent event information may be replaced with the normal playback file, specifically refer to steps 308 to 312.
Step 308, a second switching command is received.
The second switching instruction is used for indicating switching from the intelligent playback mode to the normal playback mode.
Step 309, close the target video segment.
And closing the target video recording segment, namely closing the playback file in the intelligent playback mode.
Step 310, using the second playback time when the target video segment is closed as a retrieval starting point, retrieving the latest video file of each channel of the N channels.
The second playback time refers to the corresponding time of the playback of the target video clip on the time axis when the video file is closed. Since the recorded video before the second playback time has already been played back, it is not necessary to play back the recorded video again, and therefore the second playback time is determined as the retrieval start point corresponding to the normal playback mode.
And searching the latest video recording file, namely searching the video recording file with the starting time of the video recording file after the second playback time and the closest distance from the second playback time.
And 311, when the starting time of the latest video file is earlier than the second playback time, intercepting the video file from the second playback time.
And if the starting time of the video file is earlier than the second playback time, intercepting the video file from the second playback time to the ending time of the video file.
And step 312, synchronously playing back the latest video file of each channel in the playback area corresponding to each channel in the playback interface.
In the normal playback mode, the played back video recording file does not take out the video recording segment with the intelligent event information, so that the playback is performed according to the scrolling of the time axis during the playback, and the simultaneous playback in the corresponding playback areas can be realized.
For the switching from the normal playback mode to the smart playback mode in the present embodiment, it can be explained in a schematic diagram of an exemplary mode switching method shown in fig. 3E. When the conventional playback mode is switched to the intelligent playback mode, S301 is executed first, and the currently played back video file is closed; then S302 is executed, and the next video clip with the intelligent event information is retrieved; after retrieving the video segments with the intelligent event information, executing S303, and judging whether the obtained video segments need to be combined; if the judgment result in the S303 is yes, executing the S304, combining the video segments, and then continuing to execute the S302; if the judgment result in the S303 is negative, executing the S305, and intercepting the video clip according to the intelligent event information and the playback time point; finally, S306 is executed to update the playback file.
For the switching from the intelligent playback mode to the normal playback mode in the present embodiment, it can be explained in a schematic diagram of an exemplary mode switching method shown in fig. 3F. When the intelligent playback mode is switched to the conventional playback mode, firstly executing S307, and closing the currently played back video file; then executing S308, and retrieving the next conventional video file; then S309 is executed, and the video file is intercepted according to the information and the playback time point of the video file; finally, S310 is executed to update the playback file.
At present, in the playback process, the video files generated after the actual moment corresponding to the playback function is started cannot be played back, and if the newly generated video files can be acquired when the video files are acquired, the video files generated after the playback function is started can be continuously played back without restarting the playback. Alternatively, step 302 may be replaced with steps 302a to 302e as shown in fig. 3B.
Step 302a, for any channel in the N channels, a video file corresponding to the playback time point is obtained.
The starting time of the video file corresponding to the playback time point is earlier than or equal to the playback time point, and the ending time of the video file corresponding to the playback time point is later than the playback time point.
Step 302b, after the video file is retrieved, the next video file is obtained.
After the current video file is retrieved, a next video file is obtained, where the next video file may be a video file that is stored before and is subsequent to the current video file, or may be a video file generated after the playback function is turned on.
Step 302c, when the next video file is failed to be obtained, the next video file is obtained again.
When the first acquisition of the next video file fails, a new video file may be generated, so that the next video file is immediately acquired again, and the video file is prevented from being jammed in the playback process.
Step 302d, when the next video file is not retrieved again, detecting whether the next video file exists or not at intervals of a predetermined time.
The preset time is less than the refreshing time of the video file.
Optionally, whether a next video file exists is detected, that is, whether the index file corresponding to the channel in the hard disk is refreshed or not is detected, and if the index file is refreshed, it is determined that the next video file exists.
The index file is used for uniquely identifying the corresponding video file, and at least comprises the duration information, the channel information and the intelligent event information of the video file.
The video files stored in the hard disk are refreshed at regular intervals, so that whether the preset interval duration of the next video file is smaller than the refreshing interval duration of the video files or not is detected, the newly generated video files can be added into the playback files in time under the condition that the video files are generated, and the blockage in the playback process of the video files can be avoided. Alternatively, the predetermined time interval for detection may be set to 4 seconds based on an empirical value.
Step 302e, if the next video file exists, the next video file is obtained.
In the normal playback mode, if a newly generated video file is acquired, the newly generated video file can be directly updated to the normal playback file. However, in the smart playback mode, it is necessary to search for a video clip with smart event information for a newly generated video file that is acquired.
For updating the video files in the present embodiment, a schematic diagram of an exemplary video file updating method shown in fig. 3G can be explained. Firstly, S311 is executed to obtain the next video file; then executing S312, and judging whether the obtaining result is not obtained; if the judgment result in the S312 is negative, executing S316 and updating the playback file; if the determination result in S312 is yes, S313 is executed, and the acquisition is performed again immediately; then, continuing to execute S314, and judging whether the acquisition result is not obtained; if the judgment result in the S314 is negative, executing the S316 and updating the playback file; if the determination result in S314 is yes, S315 is executed, the next re-detection time is adjusted to 4S, and then S313, S314, and S315 are executed in a loop.
In addition, the present embodiment also provides a schematic diagram of a playback progress bar, as shown in fig. 3H, the playback progress bar 320 includes a time axis 321, a total progress bar 322, and a channel progress bar 323. The channel progress bar 323 is located above the overall progress bar 322, the time axis 321 is located below the overall progress bar 322, and the overall progress bar 322 and the channel progress bar 323 correspond to the time axis 321.
The progress bar in the playback progress bar 320 is composed of a normal video recording part 324 and an intelligent video recording part 325. In the general progress bar 322, the intelligent video portion 325 represents the union information of the video segments with the intelligent event information of all channels, i.e., the union information of the target video segments of all channels, and the regular video portion 324 represents the complement information of the intelligent video portion 325 of the general progress bar 322, i.e., the portion of each channel on the general progress bar 322 without the target video segments. In the channel progress bar 323, the intelligent video portion 325 represents union information of the video segments with the intelligent event information of the corresponding channel, i.e., union information of the target video segment of the corresponding channel, and the conventional video portion 324 represents complement information of the intelligent video portion 325 of the channel progress bar 323 of the corresponding channel, i.e., a portion without the target video segment on the channel progress bar 323 of the corresponding channel.
Alternatively, the channel progress bar 323 may include a playback progress bar of a video file corresponding to two or more channels. Such as the case of four-way playback, there may be four channel progress bars 323.
In addition, the playback progress bar 320 includes a moving cursor 326, and the moving cursor 326 is used to indicate the progress of playback based on the time axis 321.
In summary, in the playback method of the video recording file provided in the embodiment of the present invention, when in the intelligent playback mode, at least one target video clip with intelligent event information is retrieved from the video files of the N channels according to the playback time point and the target video clip is cut out, the target video clip belongs to the channel on the playback interface and plays back in the playback area corresponding to the target video clip, in the intelligent playback mode, multiple paths of target video clips with intelligent event information are played back in the playback areas corresponding to the target video clips, so that the multiple paths of intelligent playback can be realized, the problem that the intelligent playback mode only supports single-path playback due to different time periods and even cross of the intelligent event information in the video files of multiple channels in the related art is solved, and the effect of supporting the multiple paths of intelligent playback is achieved.
In addition, the playback is carried out in the playback area corresponding to the channel to which the target video clip belongs at the current playback moment, and the playback of other playback areas is paused, so that the multi-path playback can be realized in an intelligent mode.
In addition, whether the target video clips in the same channel are intersected or not can be judged by detecting whether the target video clips are intersected or not, so that repeated playback of the video clips at the intersected part is avoided.
In addition, when the playback mode is switched from the normal playback mode to the intelligent playback mode or from the intelligent playback mode to the normal playback mode, the playback time when the video file before switching is closed is determined as the playback time point after switching, so that the played back part of the video file does not need to be played back again.
In addition, by acquiring the next video file, the video file generated after the playback function is started can be updated into the playback file, and the playback function does not need to be restarted to play back the newly generated video file.
Fig. 4 is a block diagram of a structure of a playback apparatus for a video file according to an embodiment of the present invention, which is applied to the video storage and playback device 120 shown in fig. 1, for example, as shown in fig. 4, the playback apparatus for a video file includes: a determination module 410, an acquisition module 420, a first retrieval module 430, an interception module 440, and a first playback module 450.
A determination module 410, configured to implement the above step 201, step 301, and any other implicit or disclosed determination related functions.
An obtaining module 420, configured to implement the above step 202, step 302, and any other implicit or disclosed obtaining related functions.
A first retrieving module 430, configured to implement the above-mentioned step 203, step 303, and any other implicit or public retrieval-related functions.
An intercept module 440 for implementing the above-mentioned step 204, step 306 and any other implicit or disclosed interception related functions.
A first playback module 450 for implementing the above-mentioned steps 205, 307 and any other implicit or public playback-related functions.
Optionally, the first playback module 450 includes: a first determination unit, a first playback unit, a second playback unit, and a third playback unit.
A first determination unit for implementing the above step 307a and any other implicit or disclosed determination related functions.
A first playback unit for implementing the above step 307b and any other implicit or disclosed playback related functions.
A second playback unit for implementing the above step 307c and any other implicit or disclosed playback related functions.
A third playback unit for implementing the above step 307d and any other implicit or disclosed playback related functions.
Optionally, the apparatus for playing back the video file further includes: a detection module and a merging module.
A detection module for implementing the above step 304 and any other implicit or disclosed detection related functions.
A merging module for implementing the above step 305 and any other implicit or disclosed merging related functions.
Optionally, the determining module 410 includes: the device comprises a receiving unit, a closing unit and a second determining unit.
A receiving unit, configured to implement step 301a and any other implicit or disclosed receiving related functions.
A closing unit, configured to implement step 301b described above and any other implicit or disclosed closing related functions.
A second determination unit for implementing the above step 301c and any other implicit or disclosed determination related functions.
Optionally, the apparatus for playing back the video file includes: the device comprises a receiving module, a closing module, a second retrieval module and a second playback module.
A receiving module for implementing the above step 308 and any other implicit or disclosed receiving related functions.
A shutdown module configured to implement step 309 and any other implicit or disclosed shutdown related functions.
A second retrieval module for implementing the above step 310 and any other implicit or disclosed retrieval-related functions.
A second playback module for implementing the above step 312 and any other implicit or disclosed playback related functions.
Optionally, the second retrieving module is further configured to implement the above step 311 and any other implicit or public retrieval-related functions.
Optionally, the obtaining module 420 includes: an acquisition unit and a detection unit.
An obtaining unit, configured to implement the above step 302a, step 302b, step 302c, step 302e, and any other implicit or disclosed obtaining related functions.
A detection unit, configured to implement the above step 302d and any other implicit or disclosed detection related functions.
Optionally, the detecting unit is further configured to detect whether the index file corresponding to the channel in the hard disk has been refreshed, and determine that a next video file exists if the index file has been refreshed.
In summary, the playback apparatus for video files provided in the embodiments of the present invention, when in the intelligent playback mode, at least one target video clip with intelligent event information is retrieved from the video files of the N channels according to the playback time point and the target video clip is cut out, the target video clip belongs to the channel on the playback interface and plays back in the playback area corresponding to the target video clip, in the intelligent playback mode, multiple paths of target video clips with intelligent event information are played back in the playback areas corresponding to the target video clips, so that the multiple paths of intelligent playback can be realized, the problem that the intelligent playback mode only supports single-path playback due to different time periods and even cross of the intelligent event information in the video files of multiple channels in the related art is solved, and the effect of supporting the multiple paths of intelligent playback is achieved.
It should be noted that: in the playback apparatus for video files provided in the foregoing embodiment, when playing back video files, only the division of the functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the video storage playing device 120 is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the playback apparatus for a video file and the playback method for a video file provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and will not be described herein again.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium may be a computer-readable storage medium contained in the memory in the foregoing embodiment; or it may be a separate computer-readable storage medium not incorporated in the terminal. The computer-readable storage medium stores one or more programs, and the one or more programs are used by one or more processors to execute the playback method of the video file.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (18)

1. A method for playing back a video file, the method comprising:
determining a playback time point corresponding to an intelligent playback mode, wherein the intelligent playback mode is a mode for playing back only a video clip identified with intelligent event information in a video file;
acquiring video files of N channels corresponding to the intelligent playback mode, wherein N is an integer greater than 1;
retrieving at least one target video segment from the video files of the N channels according to the sequence of the video time by taking the playback time point as a retrieval starting point, wherein the target video segment is a video segment marked with the intelligent event information, and the intelligent event information is a mark for indicating that a preset event exists in a video picture of the video segment;
intercepting the target video clip from the video file of the corresponding channel;
playing back each intercepted target video clip in a playback interface according to the sequence of the video recording time in a playback area corresponding to the channel to which the video clip belongs, wherein the playback interface comprises N playback areas, and each channel corresponds to the playback area;
the target video clip is two or more, and before intercepting the target video clip from the video file of the corresponding channel, the method further comprises:
detecting whether the ith target video segment and the (i + 1) th target video segment belong to the same channel and whether the video time periods corresponding to the ith target video segment and the (i + 1) th target video segment have intersection, wherein i is a positive integer;
if the target video clip does not belong to the same channel or the same channel and the corresponding video time periods of the target video clip and the channel do not have intersection, executing a step of intercepting the target video clip from the video file of the corresponding channel;
if the target video segments belong to the same channel and the video time periods corresponding to the target video segments are intersected, merging the ith target video segment and the (i + 1) th target video segment;
the intercepting the target video clip from the video file of the corresponding channel includes:
and intercepting the merged target video clip from the video file of the corresponding channel.
2. The method according to claim 1, wherein the playing back each of the intercepted target video segments in the playback interface according to the sequence of the video recording time in the playback area corresponding to the channel to which the target video segment belongs comprises:
determining the playback sequence of each target video clip according to the sequence of the video recording time;
starting playback from the 1 st target video segment in the playback sequence;
if the i-th target video segment and the i + 1-th target video segment in the playback sequence have an intersection in the video recording time, when the non-intersection part in the i-th target video segment and the i + 1-th target video segment is played back, the non-intersection part is played back in the corresponding playback area according to the channel to which the non-intersection part belongs; when the intersection part of the ith target video segment and the (i + 1) th target video segment is played back, the intersection part is played back synchronously in the corresponding playback area according to the channel to which the intersection part belongs, wherein i is a positive integer;
if there is no intersection between the ith target video recording segment and the (i + 1) th target video recording segment in the playback sequence in the video recording time, the (i + 1) th target video recording segment is played back in the corresponding playback area according to the channel to which the target video recording segment belongs, and then the (i + 1) th target video recording segment is played back in the corresponding playback area according to the channel to which the target video recording segment belongs.
3. The method of claim 2, wherein the determining the playback time point corresponding to the smart playback mode comprises:
receiving a first switching instruction, wherein the first switching instruction is used for indicating switching from a normal playback mode to the intelligent playback mode;
closing the video files played back in the conventional playback mode;
and determining the first playback time when the video file is closed as the playback time point corresponding to the intelligent playback mode.
4. The method according to claim 2, wherein after the playing back, in the playback interface, each of the intercepted target video segments in the playback area corresponding to the channel to which the target video segment belongs according to the sequence of the video recording time, the method further comprises:
receiving a second switching instruction, wherein the second switching instruction is used for indicating switching from the intelligent playback mode to a conventional playback mode;
closing the target video clip;
retrieving the latest video file of each channel in the N channels by taking the second playback moment when the target video clip is closed as a retrieval starting point;
and synchronously playing back the latest video recording file of each channel in the playback area corresponding to each channel in the playback interface.
5. The method of claim 4, wherein prior to synchronously playing back the most recent video file for each channel in the playback interface in the respective playback zone, further comprising:
and when the starting time of the latest video recording file is earlier than the second playback time, intercepting the video recording file from the second playback time.
6. The method according to any one of claims 1 to 5, wherein the obtaining the video files of the N channels corresponding to the smart playback mode includes:
for any channel in the N channels, acquiring a video file corresponding to the playback time point;
after the video file is searched, acquiring a next video file;
when the next video file is failed to be acquired, detecting whether the next video file exists or not at intervals of preset time, wherein the preset time is less than the refreshing time of the video file;
and if the next video file exists, acquiring the next video file.
7. The method of claim 6, wherein said detecting the presence of the next video file every predetermined amount of time comprises:
detecting whether an index file corresponding to the channel in a hard disk is refreshed or not, wherein the index file is used for uniquely identifying the corresponding video file and at least comprises duration information, channel information and intelligent event information of the video file;
and if the index file is refreshed, determining that the next video file exists.
8. The method of claim 6, wherein after the obtaining of the next video file, the method further comprises:
when the next video file is failed to be acquired, acquiring the next video file again;
and when the next video file is not acquired again, executing the step of detecting whether the next video file exists or not at preset time intervals.
9. The method according to any one of claims 1 to 5, wherein the playback interface comprises a playback progress bar, and the playback progress bar comprises a time axis, a moving cursor, a total progress bar, and N channel progress bars corresponding to the N channels respectively;
wherein the moving cursor is to indicate playback progress based on the timeline; the total progress bar and each channel progress bar comprise a conventional video recording part and an intelligent video recording part; the intelligent video part of the total progress bar is used for representing union information of the target video clips of all the channels, and the conventional video part of the total progress bar is used for representing complement information of the intelligent video part of the total progress bar; the intelligent video recording part of each channel progress bar is used for representing union information of the target video recording segments of the corresponding channel, and the conventional video recording part of each channel progress bar is used for representing complement information of the intelligent video recording part of the channel progress bar.
10. An apparatus for playing back a video file, the apparatus comprising:
the device comprises a determining module, a playback module and a playback module, wherein the determining module is used for determining a playback time point corresponding to an intelligent playback mode, and the intelligent playback mode is a mode for playing back only a video clip which is marked with intelligent event information in a video file;
the acquisition module is used for acquiring the video files of N channels corresponding to the intelligent playback mode, wherein N is an integer greater than 1;
a first retrieval module, configured to retrieve, from the video files of the N channels, at least one target video clip according to a sequence of video recording times with the playback time point determined by the determination module as a retrieval starting point, where the target video clip is a video clip identified with the intelligent event information, and the intelligent event information is an identifier used to indicate that a preset event exists in a video picture of the video clip;
the intercepting module is used for intercepting the target video clip retrieved by the first retrieving module from the video file of the corresponding channel;
the first playback module is used for playing back each target video clip intercepted by the intercepting module in a playback interface according to the sequence of the video recording time in a playback area corresponding to the channel to which the target video clip belongs, the playback interface comprises N playback areas, and each channel corresponds to the playback area;
the target video segment is two or more, and the device further comprises:
the detection module is used for detecting whether the ith target video segment and the (i + 1) th target video segment belong to the same channel and whether the video time periods corresponding to the ith target video segment and the (i + 1) th target video segment have intersection, wherein i is a positive integer;
the merging module is used for merging the ith target video clip and the (i + 1) th target video clip if the detection module detects that the target video clips belong to the same channel and the corresponding video time periods of the two channels have intersection;
the intercepting module is further configured to intercept the target video clip merged by the merging module from the video file of the corresponding channel:
the apparatus also includes means for performing the steps of:
and if the detection module detects that the target video segment does not belong to the same channel or the same channel and the corresponding video time periods of the target video segment and the video time periods of the target video segment do not have intersection, triggering an interception module to intercept the target video segment retrieved by the first retrieval module from the video file of the corresponding channel.
11. The apparatus of claim 10, wherein the first playback module comprises:
a first determining unit, configured to determine a playback order of each target video segment according to the sequence of the video recording time;
a first playback unit configured to start playback from a 1 st target video clip in the playback order determined by the first determination unit;
a second playback unit, configured to, if there is an intersection between an i-th target video segment and an i + 1-th target video segment in the playback order determined by the first determination unit in the video recording time, playback the non-intersection portion separately in a corresponding playback area according to a channel to which the non-intersection portion belongs when playing back to the non-intersection portion in the i-th target video segment and the i + 1-th target video segment; when the intersection part of the ith target video segment and the (i + 1) th target video segment is played back, the intersection part is played back synchronously in the corresponding playback area according to the channel to which the intersection part belongs, wherein i is a positive integer;
a third playback unit, configured to, if there is no intersection between the ith target video segment and the (i + 1) th target video segment in the playback order determined by the first determination unit in the video recording time, play back the ith target video segment in the corresponding playback area according to the channel to which the ith target video segment belongs, and then play back the (i + 1) th target video segment in the corresponding playback area according to the channel to which the ith target video segment belongs.
12. The apparatus of claim 11, wherein the determining module comprises:
a receiving unit, configured to receive a first switching instruction, where the first switching instruction is used to instruct to switch from a normal playback mode to the smart playback mode;
a closing unit, configured to close the video file played back in the normal playback mode;
and the second determining unit is used for determining the first playback time when the video file is closed by the closing unit as the playback time point corresponding to the intelligent playback mode.
13. The apparatus of claim 11, further comprising:
a receiving module, configured to receive a second switching instruction, where the second switching instruction is used to instruct to switch from the smart playback mode to a conventional playback mode;
a closing module, configured to close the target video segment;
a second retrieval module, configured to retrieve a latest video file of each channel of the N channels using a second playback time when the closing module closes the target video clip as a retrieval starting point;
and the second playback module is used for synchronously playing back the latest video file of each channel in the playback area corresponding to each channel in the playback interface.
14. The apparatus of claim 13, wherein the second retrieving module is further configured to intercept the video recording file from the second playback time when the start time of the latest video recording file is earlier than the second playback time.
15. The apparatus according to any one of claims 10 to 14, wherein the obtaining module comprises:
an obtaining unit, configured to obtain, for any one of the N channels, a video file corresponding to the playback time point, and obtain a next video file after the video file is retrieved;
the detecting unit is used for detecting whether the next video file exists or not at intervals of preset time when the acquiring unit fails to acquire the next video file, and the preset time is less than the refreshing time of the video file;
the obtaining unit is configured to obtain the next video file if the detecting unit detects that the next video file exists.
16. The apparatus according to claim 15, wherein the detecting unit is further configured to detect whether an index file corresponding to the channel in a hard disk has been refreshed, where the index file is used to uniquely identify the corresponding video recording file, and the index file at least includes duration information, channel information, and the smart event information of the video recording file; and if the index file is refreshed, determining that the next video file exists.
17. The apparatus of claim 15,
the acquiring unit is further configured to reacquire the next video file again when the acquisition of the next video file fails;
the detecting unit is further configured to detect whether the next video file exists every predetermined time when reacquiring the next video file fails.
18. The device according to any one of claims 10 to 14, wherein a playback progress bar is included in the playback interface, and the playback progress bar includes a time axis, a moving cursor, a total progress bar, and N channel progress bars corresponding to the N channels, respectively;
wherein the moving cursor is to indicate playback progress based on the timeline; the total progress bar and each channel progress bar comprise a conventional video recording part and an intelligent video recording part; the intelligent video part of the total progress bar is used for representing union information of the target video clips of all the channels, and the conventional video part of the total progress bar is used for representing complement information of the intelligent video part of the total progress bar; the intelligent video recording part of each channel progress bar is used for representing union information of the target video recording segments of the corresponding channel, and the conventional video recording part of each channel progress bar is used for representing complement information of the intelligent video recording part of the channel progress bar.
CN201611115821.5A 2016-12-07 2016-12-07 Video file playback method and device Active CN108174132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611115821.5A CN108174132B (en) 2016-12-07 2016-12-07 Video file playback method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611115821.5A CN108174132B (en) 2016-12-07 2016-12-07 Video file playback method and device

Publications (2)

Publication Number Publication Date
CN108174132A CN108174132A (en) 2018-06-15
CN108174132B true CN108174132B (en) 2020-12-11

Family

ID=62526190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611115821.5A Active CN108174132B (en) 2016-12-07 2016-12-07 Video file playback method and device

Country Status (1)

Country Link
CN (1) CN108174132B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109255038B (en) * 2018-08-08 2021-02-02 浙江大华技术股份有限公司 Method, device and equipment for reading video file and computer storage medium
CN110876092B (en) * 2018-09-04 2021-08-24 杭州海康威视数字技术股份有限公司 Video abstract generation method and device, electronic equipment and readable storage medium
CN110971857B (en) 2018-09-28 2021-04-27 杭州海康威视系统技术有限公司 Video playback method and device and computer readable storage medium
FR3091117B1 (en) * 2018-12-21 2021-01-22 Panthera Innovation VIDEO SURVEILLANCE MODULE AND SYSTEM, ESPECIALLY FOR SITE SECURITY
CN109805945B (en) * 2019-01-30 2021-12-14 北京津发科技股份有限公司 Recording/playback apparatus and method
CN111866429B (en) * 2019-04-29 2023-03-24 杭州海康威视数字技术股份有限公司 Video data preview method and device
CN110087123B (en) * 2019-05-15 2022-07-22 腾讯科技(深圳)有限公司 Video file production method, device, equipment and readable storage medium
CN110929097A (en) * 2019-11-19 2020-03-27 浙江大华技术股份有限公司 Video recording display method, device and storage medium
CN113553468B (en) * 2020-04-24 2023-07-14 杭州海康威视数字技术股份有限公司 Video index generation method and video playback retrieval method
CN111773684A (en) * 2020-08-14 2020-10-16 网易(杭州)网络有限公司 Game data processing method and device, electronic equipment and storage medium
CN112218150A (en) * 2020-10-15 2021-01-12 Oppo广东移动通信有限公司 Terminal and video analysis display method and device thereof
CN112437270B (en) * 2020-11-13 2021-09-28 珠海大横琴科技发展有限公司 Monitoring video playing method and device and readable storage medium
CN112866817B (en) * 2021-01-06 2022-10-14 浙江大华技术股份有限公司 Video playback method, device, electronic device and storage medium
CN116320517A (en) * 2023-03-21 2023-06-23 北京网梯科技发展有限公司 Learning track merging method and device and electronic equipment

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101370126B (en) * 2008-09-24 2012-02-08 中兴通讯股份有限公司 Broadcast control method and system for monitoring video
CN102036054B (en) * 2010-10-19 2013-04-17 北京硅盾安全技术有限公司 Intelligent video monitoring system based on three-dimensional virtual scene
CN102129474B (en) * 2011-04-20 2015-02-11 浙江宇视科技有限公司 Method, device and system for retrieving video data
CN102387347A (en) * 2011-10-19 2012-03-21 何进波 Video storing and instant replay system based on IP (identification of position)-SAN (storage area networking) direct storage technology
CN103020260A (en) * 2012-12-24 2013-04-03 中国科学院半导体研究所 Video query method
CN104104895B (en) * 2013-04-09 2017-05-24 杭州海康威视数字技术股份有限公司 Method for carrying out video playback on video data and hard-disk video recorder
EP2999260B1 (en) * 2013-07-08 2018-08-29 Huawei Technologies Co., Ltd. Control method, device and system for video playing
CN104702876B (en) * 2014-01-22 2017-12-01 杭州海康威视数字技术股份有限公司 A kind of Multi-path synchronous back method and device
CN103945156A (en) * 2014-04-16 2014-07-23 深圳英飞拓科技股份有限公司 Alarm video replaying method and system
CN105208434A (en) * 2014-06-11 2015-12-30 阿里巴巴集团控股有限公司 Media projection method, media projection equipment, control terminal, and cloud server
CN105262979B (en) * 2014-06-27 2018-09-28 浙江大华技术股份有限公司 A kind of multi-video-stream render method and device
CN105407307B (en) * 2014-09-04 2019-02-05 杭州海康威视数字技术股份有限公司 Processing method, system and the device of multi-channel video Video data
CN105357504A (en) * 2015-12-17 2016-02-24 深圳市科漫达智能管理科技有限公司 Recording and playback method and device for video stream data
CN106131651B (en) * 2016-08-23 2019-07-16 腾讯科技(深圳)有限公司 One kind is the same as screen live broadcasting method and device

Also Published As

Publication number Publication date
CN108174132A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN108174132B (en) Video file playback method and device
CN113475092B (en) Video processing method and mobile device
US9588640B1 (en) User interface for video summaries
CN105306899B (en) Method and device for processing monitoring video
US20080304706A1 (en) Information processing apparatus and information processing method
CN101267523B (en) Device for processing motion image, imaging apparatus, image display control method
EP2710594B1 (en) Video summary including a feature of interest
US10026446B2 (en) Intelligent playback method for video records based on a motion information and apparatus thereof
KR20150020526A (en) Automatic digital curation and tagging of action videos
CN107438196B (en) Method and apparatus for playing recorded video
CN105657537A (en) Video editing method and device
US20050031296A1 (en) Method and apparatus for reviewing video
JP5984707B2 (en) VIDEO DATA DISTRIBUTION DEVICE, VIDEO DATA DISTRIBUTION SYSTEM, AND PROGRAM
CN101232407A (en) Apparatus and method for implementing time shifting broadcast in network monitoring as well as video server
US11580742B2 (en) Target character video clip playing method, system and apparatus, and storage medium
US8260119B2 (en) Content editing apparatus
KR20040058511A (en) Dynamic video searching system
CN110502117A (en) Screenshot method and electric terminal in electric terminal
JP2010233185A (en) Apparatus, system and program for processing image
US20230283747A1 (en) System and method for labeling networked meetings and video clips from a main stream of video
US20210281899A1 (en) Image transmission apparatus, image transmission method, and program
US11818461B2 (en) Context-controlled video quality camera system
US20040237096A1 (en) Automated in-home observation of user interactions with video devices
CN112437270B (en) Monitoring video playing method and device and readable storage medium
US20210224545A1 (en) System and method for associating a video recording to an event

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