Method and apparatus for processing video data
Abstract
The disclosure relates to a method for processing video data, apparatus, electronic equipment, and storage medium. The method for processing video data can include switching to a target anti-shake processing mode in response to acquiring a switching operation, the target anti-shake processing mode including at least one of following modes that are different from an anti-shake off mode: a first anti-shake processing mode, and a second anti-shake processing mode; acquiring a video editing operation corresponding to the target anti-shake processing mode, a video editing operation corresponding to the first anti-shake processing mode being different from a video editing operation corresponding to the second anti-shake processing mode; obtaining target video data by processing video data based on the video editing operation, different video editing operations comprising operations which crop each frame of the video data with different aspect ratio; and outputting the target video data.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for processing video data, comprising:
switching to a target anti-shake processing mode in response to acquiring a switching operation, the target anti-shake processing mode comprising at least one of following modes that are different from an anti-shake off mode: a first anti-shake processing mode, and a second anti-shake processing mode; acquiring a video editing operation corresponding to the target anti-shake processing mode, a video editing operation corresponding to the first anti-shake processing mode being different from a video editing operation corresponding to the second anti-shake processing mode; obtaining target video data by processing the video data based on the video editing operation, different video editing operations comprising operations which crop each frame of the video data with different aspect ratios; and outputting the target video data.
2 . The method according to claim 1 , said acquiring a video editing operation corresponding to the target anti-shake processing mode comprising:
determining a current anti-shake processing mode, the current anti-shake processing mode being one of following modes: the anti-shake off mode, the first anti-shake processing mode, and the second anti-shake processing mode; ing the target anti-shake processing mode based on the current anti-shake processing mode in response to the switching operation, the switching operation being used to cycle through the anti-shake off mode, the first anti-shake processing mode, and the second anti-shake processing mode; switching the current anti-shake processing mode to the target anti-shake processing mode; and acquiring the video editing operation corresponding to the target anti-shake processing mode.
3 . The method according to claim 1 , wherein said obtaining target video data by processing the video data based on the video editing operation comprising:
acquiring single frame images of the video data; obtaining target single frame images by cropping the single frame image based on the video editing operation, wherein the video editing operation comprises the cropping operation; and generating the target video data based on the target single frame images.
4 . The method according to claim 3 , further comprising:
determining the video editing operation by adjusting a cropping ratio of the cropping operation based on the target anti-shake processing mode.
5 . The method according to claim 1 , further comprising:
adjusting a video collection frame rate in response to the switching operation; and collecting video data in real time based on the video collection frame rate.
6 . The method according to claim 1 , further comprising:
acquiring a conversion operation for switching cameras; switching to a camera for collecting the video data in response to the conversion operation; in response to the camera being a target camera, switching the anti-shake processing mode to an anti-shake off mode; and setting icon of the anti-shake processing mode grayed.
7 . The method according to claim 1 , further comprising:
in response to a shooting area of a camera used to determine the first anti-shake processing mode being smaller than a shooting area of a camera used to determine the second anti-shake processing mode, cropping the each frame of the video data in the first anti-shake processing mode with a first ratio and cropping the each frame of the video data in the second anti-shake processing mode with a second ratio, wherein the first ratio is smaller than the second ratio.
8 . An electric equipment, comprising:
a processor; and a memory for storing instructions executable by the processor; wherein, the processor is configured to: switch to a target anti-shake processing mode in response to acquiring a switching operation, the target anti-shake processing mode comprising at least one of following modes that are different from an anti-shake off mode: a first anti-shake processing mode, and a second anti-shake processing mode; acquire a video editing operation corresponding to the target anti-shake processing mode, a video editing operation corresponding to the first anti-shake processing mode being different from a video editing operation corresponding to the second anti-shake processing mode; obtain target video data by processing video data based on the video editing operation, different video editing operations comprising operations which crop each frame of the video data with different aspect ratios; and output the target video data.
9 . The electric equipment according to claim 8 , the processer is configured to:
determine a current anti-shake processing mode, the current anti-shake processing mode being one of following modes: the anti-shake off mode, the first anti-shake processing mode, and the second anti-shake processing mode; e the target anti-shake processing mode based on the current anti-shake processing mode in response to the switching operation, the switching operation being used to cycle through the anti-shake off mode, the first anti-shake processing mode, and the second anti-shake processing mode; switch the current anti-shake processing mode to the target anti-shake processing mode; and acquire the video editing operation corresponding to the target anti-shake processing mode.
10 . The electric equipment according to claim 8 , wherein the processor is configured to:
acquire single frame images of the video data; obtain target single frame images by cropping the single frame image based on the video editing operation, wherein the video editing operation comprises the cropping operation; and generate the target video data based on the target single frame images.
11 . The electric equipment according to claim 10 , wherein the processor is further configured to determine the video editing operation by adjusting a cropping ratio of the cropping operation based on the target anti-shake processing mode.
12 . The electric equipment according to claim 8 , wherein the processor is further configured to:
adjust a video collection frame rate in response to the switching operation; and collect the video data in real time based on the video collection frame rate.
13 . The electric equipment according to claim 8 , wherein the processor is further configured to:
acquire a conversion operation for switching cameras; switch to a camera for collecting the video data in response to the conversion operation; in response to the camera being a target camera, switch the anti-shake processing mode to an anti-shake off mode; and set icon of the anti-shake processing mode in the video processing interface grayed.
14 . The electric equipment according to claim 8 , wherein the processor is further configured to:
in response to a shooting area of a camera used to determine the first anti-shake processing mode being smaller than a shooting area of a camera used to determine the second anti-shake processing mode, crop the each frame of the video data in the first anti-shake processing mode with a first ratio and crop the each frame of the video data in the second anti-shake processing mode with a second ratio, wherein the first ratio is smaller than the second ratio.
15 . A non-transitory computer-readable storage medium having a computer instruction stored thereon, when the computer instruction being executed by a processor of electric equipment, enable the electric equipment to implement a method for processing video data,
the method for processing video data comprising: switching to a target anti-shake processing mode in response to acquiring a switching operation, the target anti-shake processing mode comprising at least one of following modes that are different from an anti-shake off mode: a first anti-shake processing mode, and a second anti-shake processing mode; acquiring a video editing operation corresponding to the target anti-shake processing mode, a video editing operation corresponding to the first anti-shake processing mode being different from a video editing operation corresponding to the second anti-shake processing mode; obtaining target video data by processing the video data based on the video editing operation, different video editing operations comprising operations which crop each frame of the video data with different aspect ratios; and outputting the target video data.
16 . The computer-readable storage medium according to claim 15 , said acquiring a video editing operation corresponding to the target anti-shake processing mode comprising:
determining a current anti-shake processing mode, the current anti-shake processing mode being one of following modes: the anti-shake off mode, the first anti-shake processing mode, and the second anti-shake processing mode; ing the target anti-shake processing mode based on the current anti-shake processing mode in response to the switching operation, the switching operation being used to cycle through the anti-shake off mode, the first anti-shake processing mode, and the second anti-shake processing mode; switching the current anti-shake processing mode to the target anti-shake processing mode; and acquiring the video editing operation corresponding to the target anti-shake processing mode.
17 . The computer-readable storage medium according to claim 15 , said obtaining target video data by processing video data based on the video editing operation comprising:
acquiring single frame images of the video data; obtaining target single frame images by cropping the single frame image based on the video editing operation, wherein the video editing operation comprises the cropping operation ; and generating the target video data based on the target single frame images, and wherein the method further comprises: determining the video editing operation by adjusting a cropping ratio of the cropping operation based on the target anti-shake processing mode.
18 . The computer-readable storage medium according to claim 15 , the method further comprising:
adjusting a video collection frame rate in response to the switching operation; and collecting the video data in real time based on the video collection frame rate.
19 . The computer-readable storage medium according to claim 15 , the method further comprising:
acquiring a conversion operation for switching cameras; switching to a camera for collecting the video data in response to the conversion operation; in response to the camera being a target camera, switching the anti-shake processing mode to an anti-shake off mode; and setting icon of the anti-shake processing mode grayed.
20 . The computer-readable storage medium according to claim 15 , wherein the method further comprises:
in response to a shooting area of a camera used to determine the first anti-shake processing mode being smaller than a shooting area of a camera used to determine the second anti-shake processing mode, cropping the each frame of the video data in the first anti-shake processing mode with a first ratio and cropping the each frame of the video data in the second anti-shake processing mode with a second ratio, wherein the first ratio is smaller than the second ratio.Join the waitlist — get patent alerts
Track US2023111361A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.