CN104616241A - Video screen-shot method and device - Google Patents
Video screen-shot method and device Download PDFInfo
- Publication number
- CN104616241A CN104616241A CN201410355904.6A CN201410355904A CN104616241A CN 104616241 A CN104616241 A CN 104616241A CN 201410355904 A CN201410355904 A CN 201410355904A CN 104616241 A CN104616241 A CN 104616241A
- Authority
- CN
- China
- Prior art keywords
- image
- image frame
- screenshot
- cache
- decoding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000008569 process Effects 0.000 claims abstract description 24
- 239000000872 buffer Substances 0.000 claims description 27
- 238000003860 storage Methods 0.000 claims description 14
- 238000004519 manufacturing process Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 description 17
- 238000012545 processing Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a video screen-shot method and device and belongs to the technical field of computers. The video screen-shot method includes that storing a preset number of newest image frames obtained through decoding in a cache in the process of decoding a target video to play; when a screen-shot command is receiver, acquiring at least one image frame from the image frames in the cache, and using as the screen-shot image and storing. The video screen-shot method and device can improve the screen-shot efficiency.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for carrying out video screenshot.
Background
With the rapid development of terminal technology, the functions of the operating system (such as the Android operating system of the mobile phone) of the terminal are more and more abundant. The video capture function of the operating system is one of the functions frequently used by the user, and the user can capture the image of the video currently being played in the video player by using the video capture function.
Generally, when a user watches a video through a video player in a terminal, the user can click a shortcut key for video capture preset by a system, at this time, the terminal takes a current playing time point on a progress bar in the video player as a capture time point, then, while playing the current video, repeatedly calling a kernel of the video player to load a video file being played currently, acquiring and analyzing head information of the video file, such as a coding type of the video, a size of the video, a duration of the video, and the like, then, acquiring an image frame corresponding to the capture time point through the kernel of the video player, decoding the image frame to obtain a corresponding image, and acquiring the decoded image by the terminal and storing the image as the capture image.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
when the video screenshot is carried out, the kernel of the video player needs to be called to repeatedly open the video file, then the corresponding image frame in the video file is obtained according to the screenshot time point, and the decoded image frame is obtained by decoding, so that the time required by the screenshot is longer, and the screenshot efficiency is low.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for performing a video screenshot. The technical scheme is as follows:
in a first aspect, a method for performing video screenshot is provided, where the method includes:
in the process of decoding and playing the target video, storing a preset number of image frames obtained by latest decoding in a cache;
and when a screenshot command is received, acquiring at least one image frame from the image frames in the cache, and storing the image frame as a screenshot image.
In a second aspect, there is provided an apparatus for making video screenshots, the apparatus comprising:
the storage module is used for storing a preset number of latest decoded image frames in a cache in the process of decoding and playing the target video;
and the acquisition module is used for acquiring at least one image frame from the image frames in the cache when a screenshot instruction is received, and storing the image frame as a screenshot image.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, in the process of decoding and playing the target video, a preset number of latest decoded image frames are stored in the cache, and when a screenshot command is received, at least one image frame is obtained from the image frames in the cache and is stored as the screenshot image.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for performing a video screenshot according to an embodiment of the present invention;
fig. 2 is a schematic interface diagram of a video player according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for performing video screenshot according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for performing a video screenshot, and as shown in fig. 1, a processing flow of the method may include the following steps:
step 101, in the process of decoding and playing the target video, storing a preset number of latest decoded image frames in a cache.
And 102, when a screenshot command is received, acquiring at least one image frame from the image frames in the cache, and storing the image frame as a screenshot image.
In the embodiment of the invention, in the process of decoding and playing the target video, a preset number of latest decoded image frames are stored in the cache, and when a screenshot command is received, at least one image frame is obtained from the image frames in the cache and is stored as the screenshot image.
Example two
The embodiment of the invention provides a method for carrying out video screenshot, and the execution main body of the method is a terminal. The terminal may be a mobile terminal, such as a mobile phone, a tablet computer, and the like.
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, in the process of decoding and playing the target video, storing a preset number of latest decoded image frames in a cache.
Wherein, the target video is any video selected to be played by the user.
In implementation, when a user needs to view a certain video (i.e., a target video), taking the target video as an example of a network video, the user may start a video player and select the target video, and the video player may connect to a corresponding video server through a URL (Uniform Resource Locator) of the target video and obtain video data of the target video, at this time, a kernel of the video player may sequentially decode image frames in the video data, and the video player may play the decoded image frames. The video player may request a certain buffer space for storing decoded image frames and the like, and may preset the maximum number of image frames stored in the buffer and set a certain deletion mechanism. In this way, a certain number of the most recently decoded image frames may be maintained in the buffer.
Alternatively, the mechanism for controlling the number of frames in the buffer may be varied, and one possible processing method is given below: in the process of decoding and playing a target video, when decoding of one image frame is completed, if the number of the image frames in the cache is less than the preset number, the image frame obtained by current decoding is stored in the cache, and if the number of the image frames in the cache is equal to the preset number, the image frame stored in the cache firstly is deleted, and the image frame obtained by current decoding is stored in the cache.
In implementation, a video player may decode and play a certain video (i.e., a target video), when the video player decodes to obtain an image frame, on one hand, the image frame may be played, and on the other hand, the image frame may be stored in a buffer, at this time, it may be determined whether the number of image frames stored in the buffer reaches a preset number, if the number of image frames in the buffer is less than the preset number, the image frame obtained by current decoding is stored in the buffer, and if the number of image frames in the buffer is equal to the preset number, the image frame stored in the buffer first may be deleted, and the image frame obtained by current decoding is stored in the buffer. Therefore, when the number of the image frames stored in the cache is smaller than the preset number, the image frames obtained by the latest decoding of the video player can be stored in the cache, and the number of the image frames stored in the cache is continuously increased along with the continuous sequential decoding of the image frames in the target video until the preset number is reached. And when the number of the image frames stored in the buffer memory is increased to the preset number, keeping the number of the image frames in the buffer memory unchanged until the target video is decoded.
And 102, when a screenshot command is received, acquiring at least one image frame from the image frames in the cache, and storing the image frame as a screenshot image.
In implementation, a technician may set a video capture function in a system program, where the start of the video capture function may be set according to actual requirements, for example, the video capture function is started after a video player buffers video data to be played for 5 seconds, or the video capture function is started when the video player is started. A video capture button may be provided at a designated location on the video player and may be set to a useable state, such as being highlighted by grey, when the video capture function is initiated.
As shown in fig. 2, when a user needs to capture a video currently played by a certain video player, a video capture button in the video player may be clicked, the video player receives a capture instruction carrying a player identifier, and the system program may determine, according to the player identifier, a video player corresponding to the player identifier, and select one or more image frames in a cache corresponding to the video player, and store the image frames as capture images in an assigned capture directory. For example, the first two image frames of the currently played image frame may be selected in the buffer, or the currently played image frame and the first two image frames of the image frame may be selected together as the screenshot image.
Optionally, the manner of selecting the screenshot image in the cache may be various, and several possible selection manners are given as follows:
in the first mode, when a screenshot command is received, the previous image frame of the currently played image frame is obtained from the image frames in the cache and stored as a screenshot image.
In implementation, the currently played image frame is stored in the buffer while being played, if the data volume of the image frame is large, the time consumption of the storage process may be long, and in order to improve the screenshot efficiency, when a screenshot instruction is received, the previous image frame of the currently played image frame stored in the buffer may be stored in a designated screenshot directory as a screenshot image.
And in the second mode, when a screenshot command is received, acquiring the currently played image frame from the image frames in the cache, and storing the image frame as a screenshot image.
In implementation, in some cases, the accuracy of the screenshot is required, and in order to improve the accuracy of the screenshot, the currently playing image frame stored in the cache may be taken as the screenshot image when the screenshot instruction is received.
Optionally, a screenshot interface may be preset for the video player, and when performing video screenshot, the system program may obtain a screenshot image through the screenshot interface, and correspondingly, the processing manner of step 102 may be: and when a screenshot command is received, acquiring at least one image frame from the image frames in the cache through a screenshot interface preset in a video player playing the target video, and storing the image frame as a screenshot image.
In implementation, a technician may set up various interfaces to the video player in the system program, which may include a screenshot interface. When receiving a screenshot instruction, the system program can select one or more image frames from the image frames in the corresponding cache of the video player through the screenshot interface and store the image frames as screenshot images in a specified screenshot directory.
Optionally, a certain execution trigger condition may be set for the step 102, and the corresponding processing procedure of the step 102 may be as follows: when receiving a screenshot command, if the next image frame of the currently played image frame is not stored locally, acquiring at least one image frame from the image frames in the cache and storing the image frame as a screenshot image. On the other hand, when receiving the screenshot command, if the next image frame of the currently played image frame is stored locally, decoding the next image frame, and storing the image frame obtained by decoding as the screenshot image.
In implementation, the screenshot interface may be preset for the video player. When receiving a screenshot instruction, the system program can search in a decoding thread of the video player through the screenshot interface to determine whether the decoding thread contains a next image frame of the currently played image frame, and if the decoding thread contains the next image frame of the currently played image frame, the system program can decode the next image frame in the decoding thread and store the decoded image frame as a screenshot image in an appointed screenshot directory. If the decoding thread does not include the next image frame, for example, the target video has been decoded and played, or the video player does not buffer corresponding data of the target video due to network reasons, at this time, at least one image frame may be selected from the image frames in the buffer memory, and stored as a screenshot image in a designated screenshot directory.
Alternatively, the terminal may be installed with a plurality of video players, which may include a system player and a non-system player, and an application program for integrating and invoking the video players may be installed in the terminal. When a video needs to be played, the user can run the application program, select a video player from the application program, and invoke the video player selected by the user to play the video.
Optionally, if the video player for decoding and playing the target video is a system player, when the target video is played, starting a video screenshot function, and repeatedly starting an inner core of the video player, acquiring playing time points corresponding to each image frame in the target video through the inner core, and storing the playing time points; when a screenshot command is received, determining and decoding the image frames corresponding to the screenshot time points according to the playing time points corresponding to the acquired image frames and the screenshot time points carried in the screenshot command, and storing the decoded image frames as screenshot images.
In implementation, when the system player is started, the start of the video screenshot function of the system player can be set according to actual requirements, which can refer to the above related contents. When the video screenshot function is started, the kernel of the system player can be called repeatedly while the target video is played, the head information of the target video is obtained and analyzed, the playing time points corresponding to all the image frames in the target video are obtained, and the playing time points are stored. When a user clicks a video screenshot button, a system player acquires a current playing time point on a playing progress bar as a screenshot time point to generate a screenshot instruction, receives the screenshot instruction, searches playing time points corresponding to the screenshot time point from playing time points corresponding to all image frames in a stored target video, decodes the image frames in the target video corresponding to the searched playing time points, and can use the decoded image frames as screenshot images.
In the embodiment of the invention, in the process of decoding and playing the target video, a preset number of latest decoded image frames are stored in the cache, and when a screenshot command is received, at least one image frame is obtained from the image frames in the cache and is stored as the screenshot image.
EXAMPLE III
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for performing a video screenshot, as shown in fig. 3, the apparatus includes:
the storage module 310 is configured to store a preset number of image frames obtained by latest decoding in a cache in the process of decoding and playing a target video;
the obtaining module 320 is configured to, when receiving a screenshot instruction, obtain at least one image frame from the image frames in the cache, and store the image frame as a screenshot image.
Optionally, the storage module 310 is configured to:
in the process of decoding and playing a target video, when decoding of one image frame is completed, if the number of the image frames in the cache is less than the preset number, the image frame obtained by current decoding is stored in the cache, and if the number of the image frames in the cache is equal to the preset number, the image frame stored in the cache firstly is deleted, and the image frame obtained by current decoding is stored in the cache.
Optionally, the obtaining module 320 is configured to:
when a screenshot command is received, acquiring a previous image frame of a currently played image frame from the image frames in the cache, and storing the previous image frame as a screenshot image; or,
and when a screenshot command is received, acquiring the currently played image frame from the image frames in the cache and storing the image frame as a screenshot image.
Optionally, the obtaining module 320 is configured to:
when a screenshot command is received, at least one image frame is obtained from the image frames in the cache through a screenshot interface preset in a video player playing the target video and is stored as a screenshot image.
Optionally, the obtaining module 320 is configured to:
when a screenshot command is received, if the next image frame of the currently played image frame is not stored locally, acquiring at least one image frame from the image frames in the cache and storing the image frame as a screenshot image;
an obtaining module 320, further configured to:
when receiving a screenshot command, if the next image frame of the currently played image frame is stored locally, decoding the next image frame, and storing the image frame obtained by decoding as a screenshot image.
In the embodiment of the invention, in the process of decoding and playing the target video, a preset number of latest decoded image frames are stored in the cache, and when a screenshot command is received, at least one image frame is obtained from the image frames in the cache and is stored as the screenshot image.
It should be noted that: in the device for performing video capture provided in the foregoing embodiment, when performing video capture, only the division of each function module is used for illustration, and in practical applications, the function distribution may be completed by different function modules as needed, that is, the internal structure of the terminal is divided into different function modules, so as to complete all or part of the functions described above. In addition, the apparatus for performing video capture and the method for performing video capture provided by the above embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
Example four
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention. Referring to fig. 4, terminal 2000 may include one or more of the following components: a processing component 2002, a memory 2004, a power component 2006, a multimedia component 2008, an audio component 2010, an input/output (I/O) interface 2012, a sensor component 2014, and a communication component 2016.
The processing component 2002 generally controls overall operation of the terminal 2000, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 2002 may include one or more processors 2020 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 2002 can include one or more modules that facilitate interaction between the processing component 2002 and other components. For example, the processing component 2002 can include a multimedia module to facilitate interaction between the multimedia component 2008 and the processing component 2002.
The memory 2004 is configured to store various types of data to support operations at the terminal 2000. Examples of such data include instructions for any application or method operating on terminal 2000, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 2004 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 2006 provides power to the various components of terminal 2000. Power components 2006 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal 2000.
The multimedia assembly 2008 includes a screen providing an output interface between the terminal 2000 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 2008 includes a front camera and/or a rear camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 2000 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 2010 is configured to output and/or input audio signals. For example, audio component 2010 includes a Microphone (MIC) configured to receive external audio signals when terminal 2000 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 2004 or transmitted via the communication component 2016. In some embodiments, audio assembly 2010 also includes a speaker for outputting audio signals.
The I/O interface 2012 provides an interface between the processing component 2002 and peripheral interface modules, which can be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor assembly 2014 includes one or more sensors for providing various aspects of state assessment for terminal 2000. For example, sensor assembly 2014 may detect an open/closed state of device 2000, a relative positioning of components such as a display and keypad of terminal 2000, a change in position of terminal 2000 or a component of terminal 2000, the presence or absence of user contact with terminal 2000, orientation or acceleration/deceleration of terminal 2000, and a change in temperature of terminal 2000. The sensor assembly 2014 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 2014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 2014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 2016 is configured to facilitate wired or wireless communication between the terminal 2000 and other devices. The terminal 2000 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication section 2016 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 2016 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal 2000 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium including instructions, such as the memory 2004 including instructions, executable by the processor 2020 of the terminal 2000 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a terminal, enable a mobile terminal to perform a method of making video screenshots, the method comprising:
in the process of decoding and playing the target video, storing a preset number of image frames obtained by latest decoding in a cache;
when a screenshot command is received, at least one image frame is obtained from the image frames in the cache and stored as a screenshot image.
Optionally, in the process of decoding and playing the target video, storing a preset number of latest decoded image frames in a buffer, including:
in the process of decoding and playing a target video, when decoding of one image frame is completed, if the number of the image frames in the cache is less than the preset number, the image frame obtained by current decoding is stored in the cache, and if the number of the image frames in the cache is equal to the preset number, the image frame stored in the cache firstly is deleted, and the image frame obtained by current decoding is stored in the cache.
Optionally, when receiving a screenshot instruction, acquiring at least one image frame from the image frames in the buffer, and storing the image frame as a screenshot image, including:
when a screenshot command is received, acquiring a previous image frame of a currently played image frame from the image frames in the cache, and storing the previous image frame as a screenshot image; or,
and when a screenshot command is received, acquiring the currently played image frame from the image frames in the cache and storing the image frame as a screenshot image.
Optionally, when receiving a screenshot instruction, acquiring at least one image frame from the image frames in the buffer, and storing the image frame as a screenshot image, including:
when a screenshot command is received, at least one image frame is obtained from the image frames in the cache through a screenshot interface preset in a video player playing the target video and is stored as a screenshot image.
Optionally, when receiving a screenshot instruction, acquiring at least one image frame from the image frames in the buffer, and storing the image frame as a screenshot image, including:
when a screenshot command is received, if the next image frame of the currently played image frame is not stored locally, acquiring at least one image frame from the image frames in the cache and storing the image frame as a screenshot image;
the method further comprises the following steps:
when receiving a screenshot command, if the next image frame of the currently played image frame is stored locally, decoding the next image frame, and storing the image frame obtained by decoding as a screenshot image.
In the embodiment of the invention, in the process of decoding and playing the target video, a preset number of latest decoded image frames are stored in the cache, and when a screenshot command is received, at least one image frame is obtained from the image frames in the cache and is stored as the screenshot image.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A method of making a video screenshot, the method comprising:
in the process of decoding and playing the target video, storing a preset number of image frames obtained by latest decoding in a cache;
and when a screenshot command is received, acquiring at least one image frame from the image frames in the cache, and storing the image frame as a screenshot image.
2. The method according to claim 1, wherein storing a preset number of latest decoded image frames in a buffer during decoding and playing of the target video comprises:
in the process of decoding and playing a target video, when decoding of one image frame is completed, if the number of the image frames in a cache is smaller than a preset number, the image frame obtained by current decoding is stored in the cache, and if the number of the image frames in the cache is equal to the preset number, the image frame stored in the cache firstly is deleted, and the image frame obtained by current decoding is stored in the cache.
3. The method according to claim 1, wherein when receiving a screenshot command, acquiring at least one image frame from the image frames in the buffer for storage as a screenshot image comprises:
when a screenshot command is received, acquiring a previous image frame of a currently played image frame from the image frames in the cache, and storing the previous image frame as a screenshot image; or,
and when a screenshot command is received, acquiring the currently played image frame from the image frames in the cache, and storing the image frame as a screenshot image.
4. The method according to claim 1, wherein when receiving a screenshot command, acquiring at least one image frame from the image frames in the buffer for storage as a screenshot image comprises:
and when a screenshot command is received, acquiring at least one image frame from the image frames in the cache through a screenshot interface preset in a video player playing the target video, and storing the image frame as a screenshot image.
5. The method according to claim 1, wherein when receiving a screenshot command, acquiring at least one image frame from the image frames in the buffer for storage as a screenshot image comprises:
when a screenshot command is received, if the next image frame of the currently played image frame is not stored locally, acquiring at least one image frame from the image frames in the cache and storing the image frame as a screenshot image;
the method further comprises the following steps:
when receiving a screenshot command, if the next image frame of the currently played image frame is stored locally, decoding the next image frame, and storing the image frame obtained by decoding as a screenshot image.
6. An apparatus for performing video screenshots, the apparatus comprising:
the storage module is used for storing a preset number of latest decoded image frames in a cache in the process of decoding and playing the target video;
and the acquisition module is used for acquiring at least one image frame from the image frames in the cache when a screenshot instruction is received, and storing the image frame as a screenshot image.
7. The apparatus of claim 6, wherein the storage module is configured to:
in the process of decoding and playing a target video, when decoding of one image frame is completed, if the number of the image frames in a cache is smaller than a preset number, the image frame obtained by current decoding is stored in the cache, and if the number of the image frames in the cache is equal to the preset number, the image frame stored in the cache firstly is deleted, and the image frame obtained by current decoding is stored in the cache.
8. The apparatus of claim 6, wherein the obtaining module is configured to:
when a screenshot command is received, acquiring a previous image frame of a currently played image frame from the image frames in the cache, and storing the previous image frame as a screenshot image; or,
and when a screenshot command is received, acquiring the currently played image frame from the image frames in the cache, and storing the image frame as a screenshot image.
9. The apparatus of claim 6, wherein the obtaining module is configured to:
and when a screenshot command is received, acquiring at least one image frame from the image frames in the cache through a screenshot interface preset in a video player playing the target video, and storing the image frame as a screenshot image.
10. The apparatus of claim 6, wherein the obtaining module is configured to:
when a screenshot command is received, if the next image frame of the currently played image frame is not stored locally, acquiring at least one image frame from the image frames in the cache and storing the image frame as a screenshot image;
the obtaining module is further configured to:
when receiving a screenshot command, if the next image frame of the currently played image frame is stored locally, decoding the next image frame, and storing the image frame obtained by decoding as a screenshot image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410355904.6A CN104616241A (en) | 2014-07-24 | 2014-07-24 | Video screen-shot method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410355904.6A CN104616241A (en) | 2014-07-24 | 2014-07-24 | Video screen-shot method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104616241A true CN104616241A (en) | 2015-05-13 |
Family
ID=53150674
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410355904.6A Pending CN104616241A (en) | 2014-07-24 | 2014-07-24 | Video screen-shot method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104616241A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105791952A (en) * | 2016-03-02 | 2016-07-20 | 传线网络科技(上海)有限公司 | Screen shooting method and device for streaming media video data, and electronic device |
CN106101814A (en) * | 2016-06-13 | 2016-11-09 | 北京小米移动软件有限公司 | Picture display method and device |
CN106412702A (en) * | 2015-07-27 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Video clip interception method and device |
CN108920113A (en) * | 2018-05-31 | 2018-11-30 | 北京小米移动软件有限公司 | Video frame images Method of printing, device and computer readable storage medium |
CN108985176A (en) * | 2018-06-20 | 2018-12-11 | 北京优酷科技有限公司 | image generating method and device |
CN110062273A (en) * | 2019-05-14 | 2019-07-26 | 维沃移动通信有限公司 | The method and mobile terminal of screenshot |
CN110324656A (en) * | 2018-03-28 | 2019-10-11 | 北京视联动力国际信息技术有限公司 | A kind of data processing method and device of view networking |
CN110858910A (en) * | 2018-08-23 | 2020-03-03 | 广州虎牙信息科技有限公司 | Live video display method, device, equipment and storage medium |
CN110876069A (en) * | 2018-08-31 | 2020-03-10 | 广州虎牙信息科技有限公司 | Method, device and equipment for acquiring video screenshot and storage medium |
CN113709574A (en) * | 2021-03-17 | 2021-11-26 | 腾讯科技(北京)有限公司 | Video screenshot method and device, electronic equipment and computer-readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100188577A1 (en) * | 2009-01-26 | 2010-07-29 | Sony Corporation | Display system and method for a freeze frame feature for streaming video |
CN101815199A (en) * | 2010-04-07 | 2010-08-25 | 中兴通讯股份有限公司 | Video processing method and terminal |
CN102722590A (en) * | 2012-06-25 | 2012-10-10 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and image acquisition method |
CN103369372A (en) * | 2013-07-17 | 2013-10-23 | 广州珠江数码集团有限公司 | Live television screen capturing system and live television screen capturing method |
CN103414863A (en) * | 2013-08-07 | 2013-11-27 | 天脉聚源(北京)传媒科技有限公司 | Method and device for processing video |
CN103686199A (en) * | 2012-09-24 | 2014-03-26 | 中兴通讯股份有限公司 | IPTV multi-window program preview method, system and terminal |
-
2014
- 2014-07-24 CN CN201410355904.6A patent/CN104616241A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100188577A1 (en) * | 2009-01-26 | 2010-07-29 | Sony Corporation | Display system and method for a freeze frame feature for streaming video |
CN101815199A (en) * | 2010-04-07 | 2010-08-25 | 中兴通讯股份有限公司 | Video processing method and terminal |
CN102722590A (en) * | 2012-06-25 | 2012-10-10 | 宇龙计算机通信科技(深圳)有限公司 | Terminal and image acquisition method |
CN103686199A (en) * | 2012-09-24 | 2014-03-26 | 中兴通讯股份有限公司 | IPTV multi-window program preview method, system and terminal |
CN103369372A (en) * | 2013-07-17 | 2013-10-23 | 广州珠江数码集团有限公司 | Live television screen capturing system and live television screen capturing method |
CN103414863A (en) * | 2013-08-07 | 2013-11-27 | 天脉聚源(北京)传媒科技有限公司 | Method and device for processing video |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106412702B (en) * | 2015-07-27 | 2020-06-05 | 腾讯科技(深圳)有限公司 | Video clip intercepting method and device |
CN106412702A (en) * | 2015-07-27 | 2017-02-15 | 腾讯科技(深圳)有限公司 | Video clip interception method and device |
CN105791952B (en) * | 2016-03-02 | 2019-03-12 | 传线网络科技(上海)有限公司 | The screenshot method and device and electronic equipment of streaming media video data |
CN105791952A (en) * | 2016-03-02 | 2016-07-20 | 传线网络科技(上海)有限公司 | Screen shooting method and device for streaming media video data, and electronic device |
CN106101814A (en) * | 2016-06-13 | 2016-11-09 | 北京小米移动软件有限公司 | Picture display method and device |
CN110324656A (en) * | 2018-03-28 | 2019-10-11 | 北京视联动力国际信息技术有限公司 | A kind of data processing method and device of view networking |
CN108920113A (en) * | 2018-05-31 | 2018-11-30 | 北京小米移动软件有限公司 | Video frame images Method of printing, device and computer readable storage medium |
CN108985176A (en) * | 2018-06-20 | 2018-12-11 | 北京优酷科技有限公司 | image generating method and device |
CN110858910B (en) * | 2018-08-23 | 2022-05-27 | 广州虎牙信息科技有限公司 | Live video display method, device, equipment and storage medium |
CN110858910A (en) * | 2018-08-23 | 2020-03-03 | 广州虎牙信息科技有限公司 | Live video display method, device, equipment and storage medium |
CN110876069A (en) * | 2018-08-31 | 2020-03-10 | 广州虎牙信息科技有限公司 | Method, device and equipment for acquiring video screenshot and storage medium |
CN110062273B (en) * | 2019-05-14 | 2021-08-10 | 维沃移动通信有限公司 | Screenshot method and mobile terminal |
CN110062273A (en) * | 2019-05-14 | 2019-07-26 | 维沃移动通信有限公司 | The method and mobile terminal of screenshot |
CN113709574A (en) * | 2021-03-17 | 2021-11-26 | 腾讯科技(北京)有限公司 | Video screenshot method and device, electronic equipment and computer-readable storage medium |
CN113709574B (en) * | 2021-03-17 | 2024-03-19 | 腾讯科技(北京)有限公司 | Video screenshot method and device, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107037949B (en) | Split screen display method and device | |
CN104616241A (en) | Video screen-shot method and device | |
US9588805B2 (en) | Method and terminal device for controlling background application | |
CN105338409B (en) | Network video preloading method and device | |
EP3174053A1 (en) | Method, apparatus and system for playing multimedia data, computer program and recording medium | |
CN105955765B (en) | Application preloading method and device | |
CN106033397B (en) | Memory buffer area adjusting method, device and terminal | |
CN104462296B (en) | File management method and device and terminal | |
CN107562349B (en) | Method and device for executing processing | |
RU2663709C2 (en) | Method and device for data processing | |
CN111031177A (en) | Screen recording method, device and readable storage medium | |
US10831514B2 (en) | Display method and device of application interface | |
CN106354504B (en) | Message display method and device | |
US20170316011A1 (en) | Method and apparatus for searching resource | |
CN104111979A (en) | Search recommendation method and device | |
CN111814088A (en) | Page processing method and device | |
US20220256230A1 (en) | Method and apparatus for video playing | |
CN104837020B (en) | The method and apparatus for playing video | |
CN110648657B (en) | Language model training method, language model building method and language model building device | |
CN104951522B (en) | Method and device for searching | |
CN110213062B (en) | Method and device for processing message | |
CN105208107A (en) | File downloading method, device, intelligent terminal and downloading device | |
CN112667852B (en) | Video-based searching method and device, electronic equipment and storage medium | |
CN112486604B (en) | Toolbar setting method and device for setting toolbar | |
CN107329893A (en) | Traversal method, device and the storage medium of application interface |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150513 |
|
RJ01 | Rejection of invention patent application after publication |