CN113038261A - Video generation method, device, equipment, system and storage medium - Google Patents

Video generation method, device, equipment, system and storage medium Download PDF

Info

Publication number
CN113038261A
CN113038261A CN201911360131.XA CN201911360131A CN113038261A CN 113038261 A CN113038261 A CN 113038261A CN 201911360131 A CN201911360131 A CN 201911360131A CN 113038261 A CN113038261 A CN 113038261A
Authority
CN
China
Prior art keywords
frame group
key frame
video
key
group
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.)
Pending
Application number
CN201911360131.XA
Other languages
Chinese (zh)
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 Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201911360131.XA priority Critical patent/CN113038261A/en
Publication of CN113038261A publication Critical patent/CN113038261A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the application discloses a video generation method, a device, equipment, a system and a storage medium, wherein the method comprises the following steps: reading video data according to the frame group, and identifying key frame pictures from the video data; determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group; a downscaled video including the associated frame group and a key frame group including the key frame picture is generated. The technical scheme of the embodiment of the application avoids the storage of other video data except the associated frame group and the key frame group in the video data, avoids the waste of storage resources and reduces the occupied storage space during the video storage. Meanwhile, through the identification of the key frame pictures and the storage of the key frame group comprising the key frame pictures, the generated reduced video is enabled to contain the complete occurrence process of key events, and the searching of the key frame pictures and the acquisition of other contents related to the key frame pictures are facilitated.

Description

