CN111741247B - Video playback method and device and computer equipment - Google Patents

Video playback method and device and computer equipment Download PDF

Info

Publication number
CN111741247B
CN111741247B CN202010582079.9A CN202010582079A CN111741247B CN 111741247 B CN111741247 B CN 111741247B CN 202010582079 A CN202010582079 A CN 202010582079A CN 111741247 B CN111741247 B CN 111741247B
Authority
CN
China
Prior art keywords
video
video frame
frame
sub
camera
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
CN202010582079.9A
Other languages
Chinese (zh)
Other versions
CN111741247A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010582079.9A priority Critical patent/CN111741247B/en
Publication of CN111741247A publication Critical patent/CN111741247A/en
Application granted granted Critical
Publication of CN111741247B publication Critical patent/CN111741247B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/93Regeneration of the television signal or of selected parts thereof
    • 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/2624Studio 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 for obtaining an image which is composed of whole input images, e.g. splitscreen
    • 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 provides a video playback method, a video playback device and computer equipment, which are used for solving the technical problem that images corresponding to a gunlock and a dome camera in a gun and dome linked camera in the prior art are not synchronized in playback. The method is applied to a gun and ball linkage camera, the gun and ball linkage camera comprises a gun camera and a ball camera, and the method comprises the following steps: determining a video file, wherein the video file comprises a plurality of video frame groups, and each video frame group comprises sub video frames correspondingly acquired by the gunlock and the dome camera at the same moment; analyzing the video file, and determining frame data identifiers of the sub-video frames in each video frame group in the video file according to an analysis result, wherein the frame data identifiers are used for representing that the sub-video frames are acquired by the gunlock or the ball machine; and respectively displaying the two sub-video frames in the video frame group on two display windows at the same time according to the frame data identifier and a preset matching rule.

Description

