A shooting method, applied to an electronic device disposed with a camera, wherein the method comprises:
- displaying a first interface, wherein the first interface comprises a first window and a first control, and the first window displays a first image collected by the camera;
- detecting a first operation acting on the first control;
- configuring a first data flow corresponding to the first window and a second data flow corresponding to a second window and displaying a second interface, in response to the first operation, wherein the second interface comprises the first window and a second control, the first window displays the first image collected by the camera and a mark displayed on a subject in the first image, the first data flow is corresponding to a first flow identifier, and the second data flow is corresponding to a second flow identifier;
- detecting a second operation acting on a mark;
- displaying the second window in response to the second operation, wherein the second window is smaller than the first window, the second window displays a close-up image of a first subject, and the first subject is a subject corresponding to the mark on which the second operation acts;
- and
- separately recording a picture in the first window and a picture in the second window in response to an operation acting on the second control;
- wherein an encoder in the electronic device obtains image data in the first data flow based on the first flow identifier, and encodes the image data in the first data flow to obtain a first video;
- and the encoder in the electronic device obtains image data in the second data flow based on the second flow identifier, and encodes the image data in the second data flow to obtain a second video;
- separately generating a first-window video file and a second-window video file based on a current system time in response to the first operation;
- associating a first encoder with the first data flow based on the first flow identifier, and associating a second encoder with the second data flow based on the second flow identifier;
- associating the first encoder with the first-window video file based on a file identifier of the first-window video file;
- and associating the second encoder with the second-window video file based on a file identifier of the second-window video file;
- and
- respectively matching the first flow identifier and the second flow identifier with a first image effect and a second image effect;
- wherein the first encoder is configured to encode the image data in the first data flow;
- the second encoder is configured to encode the image data in the second data flow;
- the first-window video file is used to store a video obtained by encoding the image data in the first data flow;
- the second-window video file is used to store a video obtained by encoding the image data in the second data flow;
- the first image effect is an image effect corresponding to the image data in the first data flow;
- and the second image effect is an image effect corresponding to the image data in the second data flow.