Video generation method, device, equipment, system and storage medium
Technical Field
The embodiment of the application relates to the technical field of video processing, in particular to a video generation method, a device, equipment, a system and a storage medium.
Background
With the increasing security awareness, it has become increasingly common to provide monitoring systems in various areas, particularly public areas.
In the prior art, monitoring video data of a longer time period, for example, 7 × 24 hours, is usually stored in a network hard disk resource in real time, and after receiving an alarm message sent by a front-end device, time nodes based on a set time interval before and after an alarm occurrence time are marked in the stored monitoring video data, and then the marked monitoring video data is downloaded and stored in a separate storage resource.
However, the above method stores a large amount of redundant information, which results in a waste of storage resources. In addition, the method is only suitable for processing the video acquired by the camera in real time, and the video data in an off-line state cannot be analyzed, so that the application process has certain limitation.
Disclosure of Invention
The application provides a video generation method, a video generation device, video generation equipment, a video generation system and a storage medium, so that the data volume of video data stored in a monitoring system is reduced, and the possibility of processing and storing offline video data is provided.
In a first aspect, an embodiment of the present application provides a video generation method, including:
reading video data according to a frame group, and identifying a key frame picture from the video data;
determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group;
generating a downscaled video including the associated frame group and a key frame group including the key frame picture.
In a second aspect, an embodiment of the present application further provides a video generating apparatus, including:
the key frame picture identification module is used for reading video data according to frame groups and identifying key frame pictures from the video data;
an associated frame group determination module, configured to determine, as an associated frame group, a first associated frame group located before the key frame picture and/or a second associated frame group located after the key frame picture;
a reduced video generation module for generating a reduced video comprising the associated frame group and a key frame group containing the key frame picture.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement a video generation method as provided in an embodiment of the first aspect.
In a fourth aspect, an image capturing system includes a camera and an electronic device as provided in the third aspect.
In a fifth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a video generation method as provided in the embodiments of the first aspect.
The method comprises the steps of reading video data according to a frame group, and identifying key frame pictures from the video data; determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group; a downscaled video including the associated frame group and a key frame group including the key frame picture is generated. According to the technical scheme, the key frame picture is determined to determine the associated frame group, so that the reduced video comprising the associated frame group and the key frame group containing the key frame picture is generated, the storage of the associated frame group and other video data except the key frame group in the video data is avoided, and the waste of storage resources is avoided. Meanwhile, through the identification of the key frame pictures and the storage of the key frame group comprising the key frame pictures, the generated reduced video is enabled to contain the completion occurrence process of key events, and the searching of the key frame pictures and the acquisition of other contents related to the key frame pictures are facilitated.
Drawings
Fig. 1 is a flowchart of a video generation method in a first embodiment of the present application;
fig. 2 is a flowchart of a video generation method in the second embodiment of the present application;
fig. 3 is a flowchart of a video generation method in the third embodiment of the present application;
fig. 4 is a block diagram of a video generating apparatus according to a fourth embodiment of the present application;
fig. 5 is a block diagram of an electronic device in a fifth embodiment of the present application;
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a video generation method in one embodiment of the present application, where the embodiment of the present application is applied to a case where online captured video data or offline video data is stored to generate a reduced video, and the method is executed by a video generation apparatus, which is implemented by software and/or hardware and is configured in an electronic device, and the electronic device may be built in an image capture system.
A video generation method as shown in fig. 1, comprising:
s110, reading the video data according to the frame group, and identifying the key frame picture from the video data.
The frame group is generally an I-frame group including an I-frame and a plurality of P-frames. The number of P frames in the band after the I frame is determined by the interval of the I frame. The I frame interval and the frame rate together determine the number of I frame groups per second.
For example, the key frame picture is identified from the video data, and the identification of the key frame picture is performed by a preset identification algorithm for the currently read video data. The preset identification algorithm comprises at least one of a tripwire detection algorithm, an abnormal behavior detection algorithm and a perimeter intrusion detection algorithm.
For example, tripwire detection is used for limiting the passage of people in key places such as roads and the like, tripwires can be arranged in a monitoring picture, and whether the monitored people have behaviors such as crossing the wires, running in the wrong direction and the like can be monitored; the behavior abnormity detection is used for monitoring abnormal behaviors such as personnel gathering, running, falling down and the like in a picture in places such as prisons, hospitals, corridors and the like; and the perimeter intrusion is used for setting a warning area in the monitoring range and automatically monitoring the target invading the warning area.
Illustratively, the video data is read according to the frame group, and the on-line video data acquired by the camera in real time can be acquired according to the frame group; alternatively, the video data may be read according to the frame group, or the generated offline video data may be read according to the frame group from another storage device or a cloud terminal local to the electronic device or associated with the electronic device.
And S120, determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group.
In an optional implementation manner of the embodiment of the present application, determining a first associated frame group located before the key frame picture may be determining the number of the first frame group according to a preset first time threshold; frame groups of a first frame group number are acquired as a first associated frame group from before a key frame group containing a key frame picture. Wherein the first time threshold is set by a technician as needed or empirically. It should be noted that, when the number of frame groups before the key frame group is less than the first frame group threshold, all frame groups before the key frame group are taken as the first associated frame group.
In order to effectively control the number of the first associated frame groups, the read video data may be buffered by a buffer queue, and the number of the first associated frame groups may be limited by the length of the buffer queue.
Illustratively, after reading video data by frame group, writing the read frame group into a buffer queue; wherein, the length of the buffer queue is fixed; identifying a key frame picture from the video data written into the tail part of the cache queue; accordingly, determining the first associated frame group located before the key frame picture may be: and if the tail frame group of the buffer queue comprises the key frame picture, taking the frame group positioned in front of the tail frame group in the buffer queue as a first associated frame group. Further, when the tail frame group in the buffer queue does not include the key frame picture, the video data is continuously read and inserted into the tail of the buffer queue, and whether the tail frame group newly received into the buffer contains the key frame picture or not is determined, and the loop is performed until the first associated frame group is determined when the tail frame group contains the key frame picture.
It should be noted that, when extracting a key frame picture from video data written into the tail portion of the buffer queue, every time a frame of video data is written into the buffer queue, key frame picture identification is performed on the newly written frame of video data.
It can be understood that, because the length of the buffer queue is fixed, when the buffer queue is full of video data and the tail frame group does not contain the key frame picture, the head frame group of the buffer queue is discarded according to the first-in first-out principle, and the reading and writing operations of the video data are continued.
It should be noted that the length of the buffer queue may be determined according to a preset first time threshold. Typically, the determined length of the buffer queue is 1 more than the first number of frame groups determined according to the first time threshold.
In an optional implementation manner of the embodiment of the present application, determining the second associated frame group located after the key frame picture may be: determining the number of second frame groups according to a preset second time threshold; and sequentially acquiring frame groups of a second frame group number from each frame group after the key frame image containing the key frame image as a second associated frame group. Wherein the second time threshold is determined by a technician as needed or empirically.
It should be noted that, according to a preset time threshold, the corresponding number of frame groups is determined, which may be the number of frame groups in a unit time according to the ratio of the acquisition array of the video data to the frame group interval; and determining the corresponding frame group quantity according to the product of the unit time frame group quantity and a preset time threshold value.
And S130, generating a reduced video comprising the associated frame group and a key frame group containing the key frame pictures.
It can be understood that in an application scenario where the camera is used to collect video data in real time and the electronic device reads the video data from the camera according to the frame group, whether to start the video reduction function can be set by the user. When the fact that a user starts a video reduction function is recognized, generating a reduced video according to the mode of the embodiment of the application; and when the video reduction function is identified not to be started by the user, the identification of the key frame picture and the determination of the associated frame group are not carried out any more.
It should be noted that the storage location of the generated reduced video may be a custom storage location determined by the user according to the needs, or may be a default storage location set by the technician in the development stage.
The method comprises the steps of reading video data according to a frame group, and identifying key frame pictures from the video data; determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group; a downscaled video including the associated frame group and a key frame group including the key frame picture is generated. According to the technical scheme, the key frame picture is determined to determine the associated frame group, so that the reduced video comprising the associated frame group and the key frame group containing the key frame picture is generated, the storage of irrelevant video data except the associated frame group and the key frame group in the video data is avoided, the waste of storage resources is avoided, and the storage space occupied during the storage of the reduced video is reduced. Meanwhile, through the identification of the key frame pictures and the storage of the key frame group comprising the key frame pictures, the generated reduced video is enabled to contain the complete occurrence process of key events, and the searching of the key frame pictures and the acquisition of other contents related to the key frame pictures are facilitated.
Example two
Fig. 2 is a flowchart of a video generation method in the second embodiment of the present application, and the second embodiment of the present application performs optimization and improvement on the basis of the technical solutions of the foregoing embodiments.
Further, after "reading video data by frame group" is performed, additionally "writing the read frame group into a buffer queue, wherein the length of the buffer queue is fixed"; correspondingly, the step of "determining that the first associated frame group located before the key frame picture" is refined into the step of taking all the frame groups located before the tail frame group in the cache queue as the first associated frame group if the tail frame group of the cache queue comprises the key frame picture "; accordingly, "generating a reduced video including the key frame group and a key frame group including the key frame picture", and "reading the first associated frame group and the trailer frame group from the buffer queue, writing the pre-established reduced video, and emptying the buffer queue" are refined to complete the determination of the first associated frame group and the generation of the reduced video including the first associated frame group.
Further, the operation "determining a second associated frame group located after the key frame picture" is refined to "a frame group of a second frame group number written into the cache queue after the key frame group is taken as a second associated frame group"; correspondingly, the step of generating the reduced video comprising the key frame group and the key frame group containing the key frame picture is refined into the step of reading the second associated frame group from the cache queue and writing the reduced video, and clearing the cache queue, so as to improve the determination mode of the second associated frame group.
A reduced video generation method as shown in fig. 2, comprising:
s210, reading the video data according to the frame group, writing the read frame group into a buffer queue, and identifying the key frame picture from the video data.
Wherein the length of the buffer queue is fixed.
And S220, if the tail frame group of the cache queue comprises the key frame picture, taking a frame group positioned in front of the tail frame group in the cache queue as a first associated frame group.
S230, reading the first associated frame group and the tail frame group from the buffer queue, writing a pre-established reduced video, and emptying the buffer queue.
It can be understood that by using the buffer queue as the storage area of the first associated frame group, the situation that when a key frame group including key frame pictures is identified, other frame groups before the key frame group are discarded, so that the key frame groups cannot be acquired is avoided.
By sequentially reading the video data from the first associated frame group and the key frame group in the buffer queue and sequentially writing the read video data into the pre-established reduced video, the key frame group containing the key frame pictures and the first associated frame groups with the set number, which are located before the key frame group and are associated with the key frame pictures, can be reserved in the finally generated reduced video, so that data redundancy and waste of storage space caused by storage of other unrelated frame groups are avoided.
It should be noted that after all the frame groups are read from the buffer queue and are correspondingly stored in the reduced video, the buffer queue needs to be cleared in order to facilitate storage of subsequent video data and avoid repeated storage of stored data.
And S240, taking the frame group with the second frame group number written into the buffer queue after the key frame group as a second associated frame group.
In an optional implementation manner of the embodiment of the present application, a frame group written into the buffer queue after the key frame group may be directly used as a second associated frame group; the second group of associated frames is read from the buffer queue and written sequentially into the reduced video until the number of second group of associated frames meets the number requirement of the second group of frames. The determination manner of the number of the second frame groups can be seen in the foregoing embodiments. However, in the process of determining and storing the second associated frame group, there is a case where a new key frame picture is included in the second associated frame group. If only the number of the second associated frame groups is limited, for a certain new key frame picture, enough second associated frame groups corresponding to the new key frame picture cannot be stored in the reduced video, and therefore, loss of key information may be caused, especially when the criminal investigation process is used for video viewing, and serious consequences will be caused due to insufficient video data.
To avoid this, the stored second associated frame set needs to be further expanded. Illustratively, when a new key frame picture is included in the second associated frame group, the new key frame picture is written into the frame group of the second frame group number of the buffer queue after the frame group where the new key frame picture is located, and the frame group is used as the second associated frame group to supplement the second associated frame group.
And S250, reading the second associated frame group from the buffer queue, writing the reduced video, and emptying the buffer queue.
It is understood that, after the determined second associated frame group is sequentially written into the reduced video, the current key frame group and the associated frame group of the key frame group are stored, so that the next video data can be acquired, and the key frame picture is identified from the video data, so that the next key frame group and the associated frame group are determined, and the determined new associated frame group and the key frame group are sequentially written into the reduced video according to the frame group reading sequence.
In order to facilitate the effective monitoring of the writing process of the first associated frame group and the second associated frame group, the different writing stages of the reduced video can be distinguished by setting and switching the parity flag. Optionally, after reading the first associated frame group from the buffer queue and writing the pre-established reduced video, setting the parity identifier as an odd identifier; and setting the parity identification as an even identification after reading the second associated frame group from the buffer queue and writing the pre-established reduced video.
In an alternative implementation of the embodiment of the present application, in order to reduce the number of key events contained in a single reduced video, thereby facilitating the viewing of the complete occurrence process containing the key events, the size of the reduced video may also be determined after each writing of the entire second associated frame group into the reduced video. If the reduced video exceeds the set file size threshold, saving the reduced video, and establishing a new reduced video for frame group writing; and if the reduced video does not exceed the set file size threshold, continuing to write the frame group in the reduced video.
According to the method and the device, the determination operation of the first associated frame group and the second associated frame group is refined, and the determination modes of the first associated frame group and the second associated frame group are enriched. And after reading the frame group in the buffer queue and writing the reduced video, the buffer queue is cleared, so that the situation that the adjacent frame group in the reduced video is repeatedly written is avoided. Meanwhile, by fixing the length of the buffer queue and the number of the second frame groups of the second associated frame groups, the user-defined setting of the video length of the key event is realized, and the storage of other unrelated video data except the key event is reduced, so that the waste of storage resources is avoided.
EXAMPLE III
Fig. 3 is a flowchart of a video generation method in the third embodiment of the present application, and the third embodiment of the present application provides a preferred implementation manner based on the technical solutions of the foregoing embodiments.
A video generation method as shown in fig. 3, comprising:
s301, respectively determining the number of the first frame group and the number of the second frame group according to a preset first time threshold value and a preset second time threshold value, a camera frame rate and a camera I frame interval.
Specifically, the first frame group number M and the second frame group number N are respectively determined according to the following formulas:
Figure BDA0002336966880000101
wherein m is a preset first time threshold; n is a preset second time threshold, f is a camera frame rate, and I is a camera I frame interval.
S302, creating a buffer queue according to the number of the first frame groups;
the length of the buffer queue is 1 greater than the number of the first frame groups, that is, M +1 frame groups can be stored in the buffer queue.
S303, reading an I frame group as a current frame group, and writing the I frame group into a buffer queue;
s304, judging whether key frame picture identification is carried out or not; if yes, go to S305A; otherwise, S305B is executed.
S305A, determining whether a key frame picture exists in the current frame group; if yes, go to S306A; otherwise, execution returns to S306B.
And identifying whether the key frame picture exists in the current frame group or not by adopting at least one of a trip wire detection algorithm, an abnormal behavior detection algorithm and a perimeter intrusion detection algorithm.
S305B, the reduced video generation operation is ended.
S306A, sequentially writing each frame group in the buffer queue into the reduced video, setting the odd-even mark as the odd mark, initializing the number of the frame groups, and emptying the buffer queue; returning to execute S303;
wherein the parity flag is initialized to an odd flag, for example, 1; the number of frame groups a is initialized to 1.
S306, 306B, judging whether the parity mark is an odd mark; if yes, go to S307; otherwise, executing S303;
s307, judging whether the number of the frame groups reaches the number of the second frame groups; if yes, go to S308B, otherwise go to S308A;
S308A, writing the frame groups in the buffer queue into the reduced video in sequence, accumulating the number of the frame groups, and emptying the buffer queue; returning to execute S303;
S308B, writing the frame groups in the buffer queue into the reduced video in sequence, setting the odd-even identification as the even identification, initializing the number of the frame groups, and emptying the buffer queue; execution continues with S309;
wherein a parity flag is set to even flag, for example 0.
S309, determining whether the reduced video exceeds a set file size threshold; if yes, go to S310; otherwise, returning to S303;
s310, saving the reduced video, and creating the reduced video to write in a frame group. Returning to S303.
Example four
Fig. 4 is a block diagram of a video generation apparatus in a fourth embodiment of the present application, where the embodiment of the present application is applied to a case where online captured video data or offline video data is stored to generate a reduced video, and the apparatus is implemented by software and/or hardware and configured in an electronic device, and the electronic device may be built in an image capture system.
A reduced video generating apparatus as shown in fig. 4, comprising: a key frame picture identification module 410, an associated frame group determination module 420, and a video generation module 430. Wherein the content of the first and second substances,
a key frame picture identification module 410, configured to read video data according to a frame group, and identify a key frame picture from the video data;
an associated frame group determining module 420, configured to determine, as an associated frame group, a first associated frame group located before the key frame picture and/or a second associated frame group located after the key frame picture;
a video generation module 430 for generating a reduced video comprising the associated frame group and a key frame group containing the key frame picture.
The method comprises the steps that video data are read according to a frame group through a key frame picture identification module, and key frame pictures are identified from the video data; determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group through an associated frame group determination module; a reduced video including an associated frame group and a key frame group including a key frame picture is generated by a video generation module. According to the technical scheme, the key frame picture is determined to determine the associated frame group, so that the reduced video comprising the associated frame group and the key frame group containing the key frame picture is generated, the storage of irrelevant video data except the associated frame group and the key frame group in the video data is avoided, the waste of storage resources is avoided, and the storage space occupied during the storage of the reduced video is reduced. Meanwhile, through the identification of the key frame pictures and the storage of the key frame group comprising the key frame pictures, the generated reduced video is enabled to contain the complete occurrence process of key events, and the searching of the key frame pictures and the acquisition of other contents related to the key frame pictures are facilitated.
Further, the apparatus further includes a buffer queue writing module, configured to:
writing the read frame group into a buffer queue, wherein the length of the buffer queue is fixed;
correspondingly, the associated frame group determining module, when performing the determination of the first associated frame group located before the key frame picture, is configured to:
if the tail frame group of the cache queue comprises the key frame picture, taking all frame groups positioned in front of the tail frame group in the cache queue as a first associated frame group;
accordingly, the reduced video generation module, when performing generating a reduced video including the associated frame group and a key frame group including the key frame picture, is configured to:
and reading the first associated frame group and the tail frame group from the buffer queue, writing a pre-established reduced video, and emptying the buffer queue.
Further, the associated frame group determining module 420, when performing the determining of the second associated frame group located after the key frame picture, is configured to:
taking the frame group with the second frame group quantity written into the cache queue behind the key frame group as a second associated frame group;
accordingly, the reduced video generating module 430, when performing generating a reduced video including the key frame group and the key frame group including the key frame picture, is configured to:
and reading the second associated frame group from the buffer queue, writing the reduced video, and emptying the buffer queue.
Further, the associated frame group determining module 420 is further configured to:
and when the second associated frame group contains a new key frame picture, writing the new key frame picture into the frame group of the second frame group quantity of the cache queue as the second associated frame group after the frame group where the new key frame picture is located. Further, the apparatus further comprises a parity setting module configured to:
setting an odd-even mark as an odd mark after reading the first associated frame group from the cache queue and writing a pre-established reduced video; and the number of the first and second groups,
and after reading the second associated frame group from the buffer queue and writing the pre-established reduced video, setting the parity identification as an even identification.
Further, the apparatus includes a reduced video reconstruction module configured to:
after all the second associated frame groups are written into the reduced video, if the reduced video exceeds a set file size threshold, the reduced video is saved, and a new reduced video is established for frame group writing.
The reduced video generation device can execute the reduced video generation method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects for executing the reduced video generation method.
EXAMPLE five
Fig. 5 is a block diagram of an electronic device in a fifth embodiment of the present application, where the electronic device includes: input device 510, output device 520, processor 530, and storage device 540.
The input device 510 is used for reading video data according to frame groups;
an output device 520 for presenting at least one of a key frame picture and a reduced video;
one or more processors 530;
a storage 540 for storing one or more programs.
In fig. 5, a processor 530 is taken as an example, the input device 510 in the electronic apparatus may be connected to the output device 520, the processor 530 and the storage device 540 through a bus or other means, and the processor 530 and the storage device 540 are also connected through a bus or other means, which is taken as an example in fig. 5.
In this embodiment, the processor 530 in the electronic device can control the input device 510 to read the video data according to the frame group; key frame pictures can also be identified from the video data; a first associated frame group located before the key frame picture and/or a second associated frame group located after the key frame picture can also be determined as an associated frame group; a reduced video including the associated frame group and a key frame group including the key frame picture may also be generated; the output device 520 may also be controlled to present the generated reduced video.
The storage device 540 in the electronic device may be used as a computer-readable storage medium for storing one or more programs, which may be software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the video generation method in the embodiment of the present application (for example, the key frame picture identification module 410, the associated frame group determination module 420, and the video generation module 430 shown in fig. 4). The processor 530 executes various functional applications and data processing of the electronic device by executing software programs, instructions and modules stored in the storage 540, that is, implements the video generation method in the above-described method embodiment.
The storage device 540 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data or the like (video data, key frame pictures, key frame groups, reduced video, and the like as in the above-described embodiments). In addition, the storage 540 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 540 may further include memory located remotely from processor 530, which may be connected to a server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
EXAMPLE six
The embodiment of the application provides an image acquisition system, which comprises a camera, a processing unit and a display unit, wherein the camera is used for acquiring images in real time and generating video data; an electronic device as shown in fig. 5 is also included.
EXAMPLE seven
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a video generation apparatus, implements a video generation method provided in an embodiment of the present application, and the method includes: reading video data according to a frame group, and identifying a key frame picture from the video data; determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group; generating a downscaled video including the associated frame group and a key frame group including the key frame picture.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A method of video generation, comprising:
reading video data according to a frame group, and identifying a key frame picture from the video data;
determining a first associated frame group positioned in front of the key frame picture and/or a second associated frame group positioned behind the key frame picture as an associated frame group;
generating a downscaled video including the associated frame group and a key frame group including the key frame picture.
2. The method of claim 1, further comprising:
writing the read frame group into a buffer queue, wherein the length of the buffer queue is fixed;
correspondingly, determining a first associated frame group located before the key frame picture includes:
if the tail frame group of the cache queue comprises the key frame picture, taking all frame groups positioned in front of the tail frame group in the cache queue as a first associated frame group;
accordingly, generating a reduced video including the key frame group and a key frame group including the key frame picture includes:
and reading the first associated frame group and the tail frame group from the buffer queue, writing a pre-established reduced video, and emptying the buffer queue.
3. The method of claim 2, wherein determining a second associated frame group located after the key frame picture comprises:
taking the frame group with the second frame group quantity written into the cache queue behind the key frame group as a second associated frame group;
accordingly, generating a reduced video including the key frame group and a key frame group including the key frame picture includes:
and reading the second associated frame group from the buffer queue, writing the reduced video, and emptying the buffer queue.
4. The method of claim 3, further comprising:
and when the second associated frame group contains a new key frame picture, writing the new key frame picture into the frame group of the second frame group quantity of the cache queue as the second associated frame group after the frame group where the new key frame picture is located.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
setting an odd-even mark as an odd mark after reading the first associated frame group from the cache queue and writing a pre-established reduced video; and the number of the first and second groups,
and after reading the second associated frame group from the buffer queue and writing the pre-established reduced video, setting the parity identification as an even identification.
6. The method of claim 5, wherein after writing all of the second associated frame group to the reduced video, the method further comprises:
and if the reduced video exceeds a set file size threshold, saving the reduced video, and establishing a new reduced video for frame group writing.
7. A video generation apparatus, comprising:
the key frame picture identification module is used for reading video data according to frame groups and identifying key frame pictures from the video data;
an associated frame group determination module, configured to determine, as an associated frame group, a first associated frame group located before the key frame picture and/or a second associated frame group located after the key frame picture;
a reduced video generation module for generating a reduced video comprising the associated frame group and a key frame group containing the key frame picture.
8. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a video generation method as claimed in any one of claims 1-6.
9. An image acquisition system comprising a camera and an electronic device according to claim 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a video generation method according to any one of claims 1 to 6.
CN201911360131.XA 2019-12-25 2019-12-25 Video generation method, device, equipment, system and storage medium Pending CN113038261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911360131.XA CN113038261A (en) 2019-12-25 2019-12-25 Video generation method, device, equipment, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911360131.XA CN113038261A (en) 2019-12-25 2019-12-25 Video generation method, device, equipment, system and storage medium

