CN114245174B - Video preview method and related equipment - Google Patents

Video preview method and related equipment Download PDF

Info

Publication number
CN114245174B
CN114245174B CN202111489959.2A CN202111489959A CN114245174B CN 114245174 B CN114245174 B CN 114245174B CN 202111489959 A CN202111489959 A CN 202111489959A CN 114245174 B CN114245174 B CN 114245174B
Authority
CN
China
Prior art keywords
video
previewed
animation
target
video frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111489959.2A
Other languages
Chinese (zh)
Other versions
CN114245174A (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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202111489959.2A priority Critical patent/CN114245174B/en
Publication of CN114245174A publication Critical patent/CN114245174A/en
Application granted granted Critical
Publication of CN114245174B publication Critical patent/CN114245174B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • 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, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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/44012Processing 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 rendering scenes according to scene graphs, e.g. MPEG-4 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/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/4402Processing 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 reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Abstract

The application discloses a video preview method and related equipment; a video to be previewed can be acquired, wherein the video to be previewed comprises at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed. According to the method and the device for synthesizing the video, the target video frames of different scenes can be synthesized into the animation, so that when a user searches the video, the user can intuitively know the approximate content of the video through the animation, the whole video does not need to be played, and the video searching efficiency is improved.

Description

Video preview method and related equipment
Technical Field
The application relates to the technical field of computers, in particular to a video preview method and related equipment.
Background
With the development of computer technology and network technology, the storage space of smart phones is increasingly larger, and in addition, the data storage capacity of cloud disk storage space and servers is also continuously increased, so that more and more people choose to record life in a video-using mode.
However, in the related art, when viewing a video, a user usually only sees a certain frame of the video, and if the user wants to roughly know the video, the user needs to click to play the whole video. For example, when a user turns over a video in an album or a cloud disk space of a mobile phone system, the user needs to guess the content of the video according to one frame of the frame because the preview page only displays one frame of the video, so that the video searching is performed, the user is inconvenient to search the video, and the searching efficiency of the user on the video is low.
Disclosure of Invention
The embodiment of the application provides a video preview method and related equipment, wherein the related equipment can comprise a video preview device, electronic equipment, a computer readable storage medium and a computer program product, and can improve the searching efficiency of videos.
The embodiment of the application provides a video preview method, which comprises the following steps:
Acquiring a video to be previewed, wherein the video to be previewed comprises at least one video frame;
performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame;
selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes;
synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed;
and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed.
Accordingly, an embodiment of the present application provides a video preview device, including:
the device comprises an acquisition unit, a video processing unit and a video processing unit, wherein the acquisition unit is used for acquiring a video to be previewed, and the video to be previewed comprises at least one video frame;
the identification unit is used for carrying out scene identification on each video frame in the video to be previewed to obtain a scene identification result of each video frame;
the selecting unit is used for selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes;
The synthesizing unit is used for synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed;
and the display unit is used for responding to the viewing operation of the video to be previewed and displaying the animation corresponding to the video to be previewed.
Optionally, in some embodiments of the present application, the video previewing apparatus may further include a path fusion unit, where the path fusion unit is configured to obtain a storage path corresponding to the video to be previewed; and fusing the storage path with the animation corresponding to the video to be previewed to obtain the fused animation.
Optionally, in some embodiments of the present application, the video preview device may further include a video playing unit, where the video playing unit is configured to perform path analysis on the animation in response to a video playing operation for the animation, so as to obtain a storage path corresponding to the video to be previewed; and acquiring and playing the video to be previewed through the storage path.
Optionally, in some embodiments of the present application, the video preview device may further include a skip play unit, where the skip play unit is configured to determine, in response to a play operation for a target video frame in the animation, time information of a target scene corresponding to the selected target video frame; determining a target video clip to be played in the video to be previewed based on the time information; and skipping to play the target video clip.
Optionally, in some embodiments of the present application, the step of "determining, in response to a selection playing operation for a target video frame in the animation, time information of a target scene corresponding to the selected target video frame" may include:
responding to a selective playing operation for a target video frame in the animation, and acquiring a video tag file, wherein the video tag file comprises a preset scene and a mapping relation between time information corresponding to the preset scene;
and determining time information corresponding to the target scene according to the video tag file and the target scene corresponding to the selected target video frame.
Optionally, in some embodiments of the present application, the selecting unit may be specifically configured to determine, for each video frame in the video to be previewed, the video frame as the target video frame when a difference between a scene recognition result corresponding to the video frame and a scene recognition result corresponding to a previous video frame is greater than a preset value.
The electronic device provided by the embodiment of the application comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the steps in the video preview method provided by the embodiment of the application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps in the video preview method provided by the embodiment of the application.
In addition, the embodiment of the application further provides a computer program product, which comprises a computer program or instructions, and the computer program or instructions implement the steps in the video preview method provided by the embodiment of the application when being executed by a processor.
The embodiment of the application provides a video preview method and related equipment, which can acquire a video to be previewed, wherein the video to be previewed comprises at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed. According to the method and the device for synthesizing the video, the target video frames of different scenes can be synthesized into the animation, so that when a user searches the video, the user can intuitively know the approximate content of the video through the animation, the whole video does not need to be played, and the video searching efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1a is a schematic view of a video preview method according to an embodiment of the present application;
FIG. 1b is a flowchart of a video preview method provided by an embodiment of the present application;
fig. 1c is a frame diagram of a video preview method provided in an embodiment of the present application;
fig. 1d is a schematic page diagram of a video preview method provided in an embodiment of the present application;
FIG. 1e is another flow chart of a video preview method provided by an embodiment of the present application;
FIG. 1f is another flowchart of a video preview method provided by an embodiment of the present application;
FIG. 2 is another flow chart of a video preview method provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a video preview device provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Embodiments of the present application provide a video preview method and related devices, which may include video previewing apparatuses, electronic devices, computer-readable storage media, and computer program products. The video preview device may be integrated in an electronic device, which may be a terminal or a server.
It will be appreciated that the video preview method of this embodiment may be performed on the terminal, may be performed on the server, or may be performed by both the terminal and the server. The above examples should not be construed as limiting the present application.
As shown in fig. 1a, an example is a method in which a terminal and a server perform video preview together. The video preview system provided by the embodiment of the application comprises a terminal 10, a server 11 and the like; the terminal 10 and the server 11 are connected via a network, for example, a wired or wireless network connection, wherein the video preview device may be integrated in the server.
Wherein, the server 11 can be used for: acquiring a video to be previewed, wherein the video to be previewed comprises at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and sending the animation corresponding to the video to be previewed to the terminal 10. The server 11 may be a single server, or may be a server cluster or cloud server composed of a plurality of servers.
Wherein the terminal 10 may be configured to: and receiving the animation corresponding to the video to be previewed, which is sent by the server 11, and displaying the animation corresponding to the video to be previewed in response to the viewing operation of the video to be previewed. The terminal 10 may include a mobile phone, a smart tv, a tablet computer, a notebook computer, or a personal computer (PC, personal Computer), among others. A client may also be provided on the terminal 10, which may be an application client or a browser client, etc.
The step of synthesizing the animation by the server 11 may be executed by the terminal 10.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the viewpoint of a video preview apparatus, which may be integrated in an electronic device, which may be a server or a terminal, or the like.
As shown in fig. 1b, the specific flow of the video preview method may be as follows:
101. and acquiring a video to be previewed, wherein the video to be previewed comprises at least one video frame.
The video to be previewed may be a video in an image database of the terminal, such as a video in an album of a smart phone, a video in a cloud disk, a video corresponding to a video link, or the like, which is not limited in this embodiment.
The embodiment does not limit the video type and the video duration of the video to be previewed. For example, the video type of the video to be previewed may include science, technology, entertainment, agriculture, etc., and the video duration may be 10 seconds, 1 hour, etc.
102. And carrying out scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame.
In general, the video to be previewed may include one or more scenes, and different video frames may correspond to different scenes, which may include objects such as characters, flowers, beaches, sky, sea, fruits, and so on. Through scene recognition, scene content corresponding to each video frame can be obtained.
In some embodiments, a scene recognition may be performed on each video frame of the video to be previewed through an artificial intelligence (Artificial Intelligence, AI) detection algorithm, so as to obtain each scene included in the video to be previewed and time information corresponding to each scene, where the time information may specifically include a start time point and an end time point of a corresponding scene, where the start time point specifically is a time point corresponding to a video frame in the video to be previewed when the scene appears first, and the end time point specifically may be a time point corresponding to a video frame in the video to be previewed when the scene appears last.
Specifically, performing scene recognition on a video frame may include performing feature extraction on the video frame through a neural network model to obtain feature information corresponding to the video frame, predicting probability that the video frame belongs to each preset scene type based on the feature information, and determining a scene type corresponding to the video frame from each preset scene type according to the probability. For example, the preset scene type with the highest probability may be used as the scene type corresponding to the video frame.
The types of the neural Network model may be various, for example, a visual geometry group Network (VGGNet, visual Geometry Group Network), a Residual Network (res net, residual Network), a dense connection convolutional Network (densenett, dense Convolutional Network), and the like, but it should be understood that the neural Network of the present embodiment is not limited to only the above listed types.
103. And selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes.
Optionally, in this embodiment, the step of selecting, based on the scene recognition result, at least one target video frame from the video frames in the video to be previewed may include:
and for each video frame in the video to be previewed, determining the video frame as a target video frame when the difference degree of the scene recognition result corresponding to the video frame and the scene recognition result corresponding to the previous video frame is larger than a preset value.
The preset value may be set according to practical situations, which is not limited in this embodiment.
The calculation method of the difference degree of the scene recognition result corresponding to the video frame and the previous video frame may be as follows:
Extracting the characteristics of the video frame to obtain first characteristic information corresponding to the video frame;
extracting features of a previous video frame of the video frame to obtain second feature information corresponding to the previous video frame;
calculating the similarity between the first characteristic information and the second characteristic information;
and determining the difference degree of the scene recognition result corresponding to the video frame and the scene recognition result corresponding to the previous video frame according to the similarity.
Wherein, the higher the similarity, the smaller the difference; conversely, the lower the similarity, the greater the degree of variance.
In some embodiments, the video to be previewed may specifically be a video being recorded, in which the embodiment may identify, in real time, a scene of a recorded video frame during the recording process, and for each recorded video frame, when identifying that the difference between the video frame and a previous video frame is large, determine the video frame as a target video frame, and record a time point corresponding to the target video frame, where the time point may represent a start time point of a scene corresponding to the target video frame, and may also represent an end time point of a scene corresponding to the previous video frame of the target video frame. When the video recording is completed, target video frames corresponding to different scenes in the video to be previewed can be obtained.
In another embodiment, the video to be previewed may be a video in a cloud disk, and in this embodiment, frame-by-frame analysis may be performed on a video that does not compose an animation, so as to obtain each video frame of the video, then each video frame is subjected to scene recognition, and if a scene change corresponding to a certain video frame is recognized, the video frame is saved, so as to obtain a target video frame corresponding to each scene in the video to be previewed.
The target video frame may be obtained from each video frame of the video to be previewed based on a scene recognition result of each video frame of the video to be previewed. Specifically, the extraction of the target video frame may be performed from the front to the back from the first video frame of the video to be previewed, or may be performed from the back to the front from the last video frame of the video to be previewed. In the extraction process of the target video frame, when the difference degree of the scene recognition results of the video frame and the previous video frame is larger than a preset value, the video frame can be extracted as the target video frame; the currently detected video frame may also be extracted as the target video frame when no new scene is detected or no new scene is detected beyond a preset duration (e.g., 5 seconds).
The preset duration may be set according to an actual situation, for example, may be set according to a duration of a video to be previewed, for example, the duration of the video exceeds 1 hour, and the preset duration may be set to 10 seconds.
104. And synthesizing the at least one target video frame to obtain the animation corresponding to the video to be previewed.
The animation format is various, and the present embodiment is not limited thereto. For example, the animation may be an animation of gif (CompuServe Graphics Interchange Format, graphic interchange format). It will be appreciated that the animation may also be considered as a small video (a video of a shorter duration) synthesized from the individual target video frames.
105. And responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed.
The view operation may be a click operation, a slide operation, or the like, and this embodiment is not limited thereto.
In some embodiments, the viewing operation of the video to be previewed may be a viewing operation of a video database to which the video to be previewed belongs, and in response to the viewing operation, a preview page may be displayed, where the preview page includes one or more videos, and animations corresponding to the videos are automatically played and displayed in the preview page; in other embodiments, the viewing operation of the video to be previewed may also be a clicking operation of the video to be previewed in the video database, and in response to the clicking operation, playing an animation corresponding to the video to be previewed.
For example, the video to be previewed is a video in an image database (such as an album in a smart phone), and when a user views the video in the album, an animation corresponding to the video can be automatically played, so that the user can intuitively know the approximate content of the corresponding video when browsing the album, and does not need to click to play the video.
For another example, the video to be previewed is a video in a cloud disk space, in which a user can learn about the corresponding video content through animation.
In some embodiments, monitoring may be registered in a file corresponding to the animation, when a video playing operation of the animation by the user, such as a clicking operation on the animation file, is detected, the user may jump to a file address of a video to be previewed corresponding to the animation, and may select to play the video to be previewed, or may select to copy the video to a local space if in a cloud disk space, which is not limited in this embodiment.
Optionally, in this embodiment, before the step of "responding to the operation of viewing the video to be previewed and displaying the animation corresponding to the video to be previewed", the method further includes:
acquiring a storage path corresponding to the video to be previewed;
and fusing the storage path with the animation corresponding to the video to be previewed to obtain the fused animation.
The fusion mode may be adding the storage path to an animation corresponding to the video to be previewed.
In some embodiments, when viewing a video in a gallery or a cloud disk space, an animation corresponding to the video is loaded first, so that the animation of the original video can be previewed first in the whole gallery or the cloud disk space, the content of the original video is known through the animation, when the complete video content is desired to be viewed, an animation interface is clicked, a storage path of the original video is registered on the interface, and a storage address corresponding to the original video can be jumped to through the path.
Optionally, in this embodiment, the video preview method may further include:
responding to the video playing operation aiming at the animation, and carrying out path analysis on the animation to obtain a storage path corresponding to the video to be previewed;
and acquiring and playing the video to be previewed through the storage path.
The video playing operation may specifically be a clicking operation or a sliding operation of the animation, which is not limited in this embodiment, and the video playing operation of the animation may jump to the storage address of the original video corresponding to the animation.
Optionally, in this embodiment, the video preview method may further include:
Determining time information of a target scene corresponding to the selected target video frame in response to a selected play operation for the target video frame in the animation;
determining a target video clip to be played in the video to be previewed based on the time information;
and skipping to play the target video clip.
The time information of the target scene may include a start time point and an end time point corresponding to the target scene. The video clip corresponding to the time information in the video to be previewed can be determined as the target video clip.
The play selection operation may be set according to actual situations, which is not limited in this embodiment. The select play operation may be set to a long press, or the like.
Specifically, for some videos, if the video duration is long, if the user only wants to pay attention to a video clip corresponding to a certain scene, such as a certain person or a certain fruit, the user can press gif animation corresponding to the video for a long time, move to a corresponding scene picture, automatically enter the original video when the user releases his hands, and play a target video clip corresponding to the scene picture.
Optionally, in this embodiment, the step of "determining, in response to a play operation for a target video frame in the animation, time information of a target scene corresponding to the selected target video frame" may include:
Responding to a selective playing operation for a target video frame in the animation, and acquiring a video tag file, wherein the video tag file comprises a preset scene and a mapping relation between time information corresponding to the preset scene;
and determining time information corresponding to the target scene according to the video tag file and the target scene corresponding to the selected target video frame.
According to the scene corresponding to the selected target video frame, a time point when the scene appears can be searched in the video tag file, and then the video clip of the corresponding time period is played.
As shown in fig. 1c, in the software design, the frame diagram of the video preview method provided in the embodiment of the present application may include four parts, namely a scene recognition module, a video source module, a video preview animation module, and a gallery/cloud disk module.
The scene recognition module can recognize the scenes of each video frame of the video to be previewed through an artificial intelligent detection algorithm. The video source module can comprise a camera tool for recording video and video files stored in a cloud disk, and can also comprise video links and the like.
The video preview animation module can synthesize each selected target video frame into an animation. The gallery/cloud disk module may include tools for viewing pictures and videos on the cell phone or in the cloud server space, and the general gallery or cloud disk will generate a list for the user to view based on the pictures and video thumbnails in the file manager.
For example, as shown in fig. 1d, a preview page corresponding to a gallery is shown, and a video in the preview page changes from a single picture to an animation, so that a user can know the video content through the animation.
For another example, the animation corresponding to the video can be generated according to the video in the cloud disk or the video corresponding to the video resource link, and the user can roughly know the video content and then decide whether to download the original video.
In a specific embodiment, as shown in fig. 1e, a process of generating an animation corresponding to a video in the video recording process is shown. Specifically, the camera may be started to record a video, in the process of recording the video, scene recognition may be performed on a recorded video frame, a scene recognition result corresponding to the video frame is compared with a scene recognition result of a previous video frame, if the difference between the two is greater than a preset value, a new scene is detected, and the video frame is captured as a preview picture 1, that is, the target video frame in the above embodiment; executing the operation on each recorded video frame, thereby obtaining target video frames under different scenes; and after the video recording is finished, synthesizing target video frames in each scene to obtain the animation corresponding to the video. The gallery of the client where the camera is located can load the animation file, and the storage address corresponding to the original video file is added into the animation file in a link mode, so that when a user views the video in the album, the content of the video can be previewed through the animation, and the user can skip to the storage address of the original video corresponding to the animation and play the original video based on the video playing operation of the animation.
In another embodiment, as shown in fig. 1f, a process of animation generation of a video in a cloud disk is shown. Specifically, the background may acquire a cloud disc video file, analyze each video frame in the video file, and in the process of video analysis, perform scene recognition on the analyzed video frame, and if the difference between the scene recognition result corresponding to the video frame and the scene recognition result of the previously analyzed video frame is greater than a preset value, may be regarded as detecting a new scene, and capture the video frame as a preview picture 1, that is, the target video frame in the above embodiment; executing the operation on each parsed video frame, thereby obtaining target video frames under different scenes; and after the video analysis is finished, synthesizing the target video frames in each scene to obtain the animation corresponding to the video. The cloud disk can load the animation and add the storage address of the original video file corresponding to the animation in a link mode in the animation, so that when a user views the video in the cloud disk, the user can preview the content of the video through the animation, and can jump to the storage address of the original video corresponding to the animation and play the original video based on the video playing operation of the animation.
As can be seen from the above, the embodiment may acquire a video to be previewed, where the video to be previewed includes at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed. According to the method and the device for synthesizing the video, the target video frames of different scenes can be synthesized into the animation, so that when a user searches the video, the user can intuitively know the approximate content of the video through the animation, the whole video does not need to be played, and the video searching efficiency is improved.
The method according to the previous embodiment will be described in further detail below with the video preview device being integrated in the terminal.
The embodiment of the application provides a video preview method, as shown in fig. 2, the specific flow of the video preview method may be as follows:
201. The terminal acquires a video to be previewed, wherein the video to be previewed comprises at least one video frame.
The video to be previewed may be a video in an image database of the terminal, such as a video in an album of a smart phone, a video in a cloud disk, a video corresponding to a video link, or the like, which is not limited in this embodiment.
202. And the terminal performs scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame.
In some embodiments, scene recognition may be performed on each video frame of the video to be previewed through an artificial intelligence detection algorithm, so as to obtain each scene included in the video to be previewed, and time information corresponding to each scene, where the time information may specifically include a start time point and an end time point of the corresponding scene, where the start time point specifically is a time point corresponding to a video frame in which the scene appears for the first time in the video to be previewed, and the end time point specifically may be a time point corresponding to a video frame in which the scene appears last in the video to be previewed.
203. And the terminal selects at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes.
Optionally, in this embodiment, the step of selecting, based on the scene recognition result, at least one target video frame from the video frames in the video to be previewed may include:
and for each video frame in the video to be previewed, determining the video frame as a target video frame when the difference degree of the scene recognition result corresponding to the video frame and the scene recognition result corresponding to the previous video frame is larger than a preset value.
204. And the terminal synthesizes the at least one target video frame to obtain the animation corresponding to the video to be previewed.
205. And the terminal responds to the viewing operation of the video to be previewed, and displays the animation corresponding to the video to be previewed.
For example, the video to be previewed is a video in an image database (such as an album in a smart phone), and when a user views the video in the album, an animation corresponding to the video can be automatically played, so that the user can intuitively know the approximate content of the corresponding video when browsing the album, and does not need to click to play the video.
For another example, the video to be previewed is a video in a cloud disk space, in which a user can learn about the corresponding video content through animation.
206. And the terminal responds to the video playing operation aiming at the animation, and carries out path analysis on the animation to obtain a storage path corresponding to the video to be previewed.
In some embodiments, monitoring may be registered in a file corresponding to the animation, when a video playing operation of the animation by the user, such as a clicking operation on the animation file, is detected, the user may jump to a file address of a video to be previewed corresponding to the animation, and may select to play the video to be previewed, or may select to copy the video to a local space if in a cloud disk space, which is not limited in this embodiment.
Optionally, in this embodiment, before the step of "responding to the operation of viewing the video to be previewed and displaying the animation corresponding to the video to be previewed", the method further includes:
acquiring a storage path corresponding to the video to be previewed;
and fusing the storage path with the animation corresponding to the video to be previewed to obtain the fused animation.
207. And the terminal acquires and plays the video to be previewed through the storage path.
The video playing operation may specifically be a clicking operation or a sliding operation of the animation, which is not limited in this embodiment, and the video playing operation of the animation may jump to the storage address of the original video corresponding to the animation.
As can be seen from the above, in this embodiment, a video to be previewed may be obtained through a terminal, where the video to be previewed includes at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed; responding to the video playing operation aiming at the animation, and carrying out path analysis on the animation to obtain a storage path corresponding to the video to be previewed; and acquiring and playing the video to be previewed through the storage path. According to the method and the device for synthesizing the video, the target video frames of different scenes can be synthesized into the animation, so that when a user searches the video, the user can intuitively know the approximate content of the video through the animation, the whole video does not need to be played, and the video searching efficiency is improved.
In order to better implement the above method, the embodiment of the present application further provides a video preview device, as shown in fig. 3, where the video preview device may include an obtaining unit 301, an identifying unit 302, a selecting unit 303, a synthesizing unit 304, and a displaying unit 305, as follows:
(1) An acquisition unit 301;
and the acquisition unit is used for acquiring the video to be previewed, wherein the video to be previewed comprises at least one video frame.
(2) An identification unit 302;
and the identification unit is used for carrying out scene identification on each video frame in the video to be previewed to obtain a scene identification result of each video frame.
(3) A selecting unit 303;
and the selecting unit is used for selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes.
Optionally, in some embodiments of the present application, the selecting unit may be specifically configured to determine, for each video frame in the video to be previewed, the video frame as the target video frame when a difference between a scene recognition result corresponding to the video frame and a scene recognition result corresponding to a previous video frame is greater than a preset value.
(4) A synthesizing unit 304;
and the synthesizing unit is used for synthesizing the at least one target video frame to obtain the animation corresponding to the video to be previewed.
(5) A display unit 305;
and the display unit is used for responding to the viewing operation of the video to be previewed and displaying the animation corresponding to the video to be previewed.
Optionally, in some embodiments of the present application, the video previewing apparatus may further include a path fusion unit, where the path fusion unit is configured to obtain a storage path corresponding to the video to be previewed; and fusing the storage path with the animation corresponding to the video to be previewed to obtain the fused animation.
Optionally, in some embodiments of the present application, the video preview device may further include a video playing unit, where the video playing unit is configured to perform path analysis on the animation in response to a video playing operation for the animation, so as to obtain a storage path corresponding to the video to be previewed; and acquiring and playing the video to be previewed through the storage path.
Optionally, in some embodiments of the present application, the video preview device may further include a skip play unit, where the skip play unit is configured to determine, in response to a play operation for a target video frame in the animation, time information of a target scene corresponding to the selected target video frame; determining a target video clip to be played in the video to be previewed based on the time information; and skipping to play the target video clip.
Optionally, in some embodiments of the present application, the step of "determining, in response to a selection playing operation for a target video frame in the animation, time information of a target scene corresponding to the selected target video frame" may include:
responding to a selective playing operation for a target video frame in the animation, and acquiring a video tag file, wherein the video tag file comprises a preset scene and a mapping relation between time information corresponding to the preset scene;
and determining time information corresponding to the target scene according to the video tag file and the target scene corresponding to the selected target video frame.
As can be seen from the above, in this embodiment, the obtaining unit 301 may obtain a video to be previewed, where the video to be previewed includes at least one video frame; performing scene recognition on each video frame in the video to be previewed through a recognition unit 302 to obtain a scene recognition result of each video frame; selecting, by the selecting unit 303, at least one target video frame from each video frame in the video to be previewed based on the scene recognition result, where different target video frames correspond to different scenes; synthesizing the at least one target video frame through a synthesizing unit 304 to obtain an animation corresponding to the video to be previewed; and displaying the animation corresponding to the video to be previewed through a display unit 305 in response to the viewing operation of the video to be previewed. According to the method and the device for synthesizing the video, the target video frames of different scenes can be synthesized into the animation, so that when a user searches the video, the user can intuitively know the approximate content of the video through the animation, the whole video does not need to be played, and the video searching efficiency is improved.
The embodiment of the application further provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the application, where the electronic device may be a terminal or a server, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
acquiring a video to be previewed, wherein the video to be previewed comprises at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
As can be seen from the above, the embodiment may acquire a video to be previewed, where the video to be previewed includes at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed. According to the method and the device for synthesizing the video, the target video frames of different scenes can be synthesized into the animation, so that when a user searches the video, the user can intuitively know the approximate content of the video through the animation, the whole video does not need to be played, and the video searching efficiency is improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps in any of the video preview methods provided by embodiments of the present application. For example, the instructions may perform the steps of:
acquiring a video to be previewed, wherein the video to be previewed comprises at least one video frame; performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame; selecting at least one target video frame from all video frames in the video to be previewed based on the scene recognition result, wherein different target video frames correspond to different scenes; synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed; and responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium may execute the steps in any video preview method provided in the embodiments of the present application, the beneficial effects that any video preview method provided in the embodiments of the present application can achieve are detailed in the previous embodiments, and are not described herein.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in various alternative implementations of the video preview aspect described above.
The foregoing has described in detail a video preview method and related devices provided by embodiments of the present application, and specific examples have been applied herein to illustrate principles and implementations of the present application, where the foregoing examples are provided to assist in understanding the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (7)

1. A video preview method, comprising:
acquiring a video to be previewed, wherein the video to be previewed comprises at least one video frame, and the video to be previewed is a video in recording;
performing scene recognition on each video frame in the video to be previewed to obtain a scene recognition result of each video frame;
for each video frame in the video to be previewed, when the difference degree of the scene recognition result corresponding to the video frame and the scene recognition result corresponding to the previous video frame is larger than a preset value, determining the video frame as a target video frame, and when video recording is completed, obtaining target video frames corresponding to different scenes in the video to be previewed;
synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed;
responding to the viewing operation of the video to be previewed, and displaying the animation corresponding to the video to be previewed;
responding to a selective playing operation for a target video frame in the animation, and acquiring a video tag file, wherein the video tag file comprises a preset scene and a mapping relation between time information corresponding to the preset scene;
determining time information corresponding to a target scene according to the video tag file and the target scene corresponding to the selected target video frame;
Determining a target video clip to be played in the video to be previewed based on the time information;
and skipping to play the target video clip.
2. The method according to claim 1, wherein before the displaying the animation corresponding to the video to be previewed in response to the viewing operation for the video to be previewed, further comprises:
acquiring a storage path corresponding to the video to be previewed;
and fusing the storage path with the animation corresponding to the video to be previewed to obtain the fused animation.
3. The method according to claim 2, wherein the method further comprises:
responding to the video playing operation aiming at the animation, and carrying out path analysis on the animation to obtain a storage path corresponding to the video to be previewed;
and acquiring and playing the video to be previewed through the storage path.
4. A video preview apparatus, comprising:
the video processing device comprises an acquisition unit, a video processing unit and a video processing unit, wherein the acquisition unit is used for acquiring a video to be previewed, the video to be previewed comprises at least one video frame, and the video to be previewed is a video in recording;
the identification unit is used for carrying out scene identification on each video frame in the video to be previewed to obtain a scene identification result of each video frame;
The selecting unit is used for determining the video frames as target video frames when the difference degree of the scene recognition result corresponding to the video frames and the scene recognition result corresponding to the previous video frame is larger than a preset value for each video frame in the video to be previewed, and obtaining target video frames corresponding to different scenes in the video to be previewed when video recording is completed;
the synthesizing unit is used for synthesizing the at least one target video frame to obtain an animation corresponding to the video to be previewed;
the display unit is used for responding to the viewing operation of the video to be previewed and displaying the animation corresponding to the video to be previewed;
the skip play unit is used for responding to the selection play operation of the target video frame in the animation, obtaining a video tag file, wherein the video tag file comprises a mapping relation between a preset scene and time information corresponding to the preset scene, determining the time information corresponding to the target scene according to the video tag file and the target scene corresponding to the selected target video frame, determining a target video fragment to be played in the video to be previewed based on the time information, and skipping to play the target video fragment.
5. An electronic device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the operations in the video preview method of any of claims 1 to 3.
6. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the video preview method of any of claims 1 to 3.
7. A computer program product comprising a computer program or instructions which, when executed by a processor, carries out the steps of the video preview method of any of claims 1 to 3.
CN202111489959.2A 2021-12-08 2021-12-08 Video preview method and related equipment Active CN114245174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111489959.2A CN114245174B (en) 2021-12-08 2021-12-08 Video preview method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111489959.2A CN114245174B (en) 2021-12-08 2021-12-08 Video preview method and related equipment

Publications (2)

Publication Number Publication Date
CN114245174A CN114245174A (en) 2022-03-25
CN114245174B true CN114245174B (en) 2024-04-09

Family

ID=80753896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111489959.2A Active CN114245174B (en) 2021-12-08 2021-12-08 Video preview method and related equipment

Country Status (1)

Country Link
CN (1) CN114245174B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107155138A (en) * 2017-06-06 2017-09-12 深圳Tcl数字技术有限公司 Video playback jump method, equipment and computer-readable recording medium
CN111641868A (en) * 2020-05-27 2020-09-08 维沃移动通信有限公司 Preview video generation method and device and electronic equipment
CN111756952A (en) * 2020-07-23 2020-10-09 北京字节跳动网络技术有限公司 Preview method, device, equipment and storage medium of effect application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107155138A (en) * 2017-06-06 2017-09-12 深圳Tcl数字技术有限公司 Video playback jump method, equipment and computer-readable recording medium
CN111641868A (en) * 2020-05-27 2020-09-08 维沃移动通信有限公司 Preview video generation method and device and electronic equipment
CN111756952A (en) * 2020-07-23 2020-10-09 北京字节跳动网络技术有限公司 Preview method, device, equipment and storage medium of effect application

Also Published As

Publication number Publication date
CN114245174A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN113115099A (en) Video recording method and device, electronic equipment and storage medium
KR20160087222A (en) Method and Appratus For Creating Photo Story based on Visual Context Analysis of Digital Contents
CN112118395B (en) Video processing method, terminal and computer readable storage medium
CN113453040B (en) Short video generation method and device, related equipment and medium
CN111209437B (en) Label processing method and device, storage medium and electronic equipment
CN113766296B (en) Live broadcast picture display method and device
KR20190107069A (en) Method and apparatus for image recognition based on augmented reality
CN112291609A (en) Video display and push method, device, storage medium and system thereof
CN111770386A (en) Video processing method, video processing device and electronic equipment
KR102592904B1 (en) Apparatus and method for summarizing image
CN112752121A (en) Video cover generation method and device
JP6203188B2 (en) Similar image search device
CN113596574A (en) Video processing method, video processing apparatus, electronic device, and readable storage medium
US9224069B2 (en) Program, method and apparatus for accumulating images that have associated text information
CN114245174B (en) Video preview method and related equipment
CN116049490A (en) Material searching method and device and electronic equipment
CN114143429A (en) Image shooting method, image shooting device, electronic equipment and computer readable storage medium
CN115689642A (en) Media content recommendation method and device, electronic equipment and storage medium
CN112165626A (en) Image processing method, resource acquisition method, related device and medium
CN114915850B (en) Video playing control method and device, electronic equipment and storage medium
CN113691729B (en) Image processing method and device
CN113873080B (en) Multimedia file acquisition method and device
CN112764553B (en) Chat expression collection method and device and electronic equipment
CN116170626A (en) Video editing method, device, electronic equipment and storage medium
CN115357810A (en) Footprint recording method, footprint display method, terminal device and storage 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