CN111757178A - Video generation method and device, electronic equipment and computer readable medium - Google Patents

Video generation method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN111757178A
CN111757178A CN202010674210.4A CN202010674210A CN111757178A CN 111757178 A CN111757178 A CN 111757178A CN 202010674210 A CN202010674210 A CN 202010674210A CN 111757178 A CN111757178 A CN 111757178A
Authority
CN
China
Prior art keywords
video
processed
content
segment
target
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.)
Granted
Application number
CN202010674210.4A
Other languages
Chinese (zh)
Other versions
CN111757178B (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.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010674210.4A priority Critical patent/CN111757178B/en
Publication of CN111757178A publication Critical patent/CN111757178A/en
Application granted granted Critical
Publication of CN111757178B publication Critical patent/CN111757178B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/44016Processing 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 splicing one content stream with another content stream, e.g. for substituting a video clip
    • 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/265Mixing

Abstract

The embodiment of the disclosure discloses a video generation method, a video generation device, an electronic device and a computer readable medium. One embodiment of the method comprises: acquiring a video to be processed, wherein the video to be processed comprises at least two video contents; dividing the video to be processed into at least two video segments according to the video content; and in response to the fact that the at least two video clips have the video clip to be processed with the set video content, replacing the video clip to be processed in the video to be processed with the target video clip to obtain the target video corresponding to the video to be processed. The embodiment realizes the modification of the video content, improves the utilization rate of the video and improves the information transmission efficiency of the video.

Description

Video generation method and device, electronic equipment and computer readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a video generation method, an apparatus, an electronic device, and a computer-readable medium.
Background
With the development of science and technology, various types of information appear in daily work and life, and convenience is provided for the life and work of users. Among them, video contains various information contents such as moving pictures and music, and is an important carrier for information transmission.
In practice, the same video may express some type of information content. However, the video acquired by the user usually contains a predetermined content, and only a specific information content can be expressed. Therefore, the utilization rate of the video is not high, and the information transmission efficiency of the video is reduced.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a video generation method, apparatus, electronic device and computer readable medium to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a video generation method, including: acquiring a video to be processed, wherein the video to be processed comprises at least two video contents; dividing the video to be processed into at least two video segments according to the video content; and in response to the fact that the at least two video clips have the video clip to be processed with the set video content, replacing the video clip to be processed in the video to be processed with the target video clip to obtain the target video corresponding to the video to be processed.
In a second aspect, some embodiments of the present disclosure provide a video generation apparatus, the apparatus comprising: a video acquisition unit configured to acquire a video to be processed, the video to be processed including at least two types of video content; the video dividing unit is configured to divide the video to be processed into at least two video segments according to video content; and the video generation unit is used for responding to the existence of the video segment to be processed of the set video content in the at least two video segments, and is configured to replace the video segment to be processed in the video to be processed by the target video segment to obtain the target video corresponding to the video to be processed.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a memory on which one or more programs are stored, the one or more programs, when executed by the one or more processors, causing the one or more processors to perform the video generation method of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the video generation method of the first aspect described above.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: first, a video to be processed containing a plurality of video contents is obtained. And then dividing the video to be processed into at least two video segments according to the video content, thereby realizing the division of the video content. And finally, when the video clip to be processed of the set video content exists in the plurality of video clips, replacing the video clip to be processed in the video to be processed by the target video clip to obtain the target video corresponding to the video to be processed. Therefore, the modification of the video content is realized, the utilization rate of the video is improved, and the information transmission efficiency of the video is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
Fig. 1 is a schematic diagram of an application scenario of a video generation method of some embodiments of the present disclosure;
fig. 2 is a flow diagram of some embodiments of a video generation method according to the present disclosure;
FIG. 3 is a flow diagram of further embodiments of a video generation method according to the present disclosure;
FIG. 4 is a flow diagram of still further embodiments of video generation methods according to the present disclosure;
fig. 5 is a schematic structural diagram of some embodiments of a video generation apparatus according to the present disclosure;
FIG. 6 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of a video generation method according to some embodiments of the present disclosure. The electronic device 101 (which may be a smart phone, a computer, a server, etc.) acquires a to-be-processed video 102 containing 5 types of video content. The 5 kinds of video contents are respectively: pentagonal content, circular content, hexagonal content, pentagonal content, and hexagonal content. After that, the electronic device 101 may divide the to-be-processed video 102 into 5 video segments according to the video content, and each video segment contains only one of the above 5 video contents. When there is set video content (which may be a shape including 5 sides, for example) in the 5 video clips, the electronic device 101 finds a video clip including pentagonal content from the 5 video clips as the to-be-processed video clip 103. After that, the electronic device 101 finds the target video segment 104, and replaces the to-be-processed video segment 103 with the target video segment 104. Finally, the electronic device 101 again combines the target video segment 104 and the other video segments into the target video 105. In this way, the modification of the video content of the video 102 to be processed is completed, the video 102 to be processed is converted into the target video 105, the utilization rate of the video is improved, and the information transmission efficiency of the video is improved.
With continued reference to fig. 2, fig. 2 illustrates a flow 200 of some embodiments of a video generation method according to the present disclosure. The video generation method comprises the following steps:
step 201, acquiring a video to be processed.
In some embodiments, an executing subject of the video generation method (e.g., the electronic device 101 shown in fig. 1) may acquire the video to be processed by a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
The present embodiment is a scheme for processing multiple video contents, that is, the video to be processed includes at least two video contents.
In some embodiments, the execution subject may obtain the pending video when the user uploads the video to the video server through the client.
In some embodiments, the execution subject may further obtain the to-be-processed video after the user performs the mixing editing on the video through the client.
Step 202, dividing the video to be processed into at least two video segments according to the video content.
The execution subject may divide the video to be processed into at least two video segments according to the video content contained in the video to be processed.
In some embodiments, the execution subject may identify content of a video frame included in the video to be processed, to obtain the content of the video frame. After the content of the video frame is obtained, the execution main body divides the video to be processed into a plurality of video segments according to the content of the video frame. For example, some video frames in the video to be processed include animal images and other video frames include plant images. The execution body may divide the video to be processed into a video clip containing an animal image and a video clip containing a plant image.
Step 203, in response to that there is a to-be-processed video segment with set video content in the at least two video segments, replacing the to-be-processed video segment in the to-be-processed video with a target video segment to obtain a target video corresponding to the to-be-processed video.
In some embodiments, when there is a to-be-processed video clip of the set video content in the at least two video clips, the execution subject may modify the to-be-processed video. At this time, the execution subject may replace the to-be-processed video segment in the to-be-processed video by the target video segment, so as to obtain the target video corresponding to the to-be-processed video. The setting video content can be game video content, dance video content and the like. The target video segment may be a video segment containing content to be delivered. Therefore, the modification of the video content is realized, the utilization rate of the video is improved, and the information transmission efficiency of the video is improved.
In the video generation method disclosed in some embodiments of the present disclosure, a to-be-processed video including a plurality of video contents is first acquired. And then dividing the video to be processed into at least two video segments according to the video content, thereby realizing the division of the video content. And finally, when the video clip to be processed of the set video content exists in the plurality of video clips, replacing the video clip to be processed in the video to be processed by the target video clip to obtain the target video corresponding to the video to be processed. Therefore, the modification of the video content is realized, the utilization rate of the video is improved, and the information transmission efficiency of the video is improved.
With continued reference to fig. 3, fig. 3 illustrates a flow 300 of some embodiments of a video generation method according to the present disclosure. The video generation method comprises the following steps:
step 301, acquiring a video to be processed.
The content of step 301 is the same as that of step 201, and is not described in detail here.
Step 302, performing feature extraction on the video frames in the video to be processed to obtain feature information of each video frame.
The execution main body can perform feature extraction on the video frames in various ways to obtain feature information of each video frame. The characteristic information is used for representing the content of the video frame. For example, the feature information may include texture features, color features, audio features, line features, and the like.
And 303, clustering the characteristic information to obtain at least two video segments of the video to be processed.
Typically, video frames containing the same content have the same or similar characteristic information. For example, if a plurality of video frames all contain images of cats, the feature information may all contain line features, audio features, and the like of cats. Therefore, the execution main body can cluster the characteristic information and divide the video to be processed according to the clustered video frames to obtain at least two video segments.
In some optional implementation manners of some embodiments, the clustering the feature information to obtain at least two video segments of the to-be-processed video may include the following steps:
firstly, for the characteristic information corresponding to the video frame in the video to be processed, marking the video frame corresponding to the characteristic information, the difference value of which is less than a set threshold value, in the video to be processed as the same type of video frame;
typically, different video frames contain video content that is not identical. Correspondingly, the feature information of different video frames is not completely the same. In order to realize the division of the video, the executive body can cluster the feature information in various ways, and the feature information with the difference smaller than a set threshold value between feature information is taken as the same type of feature information. Correspondingly, the video frames corresponding to the same kind of feature information can be used as the same kind of video frames. Therefore, the classification of the video frames is realized through clustering the characteristic information, and the accuracy and the effectiveness of dividing the video segments are improved.
And secondly, dividing the video to be processed into at least two video segments according to the corresponding time stamps of the same type of video frames.
The video frames may generally include timestamps, and the timestamps may represent the ordering of the corresponding video frames in the video to be processed, the generation time of the corresponding video frames, and other information. Accordingly, the execution main body can divide the video to be processed into at least two video segments according to the timestamps corresponding to the same type of video frames. Therefore, accurate division of the video segments is realized, and the effectiveness and the accuracy of information transmission of the final target video are improved.
Step 304, in response to that there is a to-be-processed video segment with set video content in the at least two video segments, replacing the to-be-processed video segment in the to-be-processed video with a target video segment to obtain a target video corresponding to the to-be-processed video.
The content of step 304 is the same as that of step 203, and is not described in detail here.
In some optional implementation manners of some embodiments, the replacing, by the target video segment, the to-be-processed video segment in the to-be-processed video to obtain the target video corresponding to the to-be-processed video may further include:
the first step is to mark the video segment adjacent to the target video segment in the video to be processed as the neighbor video segment.
When the execution main body replaces the video clip to be processed by the target video clip, the target video clip is adjacent to other video clips in the video to be processed. At this time, the executing body may mark video segments adjacent to the target video segment as neighbor video segments.
And secondly, setting the video frame corresponding to the neighbor video clip in the target video clip as a first video frame to be corrected.
Different video segments may differ in image content, audio, color, etc. In order to make the resulting target video have high appreciation, the executing body may modify the video frames to enable smooth transition between different video segments in terms of image content, audio, and the like.
The target video segment typically contains a plurality of video frames. The execution subject may set a video frame corresponding to the neighbor video clip in the target video clip as the first video frame to be corrected. For example, the executing subject may set consecutive 10 video frames of the target video piece that are closest to the neighbor video piece as the first video frame to be corrected.
And thirdly, setting the video frame of the interval setting frame between the neighboring video clip and the first video frame to be corrected as a second video frame to be corrected.
The execution main body may set, as a second video frame to be corrected, a video frame that is spaced apart from the first video frame to be corrected in the neighbor video clip, based on the same operation as the setting of the first video frame to be corrected.
And fourthly, smoothing the first video frame to be corrected and the second video frame to be corrected to obtain a target video corresponding to the video to be processed.
Finally, the execution main body can carry out smoothing processing on the first video frame to be corrected and the second video frame to be corrected through various methods, so that smooth transition of adjacent video segments is realized. Wherein the smoothing process may include at least one of: color smoothing, volume smoothing, etc.
With continued reference to fig. 4, fig. 4 illustrates a flow 400 of some embodiments of a video generation method according to the present disclosure. The video generation method comprises the following steps:
step 401, acquiring a video to be processed.
The content of step 401 is the same as that of step 201, and is not described in detail here.
Step 402, dividing the video to be processed into at least two video segments according to the video content.
The content of step 402 is the same as that of step 202, and is not described in detail here.
Step 403, in response to that there is a to-be-processed video segment with set video content in the at least two video segments, identifying a video type of the to-be-processed video segment.
When the video clip to be processed of the set video content exists in at least two video clips, the fact that the video clip which can be replaced exists in the two video clips is indicated. At this time, the execution subject may further identify the video type of the video clip to be processed. The video type is used for representing the positive content or the negative content of the video content. Forward content may be used to characterize the forward results of video content, e.g., forward content may be used to characterize content for information such as winnings, etc. Negative content can be used to characterize negative results of video content, e.g., negative content can be used to characterize content for failure, fines, etc. information.
For example, when the executing entity needs to deliver a certain game video content, if a video clip containing the original game video content exists in a plurality of video clips corresponding to the video to be processed, the executing entity may set the original video clip as the video clip to be processed. Thereafter, the executing agent may further analyze the result of the original game video content as a win or a loss. And if the result is success, the video type is positive content, and if the result is failure, the video type is negative content.
In some optional implementations of some embodiments, the identifying a video type of the to-be-processed video segment may include: and in response to the fact that the specified video content exists in the video clip to be processed, marking the video clip to be processed as positive content, otherwise, marking the video clip to be processed as negative content.
The execution subject may determine the video type of the video clip to be processed according to whether the specified video content exists in the video content. When the specified video content exists in the video clip to be processed, the video clip to be processed can be marked as forward content. Otherwise, the video segment to be processed may be marked as negative content. Wherein the specific video content may include at least one of: the flag image, the trophy image, the medal image, and may further include audio information indicating winning, and the like.
And step 404, acquiring a target video segment corresponding to the video type, and replacing a to-be-processed video segment in the to-be-processed video with the target video segment to obtain a target video corresponding to the to-be-processed video.
There is usually an association between each video segment in the video to be processed, i.e. the video type of the video segment to be processed is associated with other video segments. For example, if the video contents of other video segments include college entrance, work awards, job position promotion, etc., the corresponding original game video may be a game winner. That is, the video segments contained in the video to be processed all express positive information, and the content between the video segments has correlation. Therefore, the execution subject can find the target video segment according to the video type of the video segment to be processed. In general, the target video clip may be an existing video stored in a video library. After the target video segment is found, the execution main body can replace the video segment to be processed in the video to be processed through the target video segment to obtain the target video corresponding to the video to be processed. That is, the target video includes video segments other than the video segment to be processed in the video to be processed, and also includes the target video segment. Therefore, the target video is generated through the to-be-processed video, so that the target video comprises a new video which is not available in the to-be-processed video, the utilization rate of the video is improved, and the information transmission efficiency of the video is improved.
In some optional implementations of some embodiments, the obtaining of the target video segment corresponding to the video type may include:
the first step is to search at least one initial video segment corresponding to the set video content from a pre-constructed video library.
The execution subject may search at least one initial video segment corresponding to the set video content from a pre-constructed video library. The video library may store initial video segments of a plurality of video contents, and each video content may include a plurality of video segments.
And secondly, selecting an initial video clip meeting the video type from the at least one initial video clip as a target video clip.
The execution subject may determine the target video segment by randomly selecting an initial video segment, or by specifying a specific initial video segment, or the like.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a video generation apparatus, which correspond to those shown in fig. 2, and which may be particularly applied in various electronic devices.
As shown in fig. 5, the video generation apparatus 500 of some embodiments includes: a video acquisition unit 501, a video division unit 502, and a video generation unit 503. The video acquiring unit 501 is configured to acquire a video to be processed, where the video to be processed includes at least two types of video content; a video dividing unit 502 configured to divide the video to be processed into at least two video segments according to video content; the video generating unit 503 is configured to, in response to a to-be-processed video segment of the set video content existing in the at least two video segments, replace the to-be-processed video segment in the to-be-processed video with a target video segment, and obtain a target video corresponding to the to-be-processed video.
In an optional implementation manner of some embodiments, the video dividing unit 502 may include: a feature information extraction sub-unit (not shown in the drawing) and a video division sub-unit (not shown in the drawing). The feature information extraction subunit is configured to perform feature extraction on video frames in the video to be processed to obtain feature information of each video frame, where the feature information is used to represent content of the video frame; and the video dividing subunit is configured to cluster the characteristic information to obtain at least two video segments of the video to be processed.
In an optional implementation of some embodiments, the video frame includes a timestamp, and the video partitioning subunit may include: a homogeneous video frame acquisition module (not shown) and a video partitioning module (not shown). The similar video frame acquisition module is configured to mark, as to the characteristic information corresponding to the video frame in the video to be processed, the video frame corresponding to the characteristic information, of which the difference value with the characteristic information is smaller than a set threshold value, in the video to be processed as a similar video frame; and the video dividing module is configured to divide the video to be processed into at least two video segments according to the timestamps corresponding to the same type of video frames.
In an optional implementation manner of some embodiments, the video generating unit 503 may include: a video type identification subunit (not shown in the figure) and a video generation subunit (not shown in the figure). The video type identification subunit is configured to identify a video type of the video segment to be processed, where the video type is used to represent that video content is positive content or negative content; and the video generation subunit is configured to acquire a target video segment corresponding to the video type, and replace a to-be-processed video segment in the to-be-processed video with the target video segment to obtain a target video corresponding to the to-be-processed video.
In an optional implementation manner of some embodiments, the video type identification subunit may include: a video type identification module (not shown in the figure), in response to the existence of a specified video content in the to-be-processed video segment, configured to mark the to-be-processed video segment as a positive content, otherwise, mark the to-be-processed video segment as a negative content, wherein the specified video content includes at least one of the following: a flag image, a trophy image, a medal image.
In an optional implementation manner of some embodiments, the video generation subunit may include: an initial video segment search module (not shown in the figure) and a video generation module (not shown in the figure). The initial video segment searching module is configured to search at least one initial video segment corresponding to the set video content from a pre-constructed video library; and the video generation module is configured to select an initial video segment which meets the video type from the at least one initial video segment as a target video segment.
In an optional implementation manner of some embodiments, the video generating unit 503 may include: a neighbor video segment marking subunit (not shown), a first video frame to be corrected setting subunit (not shown), a second video frame to be corrected setting subunit (not shown), and a smoothing processing subunit (not shown). The neighbor video segment marking subunit is configured to mark a video segment adjacent to the target video segment in the video to be processed as a neighbor video segment; a first video frame to be corrected setting subunit configured to set a video frame in the target video segment, which corresponds to the neighbor video segment, as a first video frame to be corrected; a second video frame to be corrected setting subunit configured to set, as a second video frame to be corrected, a video frame in the neighbor video segment that is spaced from the first video frame to be corrected by a setting frame; a smoothing subunit, configured to perform smoothing processing on the first video frame to be corrected and the second video frame to be corrected, so as to obtain a target video corresponding to the video to be processed, where the smoothing processing includes at least one of: smooth color and smooth volume.
It will be understood that the elements described in the apparatus 500 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 500 and the units included therein, and are not described herein again.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 6 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a video to be processed, wherein the video to be processed comprises at least two video contents; dividing the video to be processed into at least two video segments according to the video content; and in response to the fact that the at least two video clips have the video clip to be processed with the set video content, replacing the video clip to be processed in the video to be processed with the target video clip to obtain the target video corresponding to the video to be processed.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes a video acquisition unit, a video division unit, and a video generation unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the video generation unit may also be described as a "unit for generating a target video corresponding to a video to be processed".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
According to one or more embodiments of the present disclosure, there is provided a video generation method including: acquiring a video to be processed, wherein the video to be processed comprises at least two video contents; dividing the video to be processed into at least two video segments according to the video content; and in response to the fact that the at least two video clips have the video clip to be processed with the set video content, replacing the video clip to be processed in the video to be processed with the target video clip to obtain the target video corresponding to the video to be processed.
According to one or more embodiments of the present disclosure, the dividing the to-be-processed video into at least two video segments according to video content includes: extracting the characteristics of the video frames in the video to be processed to obtain the characteristic information of each video frame, wherein the characteristic information is used for representing the content of the video frames; and clustering the characteristic information to obtain at least two video segments of the video to be processed.
According to one or more embodiments of the present disclosure, the clustering the feature information to obtain at least two video segments of the video to be processed includes: for the characteristic information corresponding to the video frame in the video to be processed, marking the video frame corresponding to the characteristic information, of which the difference value with the characteristic information is smaller than a set threshold value, in the video to be processed as a similar video frame; and dividing the video to be processed into at least two video segments according to the corresponding time stamps of the same type of video frames.
According to one or more embodiments of the present disclosure, the replacing, by the target video segment, the to-be-processed video segment in the to-be-processed video to obtain the target video corresponding to the to-be-processed video includes: identifying the video type of the video clip to be processed, wherein the video type is used for representing the positive content or the negative content of the video content; and acquiring a target video clip corresponding to the video type, and replacing the video clip to be processed in the video to be processed by the target video clip to obtain a target video corresponding to the video to be processed.
According to one or more embodiments of the present disclosure, the identifying the video type of the to-be-processed video segment includes: in response to the existence of the designated video content in the video clip to be processed, marking the video clip to be processed as a positive content, otherwise, marking the video clip to be processed as a negative content, wherein the designated video content includes at least one of the following: a flag image, a trophy image, a medal image.
According to one or more embodiments of the present disclosure, the obtaining of the target video segment corresponding to the video type includes: searching at least one initial video segment corresponding to the set video content from a pre-constructed video library; and selecting an initial video segment meeting the video type from the at least one initial video segment as a target video segment.
According to one or more embodiments of the present disclosure, the replacing, by the target video segment, the to-be-processed video segment in the to-be-processed video to obtain the target video corresponding to the to-be-processed video includes: marking the video clip adjacent to the target video clip in the video to be processed as a neighbor video clip; setting a video frame corresponding to the neighbor video clip in the target video clip as a first video frame to be corrected; setting a video frame of the neighbor video clip and the first video frame to be corrected at a set frame interval as a second video frame to be corrected; and smoothing the first video frame to be corrected and the second video frame to be corrected to obtain a target video corresponding to the video to be processed, wherein the smoothing process comprises at least one of the following steps: smooth color and smooth volume.
According to one or more embodiments of the present disclosure, there is provided a video generating apparatus including: a video acquisition unit configured to acquire a video to be processed, the video to be processed including at least two types of video content; the video dividing unit is configured to divide the video to be processed into at least two video segments according to video content; and the video generation unit is used for responding to the existence of the video segment to be processed of the set video content in the at least two video segments, and is configured to replace the video segment to be processed in the video to be processed by the target video segment to obtain the target video corresponding to the video to be processed.
According to one or more embodiments of the present disclosure, the video dividing unit includes: the characteristic information extraction subunit is configured to perform characteristic extraction on the video frames in the video to be processed to obtain characteristic information of each video frame, wherein the characteristic information is used for representing the content of the video frame; and the video dividing subunit is configured to cluster the characteristic information to obtain at least two video segments of the video to be processed.
According to one or more embodiments of the present disclosure, the video frame includes a time stamp, and the video division subunit includes: the similar video frame acquisition module is used for marking the video frames corresponding to the characteristic information, the difference value of which is less than a set threshold value, in the video to be processed as the similar video frames, as to the characteristic information corresponding to the video frames in the video to be processed; and the video dividing module is configured to divide the video to be processed into at least two video segments according to the timestamps corresponding to the same type of video frames.
According to one or more embodiments of the present disclosure, the video generation unit includes: a video type identification subunit, configured to identify a video type of the video segment to be processed, where the video type is used to represent that video content is positive content or negative content; and the video generation subunit is configured to acquire a target video segment corresponding to the video type, and replace a to-be-processed video segment in the to-be-processed video with the target video segment to obtain a target video corresponding to the to-be-processed video.
According to one or more embodiments of the present disclosure, the video type identification subunit includes: a video type identification module, configured to, in response to a specified video content existing in the to-be-processed video segment, mark the to-be-processed video segment as a positive content, and otherwise, mark the to-be-processed video segment as a negative content, where the specified video content includes at least one of: a flag image, a trophy image, a medal image.
According to one or more embodiments of the present disclosure, the video generation subunit includes: the initial video segment searching module is configured to search at least one initial video segment corresponding to the set video content from a pre-constructed video library; and the video generation module is configured to select an initial video segment which meets the video type from the at least one initial video segment as a target video segment.
According to one or more embodiments of the present disclosure, the video generation unit includes: a neighbor video segment marking subunit configured to mark a video segment adjacent to the target video segment in the video to be processed as a neighbor video segment; a first video frame to be corrected setting subunit configured to set a video frame in the target video segment, which corresponds to the neighbor video segment, as a first video frame to be corrected; a second video frame to be corrected setting subunit configured to set, as a second video frame to be corrected, a video frame in the neighbor video segment that is spaced from the first video frame to be corrected by a setting frame; a smoothing subunit, configured to perform smoothing processing on the first video frame to be corrected and the second video frame to be corrected, so as to obtain a target video corresponding to the video to be processed, where the smoothing processing includes at least one of: smooth color and smooth volume.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (10)

1. A video generation method, comprising:
acquiring a video to be processed, wherein the video to be processed comprises at least two video contents;
dividing the video to be processed into at least two video segments according to the video content;
and in response to the fact that the video clip to be processed of the set video content exists in the at least two video clips, replacing the video clip to be processed in the video to be processed with the target video clip to obtain the target video corresponding to the video to be processed.
2. The method of claim 1, wherein said dividing said video to be processed into at least two video segments in accordance with video content comprises:
extracting the characteristics of the video frames in the video to be processed to obtain the characteristic information of each video frame, wherein the characteristic information is used for representing the content of the video frame;
and clustering the characteristic information to obtain at least two video segments of the video to be processed.
3. The method of claim 2, wherein the video frame includes a timestamp, and
the clustering the characteristic information to obtain at least two video segments of the video to be processed comprises:
for the characteristic information corresponding to the video frame in the video to be processed, marking the video frame corresponding to the characteristic information, of which the difference value with the characteristic information is smaller than a set threshold value, in the video to be processed as a similar video frame;
and dividing the video to be processed into at least two video segments according to the timestamps corresponding to the same type of video frames.
4. The method according to claim 1, wherein the replacing the to-be-processed video segment in the to-be-processed video by the target video segment to obtain the target video corresponding to the to-be-processed video comprises:
identifying the video type of the video clip to be processed, wherein the video type is used for representing the positive content or the negative content of the video content;
and acquiring a target video clip corresponding to the video type, and replacing the video clip to be processed in the video to be processed by the target video clip to obtain a target video corresponding to the video to be processed.
5. The method of claim 4, wherein the identifying the video type of the video clip to be processed comprises:
in response to the existence of specified video content in the video segment to be processed, marking the video segment to be processed as positive content, otherwise, marking the video segment to be processed as negative content, wherein the specified video content comprises at least one of the following: a flag image, a trophy image, a medal image.
6. The method of claim 4, wherein the obtaining a target video segment corresponding to the video type comprises:
searching at least one initial video segment corresponding to the set video content from a pre-constructed video library;
and selecting an initial video segment which meets the video type from the at least one initial video segment as a target video segment.
7. The method according to claim 1, wherein the replacing the to-be-processed video segment in the to-be-processed video by the target video segment to obtain the target video corresponding to the to-be-processed video comprises:
marking video clips adjacent to the target video clip in the video to be processed as neighbor video clips;
setting a video frame corresponding to the neighbor video clip in the target video clip as a first video frame to be corrected;
setting a video frame of the neighbor video clip, which is separated from the first video frame to be corrected by a set frame, as a second video frame to be corrected;
performing smoothing processing on the first video frame to be corrected and the second video frame to be corrected to obtain a target video corresponding to the video to be processed, wherein the smoothing processing comprises at least one of the following steps: smooth color and smooth volume.
8. A video generation apparatus comprising:
a video acquisition unit configured to acquire a video to be processed, the video to be processed including at least two kinds of video contents;
a video dividing unit configured to divide the video to be processed into at least two video segments according to video content;
and the video generation unit is used for responding to the existence of the video segment to be processed of the set video content in the at least two video segments, and is configured to replace the video segment to be processed in the video to be processed by the target video segment to obtain the target video corresponding to the video to be processed.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1 to 7.
CN202010674210.4A 2020-07-14 2020-07-14 Video generation method and device, electronic equipment and computer readable medium Active CN111757178B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010674210.4A CN111757178B (en) 2020-07-14 2020-07-14 Video generation method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010674210.4A CN111757178B (en) 2020-07-14 2020-07-14 Video generation method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN111757178A true CN111757178A (en) 2020-10-09
CN111757178B CN111757178B (en) 2022-05-27

Family

ID=72710261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010674210.4A Active CN111757178B (en) 2020-07-14 2020-07-14 Video generation method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN111757178B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050066357A1 (en) * 2003-09-22 2005-03-24 Ryal Kim Annon Modifying content rating
US20100023863A1 (en) * 2007-05-31 2010-01-28 Jack Cohen-Martin System and method for dynamic generation of video content
CN103782605A (en) * 2011-06-21 2014-05-07 赛沃路森公司 Rendering device with content substitution
CN104661093A (en) * 2013-11-21 2015-05-27 国际商业机器公司 Method and system for determining updates for a video tutorial
CN107003720A (en) * 2014-08-18 2017-08-01 夜灯系统有限责任公司 The message generation of scripting Digital Media
CN108876866A (en) * 2017-05-16 2018-11-23 腾讯科技(深圳)有限公司 A kind of media data processing method, device and storage medium
CN109729429A (en) * 2019-01-31 2019-05-07 百度在线网络技术(北京)有限公司 Video broadcasting method, device, equipment and medium
CN110493641A (en) * 2019-08-06 2019-11-22 东软集团股份有限公司 A kind of video file encryption and decryption method and device
WO2020015492A1 (en) * 2018-07-18 2020-01-23 腾讯科技(深圳)有限公司 Method and device for identifying key time point of video, computer apparatus and storage medium
US20200145737A1 (en) * 2018-11-02 2020-05-07 International Business Machines Corporation System and method for adaptive video

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050066357A1 (en) * 2003-09-22 2005-03-24 Ryal Kim Annon Modifying content rating
US20100023863A1 (en) * 2007-05-31 2010-01-28 Jack Cohen-Martin System and method for dynamic generation of video content
CN103782605A (en) * 2011-06-21 2014-05-07 赛沃路森公司 Rendering device with content substitution
CN104661093A (en) * 2013-11-21 2015-05-27 国际商业机器公司 Method and system for determining updates for a video tutorial
CN107003720A (en) * 2014-08-18 2017-08-01 夜灯系统有限责任公司 The message generation of scripting Digital Media
CN108876866A (en) * 2017-05-16 2018-11-23 腾讯科技(深圳)有限公司 A kind of media data processing method, device and storage medium
WO2020015492A1 (en) * 2018-07-18 2020-01-23 腾讯科技(深圳)有限公司 Method and device for identifying key time point of video, computer apparatus and storage medium
US20200145737A1 (en) * 2018-11-02 2020-05-07 International Business Machines Corporation System and method for adaptive video
CN109729429A (en) * 2019-01-31 2019-05-07 百度在线网络技术(北京)有限公司 Video broadcasting method, device, equipment and medium
CN110493641A (en) * 2019-08-06 2019-11-22 东软集团股份有限公司 A kind of video file encryption and decryption method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
PUI YU HUI ET AL.: "Automatic story segmentation for spoken document retrieval", 《10TH IEEE INTERNATIONAL CONFERENCE ON FUZZY SYSTEMS》 *
PUI YU HUI ET AL.: "Automatic story segmentation for spoken document retrieval", 《10TH IEEE INTERNATIONAL CONFERENCE ON FUZZY SYSTEMS》, 7 August 2002 (2002-08-07) *
刘昌余: "多媒体事件检测中的关键技术研究", 《中国优秀博硕士学位论文全文数据库(博士)基础科学辑(月刊),2016年第01期》 *
刘昌余: "多媒体事件检测中的关键技术研究", 《中国优秀博硕士学位论文全文数据库(博士)基础科学辑(月刊),2016年第01期》, 15 January 2016 (2016-01-15) *

Also Published As

Publication number Publication date
CN111757178B (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN110213614B (en) Method and device for extracting key frame from video file
CN110516678B (en) Image processing method and device
CN111784712B (en) Image processing method, device, equipment and computer readable medium
CN109961032B (en) Method and apparatus for generating classification model
CN109862100B (en) Method and device for pushing information
CN108510084B (en) Method and apparatus for generating information
CN110472558B (en) Image processing method and device
CN110674624A (en) Method and system for editing image and text
CN109919220B (en) Method and apparatus for generating feature vectors of video
CN104813610A (en) Providing multiple content items for display on multiple devices
CN110636331B (en) Method and apparatus for processing video
CN111757178B (en) Video generation method and device, electronic equipment and computer readable medium
CN112035256A (en) Resource allocation method, device, electronic equipment and medium
CN113628097A (en) Image special effect configuration method, image recognition method, image special effect configuration device and electronic equipment
CN114125485B (en) Image processing method, device, equipment and medium
CN110188833B (en) Method and apparatus for training a model
CN114528433A (en) Template selection method and device, electronic equipment and storage medium
CN111367592B (en) Information processing method and device
CN109408716B (en) Method and device for pushing information
CN115209215A (en) Video processing method, device and equipment
CN112686599A (en) Request response method, device, system, electronic equipment and computer readable medium
CN112464039A (en) Data display method and device of tree structure, electronic equipment and medium
CN111294657A (en) Information processing method and device
CN113259414B (en) Information pushing method and device, electronic equipment and computer readable medium
CN113792869B (en) Video processing method and device based on neural network chip and electronic equipment

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.