US-12621531-B2 - Video play method and apparatus and electronic device
Abstract
This application discloses a video play method and apparatus and an electronic device, and pertains to the field of video play technologies. The video play method includes: displaying a motion trajectory on a play interface of a target video when the target video is played, where the motion trajectory is a motion trajectory of a camera when photographing the target video, and points on the motion trajectory correspond to image frames in the target video; receiving a first input of a user for a target point on the motion trajectory; and in response to the first input, controlling the target video to start playing from an image frame corresponding to the target point.
Inventors
- Ruixu DING
Assignees
- VIVO MOBILE COMMUNICATION CO., LTD.
Dates
- Publication Date
- 20260505
- Application Date
- 20240627
- Priority Date
- 20211228
Claims (11)
- 1 . A video play method, comprising: displaying a motion trajectory on a play interface of a target video when the target video is played, wherein the motion trajectory is a motion trajectory of an electronic device when the electronic device photographing the target video, and points on the motion trajectory correspond to image frames in the target video; receiving a first input of a user for a target point on the motion trajectory; and in response to the first input, controlling the target video to start playing from an image frame corresponding to the target point; wherein the controlling the target video to start playing from an image frame corresponding to the target point comprises: when the target point is a location at which a first point and a second point of the motion trajectory overlap, displaying, through division, the play interface as two play sub-windows, wherein a first play sub-window starts to play the target video from a first image frame corresponding to the first point, and a second play sub-window starts to play the target video from a second image frame corresponding to the second point.
- 2 . The method according to claim 1 , wherein before the displaying a motion trajectory on a play interface of a target video when the target video is played, the method further comprises: receiving a second input of the user; in response to the second input, recording the target video, and while recording the target video, recording motion trajectory information of the electronic device that records the target video; and associating and saving the target video and the motion trajectory information.
- 3 . The method according to claim 1 , wherein after the displaying a motion trajectory on a play interface of a target video, the method further comprises: receiving a third input of the user for the motion trajectory; and in response to the third input, changing a display size of the motion trajectory and/or changing a display viewing angle of the motion trajectory.
- 4 . The method according to claim 1 , wherein after the receiving a first input of a user for a target point on the motion trajectory, the method further comprises: when the target point is a location at which a first point and a second point of the motion trajectory overlap, in response to the first input, displaying a time progress bar, a first identifier, and a second identifier on the play interface, wherein the first identifier and the second identifier are set on the time progress bar, the first identifier is configured to identify a location that is of a first image frame corresponding to the first point and that is on the time progress bar, and the second identifier is configured to identify a location that is of a second image frame corresponding to the second point and that is on the time progress bar; receiving a fourth input of the user for the first identifier or the second identifier; and in response to the fourth input, controlling the target video to start playing from a location of the first identifier or the second identifier on the time progress bar.
- 5 . A non-transitory readable storage medium, wherein the non-transitory readable storage medium stores a program or an instruction, and when the program or the instruction is executed by a processor, steps of the video play method according to claim 1 are implemented.
- 6 . A computer program product, wherein the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one processor to implement steps of the video play method according to claim 1 .
- 7 . An electronic device, comprising a processor, a memory, and a program or an instruction stored in the memory and executable on the processor, wherein the program or the instructions, when executed by the processor, causes the processor to implement: displaying a motion trajectory on a play interface of a target video when the target video is played, wherein the motion trajectory is a motion trajectory of the electronic device when the electronic device photographing the target video, and points on the motion trajectory correspond to image frames in the target video; receiving a first input of a user for a target point on the motion trajectory; and in response to the first input, controlling the target video to start playing from an image frame corresponding to the target point; wherein the controlling the target video to start playing from an image frame corresponding to the target point comprises: when the target point is a location at which a first point and a second point of the motion trajectory overlap, displaying, through division, the play interface as two play sub-windows, wherein a first play sub-window starts to play the target video from a first image frame corresponding to the first point, and a second play sub-window starts to play the target video from a second image frame corresponding to the second point.
- 8 . The electronic device according to claim 7 , wherein the program or the instructions, when executed by the processor, further causes the processor to implement: receiving a second input of the user; in response to the second input, recording the target video, and while recording the target video, recording motion trajectory information of the electronic device that records the target video; and associating and saving the target video and the motion trajectory information.
- 9 . The electronic device according to claim 7 , wherein the program or the instructions, when executed by the processor, further causes the processor to implement: receiving a third input of the user for the motion trajectory; and in response to the third input, changing a display size of the motion trajectory and/or changing a display viewing angle of the motion trajectory.
- 10 . The electronic device according to claim 7 , wherein the program or the instructions, when executed by the processor, further causes the processor to implement: when the target point is a location at which a first point and a second point of the motion trajectory overlap, in response to the first input, displaying a time progress bar, a first identifier, and a second identifier on the play interface, wherein the first identifier and the second identifier are set on the time progress bar, the first identifier is configured to identify a location that is of a first image frame corresponding to the first point and that is on the time progress bar, and the second identifier is configured to identify a location that is of a second image frame corresponding to the second point and that is on the time progress bar; receiving a fourth input of the user for the first identifier or the second identifier; and in response to the fourth input, controlling the target video to start playing from a location of the first identifier or the second identifier on the time progress bar.
- 11 . A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement: displaying a motion trajectory on a play interface of a target video when the target video is played, wherein the motion trajectory is a motion trajectory of an electronic device when the electronic device photographing the target video, and points on the motion trajectory correspond to image frames in the target video; receiving a first input of a user for a target point on the motion trajectory; and in response to the first input, controlling the target video to start playing from an image frame corresponding to the target point; wherein the controlling the target video to start playing from an image frame corresponding to the target point comprises: when the target point is a location at which a first point and a second point of the motion trajectory overlap, displaying, through division, the play interface as two play sub-windows, wherein a first play sub-window starts to play the target video from a first image frame corresponding to the first point, and a second play sub-window starts to play the target video from a second image frame corresponding to the second point.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS The present application is a continuation application of International Application No. PCT/CN2022/141203 filed on Dec. 23, 2022, which claims priority of Chinese Patent Application No. 202111622873.2, filed with the China National Intellectual Property Administration on Dec. 28, 2021, and entitled “VIDEO PLAY METHOD AND APPARATUS AND ELECTRONIC DEVICE”, both of which are incorporated herein by reference in their entireties. TECHNICAL FIELD This application pertains to the field of video play technologies, and specifically relates to a video play method and apparatus and an electronic device. BACKGROUND A time progress bar may be used in conventional video play, and a desired play location is selected by using the time progress bar. However, in a process of implementing this application, the inventor finds that the prior art has at least the following problem: a manner of selecting a play location only by using the time progress bar is single, and if a time cue is useless, it is difficult for a user to locate video content that the user is interested in. SUMMARY Embodiments of this application are intended to provide a video play method and apparatus and an electronic device, and can resolve a problem in the prior art that a play location is only selected by using a time progress bar during video play, and some video content that is not related to a time cue cannot be located. According to a first aspect, an embodiment of this application provides a video play method. The method includes: displaying a motion trajectory on a play interface of a target video when the target video is played, where the motion trajectory is a motion trajectory of a camera when photographing the target video, and points on the motion trajectory correspond to image frames in the target video;receiving a first input of a user for a target point on the motion trajectory; andin response to the first input, controlling the target video to start playing from an image frame corresponding to the target point. According to a second aspect, an embodiment of this application provides a video play apparatus. The apparatus includes: a display module, configured to display a motion trajectory on a play interface of a target video when the target video is played, where the motion trajectory is a motion trajectory of an electronic device when photographing the target video, and points on the motion trajectory correspond to image frames in the target video;a first receiving module, configured to receive a first input of a user for a target point on the motion trajectory; anda first play module, configured to: in response to the first input, control the target video to start playing from a target image frame corresponding to the target point. According to a third aspect, an embodiment of this application provides an electronic device. The electronic device includes a processor, a memory, and a program or an instruction that is stored in the memory and that can be run on the processor, where when the program or the instruction is executed by the processor, steps of the method according to the first aspect are implemented. According to a fourth aspect, an embodiment of this application provides a readable storage medium. The readable storage medium stores a program or an instruction. When the program or the instruction is executed by a processor, steps of the method according to the first aspect are implemented. According to a fifth aspect, an embodiment of this application provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or an instruction to implement steps of the method according to the first aspect. According to a sixth aspect, an embodiment of this application provides a computer program product. The computer program product is stored in a non-transient storage medium. The computer program product is executed by at least one processor to implement steps of the method according to the first aspect. In embodiments of this application, a motion trajectory of photographing a target video is synchronously displayed when the target video is played, and there is a correspondence between video frames of the target video and points on the motion trajectory, so that a user may select a corresponding point on the motion trajectory to start to play corresponding video content at an image frame corresponding to the point. This implements play of video content based on a spatial cue, and improves user experience. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic flowchart of a video play method according to an embodiment of this application; FIG. 2 is a schematic diagram of displaying a motion trajectory on a play interface according to an embodiment of this application; FIG. 3 is a schematic diagram of changing a display viewing angle of a motion trajectory according to an embodiment of th