Video playback method and device and computer equipment

文档序号:1131026 发布日期:2020-10-02 浏览:30次 中文

阅读说明:本技术 一种录像回放的方法、装置及计算机设备 (Video playback method and device and computer equipment ) 是由 覃长洪 于 2020-06-23 设计创作,主要内容包括:本发明提供一种录像回放的方法、装置及计算机设备,用于解决现有技术中枪球联动摄像机中枪机和球机对应的图像回放不同步的技术问题。该方法应用于枪球联动摄像机,所述枪球联动摄像机包括枪机和球机,所述方法包括:确定录像视频文件,其中,所述录像视频文件包括多个视频帧组,各个所述视频帧组中包括同一时刻所述枪机和所述球机对应获取到的子视频帧;对所述录像视频文件进行解析,并根据解析结果确定所述录像视频文件中各个所述视频帧组中所述子视频帧的帧数据标识,所述帧数据标识用于表征所述子视频帧为所述枪机采集或所述球机采集;根据所述帧数据标识和预设匹配规则,在同一时刻将所述视频帧组中的两个子视频帧分别显示在两个显示窗口。(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 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.)

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 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 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 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.

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.

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 gunball linked camera video is divided into a gun camera part and a ball camera part, i.e., separate video recording. 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 gun 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 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 sub video frames which are 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 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 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, 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.

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 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 frames 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 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.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数据传输方法、装置、终端设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类