Video playback method and device and computer equipment
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method and an apparatus for playing back a video, and a computer device.
Background
At present, security monitoring gradually becomes a hot concern in a plurality of scenes such as campuses, companies, factories and the like. In the related art, the gun and ball linkage camera is used as monitoring equipment, so that a wide visual field can be seen, remote details can be captured, and the monitoring requirements on different scenes can be met more variously.
However, the related art gun-and-ball-linked camera video is divided into a gun camera part and a ball camera part, i.e., separate video. In such a mode, when a user plays back a video, the video of the gunlock and the video of the ball machine need to be played respectively, and the problem of time asynchronism of the video of the gunlock and the video of the ball machine can occur, so that the effect of checking and monitoring is influenced.
Disclosure of Invention
The embodiment of the invention provides a video playback method, a video playback device and computer equipment, which are used for solving the technical problem of asynchronous image playback corresponding to a gunlock and a dome camera in a gunlock and dome linked camera in the prior art.
In a first aspect, a video playback method is provided, which is applied to a rifle and ball linked camera, where the rifle and ball linked camera includes a rifle bolt and a ball machine, and the method includes:
determining a video file, wherein the video file comprises a plurality of video frame groups, and each video frame group comprises sub video frames correspondingly acquired by the gunlock and the dome camera at the same moment;
analyzing the video file, and determining frame data identifiers of the sub-video frames in each video frame group in the video file according to an analysis result, wherein the frame data identifiers are used for representing that the sub-video frames are collected by the gunlock or the ball machine;
and respectively displaying the two sub-video frames in the video frame group on two display windows at the same time according to the frame data identifier and a preset matching rule.
In a possible implementation manner, before determining the video file, the method further includes:
acquiring a first video frame, and determining whether the first video frame is a video frame acquired by the bolt;
if the first video frame is the video frame collected by the gunlock, adding a first frame data identifier to a frame header of the first video frame;
acquiring a second video frame which is acquired at the same time as the first video frame, and adding a second frame data identifier to a frame header of the second video frame, wherein the second video frame is a video frame acquired by the dome camera;
and packaging the added first video frame and the added second video frame to obtain the video frame group.
In a possible implementation manner, displaying two sub-video frames in a video frame group in two playing windows respectively at the same time according to the frame data identifier and a preset matching rule includes:
determining the acquisition time of two sub-video frames in each video frame group, and determining the playing time of the two sub-video frames according to the acquisition time and the preset matching rule;
determining display windows corresponding to the two sub-video frames according to the frame data identifications corresponding to the two sub-video frames;
and when the playing time is reached, the two sub-video frames are respectively displayed in corresponding display windows.
In a possible implementation manner, the corresponding display windows are located at different positions of the same playing interface.
In one possible embodiment, the window sizes of the corresponding display windows are the same.
In a possible implementation manner, the same playing interface includes four display windows, and the four display windows are used for displaying the two sub video frames and two sub video frames obtained by scaling the two sub video frames.
In one possible embodiment, the method further comprises:
inserting the video frame group into a buffer queue, and determining whether buffer data in the buffer queue reaches a preset threshold value, wherein the buffer queue is used for buffering the video frame group and sequencing the video frame group according to a time stamp sequence;
and if the buffer data in the buffer queue reaches a preset threshold value, writing the buffer data in the buffer queue into a storage area corresponding to a video file to obtain the video file.
In a second aspect, an embodiment of the present invention provides an apparatus for video playback, where the rifle and ball linked camera includes a rifle bolt and a ball machine, and the apparatus includes:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining a video recording video file, the video recording video file comprises a plurality of video frame groups, and each video frame group comprises a sub video frame which is correspondingly obtained by the gunlock and the dome camera at the same moment;
the second determination module is used for analyzing the video file and determining frame data identifiers of the sub-video frames in each video frame group in the video file according to an analysis result, wherein the frame data identifiers are used for representing that the sub-video frames are acquired by the gunlock or the ball machine;
and the display module is used for respectively displaying the two sub-video frames in the video frame group in two display windows at the same time according to the frame data identifier and a preset matching rule.
In a possible implementation, before determining the video file, the apparatus further includes a processing module configured to:
acquiring a first video frame, and determining whether the first video frame is a video frame acquired by the bolt;
if the first video frame is a video frame collected by the gunlock, adding a first frame data identifier to a frame header of the first video frame;
acquiring a second video frame acquired at the same time as the first video frame, and adding a second frame data identifier to a frame header of the second video frame, wherein the second video frame is a video frame acquired by the dome camera;
and packaging the added first video frame and the added second video frame to obtain the video frame group.
In one possible implementation, the display module is configured to:
determining the acquisition time of two sub-video frames in each video frame group, and determining the playing time of the two sub-video frames according to the acquisition time and the preset matching rule;
determining display windows corresponding to the two sub-video frames according to the frame data identifications corresponding to the two sub-video frames;
and when the playing time is reached, respectively displaying the two sub-video frames in corresponding display windows.
In a possible implementation manner, the corresponding display windows are located at different positions of the same playing interface.
In one possible embodiment, the window sizes of the corresponding display windows are the same.
In a possible implementation manner, the same playing interface includes four display windows, and the four display windows are used for displaying the two sub-video frames and two sub-video frames obtained by scaling the two sub-video frames.
In a possible implementation, the processing module is further configured to:
inserting the video frame group into a buffer queue, and determining whether buffer data in the buffer queue reaches a preset threshold value, wherein the buffer queue is used for buffering the video frame group and sequencing the video frame group according to a time stamp sequence;
and if the buffer data in the buffer queue reaches a preset threshold value, writing the buffer data in the buffer queue into a storage area corresponding to a video file to obtain the video file.
In a third aspect, a computer device is provided, the computer device comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the steps included in any of the methods of the first aspect according to the obtained program instructions.
In a fourth aspect, there is provided a storage medium having stored thereon computer-executable instructions for causing a computer device to perform the steps included in any one of the methods of the first aspect.
In a fifth aspect, a computer program product is provided, which, when run on a computer device, enables the computer device to perform the steps comprised in any one of the methods of the first aspect.
The technical scheme provided by the embodiment of the invention at least has the following beneficial effects:
in the embodiment of the present invention, a video file may be determined, where the video file includes a plurality of video frame groups, and each video frame group includes a sub-video frame that is acquired by a gun camera and a ball camera at the same time, that is, the determined video frame group in the video file is obtained by encapsulating the sub-video frame that is acquired by the gun camera and the ball camera at the same time, and the sub-video frames that are acquired by the gun camera and the ball camera at the same time are stored in a storage area, so that they are convenient to acquire at the same time, and the processing efficiency is improved. Furthermore, the sub-video frames in the video file can be analyzed, that is, the frame data identifier of the sub-video frame in each video frame group can be determined, the source of the sub-video frame is determined according to the frame data identifier, that is, the source is acquired by a gun or a dome camera, and the two sub-video frames in the video frame group are respectively displayed in the two display windows at the same time according to the frame data identifier and a preset matching rule.
In the embodiment of the invention, the gun video frame and the dome camera video frame acquired at the same moment can be simultaneously acquired, and the display windows corresponding to the gun video frame and the dome camera video frame respectively are determined, so that the gun video frame and the dome camera video frame can be correspondingly displayed on the two display windows at the same moment, namely, the gun video frame and the dome camera video frame can be simultaneously displayed.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a gun and ball linked camera of the prior art;
FIG. 3 is a flowchart of a method for video playback according to an embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus for video playback according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The embodiments and features of the embodiments of the present invention may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present invention and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
As described above, various existing scenes need to be applied to a gun and ball linked camera for security monitoring, however, when a video playback is performed by using the gun and ball linked camera, the related art video recording of the gun and ball linked camera is divided into a gun camera recording part and a ball camera recording part, i.e., separate video recording. In such a manner, when the user plays back the video, the videos of the gunlock and the dome camera need to be acquired and played respectively, so that the occurrence time of the played videos on the gunlock and the dome camera is asynchronous, and the watching experience of the user is reduced.
In view of this, the present invention provides a video playback method, by which a video frame collected by a gun camera and a video frame collected by a corresponding ball machine can be combined and stored in the same storage area, so that the video frame collected by the gun camera and the video frame collected by the ball machine can be synchronously obtained according to a playback sequence and respectively displayed in different display windows. In such a way, the video frames acquired by the gunlock and the video frames acquired by the ball machine at the same moment can be simultaneously displayed on different display windows.
After the design concept of the embodiment of the present invention is introduced, some simple descriptions are made below on application scenarios to which the technical solution in the embodiment of the present invention is applicable, and it should be noted that the application scenarios described in the embodiment of the present invention are for more clearly describing the technical solution in the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention.
In the embodiment of the present invention, the technical scheme may be applied to any scene that requires the gun and ball linkage camera, such as a square, a garden, a cell entrance, an urban road, a mall, an intersection, and the like, which is not limited in the embodiment of the present invention.
In an embodiment of the present invention, please refer to an application scenario schematic diagram shown in fig. 1, where fig. 1 includes two parts, namely a gun and ball linkage camera and a computer device, it should be noted that fig. 1 only illustrates an example of interaction between one gun and ball linkage camera and one computer device, and in a specific implementation process, a plurality of gun and ball linkage cameras may interact with one computer device, or a plurality of gun and ball linkage cameras may interact with a plurality of computer devices. Specifically, the gun and ball linked camera is an integrated monitoring device combining a gun camera and a ball machine, wherein the gun camera is used for collecting panoramic images, namely monitoring the whole scene, and the ball machine is used for collecting specific detailed images, namely monitoring details. Specifically, the gun and ball linked camera also includes a plurality of guns and a plurality of ball machine integrated monitoring devices, and for convenience of understanding, the gun and ball linked camera will be described below by taking 1 gun and 1 ball machine as an example. Such as the gun and ball linked camera shown in fig. 2.
In a specific implementation, the gun and ball linkage camera and the computer device can be in communication connection through one or more networks. The network may be a wired network, or may also be a WIreless network, for example, the WIreless network may be a mobile cellular network, or may be a WIreless-Fidelity (WIFI) network, or may also be other possible networks, which is not limited in this embodiment of the present invention.
In the embodiment of the invention, the gunlock and the dome camera in the gunball linkage camera can collect image information, then the collected image information is sent to the computer equipment, and then the computer equipment can synchronously process the image information sent by the gunball linkage camera, so that the images can be synchronously displayed to different display windows.
To further illustrate the scheme of the method for video playback provided by the embodiment of the present invention, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although embodiments of the present invention provide method steps as shown in the following embodiments or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In steps where no necessary causal relationship logically exists, the order of execution of the steps is not limited to that provided by embodiments of the present invention. The method can be executed in sequence or in parallel according to the method shown in the embodiment or the figures when the method is executed in an actual processing procedure or a device (for example, a parallel processor or an application environment of multi-thread processing).
The method for video playback in the embodiment of the present invention is described below with reference to the flowchart of the method shown in fig. 3, and the steps shown in fig. 3 may be executed by a computer device shown in fig. 1. In particular implementations, the computer device may be a server, such as a personal computer, a midrange computer, a cluster of computers, and so forth.
Step 301: and determining a video file, wherein the video file comprises a plurality of video frame groups, and each video frame group comprises sub video frames correspondingly acquired by the gunlock and the dome camera at the same moment.
In the embodiment of the invention, the image collected by the gun camera in the gun and ball linkage camera can be coded to obtain the gun video frame, the image collected by the ball machine in the gun and ball linkage camera can be coded to obtain the ball machine video frame, and then the gun video frame is processed by the gun video processing module and the ball machine video frame is processed by the ball machine video processing module, so that the video file can be obtained. Specifically, a data source field may be added to a frame header in a sub-video frame correspondingly acquired by the gun camera and the dome camera at the same time, that is, the sub-video frame is a video frame acquired by the gun camera or a video frame acquired by the dome camera, and then the processed sub-video frame is encapsulated to obtain a video frame group, so as to obtain a video file.
In the embodiment of the present invention, because the computer device directly obtains the video data obtained after the processing by the camera processing module in the gun and ball linked camera, that is, the video frames can be respectively obtained from the corresponding gun video processing module and the ball machine video processing module in the gun and ball linked camera, when the first video frame is obtained from the gun video processing module, it can be determined that the first video frame is the video frame acquired by the gun, and then the first frame data identifier is added to the frame header of the first video frame. And then, a second video frame acquired at the same time as the first video frame can be acquired through the dome camera video processing module, and a second frame data identifier is added to a frame header of the second video frame, so that the second video frame can be determined to be the video frame acquired by the dome camera, and the processed first video frame and the processed second video frame are packaged to obtain a video frame group.
In addition, in the embodiment of the present invention, if a difference between a time of acquiring a gun camera video frame and a time of acquiring a dome camera video frame is smaller than a predetermined threshold, it is determined that the gun camera video frame and the dome camera video frame at the same time are acquired. Specifically, the predetermined threshold may be correspondingly determined according to a frame rate of the gun and ball linked camera, for example, if the frame rate of the gun and ball linked camera is 25FPS, the predetermined threshold is 40 milliseconds, and if the frame rate of the gun and ball linked camera is 50FPS, the predetermined threshold is 20 milliseconds.
In the embodiment of the invention, the sub-video frames acquired by the gunlock and the dome camera at the same time are synchronously packaged, so that the gunlock video frame and the dome camera video frame in one video frame group are ensured to be at the same acquisition time, and the gunlock video frame and the dome camera video frame acquired at the same time can be accurately acquired by using a mode of adding frame data identification in the frame header to represent that the sub-video frames are the gunlock video frame and the dome camera video frame, and a basis is provided for the subsequent application of synchronously broadcasting the gunlock video frame and the dome camera video frame in different display windows.
In a specific implementation process, the existing video storage format is that a frame header and video data form a frame of data, which are sequentially arranged to form a video file, specifically, the frame header includes information such as a frame header mark, "DHAV", a type of I frame or P frame, a frame number of 200, and a time stamp of 20053624989. In the embodiment of the invention, the source of the video frame can be identified by adding a field in the frame header of the sub-video frame, the field is provided with the mark information, and the mark information can be used for representing that the frame video is a gunlock video frame or a dome camera video frame, for example, 0 represents the gunlock video frame, and 1 represents the dome camera video frame. Specifically, after the sub-video frames are processed, the gunlock video frames and the dome video frames at the same time can be packaged into video frame groups, and then the video frame groups can be sequentially arranged according to the time of packaging into the video frame groups, so that the video files are obtained.
In the embodiment of the invention, after the video frame group formed by encapsulating the gunlock video frame and the ball machine video frame at the same moment is obtained, the video frame group can be inserted into the buffer queue, whether the buffer data in the buffer queue, namely the buffered video frame group data, reaches the preset threshold value or not is judged, and if the buffer data in the buffer queue reaches the preset threshold value, the video frame group data in the buffer queue is written into the storage area corresponding to the video file, so that the video file can be obtained. Specifically, the preset threshold may be adjusted and determined in real time according to the acquired scenes corresponding to the gun camera video frame and the dome camera video frame, or may be determined correspondingly according to historical data of the scenes corresponding to the gun camera video frame and the dome camera video frame, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, the video frame groups are buffered to the buffer queue and arranged, so that the data storage problem existing when the video frame groups are directly written into the storage area corresponding to the video file can be avoided, the data of the video frame groups in the video file are sequentially stored according to the time stamp sequence, and a good implementation basis is provided for the subsequent synchronous playing of the video file.
In the embodiment of the present invention, the video file may be determined from the processed video file including the video frame group according to an actual requirement or a preset screening rule, and the video file is a video file to be played back. Specifically, if there are a plurality of processed video files containing video frame groups, the user may autonomously select a video file to be played back, for example, select a video file to be played back according to the recording time of the video file, or determine a video file determined according to images collected by a gun and ball linked camera arranged at a specific position, such as a north gate of a cell, as a video file to be played back, which is not limited in the embodiment of the present invention.
Of course, the computer device may also determine the video file according to a preset filtering rule, specifically, the preset filtering rule may be set according to the actual requirement of the user, or may determine the video file based on history determination video file data, which is not limited in the embodiment of the present invention.
Step 302: and analyzing the video file, and determining a frame data identifier of the sub-video frame in each video frame group in the video file according to an analysis result, wherein the frame data identifier is used for representing that the sub-video frame is acquired by a gun or a ball machine.
Step 303: and respectively displaying the two sub-video frames in the video frame group on the two display windows at the same time according to the frame data identifier and the preset matching rule.
In the embodiment of the present invention, after determining the video file, the video file may be parsed, and specifically, the video frame groups in the video file may be parsed, so that the frame data identifier of the sub-video frame in each video frame group may be obtained.
In the embodiment of the invention, after the frame data identification of the sub-video frames in each video frame group is determined, the obtaining time of two sub-video frames in each video frame group, namely the obtaining time of the gunlock video frame and the ball machine video frame, can be determined, and then the playing time of the gunlock video frame and the ball machine video frame is determined according to the obtaining time of the gunlock video frame and the ball machine video frame and the preset matching rule.
In a specific implementation process, the frame sequence of the gun video frame and the ball machine video frame in the video file can be determined according to the acquisition time of the gun video frame and the ball machine video frame, and when the playing condition of the video file is obtained, for example, the playing time is 2020, 5, 25, 15:00, the playing time corresponding to the gun video frame and the ball machine video frame can be determined according to the playing condition and the frame sequence, for example, the playing time of the gun video frame and the ball machine video frame with the frame sequence of 1 is 2020, 5, 25, 15, 00, and the playing time of the gun video frame and the ball machine video frame with the frame sequence of 2 is 2020, 5, 25, 15, 00, 01 seconds.
In the embodiment of the invention, the display windows corresponding to the gunlock video frame and the dome camera video frame can be determined according to the frame data identifications corresponding to the gunlock video frame and the dome camera video frame. Specifically, the frame data identifiers corresponding to the gun camera video frame and the dome camera video frame are in a one-to-one corresponding matching relationship with the display windows, for example, the frame data identifiers of the gun camera video frame are correspondingly matched with the first display window, and the frame data identifiers of the dome camera video frame are correspondingly matched with the second display window, so that the gun camera video frame can be correspondingly displayed in the first display window when being detected, and the dome camera video frame can be correspondingly displayed in the second display window when being detected; of course, the frame data identifier of the gunlock video frame may be correspondingly matched with the second display window, and the frame data identifier of the dome camera video frame may be correspondingly matched with the first display window, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, when the current moment reaches the determined playing moments of the gun camera video frame and the dome camera video frame, the gun camera video frame and the dome camera video frame can be respectively displayed in the corresponding display windows.
In the embodiment of the present invention, the display windows corresponding to the gun video frame and the dome camera video frame are located at different positions of the same playing interface, specifically, the display windows corresponding to the gun video frame may be located on the display window corresponding to the dome camera video frame, or the display windows corresponding to the gun video frame and the dome camera video frame may be located on the left and right sides of the playing interface, and of course, a function key for a user to adjust the position of the display window may be provided, and the user may adjust the display position of the display window corresponding to the gun video frame and adjust the display position of the display window corresponding to the dome camera video frame according to his own viewing habits through the function key.
In the embodiment of the invention, the gun camera video frame and the dome camera video frame at the same moment can be simultaneously displayed on the same playing interface, the display position of the display window corresponding to the gun camera video frame and the display position of the display window corresponding to the dome camera video frame can be adjusted and set, and different watching experiences of a plurality of users in various scenes can be met.
In the embodiment of the invention, the size of the display window corresponding to the gunlock video frame and the size of the display window corresponding to the dome camera video frame can be set to be the same size window, so that the visual experience of a user for checking the video file can be enhanced on the basis that the gunlock video frame and the dome camera video frame at the same moment are displayed on the same playing interface, and the use experience of the user is further improved.
In a specific implementation process, the same playing interface may further include a plurality of display windows, and a plurality of video frame groups are displayed at the same time when the playing time is reached according to the sequence of the video frame groups, and the display modes of the plurality of video frame groups may be the same, so that the requirement that the plurality of video frame groups need to be viewed at one time can be met.
For example, the playing interface includes 4 display windows, and the video frame group with the serial number 1, the video frame group with the serial number 2, the video frame group with the serial number 3, and the video frame group with the serial number 4 are sequentially displayed from left to right, the display position of the gunlock video frame group in each video frame group is located at the display position of the video frame of the dome camera, and the display window corresponding to the gunlock video frame is the same as the display window corresponding to the video frame of the dome camera in size.
In the embodiment of the present invention, the same playing interface may include four display windows, where the four display windows may respectively display a gun camera video frame and a dome camera video frame in a video frame group at a certain time, and two corresponding sub-video frames after scaling the gun camera video frame and the dome camera video frame.
In a specific implementation process, the four display windows of the same play interface may be divided into a first display window, a second display window, a third display window and a fourth display window according to positions of an upper left corner, an upper right corner, a lower left corner and a lower right corner. For example, the gun camera video frame and the dome camera video frame in the video frame group may be correspondingly displayed in the first display window and the third display window, the second display window may correspondingly display the sub-video frame obtained by performing the amplification or reduction processing on the gun camera video frame in the video frame group, and the fourth display window may correspondingly display the sub-video frame obtained by performing the amplification or reduction processing on the dome camera video frame.
In the embodiment of the invention, the gunlock video frame and the dome camera video frame in the video frame group at a certain moment can be displayed on the same playing interface, and the images which are correspondingly processed by the gunlock video frame and the dome camera video frame can be displayed, so that various display requirements are met.
Based on the same inventive concept, the embodiment of the invention provides a video playback device, and the video playback device can realize the corresponding function of the video playback method. The means for video playback may be a hardware structure, a software module, or a hardware structure plus a software module. The video playback device can be realized by a chip system, and the chip system can be formed by a chip and can also comprise the chip and other discrete devices. Referring to fig. 4, the apparatus for video playback includes:
a first determining module 401, configured to determine a video file, where the video file includes multiple video frame groups, and each video frame group includes sub video frames that are acquired by the bolt and the dome camera at the same time correspondingly;
a second determining module 402, configured to parse the video recording file, and determine, according to a parsing result, frame data identifiers of the sub-video frames in each video frame group in the video recording file, where the frame data identifiers are used to represent that the sub-video frames are acquired by the bolt or the dome camera;
and a display module 403, configured to display two sub-video frames in the video frame group on two display windows respectively at the same time according to the frame data identifier and a preset matching rule.
In a possible implementation, the apparatus further includes a processing module configured to:
acquiring a first video frame, and determining whether the first video frame is a video frame acquired by the bolt;
if the first video frame is a video frame collected by the gunlock, adding a first frame data identifier to a frame header of the first video frame;
acquiring a second video frame acquired at the same time as the first video frame, and adding a second frame data identifier to a frame header of the second video frame, wherein the second video frame is a video frame acquired by the dome camera;
and packaging the added first video frame and the added second video frame to obtain the video frame group.
In a possible implementation manner, the display module 403 is configured to:
determining the acquisition time of two sub-video frames in each video frame group, and determining the playing time of the two sub-video frames according to the acquisition time and the preset matching rule;
determining display windows corresponding to the two sub-video frames according to the frame data identifications corresponding to the two sub-video frames;
and when the playing time is reached, the two sub-video frames are respectively displayed in corresponding display windows.
In a possible implementation manner, the corresponding display windows are located at different positions of the same playing interface.
In one possible embodiment, the window sizes of the corresponding display windows are the same.
In a possible implementation manner, the same playing interface includes four display windows, and the four display windows are used for displaying the two sub video frames and two sub video frames obtained by scaling the two sub video frames.
In a possible implementation, the processing module is further configured to:
inserting the video frame group into a buffer queue, and determining whether buffer data in the buffer queue reaches a preset threshold value, wherein the buffer queue is used for buffering the video frame group and sequencing the video frame group according to a time stamp sequence;
and if the buffer data in the buffer queue reaches a preset threshold value, writing the buffer data in the buffer queue into a storage area corresponding to a video file to obtain the video file.
All relevant contents of the steps related to the embodiment of the video playback method may be referred to the functional description of the functional module corresponding to the video playback apparatus in the embodiment of the present invention, and are not described herein again.
The division of the modules in the embodiments of the present invention is schematic, and only one logical function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in each embodiment of the present invention may be integrated in one controller, or may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Based on the same inventive concept, an embodiment of the present invention provides a computer apparatus, please refer to fig. 5, where the computer apparatus includes at least one processor 501 and a memory 502 connected to the at least one processor, a specific connection medium between the processor 501 and the memory 502 is not limited in the embodiment of the present invention, in fig. 5, the processor 501 and the memory 502 are connected through a bus 500 as an example, the bus 500 is represented by a thick line in fig. 5, and a connection manner between other components is only schematically illustrated and not limited. The bus 500 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 5 for ease of illustration, but does not represent only one bus or one type of bus. In addition, the video playback apparatus further includes a communication interface 503 for receiving image information transmitted from the gun and ball linked camera.
In the embodiment of the present invention, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may execute the steps included in the foregoing video playback method by executing the instructions stored in the memory 502.
The processor 501 is a control center of the computer device, and can connect various parts of the whole computer device by using various interfaces and lines, and perform various functions and process data of the computer device by operating or executing instructions stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring on the computer device.
Optionally, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles an operating system, a user interface, an application program, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 501 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
Memory 502, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 502 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 502 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 502 of embodiments of the present invention may also be circuitry or any other device capable of performing a storage function to store program instructions and/or data.
By programming the processor 501, the code corresponding to the video playback method described in the foregoing embodiment may be solidified in the chip, so that the chip can execute the steps of the video playback method when running, and how to program the processor 501 is a technique known by those skilled in the art, and is not described herein again.
Based on the same inventive concept, embodiments of the present invention further provide a storage medium storing computer instructions, which when executed on a computer, cause the computer to perform the steps of the method for playing back a video as described above.
In some possible embodiments, the aspects of the method for video playback provided by the present invention may also be implemented in the form of a program product comprising program code for causing a controlling computer device to perform the steps of the method for video playback according to various exemplary embodiments of the present invention described above in this specification, when the program product is run on the controlling computer device.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A video playback method is characterized by being applied to a gun and ball linkage camera, wherein the gun and ball linkage camera comprises a gun camera and a ball camera, and the method comprises the following steps:
determining a video file, wherein the video file comprises a plurality of video frame groups, and each video frame group comprises sub video frames correspondingly acquired by the gunlock and the dome camera at the same moment;
analyzing the video file, and determining frame data identifiers of the sub-video frames in each video frame group in the video file according to an analysis result, wherein the frame data identifiers are used for representing that the sub-video frames are collected by the gunlock or the ball machine, and the frame data identifiers are arranged in frame headers corresponding to frame images;
and respectively displaying the two sub-video frames in the video frame group on two display windows at the same time according to the frame data identifier and a preset matching rule.
2. The method of claim 1, wherein prior to determining the video recording file, further comprising:
acquiring a first video frame, and determining whether the first video frame is a video frame acquired by the bolt;
if the first video frame is the video frame collected by the gunlock, adding a first frame data identifier to a frame header of the first video frame;
acquiring a second video frame which is acquired at the same time as the first video frame, and adding a second frame data identifier to a frame header of the second video frame, wherein the second video frame is a video frame acquired by the dome camera;
and packaging the added first video frame and the added second video frame to obtain the video frame group.
3. The method of claim 2, wherein displaying two sub-video frames in a video frame group in two playing windows respectively at the same time according to the frame data identifier and a preset matching rule comprises:
determining the acquisition time of two sub-video frames in each video frame group, and determining the playing time of the two sub-video frames according to the acquisition time and the preset matching rule;
determining display windows corresponding to the two sub-video frames according to the frame data identifications corresponding to the two sub-video frames;
and when the playing time is reached, the two sub-video frames are respectively displayed in corresponding display windows.
4. The method of claim 3, wherein the corresponding display windows are at different locations of the same playback interface.
5. The method of claim 4, wherein the window sizes of the corresponding display windows are the same size.
6. The method of claim 4, wherein the same playing interface comprises four display windows for displaying the two sub-video frames and two sub-video frames obtained by scaling the two sub-video frames.
7. The method of claim 2, wherein the method further comprises:
inserting the video frame group into a buffer queue, and determining whether buffer data in the buffer queue reaches a preset threshold value, wherein the buffer queue is used for buffering the video frame group and sequencing the video frame group according to a time stamp sequence;
and if the buffer data in the buffer queue reaches a preset threshold value, writing the buffer data in the buffer queue into a storage area corresponding to a video file to obtain the video file.
8. The utility model provides a device of video playback which characterized in that is applied to rifle ball linkage camera, rifle ball linkage camera includes rifle bolt and ball machine, the device includes:
the system comprises a first determining module, a second determining module and a third determining module, wherein the first determining module is used for determining a video recording video file, the video recording video file comprises a plurality of video frame groups, and each video frame group comprises sub video frames which are correspondingly obtained by the gunlock and the dome camera at the same moment;
the second determining module is used for analyzing the video file and determining frame data identifications of the sub-video frames in each video frame group in the video file according to an analysis result, wherein the frame data identifications are used for representing that the sub-video frames are collected by the gunlock or the ball machine, and the frame data identifications are arranged in frame headers corresponding to frame images;
and the display module is used for respectively displaying the two sub-video frames in the video frame group in two display windows at the same time according to the frame data identifier and a preset matching rule.
9. A computer device, characterized in that the computer device comprises: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method for video playback according to one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method for video playback as claimed in any one of claims 1 to 7.
CN202010582079.9A 2020-06-23 2020-06-23 Video playback method and device and computer equipment Active CN111741247B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010582079.9A CN111741247B (en) 2020-06-23 2020-06-23 Video playback method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010582079.9A CN111741247B (en) 2020-06-23 2020-06-23 Video playback method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN111741247A CN111741247A (en) 2020-10-02
CN111741247B true CN111741247B (en) 2022-09-30

