CN110753201B - Video recording method and device, electronic equipment and storage medium - Google Patents

Video recording method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110753201B
CN110753201B CN201911103194.7A CN201911103194A CN110753201B CN 110753201 B CN110753201 B CN 110753201B CN 201911103194 A CN201911103194 A CN 201911103194A CN 110753201 B CN110753201 B CN 110753201B
Authority
CN
China
Prior art keywords
target
duration
video data
recording
frame rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911103194.7A
Other languages
Chinese (zh)
Other versions
CN110753201A (en
Inventor
艾海强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201911103194.7A priority Critical patent/CN110753201B/en
Publication of CN110753201A publication Critical patent/CN110753201A/en
Application granted granted Critical
Publication of CN110753201B publication Critical patent/CN110753201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/49Saving the game status; Pausing or ending the game
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping

Abstract

The embodiment of the invention provides a video recording method, a video recording device, electronic equipment and a storage medium, wherein the method is applied to the electronic equipment and comprises the following steps: acquiring a target duration for a target application; determining a target frame rate according to the target duration; under the condition that the target application is detected to run, recording target video data according to the target frame rate; and reducing the data volume of the target video data according to a preset deletion strategy under the condition that the duration of the recording is longer than the target duration. By adjusting the target frame rate according to the target duration and dynamically adjusting the data volume of the recorded target video according to the target duration, the situation that the operation of the target application is affected due to the overlarge memory of the recorded video is avoided, the optimal screen recording time in the application operation process is guaranteed not to be missed by a user, and the user experience of the screen recording function is improved.

Description

Video recording method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of electronic equipment, in particular to a video recording method and device, electronic equipment and a storage medium.
Background
With the rapid development of science and technology, electronic equipment has evolved from a traditional communication tool to a platform capable of bearing a plurality of functions such as mobile applications, mobile contents, value-added services, games, etc., wherein the game functions become indispensable functions of the electronic equipment at present, and compared with a PC terminal, the electronic equipment has the characteristics of more desirable portability, mobility, marketability, etc.
At present, a recording function of game application of electronic equipment generally exists in two modes, one mode is that a user needs to operate the recording function by himself to start the recording function, but the user cannot start the recording function in the game process, and often thinks that the best recording opportunity is missed when the user wants to record.
The other method is to record the picture of the whole game of the user, and the mode can ensure that the game of the user can be completely recorded at each moment, but a large amount of memory is occupied, so that the phenomena of game application blocking and the like are caused, and the user experience is seriously influenced.
Disclosure of Invention
The invention provides a video recording method, a video recording device, electronic equipment and a computer readable medium, which are used for solving the problems that a large amount of memory is occupied by videos recorded by application of the electronic equipment, the normal operation of the application is influenced, and the optimal moment is easy to miss.
In a first aspect, an embodiment of the present invention provides a video recording method, where the method is applied to an electronic device, and the method includes:
acquiring a target duration for a target application;
determining a target frame rate according to the target duration;
under the condition that the target application is detected to run, recording target video data according to the target frame rate;
and reducing the data volume of the target video data according to a preset deletion strategy under the condition that the duration of the recording is longer than the target duration.
Optionally, the step of obtaining the target duration for the target application includes:
receiving a first input;
in response to the first input, a target duration for the target application is determined.
Optionally, the step of reducing the data size of the target video data according to a preset pruning strategy includes:
and deleting the expired video data from the target video data according to the target duration.
Optionally, the reducing the data size of the target video data according to the preset pruning strategy includes:
reducing the frame rate of the recorded target video data according to the duration;
or, according to the duration, reducing the frame rate of the recorded target video data and reducing the target frame rate during recording.
Optionally, after the step of recording the target video data according to the target frame rate, the method further includes:
receiving a selection operation under the condition that a plurality of sections of target video data are recorded;
and responding to the selection operation, splicing at least two sections of target video data selected by the selection operation to obtain spliced target video data.
In a second aspect, an embodiment of the present invention further provides a video recording apparatus, where the apparatus is applied to an electronic device, and the apparatus includes:
the acquisition module is used for acquiring target duration aiming at the target application;
the determining module is used for determining a target frame rate according to the target duration;
the recording module is used for recording the target video data according to the target frame rate under the condition that the target application is detected to run;
and the deleting module is used for reducing the data volume of the target video data according to a preset deleting strategy under the condition that the recording duration is longer than the target duration.
Optionally, the obtaining module includes:
a receiving submodule for receiving a first input;
a first determination submodule, configured to determine a target duration for the target application in response to the first input.
Optionally, the deleting module includes:
and the deleting submodule is used for deleting the expired video data from the target video data according to the target duration.
Optionally, the deleting module includes:
the second adjusting submodule is used for reducing the frame rate of the recorded target video data according to the duration;
and the first adjusting submodule is used for reducing the frame rate of the recorded target video data and reducing the target frame rate during recording according to the duration.
Optionally, the apparatus further includes:
the receiving module is used for receiving selection operation under the condition that a plurality of sections of target video data are recorded;
and the splicing module is used for responding to the selection operation and splicing at least two sections of target video data selected by the selection operation to obtain spliced target video data.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a processor, a memory, and a computer program stored in the memory and being executable on the processor, and when the computer program is executed by the processor, the steps of the video recording method according to the present invention are implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the video recording method according to the present invention are implemented.
The embodiment of the invention provides a video recording method, a video recording device, electronic equipment and a storage medium, wherein the method is applied to the electronic equipment and comprises the following steps: acquiring a target duration for a target application; determining a target frame rate according to the target duration; under the condition that the target application is detected to run, recording target video data according to the target frame rate; and reducing the data volume of the target video data according to a preset deletion strategy under the condition that the duration of the recording is longer than the target duration. By adjusting the target frame rate according to the target duration and dynamically adjusting the data volume of the recorded target video according to the target duration, the situation that the operation of the target application is affected due to the overlarge memory of the recorded video is avoided, the optimal screen recording time in the application operation process is guaranteed not to be missed by a user, and the user experience of the screen recording function is improved.
Drawings
Fig. 1 is a flowchart illustrating a first video recording method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a second video recording method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a third video recording method according to an embodiment of the present invention;
fig. 4 is a block diagram illustrating a structure of a video recording apparatus according to an embodiment of the present invention;
fig. 5 shows a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a first video recording method provided in an embodiment of the present invention is shown, where the method is applied to an electronic device, and the method may include:
step 101, obtaining a target duration for a target application.
In the embodiment of the present invention, before recording a screen of a target application in an electronic device of a user, the user needs to set a video length that the target application needs to record, that is, the user inputs a target duration. The target duration may also be automatically determined according to the type of the target application, and specifically, according to the content of different target applications, a corresponding default target duration may be preset, for example, the duration of a round of game in the application of the game type is about 10 to 20 minutes, so that the target duration may be set to 5 minutes to cover the highlight time in the game; for music type applications, the target duration may be set to 3 minutes to cover a major portion of a song, since a song is approximately 2 to 4 minutes in time.
And step 102, determining a target frame rate according to the target duration.
In the embodiment of the invention, in order to ensure that the data size of the subsequent recorded video does not occupy too much memory so as to avoid that the normal operation condition of the target application is influenced by insufficient memory, the system adjusts the target frame rate of the recorded video according to the target duration input by the user so as to ensure that the data volume of the finally recorded target video data does not exceed the data volume threshold, wherein the data volume threshold is determined according to the memory of the electronic equipment and the memory occupied by the running application.
The process of setting for the target application may be before the target application is started or after the target application software is started.
In the embodiment of the present invention, when the target duration input for the target application is not received or the target duration is less than or equal to the system default duration, the target application may be configured by using the system default duration, the system default duration is used as the target duration, and the system default frame rate is used as the target frame rate of the target application, where the system default duration and the system default frame rate may be preconfigured for the target application, for example, the system default duration of the game application may be 5 minutes, the system default duration of the instant messaging application may be 3 minutes, and the system default frame rate may be preconfigured according to actual needs of the target application, and a specific configuration manner is not limited herein. The target application is configured by setting the default system time length and the default system frame rate, and a user does not need to specially configure the target time length of the target application, so that the user experience of the user in recording a screen picture of the target application is improved.
And 103, recording target video data according to the target frame rate under the condition that the target application is detected to run.
In the embodiment of the present invention, the target application may be one or more application software or/and system applications installed in the electronic device. The electronic device may receive a target duration set by a user for a target application. If the target duration set for the target application is longer than the default duration of the system, it is required to ensure that the data volume of the target video data does not exceed the data volume threshold. Since the target frame rate is inversely proportional to the target duration, the target frame rate can be calculated by formula (1).
F1=T0/T1×F0 (1)
Wherein, T0 indicates the default duration of the system, T1 indicates the target duration, F0 indicates the default frame rate of the system, and F1 indicates the target frame rate.
According to the embodiment of the invention, the target frame rate for recording the target video data is adjusted when the target time length input by the user is too large, so that the user can flexibly configure the target time length, the data volume of the target video data is ensured not to be too large to influence the normal operation of the target application, and the stability of the dynamic recording process aiming at the target application is improved.
Of course, the user may start a recording end operation, and the electronic device stores the target video data in response to the recording end operation. The recorded video is generally stored in a cache, and then the target video data can be transferred from the cache to a nonvolatile storage device for storage.
In the embodiment of the invention, when the target application starts to run, the screen picture of the target application is automatically recorded according to the target frame rate. The recording process is dynamically circulated, the duration of target video data stored in a memory of the electronic equipment is always kept to be not more than a data volume threshold preset by a system, and the target frame rate of the target video data is adjusted, so that the data volume of the target video data cannot exceed the data volume threshold as long as the duration of the target video data does not exceed the target duration, and unnecessary influence on the normal operation of target applications and other applications in the electronic equipment is avoided.
And 104, reducing the data volume of the target video data according to a preset deletion strategy under the condition that the recording duration is longer than the target duration.
In the embodiment of the present invention, if the length of the video recorded by the user exceeds the target duration, the data volume of the recorded target video data will exceed the data volume threshold, and at this time, the redundant data in the target video data can be deleted by performing configuration adjustment on the target video data. Specifically, the data amount of the target video data may be reduced by adjusting a configuration that affects the video data amount, such as a frame rate and a resolution of the target video data, or compressing the target video data. Further, data in the target video data may be deleted directly, for example, a portion of the video data with high picture similarity, a portion that does not meet the content requirement of the user, and expired video data may be deleted.
In the embodiment of the invention, the user can quickly store the recorded target video data only by inputting the preset selection operation in the running process of the target application after the electronic equipment receives the selection operation, so that the user can conveniently acquire the picture required by the user in the running process of the target application. For example: in the running process of the game application, when the game picture has the wonderful moment, a user can input selection operation and store the recorded target video data, the target video data starts to be recorded when the game starts, and the recording is not triggered by the user after the wonderful moment occurs, so that the wonderful moment required by the user is included, and the user cannot miss the video data of the wonderful moment required to be recorded because the user cannot grasp the recording starting moment in the screen recording process.
The embodiment of the invention provides a first video recording method, which is applied to electronic equipment and comprises the following steps: acquiring a target duration for a target application; determining a target frame rate according to the target duration; under the condition that the target application is detected to run, recording target video data according to the target frame rate; and reducing the data volume of the target video data according to a preset deletion strategy under the condition that the duration of the recording is longer than the target duration. By adjusting the target frame rate according to the target duration and dynamically adjusting the data volume of the recorded target video according to the target duration, the situation that the operation of the target application is affected due to the overlarge memory of the recorded video is avoided, the optimal screen recording time in the application operation process is guaranteed not to be missed by a user, and the user experience of the screen recording function is improved.
Referring to fig. 2, a flowchart of a second video recording method provided in an embodiment of the present invention is shown, where the method is applied to an electronic device, and the method may include:
step 201, receiving a first input; in response to the first input, a target duration for the target application is determined.
In the embodiment of the invention, a user can configure the target time length for recording the video data through the target application before recording the video, and if the user does not configure the target time length, the system automatically confirms the default target time length of the system as the target time length so as to reduce the operation required by the user.
Step 202, recording the target video data according to the target frame rate under the condition that the target application is detected to run.
In the embodiment of the invention, if the duration of the video recorded by the user does not exceed the target duration, the data volume of the target video data recorded according to the target frame rate does not exceed the data volume threshold, and at this time, the video is recorded according to the target frame rate.
And 203, reducing the frame rate of the recorded target video data according to the duration when the duration of the recording is greater than the target duration.
In the embodiment of the present invention, the process of adjusting the frame rate of the recorded target video data may be specifically determined according to the original target frame rate, the target duration, and the duration. Because the data volume of the recorded target video data is in direct proportion to the duration and the frame rate, the ratio between the adjusted target frame rate and the original target frame rate can be determined according to the ratio between the target duration and the duration, and the adjusted target frame rate is determined under the condition that the original target frame rate is known. For example: the target duration of a certain target application is 20 minutes, the target frame rate is 60 frames, and when the duration is 40 minutes, the target frame rate is adjusted to 30 frames, so as to ensure that the data volume of the recorded target video data is unchanged. Further, in practical application, since the process is a dynamic process, when the distance that the duration of recording approaches the target duration is less than the distance threshold, the frame rate of the recorded target video data can be dynamically adjusted, so as to avoid the influence on the normal operation of the target application caused by the duration exceeding the target.
And 204, under the condition that the duration of the recording is greater than the target duration, reducing the frame rate of the recorded target video data and reducing the target frame rate during the recording according to the duration.
In the embodiment of the present invention, on the basis of the scheme of adjusting the frame rate of the recorded target video data in step 203, the target frame rate during recording may also be adjusted at the same time. Specifically, if the duration of the recorded video exceeds the target duration, it indicates that the data volume of the target video data recorded at the target frame rate exceeds the data volume threshold, the original target frame rate of the recorded video may be adjusted according to the ratio between the duration of the recorded video and the target duration, and the recording may be performed at the adjusted target frame rate, so as to reduce the data volume of the recorded target video data as much as possible, thereby reducing the memory occupied by the recorded video data, and avoiding the situation that the normal operation of the target application is affected by the large data volume of the recorded target video book. And changing the frame rate of the recorded target video data to the adjusted target frame rate while adjusting the target frame rate of the recorded video. In practical application, at least one preset time node can be preset according to the target duration, and each preset time node has different duration and target frame rate. And when the recording duration reaches a preset time node, adjusting the target frame rate to a target frame rate corresponding to the preset time node, and adjusting the frame rate of the recorded target video data to the adjusted target frame rate. For example: the target duration of a certain target application is 10 minutes, the target frame rate is 80 frames, two preset time nodes are set to be 5 minutes and 15 minutes respectively, and the corresponding target frame rates are 40 frames and 20 frames respectively. When the recording duration reaches 5 minutes, the recorded target frame rate is adjusted to 40 frames in advance, the frame rate of the recorded target video data is adjusted to 40 frames, and when the recording duration reaches 15 minutes, the recorded target frame rate is adjusted to 20 frames in advance, and the frame rate of the recorded target video data is adjusted to 20 frames.
Compared with the scheme in step 203, the dynamic frame rate adjustment method does not need to adjust the frame rate of the recorded target video data continuously after the target frame rate is adjusted, thereby saving data processing resources and further effectively avoiding the situation that the normal operation of the target application is affected by the overlarge data amount of the recorded target video data.
The scheme for adjusting the target frame rate in step 203 and step 204 may be selected according to actual requirements, and is not limited herein.
Step 205, receiving a selection operation when a plurality of target video data segments are recorded.
In the embodiment of the invention, a user can configure the preset screen area of the recording screen for the target application, and record the screen picture of the specified area or the specified window of the target application software after configuration, wherein the configuration process can be performed before the recording process or during the recording process, and the user can configure the preset screen area according to the actual requirement. By configuring the screen recording area, the flexibility of the screen recording function for the target application is improved.
In the process of recording the target application, a user can pause recording the target video data through a first operation acting on the electronic equipment, generate a section of target video data from the recorded video, and can re-record a second section of target video data through a second operation acting on the electronic equipment, so that the target video data can have multiple sections in the whole recording process. It can be understood that a user may perform the first operation and the second operation multiple times, so that multiple segments of target video data are generated in the running process of the target application, and in a time period between the first operation and the second operation, the content displayed by the target application is not recorded, so that the recorded target video data better meets the user requirements. The first operation and the second operation may be simultaneous pressing of a key combination in the electronic device, or sequential pressing of a case combination in the electronic device, and the key combination and the pressing mode respectively corresponding to the first operation and the second operation may be determined by a user through preset, or may be default by a system; the first operation and the second operation may also be touch screen operations acting on a sensing screen of the electronic device, a user may trigger the touch screen operations by performing sliding operations on the screen of the electronic device, and a specific manner of the first operation and the second operation may be configured according to a command receiving function of the electronic device and actual needs of the user, which is not specifically limited herein.
According to the embodiment of the invention, the video is recorded for many times according to the operation of the user in the process of recording the target application, so that the time period which is not wanted to be recorded by the user can be skipped over in the process of recording the dynamic video screen aiming at the target application, and the flexibility of the video recording process is improved.
And step 206, responding to the selection operation, splicing at least two sections of target video data selected by the selection operation to obtain spliced target video data.
After the process of recording the screen image of the target application is completed, a user can select the recorded multiple sections of target video data according to own requirements through selection operation acting on the electronic equipment, and splice at least two sections of selected target video data to obtain final target video data, wherein the target video data which are not selected by the selection operation can be stored individually, and the target video data which are not selected can also be deleted to reduce the data storage pressure of the electronic equipment deployed by the target application. According to the method, after the process of recording the target application, the currently recorded multiple sections of target video data are spliced according to selection operation, so that the recorded target video data can be freely spliced according to user requirements, and the flexibility of video recording for the target application is improved.
In the second video recording method provided by the embodiment of the present invention, the recorded target frame rate and the frame rate of the recorded target video data are dynamically adjusted according to the recording duration in the video recording process, so that a situation that the operation of a target application is affected due to an excessive memory of the recorded video is avoided, and a user can stop and continue the recording process through an input operation, so that the user is ensured not to miss the optimal screen recording time in the application operation process, and the user experience of the application screen recording function is improved.
Referring to fig. 3, a flowchart of a second video recording method provided in an embodiment of the present invention is shown, where the method is applied to an electronic device, and the method may include:
step 301, receiving a first input, and determining a target duration for the target application in response to the first input.
This step can refer to the detailed description of step 201, and is not described herein again.
Step 302, recording the target video data according to the target frame rate under the condition that the target application is detected to run.
This step can refer to the detailed description of step 103, which is not repeated herein.
Step 303, deleting expired video data from the target video data according to the target duration when the recording duration is longer than the target duration.
In the embodiment of the present invention, the expired video data refers to a portion of video data that is recorded first and exceeds a target duration in the target video data. When the duration of the recorded target video data does not exceed the target duration, continuously recording a screen picture of a target application, and when the duration of the recording exceeds the target duration, deleting outdated video data in the recording process in order to ensure that the target video data does not exceed a data volume threshold, so that the duration of the target video data does not exceed the target duration while continuously recording the target video data in a recording and deleting mode. The deleting process may be performed according to a preset frequency, and when the target video data exceeds the target duration preset duration, the video data with the preset duration recorded first in the target video data is deleted, for example, when the length of the target video data exceeds 5 seconds, the data in the first 5 seconds of the target video data is deleted, where the preset frequency may be determined according to the size of a memory of the electronic device and the size of a memory occupied by application software running.
Step 304, receiving a selection operation under the condition that a plurality of sections of target video data are recorded.
This step can refer to the detailed description of step 205, which is not repeated herein.
And 305, responding to the selection operation, splicing at least two sections of target video data selected by the selection operation to obtain spliced target video data.
This step can refer to the detailed description of step 206, which is not repeated here.
The third video recording method provided in the embodiment of the present invention dynamically deletes the first recorded data exceeding the target duration in the process of recording the video while adjusting the target frame rate according to the target duration, thereby not only avoiding the situation that the operation of the target application is affected by an excessive memory of the recorded video, but also ensuring that the user does not miss the optimal screen recording time in the process of operating the application, and improving the user experience of the screen recording function.
Referring to fig. 4, fig. 4 is a block diagram illustrating a structure of a video recording apparatus 40 according to an embodiment of the present invention, where the apparatus is applied to an electronic device, and the apparatus may include:
an obtaining module 401, configured to obtain a target duration for a target application.
A determining module 402, configured to determine a target frame rate according to the target duration.
A recording module 403, configured to record target video data according to the target frame rate when it is detected that the target application is running.
A deleting module 404, configured to reduce the data size of the target video data according to a preset deleting strategy when the recording duration is longer than the target duration.
Optionally, the obtaining module 401 includes:
the receiving sub-module 4011 is configured to receive a first input.
A first determining sub-module 4012, configured to determine a target duration for the target application in response to the first input.
Optionally, the deleting module 404 includes:
the deleting submodule 4041 is configured to delete expired video data from the target video data according to the target duration.
Optionally, the deleting module 404 includes:
the second adjusting sub-module 4042 is configured to reduce the frame rate of the recorded target video data according to the duration.
The first adjusting sub-module 4043 is configured to reduce the frame rate of the recorded target video data and reduce the target frame rate during recording according to the duration.
Optionally, the apparatus further includes:
a receiving module 405, configured to receive a selection operation when multiple pieces of target video data are recorded.
And the splicing module 406 is configured to splice at least two sections of target video data selected by the selection operation in response to the selection operation, so as to obtain spliced target video data.
An embodiment of the present invention provides a video recording apparatus, which is applied to an electronic device, and includes: the acquisition module is used for acquiring target duration aiming at the target application; the determining module is used for determining a target frame rate according to the target duration; the recording module is used for recording the target video data according to the target frame rate under the condition that the target application is detected to run; and the deleting module is used for reducing the data volume of the target video data according to a preset deleting strategy under the condition that the recording duration is longer than the target duration. By adjusting the target frame rate according to the target duration and dynamically adjusting the data volume of the recorded target video according to the target duration, the situation that the operation of the target application is affected due to the overlarge memory of the recorded video is avoided, the optimal screen recording time in the application operation process is guaranteed not to be missed by a user, and the user experience of the screen recording function is improved.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device 500 for implementing various embodiments of the present invention, where the electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
A processor 510 for obtaining a target duration for a target application; determining a target frame rate according to the target duration; under the condition that the target application is detected to run, recording target video data according to the target frame rate; and reducing the data volume of the target video data according to a preset deletion strategy under the condition that the duration of the recording is longer than the target duration.
In the embodiment of the invention, the data volume of the recorded target video is dynamically adjusted according to the target duration while the target frame rate is adjusted according to the target duration, so that the condition that the operation of the target application is influenced by overlarge memory of the recorded video is avoided, the optimal screen recording time in the application operation process is ensured not to be missed by a user, and the user experience of the screen recording function is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with a network and other devices through wireless communication means.
The electronic device provides wireless broadband internet access to the user via the network module 502, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 501 in case of the phone call mode.
The electronic device 500 also includes at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 5061 or a backlight when the electronic device 500 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 5, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 508 is an interface for connecting an external device to the electronic apparatus 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic apparatus 500 or may be used to transmit data between the electronic apparatus 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating device, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 510 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the electronic device. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor, which mainly handles operating devices, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The electronic device 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 through a power management device, so as to implement functions of managing charging, discharging, and power consumption through the power management device.
In addition, the electronic device 500 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 510, a memory 509, and a computer program that is stored in the memory 509 and can be run on the processor 510, and when the computer program is executed by the processor 510, the processes of the video recording method embodiment are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
Based on the hardware structure of the electronic device, the embodiments of the present invention will be described in detail below.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the video recording method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A video recording method is applied to an electronic device, and the method comprises the following steps:
acquiring a target duration for a target application;
determining a target frame rate according to the target duration;
under the condition that the target application is detected to run, recording target video data according to the target frame rate;
reducing the data volume of the target video data according to a preset deletion strategy under the condition that the duration of recording is longer than the target duration;
wherein the reducing the data amount of the target video data according to the preset pruning strategy comprises:
reducing the frame rate of the recorded target video data according to the duration;
or, according to the duration, reducing the frame rate of the recorded target video data and reducing the target frame rate during recording.
2. The method of claim 1, wherein the step of obtaining the target duration for the target application comprises:
receiving a first input;
in response to the first input, a target duration for the target application is determined.
3. The method of claim 1, wherein the step of reducing the data size of the target video data according to a preset puncturing strategy comprises:
and deleting the expired video data from the target video data according to the target duration.
4. The method according to any one of claims 1 to 3, wherein the step of recording the target video data at the target frame rate is followed by further comprising:
receiving a selection operation under the condition that a plurality of sections of target video data are recorded;
and responding to the selection operation, splicing at least two sections of target video data selected by the selection operation to obtain spliced target video data.
5. A video recording apparatus, wherein the apparatus is applied to an electronic device, the apparatus comprising:
the acquisition module is used for acquiring target duration aiming at the target application;
the determining module is used for determining a target frame rate according to the target duration;
the recording module is used for recording the target video data according to the target frame rate under the condition that the target application is detected to run;
the deleting module is used for reducing the data volume of the target video data according to a preset deleting strategy under the condition that the recording duration is longer than the target duration;
wherein the deleting module comprises:
the second adjusting submodule is used for reducing the frame rate of the recorded target video data according to the duration;
and the first adjusting submodule is used for reducing the frame rate of the recorded target video data and reducing the target frame rate during recording according to the duration.
6. The apparatus of claim 5, wherein the obtaining module comprises:
a receiving submodule for receiving a first input;
a first determination submodule, configured to determine a target duration for the target application in response to the first input.
7. The apparatus of claim 5, wherein the deletion module comprises:
and the deleting submodule is used for deleting the expired video data from the target video data according to the target duration.
8. The apparatus of any one of claims 5 to 7, further comprising:
the receiving module is used for receiving selection operation under the condition that a plurality of sections of target video data are recorded;
and the splicing module is used for responding to the selection operation and splicing at least two sections of target video data selected by the selection operation to obtain spliced target video data.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the video recording method according to any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the video recording method according to any one of claims 1 to 4.
CN201911103194.7A 2019-11-12 2019-11-12 Video recording method and device, electronic equipment and storage medium Active CN110753201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911103194.7A CN110753201B (en) 2019-11-12 2019-11-12 Video recording method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911103194.7A CN110753201B (en) 2019-11-12 2019-11-12 Video recording method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110753201A CN110753201A (en) 2020-02-04
CN110753201B true CN110753201B (en) 2022-02-08

Family

ID=69283076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911103194.7A Active CN110753201B (en) 2019-11-12 2019-11-12 Video recording method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110753201B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543348A (en) * 2020-11-27 2021-03-23 深圳市慧为智能科技股份有限公司 Remote screen recording method, device, equipment and computer readable storage medium
CN112770160A (en) * 2020-12-24 2021-05-07 沈阳麟龙科技股份有限公司 Stock analysis video creation system and method
CN114071238A (en) * 2021-11-12 2022-02-18 北京百度网讯科技有限公司 Method, apparatus, device, medium and product for generating video progress bar
CN114554273A (en) * 2022-01-27 2022-05-27 深圳市大梦龙途文化传播有限公司 Method, equipment and storage medium for automatically recording highlight moment of game
CN115361580B (en) * 2022-08-18 2023-11-03 杭州分叉智能科技有限公司 Screen picture recording method for RPA robot operation

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101489109A (en) * 2009-01-12 2009-07-22 深圳市同洲电子股份有限公司 Network personal video recording method, apparatus and background management system
CN102655579A (en) * 2012-04-09 2012-09-05 深圳一电科技有限公司 Method and device for storing audio-video images
CN103596033A (en) * 2013-11-11 2014-02-19 北京佳讯飞鸿电气股份有限公司 Method for solving problem of audio and video non-synchronization in multimedia system terminal playback
CN105791951A (en) * 2014-12-26 2016-07-20 Tcl海外电子(惠州)有限公司 Recording method and device for audio and video code stream
CN108024079A (en) * 2017-11-29 2018-05-11 广东欧珀移动通信有限公司 Record screen method, apparatus, terminal and storage medium
CN109218810A (en) * 2018-08-29 2019-01-15 努比亚技术有限公司 A kind of video record parameter regulation method, equipment and computer readable storage medium
US10440310B1 (en) * 2018-07-29 2019-10-08 Steven Bress Systems and methods for increasing the persistence of forensically relevant video information on space limited storage media

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5893062A (en) * 1996-12-05 1999-04-06 Interval Research Corporation Variable rate video playback with synchronized audio
US10133653B2 (en) * 2012-02-23 2018-11-20 Cadence Design Systems, Inc. Recording and playback of trace and video log data for programs

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101489109A (en) * 2009-01-12 2009-07-22 深圳市同洲电子股份有限公司 Network personal video recording method, apparatus and background management system
CN102655579A (en) * 2012-04-09 2012-09-05 深圳一电科技有限公司 Method and device for storing audio-video images
CN103596033A (en) * 2013-11-11 2014-02-19 北京佳讯飞鸿电气股份有限公司 Method for solving problem of audio and video non-synchronization in multimedia system terminal playback
CN105791951A (en) * 2014-12-26 2016-07-20 Tcl海外电子(惠州)有限公司 Recording method and device for audio and video code stream
CN108024079A (en) * 2017-11-29 2018-05-11 广东欧珀移动通信有限公司 Record screen method, apparatus, terminal and storage medium
US10440310B1 (en) * 2018-07-29 2019-10-08 Steven Bress Systems and methods for increasing the persistence of forensically relevant video information on space limited storage media
CN109218810A (en) * 2018-08-29 2019-01-15 努比亚技术有限公司 A kind of video record parameter regulation method, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN110753201A (en) 2020-02-04

Similar Documents

Publication Publication Date Title
CN110753201B (en) Video recording method and device, electronic equipment and storage medium
CN110557566B (en) Video shooting method and electronic equipment
CN109078319B (en) Game interface display method and terminal
CN108471550B (en) Video intercepting method and terminal
CN110855921B (en) Video recording control method and electronic equipment
CN111147919A (en) Play adjustment method, electronic equipment and computer readable storage medium
CN110990172A (en) Application sharing method, first electronic device and computer-readable storage medium
CN111597540B (en) Login method of application program, electronic device and readable storage medium
CN108132749B (en) Image editing method and mobile terminal
CN111163449B (en) Application sharing method, first electronic device and computer-readable storage medium
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN108009031B (en) Application program control method and mobile terminal
CN109729431B (en) Video privacy protection method and terminal equipment
CN111050214A (en) Video playing method and electronic equipment
CN112612552B (en) Application resource loading method and device, electronic equipment and readable storage medium
CN111694536A (en) Audio control method, electronic device and computer-readable storage medium
CN110213437B (en) Editing method and mobile terminal
CN108322659B (en) Shooting method and mobile terminal
CN111314639A (en) Video recording method and electronic equipment
CN111443968A (en) Screenshot method and electronic equipment
CN108228357B (en) Memory cleaning method and mobile terminal
CN108089799B (en) Control method of screen edge control and mobile terminal
CN111324263B (en) Screen capture method, electronic equipment and computer readable storage medium
CN110489037B (en) Screen capturing method and mobile terminal
CN109640305B (en) Audio and video acquisition method, Bluetooth device and terminal device

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