Publications (1)

Publication Number Publication Date
CN113038261A true CN113038261A (en) 2021-06-25

Family

ID=76458890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911360131.XA Pending CN113038261A (en) 2019-12-25 2019-12-25 Video generation method, device, equipment, system and storage medium

Country Status (1)

Country Link
CN (1) CN113038261A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116361254A (en) * 2023-06-02 2023-06-30 禾多科技(北京)有限公司 Image storage method, apparatus, electronic device, and computer-readable medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120183276A1 (en) * 2011-01-19 2012-07-19 Rovi Technologies Corporation Method and Apparatus for Transmission of Data or Flags Indicative of Actual Program Recording Times or Durations
US20140105564A1 (en) * 2012-10-16 2014-04-17 Amanjyot Singh JOHAR Creating time lapse video in real-time
CN105468781A (en) * 2015-12-21 2016-04-06 小米科技有限责任公司 Video query method and device
CN105530534A (en) * 2015-12-18 2016-04-27 无锡天脉聚源传媒科技有限公司 Video clipping method and apparatus
CN106385619A (en) * 2016-09-14 2017-02-08 乐视控股(北京)有限公司 Replay method and device for live broadcast video stream
CN107517402A (en) * 2016-06-16 2017-12-26 广州市动景计算机科技有限公司 The method for recording and device of client and browser live video
CN109587510A (en) * 2018-12-10 2019-04-05 广州虎牙科技有限公司 A kind of live broadcasting method, device, equipment and storage medium
CN110012348A (en) * 2019-06-04 2019-07-12 成都索贝数码科技股份有限公司 A kind of automatic collection of choice specimens system and method for race program
CN110191357A (en) * 2019-06-28 2019-08-30 北京奇艺世纪科技有限公司 The excellent degree assessment of video clip, dynamic seal face generate method and device
CN113255614A (en) * 2021-07-06 2021-08-13 杭州实在智能科技有限公司 RPA flow automatic generation method and system based on video analysis

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120183276A1 (en) * 2011-01-19 2012-07-19 Rovi Technologies Corporation Method and Apparatus for Transmission of Data or Flags Indicative of Actual Program Recording Times or Durations
US20140105564A1 (en) * 2012-10-16 2014-04-17 Amanjyot Singh JOHAR Creating time lapse video in real-time
CN105530534A (en) * 2015-12-18 2016-04-27 无锡天脉聚源传媒科技有限公司 Video clipping method and apparatus
CN105468781A (en) * 2015-12-21 2016-04-06 小米科技有限责任公司 Video query method and device
CN107517402A (en) * 2016-06-16 2017-12-26 广州市动景计算机科技有限公司 The method for recording and device of client and browser live video
CN106385619A (en) * 2016-09-14 2017-02-08 乐视控股(北京)有限公司 Replay method and device for live broadcast video stream
CN109587510A (en) * 2018-12-10 2019-04-05 广州虎牙科技有限公司 A kind of live broadcasting method, device, equipment and storage medium
CN110012348A (en) * 2019-06-04 2019-07-12 成都索贝数码科技股份有限公司 A kind of automatic collection of choice specimens system and method for race program
CN110191357A (en) * 2019-06-28 2019-08-30 北京奇艺世纪科技有限公司 The excellent degree assessment of video clip, dynamic seal face generate method and device
CN113255614A (en) * 2021-07-06 2021-08-13 杭州实在智能科技有限公司 RPA flow automatic generation method and system based on video analysis

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116361254A (en) * 2023-06-02 2023-06-30 禾多科技(北京)有限公司 Image storage method, apparatus, electronic device, and computer-readable medium
CN116361254B (en) * 2023-06-02 2023-09-12 禾多科技(北京)有限公司 Image storage method, apparatus, electronic device, and computer-readable medium