Family

ID=72650744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010582079.9A Active CN111741247B (en) 2020-06-23 2020-06-23 Video playback method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN111741247B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010738B (en) * 2021-02-08 2024-01-30 维沃移动通信(杭州)有限公司 Video processing method, device, electronic equipment and readable storage medium
CN114257844B (en) * 2021-12-21 2023-01-06 威创集团股份有限公司 Multi-video synchronous playing method, device, equipment and readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4588968B2 (en) * 2002-10-01 2010-12-01 パイオニア株式会社 Information recording medium, information recording apparatus and method, information reproducing apparatus and method, information recording / reproducing apparatus and method, computer program for recording or reproduction control, and data structure including control signal
CN106341619A (en) * 2016-09-27 2017-01-18 北京乐景科技有限公司 Video data synchronous transmission method, device and system
CN110809100A (en) * 2019-10-30 2020-02-18 北京字节跳动网络技术有限公司 Video processing method and device, terminal and storage medium

Also Published As

Publication number Publication date
CN111741247A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN108989830A (en) A kind of live broadcasting method, device, electronic equipment and storage medium
CN108062507B (en) Video processing method and device
CN111741247B (en) Video playback method and device and computer equipment
CN101535941B (en) Method and device for adaptive video presentation
CN106713964A (en) Method of generating video abstract viewpoint graph and apparatus thereof
CN107295352B (en) Video compression method, device, equipment and storage medium
CN113542795B (en) Video processing method and device, electronic equipment and computer readable storage medium
CN111698555B (en) Video frame extraction processing method and device
CN111881755B (en) Method and device for cutting video frame sequence
CN110968391A (en) Screenshot method, screenshot device, terminal equipment and storage medium
CN106060627A (en) Audio processing method and device based on multi-way live broadcast
CN115396705A (en) Screen projection operation verification method, platform and system
WO2019047663A1 (en) Video format-based end-to-end automatic driving data storage method and device
CN109600653B (en) Video file playing method and device and electronic equipment
CN112714338B (en) Video transmission method, video playing method, video transmission device, video playing device, computer equipment and storage medium
CN108540817B (en) Video data processing method, device, server and computer readable storage medium
CN105635715A (en) Video format identification method and device
CN110855947B (en) Image snapshot processing method and device
CN112911390B (en) Video data playing method and terminal equipment
CN111010599B (en) Method and device for processing multi-scene video stream and computer equipment
CN115119054A (en) Video virtual dressing and background processing method and device based on IOS (input/output system)
CN112738629B (en) Video display method and device, electronic equipment and storage medium
CN103974087A (en) Video image file compressing system, client and method
CN112954374A (en) Video data processing method and device, electronic equipment and storage medium
CN112040249A (en) Recording and broadcasting method and device and single camera

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