Video recording method and device, electronic equipment and medium
By using low-power image algorithms to process video frames and save original or anti-shake video streams during video recording, the problem of high power consumption of electronic devices is solved, and the balance between video recording quality and power consumption is achieved, and the device is avoided. The quality of the video stream is improved.
Patent Information
- Application Number
- CN202411211412.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-30
Smart Images

Figure CN119211462A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of camera technology, and specifically relates to a video recording method, device, electronic equipment and medium. Background Art
[0002] With the development of camera technology, users have higher and higher requirements on the camera quality of electronic devices.
[0003] At present, in order to improve the quality of video recording, a large number of video processing algorithms can be used to process the recorded video in real time during the camera process.
[0004] However, the addition of a large number of video processing algorithms during the video recording process significantly increases the power consumption of electronic devices, causing the temperature of the electronic devices to rise rapidly and the frequency to drop significantly, which in turn causes the electronic devices to freeze. Therefore, how to balance the video recording quality and the recording power consumption of electronic devices is an urgent problem to be solved. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a video recording method, device, electronic device and medium, which can reduce the recording power consumption of the electronic device while ensuring the quality of video recording.
[0006] In a first aspect, an embodiment of the present application provides a video recording method, the method comprising: during a video recording process, using a first image algorithm to process each original video frame, obtaining and displaying a first video frame corresponding to each original video frame; saving a first video stream, the first video stream including at least one of an original video stream and an anti-shake video stream, the original video stream including each original video frame, and the anti-shake video stream including each original video frame processed by a first electronic image stabilization (Electric Image Stabilization, EIS) algorithm; wherein the operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
[0007] In a second aspect, an embodiment of the present application provides a video recording device, which includes: a processing module, a display module and a storage module; the processing module is used to use a first image algorithm to process each original video frame during video recording to obtain a first video frame corresponding to each original video frame; the display module is used to display the first video frame corresponding to each original video frame processed by the processing module; the storage module is used to save a first video stream, the first video stream includes at least one of an original video stream and an anti-shake video stream, the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by a first EIS algorithm; wherein the operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, during the video recording process, on the one hand, since each original video frame can be processed by a first image algorithm with low running power consumption for video preview, the power consumption of the electronic device during the video recording process can be greatly reduced. On the other hand, since the original video stream or the anti-shake video stream processed by the first EIS algorithm can be saved, after the video recording is completed, the original video stream or the anti-shake video stream can be processed by image processing to obtain a finished video stream with good image quality, thereby improving the video recording quality. In this way, the video recording method provided in the embodiment of the present application can reduce the power consumption of the electronic device during the video recording process on the basis of ensuring the quality of the video recording. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a flowchart of a video recording method provided in an embodiment of the present application;
[0014] Figure 2 This is one of the schematic diagrams of the operation process of a video recording method provided in an embodiment of the present application;
[0015] Figure 3 This is a second schematic diagram of the operation process of a video recording method provided in an embodiment of the present application;
[0016] Figure 4 It is a structural schematic diagram of an electronic device to which a video recording method provided in an embodiment of the present application is applied;
[0017] Figure 5 This is a third schematic diagram of the operation process of a video recording method provided in an embodiment of the present application;
[0018] Figure 6 This is a fourth schematic diagram of the operation process of a video recording method provided in an embodiment of the present application;
[0019] Figure 7 is a schematic diagram of the structure of a video recording device provided in an embodiment of the present application;
[0020] Figure 8 It is one of the structural schematic diagrams of the electronic device provided in the embodiment of the present application;
[0021] Fig. 9 This is the second structural schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0024] The video recording method, device, electronic device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0025] At present, in order to improve the quality of video recording, a large number of video processing algorithms can be used to process the recorded video in real time during the recording process. However, the superposition of a large number of video processing algorithms during the recording process greatly increases the power consumption of electronic devices, resulting in a faster temperature increase and a larger frequency reduction of the electronic devices, which in turn causes the electronic devices to freeze.
[0026] In the related art, when an electronic device freezes, the number of algorithms can be reduced and algorithms can be gradually removed to meet the video recording power consumption standard, which may result in poor quality of the recorded video stream.
[0027] In order to solve the above-mentioned problem, an embodiment of the present application provides a video recording method, which can balance the power consumption of video recording and the quality of video recording. The video recording method may include: in the process of video recording, using a first image algorithm to process each original video frame, and obtaining and displaying a first video frame corresponding to each original video frame; saving a first video stream, the first video stream includes at least one of an original video stream and an anti-shake video stream, the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by the first EIS algorithm; wherein the operating power consumption of the first image algorithm is less than or equal to the first power consumption threshold. In this way, in the process of video recording, on the one hand, since each original video frame can be processed by a first image algorithm with low operating power consumption for video preview, the power consumption of the electronic device during video recording can be greatly reduced. On the other hand, since the original video stream or the anti-shake video stream processed by the first EIS algorithm can be saved, after completing the video recording, the original video stream or the anti-shake video stream can be processed by image processing to obtain a finished video stream with good image quality, thereby improving the quality of video recording. In this way, the video recording method provided in the embodiment of the present application can reduce the recording power consumption of the electronic device while ensuring the quality of video recording.
[0028] It can be understood that the video recording method provided in the embodiment of the present application can ensure that the power consumption and temperature rise can meet the user experience, and the saved original video stream or anti-shake video stream provides a larger operating space for post-video processing, thereby ensuring that the final finished video stream has a better video effect.
[0029] The video recording method provided in the embodiment of the present application can be executed by an electronic device or at least one of a functional module and an entity module in the electronic device that can realize the video recording. The specific execution can be determined according to actual use requirements and is not limited in the embodiment of the present application. In the embodiment of the present application, an electronic device executing the video recording method is taken as an example to illustrate the video recording method provided in the embodiment of the present application.
[0030] The present application embodiment provides a video recording method, Figure 1 A schematic diagram of the process of the video recording method provided in the embodiment of the present application is shown. Figure 1 As shown, the video recording method provided in the embodiment of the present application may include the following steps 101 and 102.
[0031] Step 101: During video recording, the electronic device uses a first image algorithm to process each original video frame to obtain and display a first video frame corresponding to each original video frame.
[0032] The operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
[0033] It should be noted that the running power consumption of the first image algorithm is less than or equal to the first power consumption threshold value, which can be understood as: when the electronic device uses the first image algorithm to process the original video frame, the power consumption of the electronic device is less than or equal to the first power consumption threshold value.
[0034] In some embodiments of the present application, the type of algorithms included in the first image algorithm may be the same as the type of algorithms superimposed when recording a video in the related art.
[0035] For example, the first image algorithm may include at least one of the following algorithms: a beautification algorithm, a filter adding algorithm, a dynamic range extension algorithm, an interpolation algorithm, and the like.
[0036] It should be noted that in the embodiment of the present application, the first image algorithm with low running power consumption is used to process the original video frame to be previewed, without reducing the type of algorithm, so that the user can see a more complete video effect during the video recording process. In other words, an image algorithm with high cost performance, such as a small running amount and good processing effect, can be used to process the original video frame to be previewed.
[0037] For example, a super-resolution algorithm can be used to super-resolution the video frames to improve the clarity and quality of the video frames. The super-resolution algorithm may include: a super-resolution algorithm based on two-line fixed interpolation and a super-resolution algorithm based on three-line fixed interpolation. Among them, the super-resolution effect of the super-resolution algorithm based on two-line fixed interpolation is worse than that of the super-resolution algorithm based on three-line fixed interpolation, but the super-resolution algorithm based on two-line fixed interpolation has a small amount of calculation and low operating power consumption. Therefore, a super-resolution algorithm based on two-line fixed interpolation can be used to process the video frames to be previewed, which not only allows users to preview clearer video images, but also avoids excessive increase in power consumption of electronic devices.
[0038] In some embodiments of the present application, the electronic device may record a video through a camera sensor in the electronic device.
[0039] Step 102: The electronic device saves the first video stream.
[0040] The first video stream includes at least one of an original video stream and an anti-shake video stream, the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by the first EIS algorithm.
[0041] In some embodiments of the present application, the first EIS algorithm may also be referred to as a video EIS algorithm.
[0042] In some embodiments of the present application, the anti-shake effect of the video frame processed by the first EIS algorithm is better, for example, better than the anti-shake effect of the video frame processed by the second EIS algorithm described below.
[0043] In some embodiments of the present application, the anti-shake video stream may also be referred to as a semi-finished video stream.
[0044] In some embodiments of the present application, for each original video frame recorded by the electronic device, the electronic device may use a first image algorithm to process an original video frame; and the electronic device may save the original video frame, and / or, the electronic device may use a first EIS algorithm to process the original video frame and save the processed original video frame.
[0045] It can be understood that performing anti-shake processing on the original video frames during the recording process can reduce the processing power consumption of the post-processing video frames.
[0046] It should be noted that in the video recording method provided in the embodiment of the present application, the original video stream and the anti-shake video stream can be saved, so it is convenient for users to perform secondary editing on the recorded video stream. For example, the original stream video can readjust the image algorithm strength, such as adjusting the anti-shake strength or beautification strength.
[0047] In some embodiments of the present application, the electronic device can determine to save the original video stream or the anti-shake video stream according to the historical review information of the user, wherein the historical review information of the user is used to indicate the video review habit of the user.
[0048] In some embodiments of the present application, the above step 102 may include the following step 102A or step 102B.
[0049] Step 102A: When the user's historical review information instructs the user to play the video within a preset time after completing the video recording, the original video stream is saved.
[0050] Step 102B: When the user's historical review information indicates that the user plays the video after a preset time period after the video is recorded, the anti-shake video stream is saved.
[0051] It can be understood that the preset time length can be 5 seconds, 20 seconds, 20 seconds, 1 minute or 5 minutes, etc., which can be specifically determined according to the processing time length of the first EIS algorithm.
[0052] It should be noted that, in order to present a better video effect, when the user watches the first video stream back, the electronic device may first perform image processing on the first video stream and display the processed first video stream.
[0053] Thus, when the user's historical review information indicates that the user is accustomed to reviewing the recorded video stream within a preset time after completing the video recording, the electronic device can perform EIS anti-shake processing on each original video frame during the video recording process to shorten the processing time when the user reviews the video stream, thereby improving the review efficiency of the user's video stream.
[0054] When the user's historical playback information indicates that the user is accustomed to watching the recorded video stream beyond the preset time after completing the video recording, since the user is unlikely to view the recorded video stream immediately, the power consumption of video processing can be balanced as much as possible, that is, after the video recording is completed, EIS anti-shake processing is performed in the background. This can further reduce the power consumption of the electronic device during the video recording process, thereby avoiding the temperature increase and frequency reduction of the electronic device, and further avoiding the electronic device from freezing during the video recording process.
[0055] For example, if the user is accustomed to playing the video after recording and seldom plays it back immediately, the electronic device can directly save the original video stream to balance the video processing power consumption to the background rendering as much as possible; if the user is accustomed to playing it back immediately after recording, the electronic device can consider the video playback performance and give priority to EIS algorithms that need to be cached for a certain period of time, such as 1s processing, during the video recording process.
[0056] In this way, when the user is used to watching the video within the preset time after the video recording is completed, the electronic device saves the original video stream for later processing; when the user is used to watching the video again after the preset time after the video recording is completed, the electronic device can save the anti-shake video stream processed by the first EIS algorithm for later processing. Therefore, the electronic device can flexibly and evenly allocate the video processing power consumption according to the user's video playback habits, thereby improving the flexibility of balancing the video processing power consumption.
[0057] In the video recording method provided by the present application, during the video recording process, on the one hand, since each original video frame can be processed by a first image algorithm with low running power consumption for video preview, the power consumption of the electronic device during the video recording process can be greatly reduced. On the other hand, since the original video stream or the anti-shake video stream processed by the first EIS algorithm can be saved, after the video recording is completed, the original video stream or the anti-shake video stream can be processed by image processing to obtain a finished video stream with good image quality, thereby improving the video recording quality. In this way, the video recording method provided by the embodiment of the present application can reduce the power consumption of the electronic device during the video recording process on the basis of ensuring the quality of the video recording. Furthermore, it can avoid the jamming of the electronic device during the video recording process.
[0058] In some embodiments of the present application, before the above step 101, the video recording method provided in the embodiment of the present application may further include the following step 103, and the above step 101 may include the following step 101A.
[0059] Step 103: The electronic device processes each original video frame using a second EIS algorithm.
[0060] Step 101A: The electronic device uses the first image algorithm to process each original video frame processed by the second EIS algorithm, and obtains and displays a first video frame corresponding to each original video frame.
[0061] The number of reference frames corresponding to the second EIS algorithm is less than that corresponding to the first EIS algorithm. Thus, since the number of reference frames referred to by the second EIS algorithm is smaller, the anti-shake calculation amount is smaller, and thus the power consumption of the electronic device is smaller when running the second EIS algorithm.
[0062] For example, the number of reference frames corresponding to the first EIS algorithm may be 40 to 60 frames, and the number of reference frames corresponding to the second EIS algorithm may be 2 frames.
[0063] Specifically, the first EIS algorithm may refer to the i-40th to i-1th original video frames and the i+1th to i+40th original video frames, and perform EIS processing on the i-th original video frame;
[0064] The second EIS algorithm may perform EIS processing on the i-th original video frame with reference to the i-1-th original video frame and the i+1-th original video frame, where i is a positive integer.
[0065] When i-40 is less than 0, all original video frames preceding the i-th original video frame may be used as reference frames.
[0066] In some embodiments of the present application, the first EIS algorithm may be referred to as a video EIS algorithm, and the second EIS algorithm may be referred to as a preview EIS algorithm. Figure 2 As shown, the video recording EIS algorithm can be referred to as video recording EIS, and the preview EIS algorithm can be referred to as preview EIS.
[0067] Combine the following Figure 2 and Figure 3 The video recording method provided in the embodiment of the present application is described.
[0068] Example 1, such as Figure 2 As shown, the electronic device records video through a camera, and each original video frame output by the camera can be divided into three channels, wherein the first channel is used to save the original video stream (Raw Video), the second channel is sent to the preview EIS algorithm to generate a preview video stream, and the third channel is sent to the recording EIS algorithm to save the semi-finished video stream (Semi Video).
[0069] See also Figure 2 The original video stream processed by the preview EIS will be calculated by multiple basic algorithms (Basic Algo) and finally presented to the user as a preview video stream with effects. Among them, the basic algorithm refers to a simplified algorithm of the complete effect algorithm.
[0070] It can be seen that the video stream processed by the recording EIS is stored as a semi-finished video stream (Semi Video), and is rendered into a finished video stream and displayed in real time when the user watches the video again, or is rendered into a finished video stream and stored by the electronic device using background rendering.
[0071] Example 2, such as Figure 3 As shown, the electronic device records a video through a camera, and each original video frame output by the camera can be divided into two channels, wherein the first channel is used to save the original video stream, and the second channel is fed into the preview EIS algorithm to generate a preview video stream. For a description of generating a preview video stream, see Example 1 above.
[0072] Thus, during the video recording process, since each original video frame can be processed in sequence using the second EIS algorithm with a smaller number of reference frames and the first image algorithm with lower operating power consumption, the user can see a more complete video effect through the preview screen, and the power consumption of the electronic device can be reduced. Furthermore, since the power consumption of the electronic device during the video recording process is low, the electronic device can be prevented from freezing during the video recording process.
[0073] In some embodiments of the present application, after the above step 102, the video recording method provided by the embodiment of the present application may further include the following step 104.
[0074] Step 104: The electronic device processes each video frame in the first video stream using a second image algorithm to obtain and save a second video frame corresponding to each video frame.
[0075] The image quality of the first video frame is less than the image quality of the second video frame. For example, assuming that the first image algorithm and the second image algorithm are both noise reduction algorithms, then: the noise of the first video frame is greater than the noise of the second video frame.
[0076] It can be understood that after the electronic device uses the second image algorithm to process all the video frames in the first video stream, a second video stream can be obtained, where the second video stream can also be called a finished video stream.
[0077] In some embodiments of the present application, the type of the second image algorithm is the same as the type of the first image algorithm.
[0078] For example, the first image algorithm includes: a beautification algorithm, a filter algorithm, a face-thinning algorithm, and a background blurring algorithm; then the second image algorithm also includes a beautification algorithm, a filter algorithm, a face-thinning algorithm, and a background blurring algorithm.
[0079] In some embodiments of the present application, the processing effect of each algorithm in the second image algorithm is greater than the processing effect of the corresponding algorithm in the first image algorithm.
[0080] For example, combined with Figure 2 and Figure 5 The first image algorithm includes image algorithm 1 and image algorithm 2, and the second image algorithm includes image algorithm 1' and image algorithm 2', wherein the quality of the image processed by image algorithm 1' is better than the quality of the image processed by image algorithm 1, and the quality of the image processed by image algorithm 2' is better than the quality of the image processed by image algorithm 2.
[0081] In some embodiments of the present application, after the electronic device obtains the second video stream, the first video stream may be deleted to reduce the amount of storage space occupied by the electronic device.
[0082] It can be understood that step 104 is performed after the video recording is completed.
[0083] In some embodiments of the present application, the electronic device may perform step 104 by foreground real-time rendering or background rendering. The foreground real-time rendering process is perceptible to the user, that is, the video frames in the first video stream are processed while the processed video frames are displayed; the background rendering process is not perceptible to the user, that is, the rendering process is performed in the background of the electronic device.
[0084] It should be noted that the process of the electronic device processing all the video frames in the first video stream can be called a rendering process.
[0085] In this way, since the electronic device can use the second image algorithm with higher processing capability to process the recorded first video stream, the video quality of the processed video stream can be higher, thus improving the video recording quality.
[0086] In some embodiments of the present application, the above step 104 may include the following step 104A.
[0087] Step 104A: When the first information meets the rendering condition or receives the user's input for playing the first video stream, the electronic device uses the second image algorithm to process each video frame in the first video stream to obtain and save the second video frame corresponding to each video frame.
[0088] The first information may include at least one of the following:
[0089] System status information of electronic equipment;
[0090] User behavior information of the user currently using the electronic device;
[0091] User historical behavior information of the user using the electronic device.
[0092] In some embodiments of the present application, in method 1, when the first information meets the rendering condition, the electronic device may use the background rendering method and adopt the second image algorithm to process each video frame in the first video stream; in method 2, when the electronic device receives the user's display input for the first video stream, the electronic device may use the foreground real-time rendering method and adopt the second image algorithm to process each video frame in the first video stream.
[0093] It can be understood that the video recording method provided by the embodiment of the present application ensures that the user can still see the complete effect when watching the video through real-time rendering; in the later rendering, the user's habits and the system status of the electronic device are used to determine whether to trigger the background rendering, and the background rendering is as unaware of the user as possible. After the rendering is completed, the real-time rendering is no longer required when the first video stream is displayed in the future. In this way, the problem of high power consumption of video recording caused by superimposing multiple algorithms can be solved.
[0094] In some embodiments of the present application, the first information satisfying the rendering condition indicates that the electronic device is currently capable of processing the first video stream.
[0095] In some embodiments of the present application, in the above-mentioned method 1, after the electronic device saves the first video stream, Figure 4 As shown, the monitoring module 40 in the electronic device can monitor the system status of the electronic device and the user's use behavior of the electronic device to obtain the first information. Then, the monitoring module 40 can output the monitored first information to the decision module 41 in the electronic device, and the decision module 41 can determine whether the first information meets the rendering condition, that is, whether the electronic device is currently capable of processing the video stream. If the decision module determines that the first information meets the rendering condition, the decision module 41 can trigger the processing module 42 of the electronic device to start rendering, so that the processing module 42 can use the second image algorithm to perform image processing on each video frame in the first video stream.
[0096] In some embodiments of the present application, Figure 4 As shown, in the process that the processing module 42 adopts the second image algorithm to process the video frames in the first video stream, the monitoring module 40 can continuously monitor the system status of the electronic device and the user's usage behavior of the electronic device. If the first information obtained by monitoring no longer meets the rendering conditions, the decision module 41 can trigger the processing module 42 to stop rendering.
[0097] In some embodiments of the present application, the processing module may be a graphics processing unit (GPU) in an electronic device.
[0098] In some embodiments of the present application, Figure 4 As shown, the electronic device also includes a system artificial intelligence (AI) module 43, which is used to collect and analyze user data to obtain historical usage information of the user using the electronic device and usage behavior information of the user currently using the electronic device, and output the historical usage information of the user using the electronic device and the usage behavior information of the user currently using the electronic device to the monitoring module.
[0099] In some embodiments of the present application, in method 2, after saving the first video stream, the electronic device can add a first task for processing the first video stream to a task queue for background processing of the electronic device. When the first information meets the rendering conditions, the processing module can obtain the first task from the task queue, perform frame decomposition processing on the first video stream, and then send each video frame obtained by the frame decomposition processing to the second image algorithm for processing.
[0100] In some embodiments of the present application, in the above-mentioned method 2, when the user triggers the playback of the first video stream, the electronic device can preferentially use the second image algorithm to process the anti-shake video stream in the first video stream to present a video stream with a more complete image effect to the user in real time.
[0101] It should be noted that in method 2, the electronic device can use the second image algorithm to perform image processing on each video frame in the first video stream through the above-mentioned processing module, see method 1 for details.
[0102] In some embodiments of the present application, the system status information of the electronic device may include at least one of the following:
[0103] The load on the central processing unit (CPU) of the electronic device;
[0104] The load size of the GPU in the electronic device;
[0105] Screen status information of electronic devices;
[0106] Temperature of electronic equipment;
[0107] The battery level of electronic devices;
[0108] The memory usage of electronic devices.
[0109] In some embodiments of the present application, the user behavior information of the user currently using the electronic device may indicate at least one of the following:
[0110] Whether the user is currently using an electronic device;
[0111] The type of application the user is currently using.
[0112] In some embodiments of the present application, the user history behavior information of the user using the electronic device may indicate at least one of the following:
[0113] The time period during which the user has historically used the electronic device;
[0114] The types of applications the user has historically used.
[0115] In some embodiments of the present application, the rendering condition may include at least one of the following:
[0116] 1), the CPU load is less than or equal to the first load threshold;
[0117] 2), the GPU load is less than or equal to the second load threshold;
[0118] 3) The screen of the electronic device is off;
[0119] 4), the temperature of the electronic device is less than or equal to a first temperature threshold;
[0120] 5), the battery power of the electronic device is less than or equal to the first power threshold;
[0121] 6) The user is not currently using an electronic device;
[0122] 7), the type of application currently used by the user is the first type;
[0123] 8), the type of application currently used by the user is different from the second type;
[0124] 9), the system time of the electronic device is the first time, and the first time is the start time of the background processing time period determined according to the historical usage behavior of the user using the electronic device;
[0125] 10), the screen of the electronic device is in a bright screen state, and the temperature of the electronic device is less than or equal to a second temperature threshold;
[0126] 11) The memory usage of the electronic device is less than the first memory threshold.
[0127] The first temperature threshold is greater than the second temperature threshold.
[0128] In some embodiments of the present application, the first type of application may be an application running in the electronic device with power consumption less than or equal to the second power consumption threshold; the first type of application may be an application running in the electronic device with power consumption greater than the second power consumption threshold. The first power consumption threshold and the second power consumption threshold may be the same or different.
[0129] In some embodiments of the present application, the first type may include at least one of the following: a music application, a social application, a map application, a novel application, and a financial application.
[0130] The second type may include: a game application or a video application.
[0131] The video recording method provided in the embodiment of the present application is described below with reference to specific examples.
[0132] For example, when the screen of an electronic device is in a bright screen state, if the temperature of the electronic device is too high, the brightness of the screen may be reduced, which may lead to a poor user experience and poor human-computer interaction performance. Therefore, it is necessary to combine the current temperature of the electronic device. If the temperature is high, it means that it is not suitable for video rendering at this time.
[0133] For example, the user's historical usage habits of electronic devices indicate that the user may be a student, and electronic devices, such as mobile phones, are idle during class time on weekdays. The electronic device can monitor the temperature and battery power of the electronic device during the class time period on weekdays to determine whether the electronic device is suitable for video rendering during the time period. For example, if the temperature of the electronic device is less than 40 degrees and the battery power is greater than 80%, the electronic device can trigger background rendering.
[0134] In this way, since the electronic device can use the second image algorithm to process each video frame in the first video stream when it receives the playback input for the first video stream or monitors that the first information meets the rendering conditions, that is, when the user triggers the playback of the first video stream or the electronic device has video processing capabilities, the second image algorithm is used to process the first video stream, thereby improving the flexibility of processing the first video stream.
[0135] In some embodiments of the present application, in the above-mentioned method 2, after the above-mentioned step 104A, the video recording method provided by the embodiment of the present application may further include the following step 105.
[0136] Step 105: The electronic device plays the second video frame corresponding to each video frame.
[0137] The following is combined with Figure 5 The video recording method provided in the embodiment of the present application is described.
[0138] For example, in order to enable the user to see the complete video effect when watching the video, the second image algorithm can be used to process the semi-finished video stream in real time to obtain the finished video stream for display to the user. Assuming that the second image algorithm includes image algorithm 1' and image algorithm 2', then refer to Figure 5 , the real-time rendering process includes the following processing steps:
[0139] Step 1: In the system album, the electronic device detects that the video stream that the user clicks to play is a semi-finished video stream;
[0140] Step 2: The electronic device parses the semi-finished video stream, and the electronic device may sequentially use image algorithm 1' and image algorithm 2' to process each video frame in the semi-finished video stream;
[0141] Step 3, the electronic device displays the video frames processed by the image algorithm 1' and the image algorithm 2' to the user;
[0142] Step 4: The electronic device stores the video frames processed by the image algorithm 1' and the image algorithm 2' to obtain a finished video stream.
[0143] In this way, since the semi-finished video stream can be directly processed using the second image algorithm, the speed of processing the video stream can be increased.
[0144] Exemplarily, the first video stream is Figure 3 In the original video stream, assuming that the second image algorithm includes image algorithm 1' and image algorithm 2', then refer to Figure 6 ,In the real-time rendering stage, the video EIS algorithm, the image algorithm 1' and the image algorithm 2' can be used in sequence to process each original video frame in the original video stream; and then the processed video frames can be played and stored.
[0145] In this way, when the user watches the first video stream again, since the electronic device can process each video frame in the first video stream in real time and the second video frame corresponding to each video frame, the user can view the finished video stream with complete image effects.
[0146] In some embodiments of the present application, the first video stream is an original video stream. Before the above step 104, the video recording method provided by the embodiment of the present application may further include the following step 106, and the above step 104 may include the following step 104B.
[0147] Step 106: The electronic device processes each video frame in the first video stream using the first EIS algorithm.
[0148] Step 104B: The electronic device uses a second image algorithm to process each video frame processed by the first EIS algorithm, and obtains and saves a second video frame corresponding to each video frame.
[0149] It can be understood that step 106 is illustrated by taking the example of an electronic device using the first EIS algorithm to process each video frame in the first video stream. In actual implementation, the electronic device can also use an EIS algorithm with higher anti-shake performance to process the video frames in the first video stream, so that the final finished video stream has a better anti-shake effect.
[0150] In this way, when the first video stream is an original video stream, since the electronic device can first use the first EIS algorithm to process each original video frame in the original video stream, and then use the second image algorithm to perform image processing on the original video frames processed by the first EIS algorithm, it can ensure that the final finished video frame has good image quality.
[0151] The video recording method provided in the embodiment of the present application can be executed by a video recording device. In the embodiment of the present application, the video recording device provided in the embodiment of the present application is described by taking the video recording method executed by the video recording device as an example.
[0152] The present application embodiment provides a video recording device, Figure 7 FIG. 4 shows a schematic diagram of the structure of a video recording device provided in an embodiment of the present application. Figure 7 As shown, the video recording device 700 provided in the embodiment of the present application may include: a processing module 701, a display module 702 and a storage module 703;
[0153] The processing module 701 is used to process each original video frame using a first image algorithm during video recording to obtain a first video frame corresponding to each original video frame;
[0154] A display module 702, configured to display a first video frame corresponding to each original video frame processed by the processing module 701;
[0155] A storage module 703 is used to store a first video stream, where the first video stream includes at least one of an original video stream and an anti-shake video stream, where the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by a first EIS algorithm;
[0156] The operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
[0157] In some embodiments of the present application, the processing module 701 is further configured to process each original video frame using a second EIS algorithm before processing each original video frame using a first image algorithm to obtain and display a first video frame corresponding to each original video frame, and the number of reference frames corresponding to the second EIS algorithm is less than the number of reference frames corresponding to the first EIS algorithm;
[0158] The processing module 701 is specifically configured to use the first image algorithm to process each original video frame processed by the second EIS algorithm to obtain a first video frame corresponding to each original video frame.
[0159] In some embodiments of the present application, the storage module 703 is specifically used to:
[0160] When the user's historical playback information indicates that the user plays the video within a preset time after completing the video recording, saving the original video stream;
[0161] When the user's historical review information indicates that the user plays the video after a preset time period after the video is recorded, the anti-shake video stream is saved.
[0162] In some embodiments of the present application, the processing module 701 is further configured to, after the storage module 703 saves the first video stream, use a second image algorithm to process each video frame in the first video stream to obtain a second video frame corresponding to each video frame;
[0163] The storage module 703 is further used to store the second video frame corresponding to each video frame processed by the processing module 701;
[0164] The image quality of the first video frame is lower than the image quality of the second video frame.
[0165] In some embodiments of the present application, the first video stream is an original video stream;
[0166] The processing module 701 is further configured to process each video frame in the first video stream using the first EIS algorithm before processing each video frame in the first video stream using the second image algorithm to obtain a second video frame corresponding to each video frame;
[0167] The processing module 701 is specifically configured to use a second image algorithm to process each video frame processed by the first EIS algorithm to obtain a second video frame corresponding to each video frame.
[0168] In some embodiments of the present application, the processing module 701 is specifically configured to process each video frame in the first video stream using a second image algorithm to obtain a second video frame corresponding to each video frame when the first information satisfies the rendering condition or when a user input for playing the first video stream is received;
[0169] The first information includes at least one of the following:
[0170] System status information of electronic equipment;
[0171] User behavior information of the user currently using the electronic device;
[0172] User historical behavior information of the user using the electronic device.
[0173] In some embodiments of the present application, the display module 702 is also used to, when the processing module 701 receives the user's input for playing the first video stream, use the second image algorithm to process each video frame in the first video stream, obtain and save the second video frame corresponding to each video frame, and then play the second video frame corresponding to each video frame.
[0174] In some embodiments of the present application, the system status of the electronic device may include at least one of the following:
[0175] The load on the CPU of the electronic device;
[0176] The load size of the GPU in the electronic device;
[0177] Screen status information of electronic devices;
[0178] Temperature of electronic equipment;
[0179] The battery level of electronic devices;
[0180] In the video recording device provided by the embodiment of the present application, during the video recording process, on the one hand, since each original video frame can be processed by a first image algorithm with low running power consumption for video preview, the power consumption of the electronic device during the video recording process can be greatly reduced. On the other hand, since the original video stream or the anti-shake video stream processed by the first EIS algorithm can be saved, after the video recording is completed, the original video stream or the anti-shake video stream can be processed by image processing to obtain a finished video stream with good image quality, thereby improving the video recording quality. In this way, the video recording device provided by the embodiment of the present application can reduce the recording power consumption of the electronic device during the video recording process on the basis of ensuring the quality of the video recording.
[0181] The video recording device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0182] The video recording device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0183] The video recording device provided in the embodiment of the present application can achieve Figures 1 to 6 The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.
[0184] Alternatively, if Figure 8 As shown, an embodiment of the present application also provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned video recording method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0185] It should be noted that the electronic devices in the embodiments of the present application include mobile electronic devices and non-mobile electronic devices.
[0186] Fig. 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0187] The electronic device 1500 includes but is not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, and a processor 1510 and other components.
[0188] Those skilled in the art will appreciate that the electronic device 1500 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0189] The processor 1510 is used to process each original video frame using a first image algorithm during video recording to obtain a first video frame corresponding to each original video frame;
[0190] A display unit 1506, configured to display a first video frame corresponding to each original video frame processed by the processor 1510;
[0191] The memory 1509 is used to store a first video stream, where the first video stream includes at least one of an original video stream and an anti-shake video stream, where the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by the first EIS algorithm;
[0192] The operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
[0193] In some embodiments of the present application, the processor 1510 is further configured to process each original video frame using a second EIS algorithm before processing each original video frame using a first image algorithm to obtain a first video frame corresponding to each original video frame, wherein the number of reference frames of the second EIS algorithm is less than the number of reference frames of the first EIS algorithm;
[0194] The processor 1510 is specifically configured to use the first image algorithm to process each original video frame processed by the second EIS algorithm to obtain a first video frame corresponding to each original video frame.
[0195] In some embodiments of the present application, the memory 1509 is specifically used for:
[0196] When the user's historical playback information indicates that the user plays the video within a preset time after completing the video recording, saving the original video stream;
[0197] When the user's historical review information indicates that the user plays the video after a preset time period after the video is recorded, the anti-shake video stream is saved.
[0198] In some embodiments of the present application, the processor 1510 is further configured to, after the memory 1509 stores the first video stream, process each video frame in the first video stream using a second image algorithm to obtain a second video frame corresponding to each video frame;
[0199] The memory 1509 is further used to store a second video frame corresponding to each video frame processed by the processor 1510;
[0200] The image quality of the first video frame is lower than the image quality of the second video frame.
[0201] In some embodiments of the present application, the first video stream is an original video stream;
[0202] The processor 1510 is further configured to process each video frame in the first video stream using the first EIS algorithm before processing each video frame in the first video stream using the second image algorithm to obtain a second video frame corresponding to each video frame;
[0203] The processor 1510 is specifically configured to use a second image algorithm to process each video frame processed by the first EIS algorithm to obtain a second video frame corresponding to each video frame.
[0204] In some embodiments of the present application, the processor 1510 is specifically configured to process each video frame in the first video stream using a second image algorithm to obtain a second video frame corresponding to each video frame when the first information satisfies a rendering condition or a user input for playing the first video stream is received;
[0205] The first information includes at least one of the following:
[0206] System status information of electronic equipment;
[0207] User behavior information of the user currently using the electronic device;
[0208] User historical behavior information of the user using the electronic device.
[0209] In some embodiments of the present application, the display unit 1506 is also used to, when the processor 1510 receives a user's input for playing the first video stream, use a second image algorithm to process each video frame in the first video stream, obtain and save a second video frame corresponding to each video frame, and then play the second video frame corresponding to each video frame.
[0210] In some embodiments of the present application, the system state of the electronic device includes at least one of the following:
[0211] The load on the CPU of the electronic device;
[0212] The load size of the GPU in the electronic device;
[0213] Screen status information of electronic devices;
[0214] Temperature of electronic equipment;
[0215] The battery level of an electronic device.
[0216] In the electronic device provided by the embodiment of the present application, during the video recording process, on the one hand, since each original video frame can be processed by a first image algorithm with low running power consumption for video preview, the power consumption of the electronic device during the video recording process can be greatly reduced. On the other hand, since the original video stream or the anti-shake video stream processed by the first EIS algorithm can be saved, after the video recording is completed, the original video stream or the anti-shake video stream can be processed to obtain a finished video stream with good image quality, thereby improving the video recording quality. In this way, the electronic device provided by the embodiment of the present application can reduce the power consumption of the electronic device during the video recording process on the basis of ensuring the quality of video recording.
[0217] It should be understood that in the embodiment of the present application, the input unit 1504 may include a graphics processor 15041 and a microphone 15042, and the graphics processor 15041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1506 may include a display panel 15061, and the display panel 15061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1507 includes a touch panel 15071 and at least one of other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include two parts: a touch detection device and a touch controller. Other input devices 15072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0218] The memory 1509 can be used to store software programs and various data. The memory 1509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1509 may include a volatile memory or a non-volatile memory, or the memory 1509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0219] The processor 1510 may include one or more processing units; optionally, the processor 1510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1510.
[0220] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned video recording method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0221] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0222] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video recording method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0223] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0224] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned video recording method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0225] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0226] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0227] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A video recording method, characterized in that: The method comprises: During the video recording process, each original video frame is processed by a first image algorithm to obtain and display a first video frame corresponding to each original video frame; Saving a first video stream, wherein the first video stream includes at least one of an original video stream and an anti-shake video stream, wherein the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by a first electronic image stabilization EIS algorithm; The operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
2. The method according to claim 1, characterized in that Before using the first image algorithm to process each original video frame to obtain and display the first video frame corresponding to each original video frame, the method further includes: Processing each of the original video frames using a second EIS algorithm, wherein the number of reference frames corresponding to the second EIS algorithm is less than the number of reference frames corresponding to the first EIS algorithm; The step of using the first image algorithm to process each original video frame to obtain and display a first video frame corresponding to each original video frame includes: A first image algorithm is used to process each original video frame processed by the second EIS algorithm, and a first video frame corresponding to each original video frame is obtained and displayed.
3. The method according to claim 1, characterized in that: The step of saving the first video stream comprises: When the user's historical playback information indicates that the user plays the video within a preset time after completing the video recording, saving the original video stream; When the user's historical review information indicates that the user plays the video after a preset time period after the video is recorded, the anti-shake video stream is saved.
4. The method according to any one of claims 1 to 3, characterized in that After saving the first video stream, the method further includes: Processing each video frame in the first video stream using a second image algorithm to obtain and save a second video frame corresponding to each video frame; The image quality of the first video frame is less than the image quality of the second video frame.
5. The method according to claim 4, characterized in that The first video stream is the original video stream; Before using the second image algorithm to process each video frame in the first video stream to obtain and save a second video frame corresponding to each video frame, the method further includes: Processing each video frame in the first video stream using the first EIS algorithm; The step of using a second image algorithm to process each video frame in the first video stream to obtain and save a second video frame corresponding to each video frame includes: The second image algorithm is used to process each video frame processed by the first EIS algorithm, and a second video frame corresponding to each video frame is obtained and saved.
6. The method according to claim 4 or 5, characterized in that: The step of using a second image algorithm to process each video frame in the first video stream to obtain and save a second video frame corresponding to each video frame includes: When the first information satisfies the rendering condition or a user input for playing the first video stream is received, processing each video frame in the first video stream using the second image algorithm to obtain and save a second video frame corresponding to each video frame; The first information includes at least one of the following: System status information of electronic equipment; User behavior information of the user currently using the electronic device; User historical behavior information of the user using the electronic device.
7. The method according to claim 6, characterized in that After using the second image algorithm to process each video frame in the first video stream to obtain and save a second video frame corresponding to each video frame, the method further includes: The second video frame corresponding to each video frame is played.
8. A video recording device, characterized in that: The device comprises: a processing module, a display module and a storage module; The processing module is used to process each original video frame using a first image algorithm during video recording to obtain a first video frame corresponding to each original video frame; The display module is used to display the first video frame corresponding to each original video frame processed by the processing module; The storage module is used to store a first video stream, wherein the first video stream includes at least one of an original video stream and an anti-shake video stream, the original video stream includes each original video frame, and the anti-shake video stream includes each original video frame processed by a first EIS algorithm; The operating power consumption of the first image algorithm is less than or equal to a first power consumption threshold.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the video recording method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the video recording method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for battery management of a battery with a charge state compensation system and battery management system
CN106164815A
Video effect processing method and device
CN107948543A
Photo processing method and device and computer readable storage medium
CN110022396A
Video recording method and electronic equipment
CN110602386A
Video recording method and device, video processing method and device, terminal and storage medium
CN113301254A