CN113490051B - Video frame extraction method and device, electronic equipment and storage medium - Google Patents
Video frame extraction method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113490051B CN113490051B CN202110807408.XA CN202110807408A CN113490051B CN 113490051 B CN113490051 B CN 113490051B CN 202110807408 A CN202110807408 A CN 202110807408A CN 113490051 B CN113490051 B CN 113490051B
- Authority
- CN
- China
- Prior art keywords
- frame
- video
- frame extraction
- window
- extracted
- 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
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 348
- 238000012545 processing Methods 0.000 claims abstract description 38
- 239000012634 fragment Substances 0.000 claims abstract description 12
- 238000000034 method Methods 0.000 claims description 42
- 238000009877 rendering Methods 0.000 claims description 30
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 13
- 230000009467 reduction Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000004040 coloring Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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
- H04N21/4402—Processing 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 involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440281—Processing 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 involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-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/47205—End-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 manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Television Signal Processing For Recording (AREA)
Abstract
The video frame extraction method provided by the embodiment of the invention is applied to the technical field of information, when a sliding frame extraction instruction of a user for a video to be extracted is received, a frame extraction window is loaded on the video to be extracted, and the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments; performing frame extraction processing on the video frame sequence in the frame extraction window; wherein each video clip is frame-decimated by a frame decimator. According to the video frame extraction method, when the sliding frame extraction instruction of the user for the video to be extracted is received, the frame extraction window is loaded on the video to be extracted, the frames of the video clips in the frame extraction window are preferentially extracted, and because each video clip is extracted through one frame extractor, the frame extraction can be simultaneously carried out through the frame extractor corresponding to each video clip, so that the frame extraction efficiency of the video is improved, and the user experience is improved.
Description
Technical Field
The present invention relates to the field of information technologies, and in particular, to a video frame extraction method, a video frame extraction device, an electronic device, and a storage medium.
Background
With the development of communication technology, short videos have also grown in bursts, and viewing short videos through mobile phones and the like has become a part of entertainment lives of many people. In the case of extracting frames of a short video by a tool such as a mobile phone, each frame of image corresponding to the whole video cannot be displayed, and therefore, in general, each frame of image corresponding to the video is arranged in order, and therefore, the manner of sliding each arranged frame of image can determine that the corresponding video frame is subjected to video editing.
However, when the video is frame-extracted through the editing tool, the video to be split is generally frame-extracted and displayed all at once, so when a user wants to directly watch the frame-extracted result of a certain section of video located in the middle in the video to be split, the user needs to wait for a long time, and the user experience effect is poor.
Disclosure of Invention
The embodiment of the invention aims to provide a video frame extraction method, a device, electronic equipment and a storage medium, so as to achieve the aim of improving user experience in a video frame extraction process. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a video frame extraction method, including:
when a sliding frame extraction instruction of a user for a frame to be extracted video is received, loading a frame extraction window on the frame to be extracted video, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments;
performing frame extraction processing on the video frame sequence in the frame extraction window; wherein each video clip is frame-decimated by a frame decimator.
Optionally, the method further comprises:
when a sliding window instruction of the frame extraction window is received, sliding the frame extraction window on the video to be extracted;
and performing frame extraction processing on the video frame sequence in the sliding frame extraction window.
Optionally, the method further comprises:
when a frame extraction window size adjusting instruction is received, the frame extraction window is enlarged or reduced on the video to be extracted, the larger the frame extraction window is, the more video frame sequences are contained, and the smaller the frame extraction window is, the fewer video frame sequences are contained;
and performing frame extraction processing on the video frame sequence in the frame extraction window after the enlargement or the reduction.
Optionally, after performing frame extraction processing on the video frame sequence in the frame extraction window, the method further includes:
and rendering and displaying the video frame sequence after frame extraction.
Optionally, rendering and displaying the video frame sequence after frame extraction includes:
selecting a preset number of video frame sequences adjacent to the front and/or the rear of the frame extraction window to perform frame extraction processing;
and when the frame extraction window covers the preset number of video frame sequences, rendering and displaying the preset number of video frame sequences.
Optionally, when receiving a sliding frame extraction instruction for a video to be extracted from a user, after loading a frame extraction window on the video to be extracted, the method further includes:
inquiring whether a pre-stored frame extraction result comprises a frame extraction result of a video frame sequence or not;
if the video frame sequence exists, rendering and displaying the frame extraction result of the video frame sequence in the pre-stored frame extraction result.
Optionally, performing frame extraction processing on the video frame sequence in the frame extraction window includes:
calculating the frame extraction starting time and the frame extraction ending time of each video segment according to the first frame and the last frame of each video segment in the frame extraction window;
and according to the frame extraction starting time, the frame extraction ending time and the preset step length of each video segment, performing frame extraction through a frame extractor corresponding to each video segment.
In a second aspect of the present invention, a video frame extraction device is provided, where the device includes:
the instruction receiving model is used for loading a frame extraction window on the video to be extracted when receiving a sliding frame extraction instruction of a user aiming at the video to be extracted, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments;
the video frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the frame extraction window; wherein each video clip is frame-decimated by a frame decimator.
Optionally, the apparatus further includes:
the sliding window instruction module is used for sliding the frame extraction window on the video to be extracted when receiving the sliding window instruction of the frame extraction window;
and the sliding frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the sliding frame extraction window.
Optionally, the apparatus further includes:
the size adjusting instruction module is used for enlarging or reducing the frame extraction window on the video to be extracted when receiving the size adjusting instruction of the frame extraction window, wherein the larger the frame extraction window is, the more video frame sequences are contained, and the smaller the frame extraction window is, the fewer the video frame sequences are contained;
and the adjusted frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the enlarged or reduced frame extraction window.
Optionally, the apparatus further includes:
and the rendering display module is used for rendering and displaying the video frame sequence after frame extraction.
Optionally, the video frame extraction module includes:
the video frame selection sub-module is used for selecting a preset number of video frame sequences adjacent to the front and/or the rear of the frame extraction window to carry out frame extraction processing;
the video frame rendering sub-module is used for rendering and displaying the video frame sequences with the preset number when the frame extraction window covers the video frame sequences with the preset number.
Optionally, the apparatus further includes:
the frame extraction result inquiring sub-module is used for inquiring whether the pre-stored frame extraction result comprises a frame extraction result of the video frame sequence;
and the frame extraction result rendering sub-module is used for rendering and displaying the frame extraction result of the video frame sequence in the pre-stored frame extraction result if the frame extraction result exists.
Optionally, the video frame extraction module includes:
the frame extraction time calculation sub-module is used for calculating the frame extraction start time and the frame extraction end time of each video segment according to the first frame and the last frame of each video segment in the frame extraction window;
and the video segment frame extraction submodule is used for carrying out frame extraction through a frame extractor corresponding to each video segment according to the frame extraction starting time, the frame extraction ending time and the preset step length of each video segment.
In yet another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for executing any video frame extraction method when the program stored in the memory is executed.
In yet another aspect of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, the computer program when executed by a processor implementing any one of the video frame extraction methods described above.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the video frame extraction methods described above.
According to the video frame extraction method provided by the embodiment of the invention, when a sliding frame extraction instruction of a user for a video to be extracted is received, a frame extraction window is loaded on the video to be extracted, and the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments; performing frame extraction processing on the video frame sequence in the frame extraction window; wherein each video clip is frame-decimated by a frame decimator. According to the video frame extraction method, when the sliding frame extraction instruction of the user for the video to be extracted is received, the frame extraction window is loaded on the video to be extracted, the frames of the video clips in the frame extraction window are preferentially extracted, and because each video clip is extracted through one frame extractor, the frame extraction can be simultaneously carried out through the frame extractor corresponding to each video clip, so that the frame extraction efficiency of the video is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of a video frame extraction method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a sliding frame extraction window according to an embodiment of the present application;
FIG. 3 is a diagram of an example of a frame extraction window according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of adjusting a size of a frame extraction window according to an embodiment of the present application;
fig. 5 is a schematic flow chart for rendering and displaying video according to an embodiment of the present application;
fig. 6 is another schematic flow chart for rendering and displaying video according to an embodiment of the present application;
fig. 7 is another flow chart of a video frame extraction method according to an embodiment of the present application;
FIG. 8 is a diagram of another example of a frame extraction window according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a video frame extracting apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In a first aspect of the present invention, there is provided a video frame extraction method, including:
when a sliding frame extraction instruction of a user for a frame to be extracted video is received, loading a frame extraction window on the frame to be extracted video, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments;
performing frame extraction processing on the video frame sequence in the frame extraction window; wherein each video clip is frame-decimated by a frame decimator.
According to the video frame extraction method, when the sliding frame extraction instruction of the user for the video to be extracted is received, the frame extraction window is loaded on the video to be extracted, the frames of the video clips in the frame extraction window are preferentially extracted, and because each video clip is extracted through one frame extractor, the frame extraction can be simultaneously carried out through the frame extractor corresponding to each video clip, so that the frame extraction efficiency of the video is improved, and the user experience is improved.
Specifically, referring to fig. 1, fig. 1 is a schematic flow chart of a video frame extraction method provided in an embodiment of the present application, including:
step S11, when a sliding frame extraction instruction of a user aiming at a frame to be extracted video is received, loading a frame extraction window on the frame to be extracted video, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments.
The video frame extraction method is applied to frame extraction of videos, wherein the videos to be extracted can be arranged and displayed side by side according to the sequence of the corresponding videos in the frame extraction process, wherein a frame extraction window comprises a video frame sequence consisting of a plurality of video clips, and other video frame sequences in the videos to be extracted can be watched by sliding the video frame sequence, so that the corresponding video frames can be conveniently determined to carry out operations such as video editing or frame extraction. The sliding frame extraction instruction is only used for indicating an operation instruction of a user, and in the actual use process, the sliding frame extraction instruction can be input in a mode of clicking a mouse or pressing a key and the like.
In the actual use process, the video frame extraction method provided by the embodiment of the application is applied to an intelligent terminal, and the intelligent terminal can be a mobile phone or a computer.
And step S12, performing frame extraction processing on the video frame sequence in the frame extraction window.
Wherein each video clip is frame-decimated by a frame decimator. The duration of each video clip in the actual use process can be set according to the actual situation, for example, 2s.
Since each video clip is decimated by one decimator. And when the frames are extracted, the frames can be extracted through the frame extractor corresponding to each video segment, so that CPU resources are fully utilized.
According to the video frame extraction method, when the sliding frame extraction instruction of the user for the video to be extracted is received, the frame extraction window is loaded on the video to be extracted, the frames of the video clips in the frame extraction window are preferentially extracted, and because each video clip is extracted through one frame extractor, the frame extraction can be simultaneously carried out through the frame extractor corresponding to each video clip, so that the frame extraction efficiency of the video is improved, and the user experience is improved.
Optionally, referring to fig. 2, the method further includes:
step S13, when a sliding window instruction of a frame extraction window is received, sliding the frame extraction window on a video to be extracted;
and S14, performing frame extraction processing on the video frame sequence in the sliding frame extraction window.
In the actual use process, the user can input the sliding window instruction after loading the frame extraction window on the video to be extracted, or can input the sliding window instruction after carrying out frame extraction processing on the video frame sequence in the frame extraction window. That is, the step S13 may be performed after the step S11 or after the step S12.
The sliding window instruction is only used for indicating an operation instruction of a user, and in an actual use process, the user can also input the sliding window instruction in a mode of clicking a mouse or pressing a key and the like to slide the video to be extracted. For example, referring to fig. 3, each video frame in the video in fig. 3 is arranged and displayed according to the sequence in the corresponding video, the user may select the video frame displayed in the frame extraction window by sliding the frame extraction window, and for different video frames, the corresponding time of the video frame in the video may also be displayed. In the actual use process, the sliding can be performed by dragging the video to be extracted.
When a sliding window instruction of the frame extraction window is received, the frame extraction window is slid on the video to be extracted, and when frame extraction processing is carried out on a video frame sequence in the slid frame extraction window, one or more video fragments positioned in the frame extraction window in each video fragment of the video to be extracted can be determined according to the sliding window instruction. For example, for each video segment s 1 ,s 2 ,...,s n Respectively corresponding time length t 1 ,t 2 ...t k ...t i ...t n 。
When the width of a single picture is W pixels, the height is h pixels, and under the condition of f frames per second, the length W corresponding to the total video segment after frame extraction can be calculated as follows:
position R of each video clip in the frame-extraction window i =(left i ,right i ,top i ,bottom i ) WhereinWhen each video clip is a lateral extension, light i Left for video clip i at the right coordinate of the frame-extraction window i For the left coordinate of the video clip i in the frame extraction window, top i For video clip i at the upper coordinates of the frame-extraction window, bottom i The video clip i is at the lower coordinates of the frame-extraction window.
Optionally, referring to fig. 4, the method further includes:
step S15, when a frame extraction window size adjustment instruction is received, the frame extraction window is enlarged or reduced on the video to be extracted, the larger the frame extraction window is, the more video frame sequences are contained, and the smaller the frame extraction window is, the fewer video frame sequences are contained;
and S16, performing frame extraction processing on the video frame sequence in the enlarged or reduced frame extraction window.
In the actual use process, the user can input the size adjustment instruction of the frame extraction window after loading the frame extraction window on the video to be extracted, or can input the size adjustment instruction of the frame extraction window after carrying out frame extraction processing on the video frame sequence in the frame extraction window. That is, the step S15 may be performed after the step S11 or after the step S12.
Specifically, when a frame extraction window size adjustment instruction is received, the frame extraction window is enlarged or reduced on the video to be extracted; and performing frame extraction processing on the video frame sequence in the frame extraction window after the enlargement or the reduction. One or more video clips located in the frame extraction window in each video clip of the video to be frame extracted can be determined according to the size adjustment instruction, and the specific determination method can refer to the sliding window instruction and is not repeated here.
By the video frame extraction method, when a sliding window instruction of a frame extraction window is received, the frame extraction window can be slid on the video to be extracted; and performing frame extraction processing on the video frame sequence in the sliding frame extraction window. Therefore, the method and the device are convenient for the user to move, enlarge or reduce the frame extraction window, and determine the video clips to extract frames according to the moved, enlarged or reduced frame extraction window, so that the user can conveniently select the video clips by adjusting the frame extraction window, and the user experience is improved.
Optionally, referring to fig. 5, after performing frame extraction processing on the video frame sequence in the frame extraction window in step S12, the method further includes:
and step S17, rendering and displaying the video frame sequence after frame extraction.
The video frame sequence after frame extraction is rendered and displayed, and specific rendering can be realized through multi-light source one-time rendering, multi-light source multi-time rendering, delayed coloring and the like. The current frame extraction result can be conveniently checked by the user through rendering and displaying, so that whether frame extraction and other operations are performed again or not can be selected.
Optionally, referring to fig. 6, rendering and displaying the video frame sequence after frame extraction includes:
step S18, selecting a preset number of video frame sequences adjacent to the front and/or the rear of the frame extraction window to perform frame extraction processing;
step S19, when the frame extraction window covers a preset number of video frame sequences, rendering and displaying the preset number of video frame sequences.
Optionally, when receiving a sliding frame extraction instruction for a video to be extracted from a user, after loading a frame extraction window on the video to be extracted, the method further includes: inquiring whether a pre-stored frame extraction result comprises a frame extraction result of a video frame sequence or not; if the video frame sequence exists, rendering and displaying the frame extraction result of the video frame sequence in the pre-stored frame extraction result.
In the actual use process, if the frame extraction result of the adjacent video frame sequence is not inquired, the frame extraction result of the adjacent video frame sequence can be searched from the buffer memory to be displayed, the black screen is prevented, and after the frame extraction of the video segment is completed, the frame extraction result of the video segment is used to replace the occupied picture.
By selecting the preset number of video frame sequences adjacent to the front and/or the rear of the frame extraction window to perform frame extraction processing, when a user does not operate a video image segment of the video to be extracted, the video frame sequences in a certain time range on both sides of the visible window can be extracted, the frame extraction result is cached, and when the frame extraction window covers the preset number of video frame sequences, the preset number of video frame sequences are directly rendered and displayed without re-frame extraction, so that the time is saved.
Optionally, referring to fig. 7, step S12 performs frame extraction processing on the video frame sequence in the frame extraction window, including:
step S121, calculating the frame extraction start time and the frame extraction end time of each video segment according to the first frame and the last frame of each video segment in the frame extraction window;
step S122, according to the frame extraction start time, the frame extraction end time and the preset step length of each video segment, frame extraction is performed through the frame extractor corresponding to each video segment.
The frame-extraction start time and frame-extraction end time of each video clip are calculated from the first frame and the last frame of each video clip within the frame-extraction window, see fig. 8. Selecting a first frame and a last frame by judging whether each video frame in each video segment overlaps with the frame, for example, a rectangular frame R corresponding to the video segment i Rectangle R with current frame drawing window v = (0, right, top, bottom) to the same coordinate system, determine whether there is an overlap, the overlap represents the frame to be extracted, if the video segment s i The frame needs to be extracted, and the starting time t of the frame needs to be extracted can be calculated istart And end time, t iend And then calculating a frame extraction time point according to the time interval of 1/f step length, wherein right is the right coordinate of the rectangle of the current frame extraction window, top is the upper coordinate of the rectangle of the current frame extraction window, and bottom is the lower coordinate of the rectangle of the current frame extraction window, so that frame extraction is carried out through the frame extractor corresponding to each video segment according to the frame extraction starting time, the frame extraction ending time and the preset step length. For example, the video frame sequences 20-31 in the figures may be divided into four video segments, S respectively 7 、S 8 、S 9 、S 10 Wherein the video clip S 7 The video frames 21 in (a) overlap with the frame-extraction window, and thus for the video segment S 7 The frame extraction start time of (2) is the time corresponding to the video frame 21, the frame extraction end time is the time corresponding to the video frame 22, and the same applies to the video segment S 10 The frame extraction start time of (a) is the time corresponding to the video frame 29 and the frame extraction end time is the time corresponding to the video frame 30.
According to the video frame extraction method, frame extraction starting time and frame extraction ending time of each video segment can be calculated according to the first frame and the last frame of each video segment in the frame extraction window, and frame extraction is carried out through a frame extractor corresponding to each video segment according to the frame extraction starting time, the frame extraction ending time and a preset step length of each video segment.
In a second aspect of the present invention, there is also provided a video frame extracting apparatus, referring to fig. 9, the apparatus includes:
the instruction receiving model 901 is used for loading a frame extraction window on a video to be extracted when receiving a sliding frame extraction instruction of a user aiming at the video to be extracted, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments;
the video frame extraction module 902 is configured to perform frame extraction processing on a video frame sequence in a frame extraction window; wherein each video clip is frame-decimated by a frame decimator.
Optionally, the apparatus further includes:
the sliding window instruction module is used for sliding the frame extraction window on the video to be extracted when receiving the sliding window instruction of the frame extraction window;
and the sliding frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the sliding frame extraction window.
Optionally, the apparatus further includes:
the size adjusting instruction module is used for enlarging or reducing the frame extraction window on the video to be extracted when receiving the size adjusting instruction of the frame extraction window, wherein the larger the frame extraction window is, the more video frame sequences are contained, and the smaller the frame extraction window is, the fewer the video frame sequences are contained;
and the adjusted frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the enlarged or reduced frame extraction window.
Optionally, the apparatus further includes:
and the rendering display module is used for rendering and displaying the video frame sequence after frame extraction.
Optionally, the video frame extraction module 902 includes:
the video frame selection sub-module is used for selecting a preset number of video frame sequences adjacent to the front and/or the rear of the frame extraction window to carry out frame extraction processing;
the video frame rendering sub-module is used for rendering and displaying the video frame sequences with the preset number when the frame extraction window covers the video frame sequences with the preset number.
Optionally, the apparatus further includes:
the frame extraction result inquiring sub-module is used for inquiring whether the pre-stored frame extraction result comprises a frame extraction result of the video frame sequence;
and the frame extraction result rendering sub-module is used for rendering and displaying the frame extraction result of the video frame sequence in the pre-stored frame extraction result if the frame extraction result exists.
Optionally, the video frame extraction module 902 includes:
the frame extraction time calculation sub-module is used for calculating the frame extraction start time and the frame extraction end time of each video segment according to the first frame and the last frame of each video segment in the frame extraction window;
and the video segment frame extraction submodule is used for carrying out frame extraction through a frame extractor corresponding to each video segment according to the frame extraction starting time, the frame extraction ending time and the preset step length of each video segment.
According to the video frame extraction device, one or more video image segments in the view window in each video image segment of the video to be extracted can be determined according to the sliding instruction and used as the visible video image segments, the frame extraction is carried out through the frame extractor corresponding to each video image segment for the visible video image segments, and the frame extraction can be carried out on a plurality of video image segments in the view window simultaneously by the frame extractor corresponding to each video image segment preferentially, so that the frame extraction efficiency of the video is improved, and the user experience is improved.
The embodiment of the invention also provides an electronic device, as shown in fig. 10, which comprises a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to execute a program stored in the memory 1003, and implement the following steps:
when a sliding frame extraction instruction of a user for a frame to be extracted video is received, loading a frame extraction window on the frame to be extracted video, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments;
performing frame extraction processing on the video frame sequence in the frame extraction window; wherein each video clip is frame-decimated by a frame decimator.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where a computer program is stored, where the computer program is executed by a processor to implement the video frame extraction method according to any one of the foregoing embodiments.
In yet another embodiment of the present invention, a computer program product comprising instructions that, when executed on a computer, cause the computer to perform the video frame extraction method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part 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, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more 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)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, storage media, computer program product embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (9)
1. A method for video frame extraction, the method comprising:
when a sliding frame extraction instruction of a user for a video to be extracted is received in the execution process of a video frame extraction task, loading a frame extraction window on the video to be extracted, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments; when a sliding window instruction of the frame extraction window is received, sliding the frame extraction window on the video to be extracted;
performing frame extraction processing on the video frame sequence in the frame extraction window; each video clip carries out frame extraction through a frame extractor;
the method further comprises the steps of:
when a size adjustment instruction of the frame extraction window is received, the frame extraction window is enlarged or reduced on the video to be extracted, the larger the frame extraction window is, the more video frame sequences are contained, and the smaller the frame extraction window is, the fewer video frame sequences are contained;
and performing frame extraction processing on the video frame sequence in the frame extraction window after the enlargement or the reduction.
2. The method according to claim 1, wherein the method further comprises:
and performing frame extraction processing on the video frame sequence in the sliding frame extraction window.
3. The method of claim 1, wherein after the frame-extracting the sequence of video frames within the frame-extracting window, the method further comprises:
and rendering and displaying the video frame sequence after frame extraction.
4. A method according to claim 3, wherein rendering and presenting the decimated video frame sequence comprises:
selecting a preset number of video frame sequences adjacent to the front and/or the rear of the frame extraction window to perform frame extraction processing;
and when the frame extraction window covers the video frame sequences with the preset number, rendering and displaying the video frame sequences with the preset number.
5. The method according to claim 1, wherein upon receiving a sliding frame extraction instruction for a video to be extracted from a user, after loading a frame extraction window on the video to be extracted, the method further comprises:
inquiring whether a pre-stored frame extraction result comprises a frame extraction result of the video frame sequence or not;
if so, rendering and displaying the frame extraction result of the video frame sequence in the pre-stored frame extraction results.
6. The method of claim 1, wherein the frame-extracting the sequence of video frames within the frame-extracting window comprises:
calculating the frame extraction starting time and the frame extraction ending time of each video segment according to the first frame and the last frame of each video segment in the frame extraction window;
and according to the frame extraction starting time, the frame extraction ending time and the preset step length of each video segment, performing frame extraction through a frame extractor corresponding to each video segment.
7. A video frame-taking device, the device comprising:
the method comprises the steps that an instruction receiving model is used for loading a frame extraction window on a video to be extracted when a sliding frame extraction instruction of a user for the video to be extracted is received in the executing process of a video frame extraction task, wherein the frame extraction window comprises a video frame sequence consisting of a plurality of video fragments;
the video frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the frame extraction window; each video clip carries out frame extraction through a frame extractor;
the size adjusting instruction module is used for enlarging or reducing the frame extraction window on the frame video to be extracted when receiving the size adjusting instruction of the frame extraction window, wherein the larger the frame extraction window is, the more the video frame sequences are contained, and the smaller the frame extraction window is, the fewer the video frame sequences are contained;
the adjusted frame extraction module is used for carrying out frame extraction processing on the video frame sequence in the enlarged or reduced frame extraction window;
and the sliding window instruction module is used for sliding the frame extraction window on the video to be extracted when receiving the sliding window instruction of the frame extraction window.
8. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when executing a program stored on a memory.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110807408.XA CN113490051B (en) | 2021-07-16 | 2021-07-16 | Video frame extraction method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110807408.XA CN113490051B (en) | 2021-07-16 | 2021-07-16 | Video frame extraction method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113490051A CN113490051A (en) | 2021-10-08 |
CN113490051B true CN113490051B (en) | 2024-01-23 |
Family
ID=77940987
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110807408.XA Active CN113490051B (en) | 2021-07-16 | 2021-07-16 | Video frame extraction method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113490051B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102099860A (en) * | 2008-05-15 | 2011-06-15 | 苹果公司 | User interfaces for editing video clips |
CN104036536A (en) * | 2013-03-07 | 2014-09-10 | 腾讯科技(深圳)有限公司 | Generating method and apparatus of stop motion animation |
CN105872675A (en) * | 2015-12-22 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Method and device for intercepting video animation |
CN108012090A (en) * | 2017-10-25 | 2018-05-08 | 北京川上科技有限公司 | A kind of method for processing video frequency, device, mobile terminal and storage medium |
CN108040288A (en) * | 2017-12-20 | 2018-05-15 | 北京达佳互联信息技术有限公司 | Video editing method, device and intelligent mobile terminal |
CN108055587A (en) * | 2017-11-30 | 2018-05-18 | 星潮闪耀移动网络科技(中国)有限公司 | Sharing method, device, mobile terminal and the storage medium of image file |
CN108769549A (en) * | 2018-06-29 | 2018-11-06 | 咪咕动漫有限公司 | A kind of image processing method, device and computer readable storage medium |
CN110381365A (en) * | 2019-07-02 | 2019-10-25 | 北京字节跳动网络技术有限公司 | Video takes out frame method, device and electronic equipment |
CN110868636A (en) * | 2019-12-06 | 2020-03-06 | 广州酷狗计算机科技有限公司 | Video material intercepting method and device, storage medium and terminal |
CN112565886A (en) * | 2020-12-29 | 2021-03-26 | 北京奇艺世纪科技有限公司 | Video frame extraction method and device, electronic equipment and readable storage medium |
CN113015005A (en) * | 2021-05-25 | 2021-06-22 | 腾讯科技(深圳)有限公司 | Video clipping method, device and equipment and computer readable storage medium |
-
2021
- 2021-07-16 CN CN202110807408.XA patent/CN113490051B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102099860A (en) * | 2008-05-15 | 2011-06-15 | 苹果公司 | User interfaces for editing video clips |
CN104036536A (en) * | 2013-03-07 | 2014-09-10 | 腾讯科技(深圳)有限公司 | Generating method and apparatus of stop motion animation |
CN105872675A (en) * | 2015-12-22 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Method and device for intercepting video animation |
CN108012090A (en) * | 2017-10-25 | 2018-05-08 | 北京川上科技有限公司 | A kind of method for processing video frequency, device, mobile terminal and storage medium |
CN108055587A (en) * | 2017-11-30 | 2018-05-18 | 星潮闪耀移动网络科技(中国)有限公司 | Sharing method, device, mobile terminal and the storage medium of image file |
CN108040288A (en) * | 2017-12-20 | 2018-05-15 | 北京达佳互联信息技术有限公司 | Video editing method, device and intelligent mobile terminal |
CN108769549A (en) * | 2018-06-29 | 2018-11-06 | 咪咕动漫有限公司 | A kind of image processing method, device and computer readable storage medium |
CN110381365A (en) * | 2019-07-02 | 2019-10-25 | 北京字节跳动网络技术有限公司 | Video takes out frame method, device and electronic equipment |
CN110868636A (en) * | 2019-12-06 | 2020-03-06 | 广州酷狗计算机科技有限公司 | Video material intercepting method and device, storage medium and terminal |
CN112565886A (en) * | 2020-12-29 | 2021-03-26 | 北京奇艺世纪科技有限公司 | Video frame extraction method and device, electronic equipment and readable storage medium |
CN113015005A (en) * | 2021-05-25 | 2021-06-22 | 腾讯科技(深圳)有限公司 | Video clipping method, device and equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113490051A (en) | 2021-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111698553B (en) | Video processing method and device, electronic equipment and readable storage medium | |
EP3220249B1 (en) | Method, device and terminal for implementing regional screen capture | |
CN112306607B (en) | Screenshot method and device, electronic equipment and readable storage medium | |
US20220417417A1 (en) | Content Operation Method and Device, Terminal, and Storage Medium | |
CN107197357B (en) | Method and device for intercepting video during playing | |
CN107092421B (en) | Method and device for displaying control of application | |
CN112434175A (en) | Multimedia information display method and device, electronic equipment and computer readable medium | |
JP2023540271A (en) | Picture processing method, apparatus, device and storage medium | |
WO2017008646A1 (en) | Method of selecting a plurality targets on touch control terminal and equipment utilizing same | |
CN112836086A (en) | Video processing method and device and electronic equipment | |
CN112887794A (en) | Video editing method and device | |
CN112308780A (en) | Image processing method, device, equipment and storage medium | |
CN111813300A (en) | Screen capture method and device | |
CN109359582B (en) | Information searching method, information searching device and mobile terminal | |
US20170161871A1 (en) | Method and electronic device for previewing picture on intelligent terminal | |
CN115756249B (en) | Media data playing method and device, storage medium and electronic equipment | |
CN106940722B (en) | Picture display method and device | |
CN109358927B (en) | Application program display method and device and terminal equipment | |
CN113010738B (en) | Video processing method, device, electronic equipment and readable storage medium | |
CN113490051B (en) | Video frame extraction method and device, electronic equipment and storage medium | |
CN110286826B (en) | Display content processing method, device, equipment and storage medium | |
CN112995401A (en) | Control display method, device, equipment and medium | |
CN113726953B (en) | Display content acquisition method and device | |
CN112291519B (en) | Display screen switching method and device, electronic equipment and storage medium | |
CN115460448A (en) | Media resource editing method and device, electronic equipment 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 | ||
GR01 | Patent grant |