CN112770176A - Video frame determination method and device, electronic equipment and computer readable medium - Google Patents

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

Info

Publication number
CN112770176A
CN112770176A CN202011540143.3A CN202011540143A CN112770176A CN 112770176 A CN112770176 A CN 112770176A CN 202011540143 A CN202011540143 A CN 202011540143A CN 112770176 A CN112770176 A CN 112770176A
Authority
CN
China
Prior art keywords
frame
video
adjacent
scene
starting
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
CN202011540143.3A
Other languages
Chinese (zh)
Other versions
CN112770176B (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.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and 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 IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202011540143.3A priority Critical patent/CN112770176B/en
Publication of CN112770176A publication Critical patent/CN112770176A/en
Application granted granted Critical
Publication of CN112770176B publication Critical patent/CN112770176B/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 or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application provides a video frame determination method, a video frame determination device, electronic equipment and a computer readable medium, which relate to the technical field of videos, and the method comprises the following steps: acquiring a video to be edited and a reference video corresponding to the video to be edited; determining a reference frame in the reference video, wherein the reference frame comprises a film start frame or a film end frame of the reference video; and determining a target starting frame corresponding to the feature film starting frame or a target ending frame corresponding to the feature film ending frame in the video to be edited. According to the method and the device, the video to be edited is edited according to the target starting frame and the target ending frame, the editing accuracy is improved, and the editing efficiency is improved.

Description

Video frame determination method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to the field of video technologies, and in particular, to a method and an apparatus for determining a video frame, an electronic device, and a computer-readable medium.
Background
Generally, videos such as a television play or a comprehensive program and the like are played in a television station at first, and can be played in a video client only after the television station is played, because the copyright of the television station is a live copyright, and the copyright of the video client is an on-demand copyright. Therefore, when the video client plays the on-demand video, the video content needs to be synchronized with the video content played by the television station, so that the user can continue to watch the video content in the same episode of the video client after watching the video through the television station is interrupted.
The video content in the video-on-demand only comprises a head song, a tail song and a feature song, and the video played by the television station comprises the head song, a president, a feature song, a next collection forecast and the tail song, so that a video editing engineer needs to find a feature song point position in the video played by the television station, and then the video editing engineer carries out editing in the DVD video according to the feature song point position.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present application provides a video frame determination method, apparatus, electronic device and computer readable medium.
In a first aspect, the present application provides a method for determining a video frame, the method including:
acquiring a video to be edited and a reference video corresponding to the video to be edited;
determining a reference frame in the reference video, wherein the reference frame comprises a film start frame or a film end frame of the reference video;
and determining a target starting frame corresponding to the feature film starting frame or a target ending frame corresponding to the feature film ending frame in the video to be edited.
Optionally, the determining a reference frame in the reference video comprises:
acquiring an alternative frame in the reference video, wherein the alternative frame is a picture frame in non-feature content of the reference video;
determining an alternative time corresponding to the alternative frame;
continuing a preset time length based on the alternative time length to obtain a target clipping time length, wherein the preset time length is continued forwards or backwards;
and obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment.
Optionally, the sequentially including an adjacent starting scene and a feature scene in the reference video, where the candidate frame is any frame in the adjacent starting scene, and the obtaining the target clipping time based on the candidate time continuing for a preset duration includes: based on the alternative time corresponding to the alternative frame in the adjacent starting scene, a first clipping time is obtained by extending backwards for a first time length;
the obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment includes: determining a first picture frame corresponding to the first clipping moment; and taking the first picture frame as a reference frame in the reference video.
Optionally, the candidate frame is a starting frame in the adjacent starting scene, and determining the candidate time corresponding to the candidate frame includes:
acquiring a preset adjacent starting frame picture from a database, wherein the adjacent starting frame picture is a picture corresponding to a starting frame in the adjacent starting scene;
searching for an adjacent starting frame corresponding to the adjacent starting frame picture in the adjacent starting scene;
and determining the adjacent starting time of the adjacent starting frame in the adjacent starting scene, and taking the adjacent starting time as the alternative time.
Optionally, the reference video sequentially includes a feature scene and an adjacent end scene, the candidate frame is any frame in the adjacent end scene, and the obtaining the target clipping time based on the candidate time continuing for a preset duration includes: based on the alternative time corresponding to the alternative frame, the second time length is continued forwards to obtain a second clipping time;
the obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment includes: determining a second picture frame corresponding to the second clipping moment; and taking the second picture frame as a reference frame in the reference video.
Optionally, the candidate frame is an end frame in the adjacent end scene, and determining the candidate time corresponding to the candidate frame includes:
acquiring a preset adjacent end frame picture from a database, wherein the adjacent end frame picture is a picture corresponding to an end frame in the adjacent end scene;
searching an adjacent ending frame corresponding to the adjacent ending frame picture in the adjacent ending scene;
and determining the adjacent ending time of the adjacent ending frame in the adjacent ending scene, and taking the ending starting time as the alternative time.
Optionally, the determining a target start frame corresponding to the feature film start frame or a target end frame corresponding to the feature film end frame in the video to be edited includes:
determining a start frame identifier carried by the feature film start frame or an end frame identifier carried by the feature film end frame;
searching the start frame identifier or the end frame identifier by traversing the frame identifiers corresponding to all the picture frames of the video to be edited;
and in the video to be clipped, determining a target starting frame corresponding to the starting frame identification or a target ending frame corresponding to the ending frame identification, wherein the video to be clipped and the reference video adopt the same frame identification.
In a second aspect, there is provided a video frame determination apparatus, the apparatus comprising:
the device comprises an acquisition module, a judgment module and a display module, wherein the acquisition module is used for acquiring a video to be edited and a reference video corresponding to the video to be edited;
a first determining module, configured to determine a reference frame in the reference video, where the reference frame includes a film start frame or a film end frame of the reference video;
and the second determining module is used for determining a target starting frame corresponding to the feature film starting frame or a target ending frame corresponding to the feature film ending frame in the video to be edited.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing any of the method steps described herein when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, carries out any of the method steps.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
in the video clipping method provided by the embodiment of the application, the server obtains a video to be clipped and a reference video corresponding to the video to be clipped, determines a reference frame in the reference video, wherein the reference frame comprises a feature film start frame or a feature film end frame of the reference video, and finally determines a target start frame corresponding to the feature film start frame or a target end frame corresponding to the feature film end frame in the video to be clipped. According to the method and the device, the target start frame or the target end frame in the video to be edited is determined according to the frame matching, the video to be edited can be edited according to the target start frame or the target end frame, the accuracy of frame identification is improved, and therefore the accuracy of editing is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a method for determining a video frame according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for determining a reference frame according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of determining a reference frame according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of another method for determining a reference frame according to an embodiment of the present disclosure;
FIG. 5 is another diagram illustrating the determination of a reference frame according to an embodiment of the present application;
FIG. 6 is a further diagram illustrating the determination of a reference frame according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a video editing system according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of video frame determination according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a video frame determination method, which can be applied to a server and used for identifying a target start frame or a target end frame of a video to be clipped, so that video clipping is performed at the position of the target start frame or the position of the target end frame.
A detailed description will be given below of a video frame determination method provided in an embodiment of the present application with reference to a specific implementation manner, as shown in fig. 1, the specific steps are as follows:
step 101: and acquiring a video to be clipped and a reference video corresponding to the video to be clipped.
In the embodiment of the application, the server extracts the video to be clipped from the DVD video according to the DVD video provided by the film side, and takes the played video information of the television station as the reference video.
Step 102: determining a reference frame in the reference video, wherein the reference frame comprises a film start frame or a film end frame of the reference video.
In the embodiment of the present application, the reference video includes three types, which are an adjacent start scene + a feature scene, or a feature scene + an adjacent end scene, or an adjacent start scene + a feature scene + an adjacent end scene. Different types of reference videos may be used to obtain reference frames in different ways, which will be described in detail below.
The adjacent starting scene is a scene before the feature scene is played, and may only include a head-of-film song, or only include a front synopsis, or may include contents such as the head-of-film song and the front synopsis, and the adjacent ending scene is a scene after the feature scene is played, and may only include a next-episode notice, or may only include a last-episode song, or may include contents such as a next-episode notice and a last-episode song. The server determines alternative frames in an adjacent starting scene and/or an adjacent ending scene, determines alternative time corresponding to the alternative frames, then continues for a preset time length forwards or backwards based on the alternative time to obtain a reference frame, the reference frame comprises a positive starting frame or a positive ending frame of the determined positive scene, and the server stores the reference frame in a database.
Step 103: and determining a target starting frame corresponding to the film starting frame or a target ending frame corresponding to the film ending frame in the video to be edited.
In the embodiment of the application, the video to be edited and the reference video both comprise a plurality of picture frames, each picture frame has a corresponding frame identifier, and the same picture frame in the video to be edited and the reference video has the same frame identifier. The frame identifier may be used to uniquely identify the frame of the picture, and is illustratively a numerical value, a character, or the like.
The method comprises the steps that a server obtains a feature start frame or a feature end frame of a reference video from a database, a start frame identifier carried by the feature start frame or an end frame identifier carried by the feature end frame can be determined, the video to be edited and the reference video adopt the same frame identifier, so that the server can search the start frame identifier or the end frame identifier by traversing frame identifiers corresponding to all picture frames of the video to be edited, and the server determines a target start frame according to the start frame identifier or determines a target end frame according to the end frame identifier in the video to be edited.
In the application, the server can automatically match the target start frame or the target end frame in the video to be edited according to the reference frame of the reference video, and compared with the manual frame identification, the accuracy of frame identification is improved.
Optionally, the server pre-stores a correspondence between a video frame and a time, and after determining a target start frame or a target end frame of a video to be edited, the server may determine a target start time corresponding to the target start frame or a target end time corresponding to the target end frame according to the correspondence. The server can clip at the target starting time of the video to be clipped according to the target starting frame to obtain the clipped video containing the feature scene and the adjacent ending scene. The server can clip at the target end time of the video to be clipped according to the target end frame to obtain the clipped video containing the adjacent starting scene and the feature scene. The server can clip the video to be clipped at the target starting time and the target ending time according to the target starting frame and the target ending frame to obtain the clipped video containing the feature scene. The method and the device have the advantages that the automatic clipping mode is adopted, clipping efficiency is improved, and clipping accuracy is improved by adopting AI clipping.
As an alternative embodiment, determining a reference frame in a reference video includes: acquiring an alternative frame in a reference video, wherein the alternative frame is a picture frame in non-feature content of the reference video; determining an alternative time corresponding to the alternative frame; continuing a preset time length based on the alternative time length to obtain a target clipping time length, wherein the continuation of the preset time length is to execute forward continuation or backward continuation; and obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment.
In the embodiment of the application, the reference video sequentially comprises an adjacent starting scene, a positive scene and an adjacent ending scene, the server takes one picture frame in the adjacent starting scene or the adjacent ending scene as a candidate frame, and then the reference frame in the positive scene is determined through the candidate frame. Specifically, the server determines an alternative time corresponding to the alternative frame, then continues forward or backward for a preset time length based on the alternative time to obtain a target clipping time, and then takes a picture frame corresponding to the target clipping time as a reference frame. If the alternative frame is located in the adjacent starting scene, the reference frame can be obtained only by extending the preset time length backwards, and if the alternative frame is located in the adjacent ending scene, the reference frame can be obtained only by extending the preset time length forwards.
As an alternative implementation, as shown in fig. 2, the reference video sequentially includes an adjacent starting scene and a feature scene, the candidate frame is any frame in the adjacent starting scene, and obtaining the reference frame in the reference video includes:
step 201: based on the alternative time corresponding to the alternative frame in the adjacent starting scene, the first time length is continued backwards to obtain a first clipping time;
in the embodiment of the application, the server selects any one video frame from video frames in adjacent starting scenes as the alternative frame, and determines the alternative time corresponding to the alternative frame according to the corresponding relation between the video frame and the time. Since the candidate frame is located in the contiguous start scene, the server continues backward for a first duration to get the first clipping instant.
The server starts from the alternative time in the adjacent starting scene and continues backwards for a first sub-time length to obtain a first clipping sub-time length, wherein the first sub-time length corresponds to a feature film starting frame in the feature film scene, and the first sub-time length is the time length from the alternative frame to the feature film starting frame; and the server continues a second sub-duration backwards from the alternative time to obtain a second clipping sub-time, wherein the second sub-time corresponds to a feature film ending frame in the feature film scene, and the second sub-duration comprises the first sub-duration and the feature film duration. Thus, the server can obtain the film start frame and the film end frame according to the alternative frames in the adjacent start scene.
As shown in fig. 3, the candidate frame a is a video frame in an adjacent starting scene, the film start frame corresponds to a, and the film end frame corresponds to b, the candidate frame a extends backward for a first sub-duration 1 to a point a, and the candidate frame a extends backward for a second sub-duration 2 to a point b.
Step 202: and determining a first picture frame corresponding to the first clipping moment, and taking the first picture frame as a reference frame in the reference video.
In the embodiment of the application, the server determines that the first clipping moment corresponds to a first picture frame in a feature scene according to the corresponding relation between the video frames and the moments, and the server takes the first picture frame as a reference frame in a reference video.
In the application, the server can start from any frame adjacent to the initial scene and continue for the first duration from the beginning to the end to obtain the film initial frame or the film ending frame in the film scene, so that the searching efficiency is improved.
As an optional implementation manner, the candidate frame is a starting frame in an adjacent starting scene, and determining the candidate time corresponding to the candidate frame includes: acquiring a preset adjacent starting frame picture from a database, wherein the adjacent starting frame picture is a picture corresponding to a starting frame in an adjacent starting scene; searching an adjacent initial frame corresponding to the adjacent initial frame picture in the adjacent initial scene; and determining the adjacent starting time of the adjacent starting frame in the adjacent starting scene, and taking the adjacent starting time as the alternative time. The server starts from the adjacent starting time, takes the time length of the adjacent starting scene which is continued backwards as a first sub-time length, and takes the video frame corresponding to the time as a positive film starting frame; and the server starts from the adjacent starting time, takes the total time length which continues the adjacent starting scene and the feature scene backwards as a second sub-time length, and takes the video frame corresponding to the time as a feature ending frame.
In the embodiment of the present application, the database stores a picture of an adjacent start frame corresponding to a start frame of an adjacent start scene in advance, and the picture of the adjacent start frame is, for example, a picture corresponding to a start frame of a movie title, and may also be a picture corresponding to a start frame of a previous review.
If the adjacent initial frame picture is the picture corresponding to the initial frame of the beginning song, the server acquires the adjacent initial frame picture from the database and searches the adjacent initial frame corresponding to the adjacent initial frame picture in the adjacent initial scene, namely the first frame in the beginning song. The server determines the adjacent starting time of the adjacent starting frame in the start of title, and takes the adjacent starting time as the alternative time. And the server continues the duration of the head of the film + the duration of the previous review from the alternative moment backwards to obtain a film starting frame, and continues the duration of the head of the film + the duration of the previous review + the film scene backwards to obtain a film ending frame.
If the adjacent initial frame picture is the picture corresponding to the initial frame of the antecedent review, the server acquires the adjacent initial frame picture from the database and searches the adjacent initial frame corresponding to the adjacent initial frame picture in the adjacent initial scene, namely the initial frame in the antecedent review. The server determines the adjacent starting time of the adjacent starting frame in the previous emotion review, and takes the adjacent starting time as the alternative time. And the server continues the duration of the antecedent review backwards from the alternative moment to obtain a film starting frame, and continues the duration of the antecedent review + film scene backwards to obtain a film ending frame.
In the method, the server determines the adjacent starting time corresponding to the adjacent starting frame, and as the duration of the content such as the initial song, the antecedent review and the like in the adjacent starting scene is basically fixed, the first duration is continued backwards from the adjacent starting time, the reference frame is searched in an automatic mode, the searching duration is shortened, and the searching efficiency is improved.
As an alternative embodiment, since the adjacent starting scene of the reference video contains the advertisement, the advertisement in the reference video of different episodes may be changed, and there may be a difference in the time lengths of different advertisements, so that the video frame corresponding to the first clipping time obtained by extending the adjacent starting time backward for the first time length may not be the reference frame. The server takes the video frame corresponding to the first clipping moment as a first frame to be selected, and then determines a first frame set to which the first frame to be selected belongs, wherein the first frame set comprises a plurality of frame frames positioned before the first frame to be selected, the first frame to be selected and a plurality of frame frames positioned after the first frame to be selected. The server acquires the preset frame picture, and then searches the reference frame in the first frame set according to the preset frame picture, so that the searching accuracy of the reference frame can be improved.
For example, the preset frame picture is a picture of the target start frame, the picture of the target start frame may be a black screen and display an "xth set", and the server finds the feature film start frame in the first frame set according to the "xth set" of the black screen.
As an optional implementation manner, as shown in fig. 4, the reference video sequentially includes a feature scene and an adjacent end scene, the candidate frame is any frame in the adjacent end scene, and obtaining the reference frame in the reference video includes:
step 401: and based on the alternative time corresponding to the alternative frame, the second time length is continued forwards to obtain a second clipping time.
In the embodiment of the application, the server selects any one video frame from video frames in adjacent ending scenes as the alternative frame, and determines the alternative ending time corresponding to the alternative ending frame according to the corresponding relation between the video frame and the time. Since the candidate frame is located in the contiguous ending scene, the server continues forward for a second duration before the second clipping instant is available.
The server continues a third sub-time length from the alternative time to the front to obtain a third clipping sub-time length, wherein the third clipping sub-time length corresponds to a feature film ending frame in the feature film scene, and the third sub-time length comprises the time length from the alternative frame to the feature film ending frame; and the server continues a fourth sub-duration from the alternative time to the front to obtain a fourth clipping sub-time, wherein the fourth clipping sub-time corresponds to a feature film starting frame in the feature film scene, and the fourth sub-duration comprises a third sub-duration and a feature film duration. Thus, the server can obtain the film start frame and the film end frame according to the alternative frames in the adjacent end scene.
As shown in fig. 5, the candidate frame B is a video frame in the adjacent ending scene, the start frame of the feature film corresponds to a, the end frame of the feature film corresponds to B, the candidate frame B extends forward for a third sub-duration 3 to a point B, and the candidate frame B extends forward for a fourth sub-duration 4 to a point a.
Step 402: and determining a second picture frame corresponding to the second clipping moment, and taking the second picture frame as a reference frame in the reference video.
In the embodiment of the application, the server determines a second picture frame in the feature scene corresponding to the second clipping moment according to the corresponding relation between the video frame and the moment, and the server takes the second picture frame as a reference frame in the reference video.
In the application, the server can continue the second duration from any frame in the adjacent ending scene to obtain the film starting frame or the film ending frame in the film scene, so that the searching efficiency is improved.
The reference video sequentially comprises a feature start scene, a feature scene and an adjacent end scene, the alternative frames comprise any frame in the adjacent start scene and any frame in the adjacent end scene, and the process of obtaining the reference frames in the reference video comprises the following steps: the server starts from the alternative time in the adjacent starting scene and continues backwards for a first sub-time length to obtain a first clipping sub-time length, wherein the first sub-time length corresponds to the feature film starting frame in the feature film scene, and the first sub-time length is the time length from the alternative frame in the adjacent starting scene to the feature film starting frame; and the server continues a fourth sub-time length from the alternative time in the adjacent ending scene to the front to obtain a fourth clipping sub-time length, wherein the fourth sub-time length corresponds to the front ending frame in the front scene, and the fourth sub-time length is the time length from the alternative frame in the adjacent ending scene to the front ending frame. Thus, the server can obtain the film starting frame according to the alternative frame in the adjacent starting scene and obtain the film ending frame according to the alternative frame in the adjacent ending scene.
As shown in fig. 6, the candidate frame a is a video frame in the adjacent starting scene, the candidate frame B is a video frame in the adjacent ending scene, the positive starting frame corresponds to a, the positive ending frame corresponds to B, the candidate frame a extends backward for a first sub-duration 1 to reach a point a, and the candidate frame B extends forward for a third sub-duration 3 to reach a point B.
As an optional implementation manner, the candidate frame is an end frame in an adjacent end scene, and determining the candidate time corresponding to the candidate frame includes: acquiring a preset adjacent end frame picture from a database, wherein the adjacent end frame picture is a picture corresponding to an end frame in an adjacent end scene; in the adjacent ending scene, searching an adjacent ending frame corresponding to the adjacent ending frame picture; and determining the adjacent ending time of the adjacent ending frame in the adjacent ending scene, and taking the ending starting time as the alternative time.
In the embodiment of the present application, an adjacent end frame screen corresponding to an end frame adjacent to an end scene is prestored in the database, and the adjacent end frame screen may be a screen corresponding to an end frame of a trailer as an example, or may be a screen corresponding to an end frame of a previous review. The server acquires the adjacent ending frame picture from the database and determines the corresponding adjacent ending frame of the adjacent ending frame picture in the adjacent ending scene, namely the last frame in the adjacent ending scene. The server determines an adjacency ending time of the adjacency ending frame in the adjacency ending scene, and takes the adjacency ending time as an alternative time. The server starts from the adjacent ending time, takes the time length in the adjacent ending scene which continues forward as a second time length, and takes the video frame corresponding to the time as a film ending frame; and the server takes the total duration in the adjacent ending scene and the feature film scene which continue forwards as a second duration from the adjacent ending time, and takes the video frame corresponding to the time as a feature film starting frame.
In the present application, an adjacent end frame screen corresponding to an end frame adjacent to an end scene is stored in advance in the database, and the adjacent end frame screen is illustratively a screen corresponding to an end frame in a trailer or a screen corresponding to an end frame in a next episode.
If the adjacent ending frame picture is the picture corresponding to the ending frame of the trailer, the server acquires the adjacent ending frame picture from the database and searches the adjacent ending frame corresponding to the adjacent ending frame picture in the adjacent ending scene, namely the trailer in the trailer. The server determines the adjacent ending time of the adjacent ending frame in the trailer and takes the adjacent ending time as the alternative time. And the server continues the trailer song plus the duration of the next collection forecast from the alternative moment forward to obtain the trailer ending frame, and continues the trailer song plus the duration of the next collection forecast plus the trailer scene forward to obtain the trailer starting frame.
If the adjacent ending frame picture is the picture corresponding to the ending frame of the next-episode announcement, the server acquires the adjacent ending frame picture from the database and searches the adjacent ending frame corresponding to the adjacent ending frame picture in the adjacent ending scene, namely the tail frame in the next-episode announcement. The server determines the adjacency ending time of the adjacency ending frame in the next-set announcement, and takes the adjacency ending time as the alternative time. And the server continues the duration of the next episode of forecast forward from the alternative moment to obtain a positive ending frame, and continues the duration of the next episode of forecast plus the positive scene forward to obtain a positive starting frame.
In the application, the server determines the adjacency ending time corresponding to the adjacency ending frame, and because the duration of the content such as the trailer, the next episode announcement and the like in the adjacency ending scene is basically a fixed duration, the first duration is continued from the adjacency ending time to the front, so that the search duration is shortened, and the search efficiency is improved.
As an alternative embodiment, the server continues from the end time of the adjacency forward for a second length of time, resulting in a second clipping time. Since the adjacent end scene of the reference video contains the advertisement, the advertisement in the reference video of different episodes will be changed, and the time lengths of different advertisements will have differences, the video frame corresponding to the second clipping time may not be the reference frame. And the server takes the video frame corresponding to the second clipping moment as a second frame to be selected, and then determines a second frame set of the second frame to be selected, wherein the second frame set comprises a plurality of picture frames positioned before the second frame to be selected, the second frame to be selected and a plurality of picture frames positioned after the second frame to be selected. The server acquires the preset frame picture, and then searches the reference frame in the second frame set according to the preset frame picture, so that the searching accuracy of the reference frame can be improved.
Illustratively, the preset frame picture is a first frame picture in the near ending scene, the first frame picture in the near ending scene may be an advertisement first frame picture, and the server searches for the advertisement first frame in the second frame set and takes a previous frame of the advertisement first frame as a target ending frame.
As an alternative implementation, a clipped video is obtained after the video to be clipped is clipped, where the clipped video may include at least two target episodes, and since each target episode includes one adjacent start scene and one adjacent end scene, the adjacent start scene and the adjacent end scene between the target episodes need to be deleted according to the episode order, so as to obtain a coherent clipped video that only contains feature content.
The edited video can comprise a target episode, and a target starting frame and a target ending frame in the edited video can be identified, so that a prompter retrospective scene is added before the target starting frame or a posterous scene is added after the target ending frame.
Based on the same technical concept, the embodiment of the present application further provides a video clip system, as shown in fig. 7, the system includes a task module 1, an AI service module 2, and an auditing module 3. The task module 1 acquires a video to be edited and a reference video, the task module 1 takes a TV stream resource as the reference video, takes a DVD stream resource as the video to be edited, and sends the TV stream resource and the DVD stream resource to the AI service module 2, the AI service module 2 identifies a feature film start frame and a feature film end frame in the reference video, stores the feature film start frame and the feature film end frame in a database, then determines a target start frame in the video to be edited according to the feature film start frame, determines a target end frame in the video to be edited according to the feature film end frame, and edits the video to be edited. The AI service module 2 sends the clipped video to the auditing module 3 for auditing, and if the auditing module 3 determines that the video content at the episode connection part of the clipped video is the same as the video content of the reference video, the video editing is successful after the auditing is determined to be passed.
Based on the same technical concept, an embodiment of the present application further provides a video frame determination apparatus, as shown in fig. 8, the apparatus includes:
an obtaining module 801, configured to obtain a video to be clipped and a reference video corresponding to the video to be clipped;
a first determining module 802, configured to determine a reference frame in a reference video, where the reference frame includes a film start frame or a film end frame of the reference video;
a second determining module 802, configured to determine a target start frame corresponding to the feature start frame or a target end frame corresponding to the feature end frame in the video to be clipped.
Optionally, the first determining module 802 includes:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring an alternative frame in a reference video, and the alternative frame is a picture frame in non-feature content of the reference video;
a determining unit, configured to determine an alternative time corresponding to the alternative frame;
the first obtaining unit is used for continuing a preset time length based on the alternative time length to obtain the target clipping time length, wherein the preset time length is continued forwards or backwards;
and the second obtaining unit is used for obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment.
Optionally, the reference video sequentially includes a neighboring start scene and a feature scene, and the first obtaining unit includes:
the first continuation subunit is used for continuing the first time length backwards to obtain a first clipping time based on the alternative time corresponding to the alternative frame in the adjacent starting scene;
the second obtaining unit includes:
the first determining subunit is used for determining a first picture frame corresponding to the first clipping moment;
the first as a subunit is configured to use the first picture frame as a reference frame in a reference video.
Optionally, the alternative frame is a starting frame in an adjacent starting scene, and the first continuation subunit includes:
the first acquisition submodule is used for acquiring a preset adjacent starting frame picture from a database, wherein the adjacent starting frame picture is a picture corresponding to a starting frame in an adjacent starting scene;
the first searching submodule is used for searching an adjacent initial frame corresponding to an adjacent initial frame picture in an adjacent initial scene;
and the first determining submodule is used for determining the adjacent starting time of the adjacent starting frame in the adjacent starting scene and taking the adjacent starting time as the alternative time.
Optionally, the reference video sequentially includes a feature scene and an adjacent end scene, the candidate frame is any frame in the adjacent end scene, and the first obtaining unit includes:
the second continuation subunit is used for continuing the second duration forward to obtain a second clipping time based on the alternative time corresponding to the alternative frame;
the second obtaining unit includes:
the second determining subunit is used for determining a second picture frame corresponding to the second clipping moment;
and the second as a subunit for using the second picture frame as a reference frame in the reference video.
Optionally, the second continuation subunit comprises:
the second acquisition submodule is used for acquiring a preset adjacent end frame picture from the database, wherein the adjacent end frame picture is a picture corresponding to an end frame in an adjacent end scene;
the second searching submodule is used for searching an adjacent ending frame corresponding to the adjacent ending frame picture in the adjacent ending scene;
and the second determining submodule is used for determining the adjacent ending time of the adjacent ending frame in the adjacent ending scene and taking the ending starting time as the alternative time.
Optionally, the second determining module 803 includes:
a third determining module, configured to determine a start frame identifier carried by the feature film start frame or an end frame identifier carried by the feature film end frame;
the traversal module is used for finding the start frame identifier or the end frame identifier by traversing the frame identifiers corresponding to all the picture frames of the video to be edited;
and the fourth determining module is used for determining a target starting frame corresponding to the starting frame identifier or a target ending frame corresponding to the ending frame identifier in the video to be edited, wherein the video to be edited and the reference video adopt the same frame identifier.
Based on the same technical concept, an embodiment of the present invention further provides an electronic device, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the above steps when executing the program stored in the memory 903.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In a further embodiment provided by the present invention, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the methods described above.
In a further embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for video frame determination, the method comprising:
acquiring a video to be edited and a reference video corresponding to the video to be edited;
determining a reference frame in the reference video, wherein the reference frame comprises a film start frame or a film end frame of the reference video;
and determining a target starting frame corresponding to the feature film starting frame or a target ending frame corresponding to the feature film ending frame in the video to be edited.
2. The method of claim 1, wherein the determining the reference frame in the reference video comprises:
acquiring an alternative frame in the reference video, wherein the alternative frame is a picture frame in non-feature content of the reference video;
determining an alternative time corresponding to the alternative frame;
continuing a preset time length based on the alternative time length to obtain a target clipping time length, wherein the preset time length is continued forwards or backwards;
and obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment.
3. The method according to claim 2, wherein the reference video sequentially includes an adjacent starting scene and a feature scene, the candidate frame is any frame in the adjacent starting scene, and the extending for a preset duration based on the candidate time obtains a target clipping time, including: based on the alternative time corresponding to the alternative frame in the adjacent starting scene, a first clipping time is obtained by extending backwards for a first time length;
the obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment includes: determining a first picture frame corresponding to the first clipping moment; and taking the first picture frame as a reference frame in the reference video.
4. The method according to claim 3, wherein the candidate frame is a starting frame in the adjacent starting scene, and determining the candidate time corresponding to the candidate frame comprises:
acquiring a preset adjacent starting frame picture from a database, wherein the adjacent starting frame picture is a picture corresponding to a starting frame in the adjacent starting scene;
searching for an adjacent starting frame corresponding to the adjacent starting frame picture in the adjacent starting scene;
and determining the adjacent starting time of the adjacent starting frame in the adjacent starting scene, and taking the adjacent starting time as the alternative time.
5. The method of claim 2, wherein the reference video sequentially includes a feature scene and an adjacent end scene, the candidate frame is any frame in the adjacent end scene, and the obtaining the target clipping time based on the candidate time extending for a preset duration comprises: based on the alternative time corresponding to the alternative frame, the second time length is continued forwards to obtain a second clipping time;
the obtaining a reference frame in the reference video according to the picture frame corresponding to the target clipping moment includes: determining a second picture frame corresponding to the second clipping moment; and taking the second picture frame as a reference frame in the reference video.
6. The method of claim 5, wherein the candidate frame is an end frame in the contiguous end scene, and determining the candidate time corresponding to the candidate frame comprises:
acquiring a preset adjacent end frame picture from a database, wherein the adjacent end frame picture is a picture corresponding to an end frame in the adjacent end scene;
searching an adjacent ending frame corresponding to the adjacent ending frame picture in the adjacent ending scene;
and determining the adjacent ending time of the adjacent ending frame in the adjacent ending scene, and taking the ending starting time as the alternative time.
7. The method of claim 1, wherein the determining a target start frame or a target end frame corresponding to the positive start frame in the video to be edited comprises:
determining a start frame identifier carried by the feature film start frame or an end frame identifier carried by the feature film end frame;
searching the start frame identifier or the end frame identifier by traversing the frame identifiers corresponding to all the picture frames of the video to be edited;
and in the video to be clipped, determining a target starting frame corresponding to the starting frame identification or a target ending frame corresponding to the ending frame identification, wherein the video to be clipped and the reference video adopt the same frame identification.
8. An apparatus for video frame determination, the apparatus comprising:
the device comprises an acquisition module, a judgment module and a display module, wherein the acquisition module is used for acquiring a video to be edited and a reference video corresponding to the video to be edited;
a first determining module, configured to determine a reference frame in the reference video, where the reference frame includes a film start frame or a film end frame of the reference video;
and the second determining module is used for determining a target starting frame corresponding to the feature film starting frame or a target ending frame corresponding to the feature film ending frame in the video to be edited.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202011540143.3A 2020-12-23 2020-12-23 Video frame determination method and device, electronic equipment and computer readable medium Active CN112770176B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011540143.3A CN112770176B (en) 2020-12-23 2020-12-23 Video frame determination method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011540143.3A CN112770176B (en) 2020-12-23 2020-12-23 Video frame determination method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN112770176A true CN112770176A (en) 2021-05-07
CN112770176B CN112770176B (en) 2022-10-25

Family

ID=75694770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011540143.3A Active CN112770176B (en) 2020-12-23 2020-12-23 Video frame determination method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN112770176B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914738B (en) * 2022-11-08 2024-06-04 北京奇艺世纪科技有限公司 Video generation method, device, server and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716676A (en) * 2013-12-30 2014-04-09 深圳Tcl新技术有限公司 Video program broadcasting method and device for smart television
WO2018086303A1 (en) * 2016-11-14 2018-05-17 武汉斗鱼网络科技有限公司 Advertisement inter-cut method and device, and readable storage medium
CN108769731A (en) * 2018-05-25 2018-11-06 北京奇艺世纪科技有限公司 The method, apparatus and electronic equipment of target video segment in a kind of detection video
CN110290419A (en) * 2019-06-25 2019-09-27 北京奇艺世纪科技有限公司 Video broadcasting method, device and electronic equipment
CN110858921A (en) * 2018-08-22 2020-03-03 北京优酷科技有限公司 Program video processing method and device
CN110915224A (en) * 2018-08-01 2020-03-24 深圳市大疆创新科技有限公司 Video editing method, device, equipment and storage medium
CN111356015A (en) * 2020-02-25 2020-06-30 北京奇艺世纪科技有限公司 Duplicate video detection method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716676A (en) * 2013-12-30 2014-04-09 深圳Tcl新技术有限公司 Video program broadcasting method and device for smart television
WO2018086303A1 (en) * 2016-11-14 2018-05-17 武汉斗鱼网络科技有限公司 Advertisement inter-cut method and device, and readable storage medium
CN108769731A (en) * 2018-05-25 2018-11-06 北京奇艺世纪科技有限公司 The method, apparatus and electronic equipment of target video segment in a kind of detection video
CN110915224A (en) * 2018-08-01 2020-03-24 深圳市大疆创新科技有限公司 Video editing method, device, equipment and storage medium
CN110858921A (en) * 2018-08-22 2020-03-03 北京优酷科技有限公司 Program video processing method and device
CN110290419A (en) * 2019-06-25 2019-09-27 北京奇艺世纪科技有限公司 Video broadcasting method, device and electronic equipment
CN111356015A (en) * 2020-02-25 2020-06-30 北京奇艺世纪科技有限公司 Duplicate video detection method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914738B (en) * 2022-11-08 2024-06-04 北京奇艺世纪科技有限公司 Video generation method, device, server and storage medium

Also Published As

Publication number Publication date
CN112770176B (en) 2022-10-25

Similar Documents

Publication Publication Date Title
US10231023B2 (en) Media fingerprinting for content determination and retrieval
CN108235141B (en) Method, device, server and storage medium for converting live video into fragmented video on demand
WO2019109643A1 (en) Video recommendation method and apparatus, and computer device and storage medium
US9113217B2 (en) Media fingerprinting for social networking
CN110913241B (en) Video retrieval method and device, electronic equipment and storage medium
CN109168037B (en) Video playing method and device
CN102163212B (en) Video segment identification
US20220021952A1 (en) Determining A Popularity Metric for Media Content
JP2021052416A (en) System and method for linking advertisement in streaming content
US20070130611A1 (en) Triggerless interactive television
CN103581705A (en) Method and system for recognizing video program
JP2009239729A (en) Device, method and program for informing content scene appearance
CN110674345A (en) Video searching method and device and server
US10795932B2 (en) Method and apparatus for generating title and keyframe of video
CN108616769B (en) Video-on-demand method and device
WO2020078676A1 (en) Methods and apparatus for generating a video clip
CN107948718B (en) Program information processing method, device and system
CN104581226A (en) Method and device for recommending programs by aiming at current live stream
CN112770176B (en) Video frame determination method and device, electronic equipment and computer readable medium
CN114245229B (en) Short video production method, device, equipment and storage medium
CN109101964B (en) Method, device and storage medium for determining head and tail areas in multimedia file
CN115080792A (en) Video association method and device, electronic equipment and storage medium
CN105227355A (en) A kind of multimedia play list management method, Apparatus and system
CN111405373B (en) Method and device for acquiring video stream
CN115022663A (en) Live stream processing method and device, electronic equipment and medium

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