Similar Documents

Publication Publication Date Title
US11240542B2 (en) System and method for multiple video playback
WO2021143228A1 (en) Data pushing method and apparatus, electronic device, computer storage medium and computer program
CN113191293B (en) Advertisement detection method, device, electronic equipment, system and readable storage medium
US20190174089A1 (en) Method and device for storing warning image
CN110719332A (en) Data transmission method, device, system, computer equipment and storage medium
CN111629165A (en) Alarm video processing method, device, equipment and storage medium
CN104751164A (en) Method and system for capturing movement trajectory of object
CN112419639A (en) Video information acquisition method and device
CN111881320A (en) Video query method, device, equipment and readable storage medium
CN113038261A (en) Video generation method, device, equipment, system and storage medium
CN110677718A (en) Video identification method and device
CN111263113B (en) Data packet sending method and device and data packet processing method and device
CN112291538A (en) Video monitoring data storage method and device
CN102938829A (en) Method for realizing prerecording of real-time audio/video stream
CN114764895A (en) Abnormal behavior detection device and method
TWI589158B (en) Storage system of original frame of monitor data and storage method thereof
CN110602483B (en) Video fault determination method, device and computer readable storage medium
CN112162888A (en) Method and device for determining reason of black screen of display and computer storage medium
CN112419638B (en) Method and device for acquiring alarm video
CN115643408A (en) Image compression method, device, equipment and storage medium
JP2004289294A (en) Data processing system, data processor, and data processing method
CN111601105B (en) Video display state abnormity detection method and device and electronic equipment
CN114359828A (en) Target behavior recording method, device, storage medium and electronic device
CN115331204A (en) Fatigue driving recognition method, system, electronic device and storage medium
JP2012511194A (en) Image motion detection method and apparatus

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