Video processing method and terminal
AssigneeHonor Device Co., Ltd.
InventorJianxian WANG
Life of this patent
Estimating the term…
Abstract
A video processing method and a terminal are provided. In the method, according to technical solutions provided in this application, after determining to record a main character, the terminal may simultaneously generate two videos. One video is a main-character video, and the other is an original video. To obtain the two videos in real time (the original video and the main-character video), first audio data needs to be copied to obtain two paths of second audio data, and the two paths of second audio data are concurrently encoded to generate the two videos in real time.
Claims12
A video processing method, applied to a terminal, wherein the terminal comprises a camera, and the method comprises:
- displaying a recording interface, wherein the recording interface comprises a first control, a first preview window, and a second preview window, and the first preview window is used to display an image captured by the camera;
- displaying a first image in the first preview window at a first moment, wherein the first image is captured by the camera at the first moment;
- when it is detected that a first object is in a first position of the first image, displaying, by the terminal, a second image in the second preview window, wherein the second image is generated based on the first image, and the second image comprises the first object;
- displaying a third image in the first preview window at a second moment, wherein the third image is captured by the camera at the second moment;
- when it is detected that the first object is in a second position of the third image, displaying, by the terminal, a fourth image in the second preview window, wherein the fourth image is generated based on the third image, and the fourth image comprises the first object;
- obtaining first audio data, wherein the first audio data comprises a first audio signal and information about the first audio signal, and the first audio signal is an audio signal generated based on an audio signal collected at the first moment;
- and
- detecting a first operation for the first control, stopping video recording in response to the first operation, and saving a first video recorded based on an image displayed in the first preview window and a second video recorded based on an image displayed in the second preview window, wherein
- the first video comprises the first image and first target audio data, the second video comprises the second image and second target audio data, and both the first target audio data and the second target audio data are obtained based on the first audio data.
10-13. (canceled)
An electronic device, comprising:
- one or more processors;
- one or more memories;
- and
- a module at which a plurality of applications are installed, wherein
- the memory stores one or more programs, and when the one or more programs are executed by the processor, the electronic device is enabled to perform the following steps:
- displaying a recording interface, wherein the recording interface comprises a first control, a first preview window, and a second preview window, and the first preview window is used to display an image captured by the camera;
- displaying a first image in the first preview window at a first moment, wherein the first image is captured by the camera at the first moment;
- when it is detected that a first object is in a first position of the first image, displaying, by the terminal, a second image in the second preview window, wherein the second image is generated based on the first image, and the second image comprises the first object;
- displaying a third image in the first preview window at a second moment, wherein the third image is captured by the camera at the second moment;
- when it is detected that the first object is in a second position of the third image, displaying, by the terminal, a fourth image in the second preview window, wherein the fourth image is generated based on the third image, and the fourth image comprises the first object;
- obtaining first audio data, wherein the first audio data comprises a first audio signal and information about the first audio signal, and the first audio signal is an audio signal generated based on an audio signal collected at the first moment;
- and
- detecting a first operation for the first control, stopping video recording in response to the first operation, and saving a first video recorded based on an image displayed in the first preview window and a second video recorded based on an image displayed in the second preview window, wherein
- the first video comprises the first image and first target audio data, the second video comprises the second image and second target audio data, and both the first target audio data and the second target audio data are obtained based on the first audio data.
A computer storage medium, comprising
- a computer program, which when executed by a processor, cause the processor to perform operations comprising:
- displaying a recording interface, wherein the recording interface comprises a first control, a first preview window, and a second preview window, and the first preview window is used to display an image captured by the camera;
- displaying a first image in the first preview window at a first moment, wherein the first image is captured by the camera at the first moment;
- when it is detected that a first object is in a first position of the first image, displaying, by the terminal, a second image in the second preview window, wherein the second image is generated based on the first image, and the second image comprises the first object;
- displaying a third image in the first preview window at a second moment, wherein the third image is captured by the camera at the second moment;
- when it is detected that the first object is in a second position of the third image, displaying, by the terminal, a fourth image in the second preview window, wherein the fourth image is generated based on the third image, and the fourth image comprises the first object;
- obtaining first audio data, wherein the first audio data comprises a first audio signal and information about the first audio signal, and the first audio signal is an audio signal generated based on an audio signal collected at the first moment;
- and
- detecting a first operation for the first control, stopping video recording in response to the first operation, and saving a first video recorded based on an image displayed in the first preview window and a second video recorded based on an image displayed in the second preview window, wherein
- the first video comprises the first image and first target audio data, the second video comprises the second image and second target audio data, and both the first target audio data and the second target audio data are obtained based on the first audio data.
Dependencies are inferred from the claim text.