WO2022116962A1 - Video playback method and apparatus, and electronic device - Google Patents

Video playback method and apparatus, and electronic device Download PDF

Info

Publication number
WO2022116962A1
WO2022116962A1 PCT/CN2021/134313 CN2021134313W WO2022116962A1 WO 2022116962 A1 WO2022116962 A1 WO 2022116962A1 CN 2021134313 W CN2021134313 W CN 2021134313W WO 2022116962 A1 WO2022116962 A1 WO 2022116962A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
video
target
frame
input
Prior art date
Application number
PCT/CN2021/134313
Other languages
French (fr)
Chinese (zh)
Inventor
邱靖
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2022116962A1 publication Critical patent/WO2022116962A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • H04N21/4316Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440245Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440281Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the temporal resolution, e.g. by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44213Monitoring of end-user related data

Definitions

  • the present application belongs to the technical field of video processing, and in particular relates to a video playback method, device and electronic device.
  • the purpose of the embodiments of the present application is to provide a video playback method, device and electronic device, which can solve the current problem that details cannot be presented during video playback on the basis of avoiding excessive video occupation.
  • an embodiment of the present application provides a video playback method, including:
  • a first input to a first object is received; wherein the first object is the first image in the first video data, or the first object and the first object image association;
  • the content of the third image is related to the content of the first image
  • the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  • an embodiment of the present application provides a video playback device, including:
  • a receiving module configured to receive a first input to a first object when the first video is played; wherein, the first object is the first image in the first video, or the first object is related to a first image association in the first video;
  • a response module configured to insert at least one frame of a third image between the first image and the second image in response to the first input, and play the first video after inserting the third image
  • the content of the third image is related to the content of the first image
  • the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the video playback method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the video playback method according to the first aspect is implemented A step of.
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect The steps of the video playback method.
  • a computer program product is provided, the computer program product is stored in a non-transitory storage medium, the computer program product is executed by at least one processor to implement the method of the first aspect.
  • the first video when the first video is played, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video, so that Since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch more details , and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
  • Fig. 1 is one of the flowcharts of the video playing method of the embodiment of the present application.
  • FIG. 2 is a schematic diagram of frame insertion processing according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a slow motion picture according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a second target image according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a third target image according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a pressure value change curve of a first input in an embodiment of the present application.
  • FIG. 8 is a block diagram of a video playback device according to an embodiment of the present application.
  • FIG. 9 is a block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • the embodiment of the present application provides a kind of video playing method, specifically can include the following steps:
  • Step 11 In the case of playing the first video, receive a first input to the first object.
  • the first object is the first image in the first video, or the first object is associated with the first image in the first video.
  • the first video may be a part of a complete video.
  • the image of a complete video is: several frames of images containing the A object, several frames of images containing the B object, etc., wherein the images of the first video can be are several frames of images containing the A object.
  • the first video may also be a complete video, for example, the video may be a short video, a gif image, or the like, which is not limited in this embodiment of the present application.
  • the first object is the first image in the first video, that is, the first input may be the first input for the currently playing first image during the process of playing the first video.
  • the form of the first input is not limited, for example, the first input may be a pressing input, a continuous click input, a sliding input of a predetermined track, and the like.
  • the first object may be a progress bar of video playback, and the first object is associated with the first image in the first video, that is, the first input may be for the progress bar with the first image.
  • a long-press operation on a corresponding area associated with an image, etc., where a long-press operation refers to an operation whose pressing duration exceeds a preset threshold, and of course other pressing operations, etc., are not limited to this embodiment of the present application.
  • the first object may be a target object in an image currently displayed in the first video, and the first object is associated with the first image, that is, the first input may be for the first video
  • the first input of the image currently displayed in the first input extract the target object in the currently displayed image according to the first input (for example, the target object may be the object corresponding to the operation position of the first input), and will be located in the
  • the image containing the target object before the currently displayed image is determined as the first image; or, in the case that there is no image containing the target object between the currently displayed images, the currently displayed image identified as the first image.
  • Step 12 In response to the first input, insert at least one frame of a third image between the first image and the second image, and play the first video after inserting the third image.
  • the content of the third image is related to the content of the first image
  • the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  • At least one frame of a third image may be inserted between the first image and the second image following the first image; or, in response to the first input, may At least one frame of a third image is inserted between the first image and a second image preceding the first image; alternatively, in response to the first input, at least one frame may be inserted between two frames of the second image A third image, wherein the first image is located between the two frames of the second image.
  • the content of the first image and the second image are related, that is, the first image and the second image both contain the target object;
  • the third image is related to the content of the first image, that is, the first image and the third image are related. All contain the target object; or the contents of the first image, the second image and the third image are all related, that is, the first image, the second image and the third image all contain the target object.
  • the step of playing the first video data inserted into the third image may specifically include:
  • the first video data inserted into the third image is played from the first image.
  • playing the first video after inserting the third image is to play the complete video after inserting the third image.
  • playing the first video after inserting the third image may include: playing the complete video after inserting the third image; The paragraph of the first video corresponding to the third image, for example, when at least one frame of the third image is inserted between the first image and the second image after the first image, the first image is played from the first image to the second image.
  • the end of the image as in the case of inserting at least one frame of the third image between the first image and the second image preceding the first image, play from the second image to the end of the first image; as in The first image is located between two frames of the second image, and when at least one frame of the third image is inserted between the two frames of the second image, the playback starts from the second image located before the first image to the location where the second image is located.
  • the second image after the first image ends.
  • a pop-up window can be displayed in the playback window for playing the first video, and the first video with the third image inserted is played in the pop-up window, that is, by pop-up.
  • the first video after the frame insertion is previewed in the window mode, that is, playing the first video in which the third image is inserted in the present application can be understood as the real-time frame insertion playback mode for the first video in the playback process, which can reduce the need for electronic equipment. memory space usage.
  • the electronic device can automatically and intelligently adjust the The video area performs real-time frame insertion processing, so that the video area can display more details and smooth and continuous slow motion during playback.
  • the method may further include: : When the first input ends, display prompt information, where the prompt information is used to prompt the user whether to save the first video after frame insertion.
  • first input such as long-press input
  • real-time frame interpolation processing is performed on the first video
  • first input ends such as when the operating object of the first input is separated from the electronic device
  • prompting the user whether to save the first video after frame insertion processing by displaying prompt information so that the user can choose to store the first video after frame insertion processing while reducing memory space occupation, further ensuring practical Effect.
  • the first video is restored to the initial playback state (that is, the playback state before frame insertion processing), which can satisfy the user's real-time response to the played video in any process of playing the video.
  • the need for video processing, as well as reducing the occupation of memory space, and the operation is simple and convenient, reducing the difficulty of requiring professional video processing.
  • the first video when the first video is played, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video, so that Since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch more details , and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
  • the step of inserting at least one frame of a third image between the first image and the second image may specifically include:
  • the third image is inserted adjacent to the first target image corresponding to the third image.
  • each frame of image in the first video contains the target object:
  • the repeated images learned by AI are automatically inserted into adjacent positions of each frame of the first video.
  • a blank rectangular area represents a frame of image in the initial video.
  • a repeated frame of image is inserted adjacent to the initial image of each frame, as shown in Figure 2(b)
  • the rectangular area filled with horizontal lines is shown; of course, according to the number of frames in the initial video, the degree of slow-motion detail that needs to be obtained, etc., multiple frames of repeated images can also be inserted adjacent to the initial image of each frame, as shown in Figure 2 ( c)
  • the rectangular area filled by horizontal lines and the rectangular area filled by grid are shown.
  • the repeated images learned by AI can be automatically inserted into the adjacent positions of some frame images in the first video.
  • 3, 5, 7, and 9 frames of images are adjacent to insert one or more frames of repeated images learned by AI, or one or more frames can be inserted at the position where the 3, 4, 5, 6, and 7 frame images ring Repeated images learned by AI, etc., are not limited to this embodiment of the present application.
  • the step of inserting at least one frame of a third image between the first image and the second image may specifically include:
  • a third image is generated; wherein the content of the third image is different from the content of the second target image and the third target image, and the second target image
  • the image and the third target image are: any two adjacent frames of images from the first image to the second image;
  • the third image is inserted between the second target image and the third target image.
  • the adjacent second target image and the third target image both contain the same target object (here the same target object refers to the same object, and its action, position and shape may be the same or different), which means the second target image It is related to the content of the third target image.
  • the target object in the second target image is the object A in FIG. 3
  • the target object in the second target image is the object E in FIG. 3
  • the direction and position of the two may be different, but they are both “skiing objects”, then It is determined to be the same target object, or the motion, position, shape, etc. of the target objects contained in the second target image and the third target image may also be the same.
  • the content of the third image is different from the content of the second target image and the third target image, which may mean that the third image contains the same target object as the second target image and the third target image, But the content of the target object is different (eg, at least one of the position, action, shape, etc. of the target object may be different).
  • frame insertion processing in this embodiment is: based on motion estimation and motion compensation algorithms, frame insertion processing is performed in real time. To put it simply, real-time video frame insertion technology can estimate the motion trajectory of objects based on the relationship between two adjacent frames, insert one or more intermediate images, and increase the video frame rate to ensure smoother video playback and better motion details. clear.
  • the frame rate of the initial video is 24 frames.
  • the picture will appear incoherent and blurred, which greatly affects the viewing experience.
  • the motion trajectory is estimated by the relationship between adjacent frames, and multi-frame intermediate images are generated, so that the original 24 frames can be increased to 60 frames to enhance the viewing experience.
  • the frame insertion process can be seen in Figure 2.
  • the rectangular area filled with horizontal lines is the intermediate image obtained after estimating the trajectory. After inserting the compensated intermediate image, the trajectory is relatively coherent.
  • the rectangular area filled with grids is the pre/post frame after learning the estimated motion trajectory. Images, inserted repeating intermediate images, smoother browsing after further intermediate images are inserted.
  • the step of generating the third image according to the content of the second target image and the third target image may specifically include:
  • the position of the target object contained in the third image on the motion trajectory is different from the position of the target object contained in the second target image and the third target image on the motion trajectory.
  • the target object may be determined according to the operation position of the first input, for example, in the case of receiving the first input to the first image, in response to the first input, extract the corresponding first image in the first image.
  • An object at an input operation position is used as the target object, and the movement track of the target object is determined according to the target objects contained in the second target image and the third target image.
  • FIG. 3 shows a schematic diagram of a slow motion picture.
  • the second target image 41 including the object A in the initial video is shown in FIG. 4
  • the third target image 51 including the object E is shown in FIG. 4 .
  • Figure 5 shows the motion trajectory of the target object.
  • the motion trajectory of the target object can be estimated as shown by the dotted line in Figure 3.
  • the motion trajectory of the target object can be estimated based on the object A and the The action of object E is learned through AI, and multiple objects B are determined, that is, a third image is obtained.
  • object A and object E can also be learned through AI to determine multiple objects B, C, and D, that is, multiple objects B, C, and D can be determined.
  • Frame the third image which is not limited in this embodiment of the present application.
  • motion trajectory estimation and AI learning it is possible to ensure that the action details of the slow-motion picture 31 played after inserting the intermediate image are more vivid and specific, and the video playback picture can be guaranteed to be smoother.
  • the step of inserting at least one frame of a third image between the first image and the second image may specifically include:
  • N is a positive integer.
  • the input parameter may be the input duration of the long-press input, for example: the longer the pressing duration is, the larger the frame number N of the inserted third image is. , the motion of the embodied moving object is slower; or, in the case that the first input is a pressing input, the input parameter may be the pressure value of pressing, for example: the greater the pressure value of pressing, the inserted third image The larger the number of frames N, the slower the motion of the embodied moving object.
  • the step of playing the first video after inserting the third image may specifically include:
  • the images corresponding to the target video part are: the first image, the second image and the third image.
  • the input parameter may be the input duration of the long-press input, for example: if the pressing duration is longer, the playback duration is shorter, and the presentation delay is fast. Action playback, if the pressing time is shorter, the longer the playing time is, the slow-motion playback will appear; or, in the case that the first input is a pressing input, the input parameter can be the pressure value of pressing, such as: if the pressing The larger the pressure value, the shorter the playback time, and the delayed fast-motion playback is displayed. If the pressure value is smaller, the longer the playback time is, and the slow-motion playback is displayed.
  • the electronic device detects that there is a pressing input
  • real-time frame image learning is enabled
  • real-time frame insertion is performed on some or all of the frame images in the first video, so that the user
  • the slow-motion presentation of the target object in the first video can be browsed in real time.
  • the corresponding interaction of the pressure value of the pressing input can be defined as the frame image multiple of the inserted frame, for example: the middle value of the pressing can be preset, as shown in paragraphs A-B in FIG. 6 , the pressure value of the pressing input is the pressing value.
  • the first video is played according to the initial state; when the pressure value of the press input is less than the middle value of the press, as shown in section C-D in Figure 6, if the pressure value of the press input is larger, the The slower the movement of the moving object; when the pressure value of the pressing input is greater than the middle value of the pressing, as shown in the E-F segment in Figure 6, if the pressure value of the pressing input is smaller, the faster the movement of the moving object is displayed.
  • the first video with different frame rates can be previewed in real time, and the operation method is convenient and fast, avoiding multiple operation adjustments, and to a certain extent Conducive to simplifying user operations.
  • an embodiment of the present application also provides a flowchart of a video playback method, which specifically includes:
  • Step 701 When playing the first video, the electronic device detects in real time whether there is a pressing input.
  • the electronic device detects the pressing area and time on the screen in real time.
  • Step 702 Determine a starting frame according to the first input.
  • the obtained coordinate value is used to determine the target object in the current image, and the image that the target object first appears in the first video playback process is used as the starting frame.
  • the currently displayed first image is used as the starting frame, etc., which is not limited in this embodiment of the present application.
  • Step 703 Compare the pressure value of the pressing input with a preset intermediate value.
  • Step 704 If the pressure value of the pressing input is greater than the preset intermediate value, and becomes larger and larger, it means that the magnification of the frame interpolation needs to be gradually increased; The smaller the value, the lower the magnification that needs to be interpolated.
  • Step 705 If the pressure value of the pressing input is equal to the preset intermediate value, or the pressure value of the pressing input is zero, resume normal playback.
  • Step 706 Insert a frame image in real time according to the magnification determined in the above step 704, and/or determine the video playback time according to the pressure value input by pressing.
  • Step 707 Play the first video after inserting the frame image.
  • the first video after the frame image is inserted is played according to the playback time, so as to present slow motion playback or fast motion playback.
  • Step 708 Cache the first video after inserting the frame image.
  • the effect of real-time frame insertion can also be cached in the database.
  • Step 709 in the case of receiving the synthesis input from the user, the first video after frame insertion may be synthesized with other segments of the original video.
  • Step 710 In the case of receiving the user's format selection input, the target format can be determined, and the composited video can be saved locally according to the target format. If the user's composite input is received, the cache releases the insert. The first video after the frame.
  • the user in the process of playing the first video, the user can press the input to cause the electronic device to perform real-time frame insertion processing on the first video, so that the played frame-inserted first video has a better picture. More details, clearer and smoother.
  • the solution can preview the first video of different frame rates in real time, and the operation method is convenient and fast, avoiding multiple operation adjustments, which is beneficial to simplify the user to a certain extent. operation, and avoid occupying too much memory space by means of caching, and by providing a way to combine and save, it is also convenient for subsequent viewing and sharing. .
  • the execution body may be a video playback device, or a control module in the video playback device for executing the video playback method.
  • the video playing device provided by the embodiment of the present application is described by taking a video playing device executing a video playing method as an example.
  • an embodiment of the present application further provides a video playback device 800, including:
  • a receiving module 810 configured to receive a first input of a first object when the first video is played; wherein the first object is the first image in the first video, or the first object associated with a first image in the first video;
  • a response module 820 configured to, in response to the first input, insert at least one frame of a third image between the first image and the second image, and play the first video after inserting the third image;
  • the content of the third image is related to the content of the first image
  • the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  • the response module 820 includes:
  • a copying sub-module configured to perform copying processing on the first target image to obtain at least one frame of third image; wherein, the first target image is: the part from the first image to the second image or all images;
  • a first frame insertion submodule configured to insert the third image into a position adjacent to the first target image corresponding to the third image.
  • the response module 820 includes:
  • a second frame insertion submodule configured to insert the third image between the second target image and the third target image.
  • the generating submodule includes:
  • a determining unit configured to determine the motion trajectory of the target object according to the target object contained in the second target image and the third target image;
  • a generating unit configured to generate a third image including the target object according to the motion trajectory of the target object
  • the position of the target object included in the third image on the motion track is different from the position of the target object included in the second target image and the third target image on the motion track.
  • the response module 820 includes:
  • a first determination submodule configured to determine the playback frame rate corresponding to the input parameter of the first input
  • the second determination submodule is configured to determine the frame number N of the third image inserted between the first image and the second image according to the playback frame rate, and determine the frame number N of the third image to be inserted between the first image and the second image N frames of third images are inserted between the second images, where N is a positive integer.
  • the response module 820 includes:
  • a first playing submodule configured to play the first video data inserted into the third image from the second image when the second image is located before the first image
  • a second playing submodule configured to play the first video data inserted into the third image from the first image when the second image is located after the first image.
  • the response module 820 includes:
  • a third determination submodule configured to determine the playback duration corresponding to the input parameter of the first input
  • the third playing submodule is used to play the target video part in the first video after inserting the third image according to the playing duration;
  • the images corresponding to the target video part are: the first image, the second image and the third image.
  • the video playback device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the video playback device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the video playback device provided in the embodiment of the present application can implement each process implemented by the method embodiments in FIG. 1 to FIG. 7 , and to avoid repetition, details are not repeated here.
  • the apparatus 800 in this embodiment of the present application when the first video is played, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video , in this way, since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch more More details, and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
  • an embodiment of the present application further provides an electronic device 900, including a processor 901, a memory 902, a program or instruction stored in the memory 902 and executable on the processor 901,
  • an electronic device 900 including a processor 901, a memory 902, a program or instruction stored in the memory 902 and executable on the processor 901,
  • the program or instruction is executed by the processor 901
  • each process of the above video playback method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc. part.
  • the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power functions. consumption management and other functions.
  • a power source such as a battery
  • the power management system can manage charging, discharging, and power functions. consumption management and other functions.
  • the structure of the electronic device shown in FIG. 10 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the radio frequency unit 1001 is configured to receive a first input of a first object when the first video is played; wherein, the first object is the first image in the first video, or the first object An object is associated with the first image in the first video.
  • the processor 1010 is configured to, in response to the first input, insert at least one frame of a third image between the first image and the second image, and play the first image after the insertion of the third image through the display unit 1006 video, or play the first video after inserting the third image through the audio output unit 1003 and the display unit 1006 .
  • the content of the third image is related to the content of the first image
  • the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  • the processor 1010 is configured to perform duplication processing on the first target image to obtain at least one frame of the third image; wherein the first target image is: from the first image to the second image Part or all of the images in between; inserting the third image to a position adjacent to the first target image corresponding to the third image.
  • the processor 1010 is further configured to generate a third image according to the content of the second target image and the third target image; wherein the content of the third image is the same as the second target image and the third target image.
  • the contents of the target images are different, and the second target image and the third target image are: any two adjacent frames of images from the first image to the second image; insert the third image into the to between the second target image and the third target image.
  • the processor 1010 is further configured to determine the motion trajectory of the target object according to the target object contained in the second target image and the third target image; generate a motion trajectory according to the target object a third image including the target object; wherein, the position of the target object included in the third image on the motion track is the same as the target object included in the second target image and the third target image The positions on the motion trajectory are different.
  • the processor 1010 is further configured to determine a playback frame rate corresponding to the input parameter of the first input; according to the playback frame rate, determine to insert between the first image and the second image
  • the frame number N of the third image is N, and N frames of the third image are inserted between the first image and the second image, where N is a positive integer.
  • the processor 1010 is further configured to, when the second image is located before the first image, start from the second image and play the first image after the third image is inserted through the display unit 1006. a video data, or play the first video data after inserting the third image through the audio output unit 1003 and the display unit 1006;
  • the processor 1010 is further configured to, when the second image is located after the first image, start from the first image and play the first image after the third image is inserted through the display unit 1006 a video data, or play the first video data inserted into the third image through the audio output unit 1003 and the display unit 1006 .
  • the processor 1010 is further configured to determine the playback duration corresponding to the input parameter of the first input; the display unit 1006 inserts the target video part in the first video after the third image according to the The audio output unit 1003 and the display unit 1006 play the target video part in the first video inserted after the third image according to the playback duration.
  • the images corresponding to the target video part are: the first image, the second image and the third image.
  • the electronic device 1000 in this embodiment of the present application in the case of playing the first video, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video.
  • the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch the More details, and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
  • the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 1007 includes a touch panel 10071 and other input devices 10072 .
  • the touch panel 10071 is also called a touch screen.
  • the touch panel 10071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • Memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and application programs, and the like, and the modem processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1010.
  • Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above video playback method embodiments.
  • 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 the above video playback method embodiments.
  • An embodiment of the present application further provides 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 process to implement the above method in FIG. 1 . In order to avoid repetition, the details are not repeated here.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.

Abstract

Disclosed in the present application are a video playback method and apparatus, and an electronic device, which belong to the technical field of video processing. Said method comprises: in the case where a first video is played back, receiving a first input to a first object, wherein the first object is a first image in the first video, or the first object is associated with the first image in the first video; and in response to the first input, inserting at least one third image between the first image and a second image, and playing back the first video inserted with the third image, wherein the content of the third image is related to that of the first image, and the second image comprises at least one of an image before the first image and an image after the first image in the first video.

Description

视频播放方法、装置及电子设备Video playback method, device and electronic device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2020年12月4日在中国提交的中国专利申请No.202011408989.1的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202011408989.1 filed in China on Dec. 4, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于视频处理技术领域,具体涉及一种视频播放方法、装置及电子设备。The present application belongs to the technical field of video processing, and in particular relates to a video playback method, device and electronic device.
背景技术Background technique
目前,大部分电子设备都具有视频播放,或者录制视频的功能,但是对于手机等电子设备来说,从节省空间等方面的考虑,其在录制视频时,一般录制得到的视频在单位时间内包含的帧数较少,这样将导致视频慢放时无法还原太多细节。假如在手机上配置高速摄像机,虽然能够避免这一问题,但是其成本较高。因此,在避免视频过多的占用空间的基础上,如何实现视频播放时的细节呈现是目前需要解决的问题。At present, most electronic devices have the function of playing video or recording video, but for electronic devices such as mobile phones, from the consideration of space saving and other aspects, when recording video, the recorded video generally contains the contents of the unit time. The number of frames is less, which will cause the video to slow down and not be able to restore much detail. If a high-speed camera is configured on the mobile phone, although this problem can be avoided, the cost is relatively high. Therefore, on the basis of avoiding the excessive occupation of video space, how to realize the presentation of details during video playback is a problem that needs to be solved at present.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的是提供一种视频播放方法、装置及电子设备,能够解决目前在避免视频过多的占用空间的基础上,不能实现视频播放时的细节呈现的问题。The purpose of the embodiments of the present application is to provide a video playback method, device and electronic device, which can solve the current problem that details cannot be presented during video playback on the basis of avoiding excessive video occupation.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above technical problems, this application is implemented as follows:
第一方面,本申请实施例提供了一种视频播放方法,包括:In a first aspect, an embodiment of the present application provides a video playback method, including:
在播放第一视频的情况下,接收对第一对象的第一输入;其中,所述第一对象为所述第一视频数据中的第一图像,或者所述第一对象与所述第一图像关联;In the case of playing the first video, a first input to a first object is received; wherein the first object is the first image in the first video data, or the first object and the first object image association;
响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频;In response to the first input, inserting at least one frame of a third image between the first image and the second image, and playing the first video after inserting the third image;
其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
第二方面,本申请实施例提供了一种视频播放装置,包括:In a second aspect, an embodiment of the present application provides a video playback device, including:
接收模块,用于在播放第一视频的情况下,接收对第一对象的第一输入;其中,所述第一对象为所述第一视频中的第一图像,或者所述第一对象与所述第一视频中的第一图像关联;a receiving module, configured to receive a first input to a first object when the first video is played; wherein, the first object is the first image in the first video, or the first object is related to a first image association in the first video;
响应模块,用于响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频;a response module, configured to insert at least one frame of a third image between the first image and the second image in response to the first input, and play the first video after inserting the third image;
其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的视频播放方法的步骤。In a third aspect, embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the video playback method according to the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的视频播放方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the video playback method according to the first aspect is implemented A step of.
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的视频播放方法的步骤。In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect The steps of the video playback method.
第六方面,提供了一种计算机程序产品,所述计算机程序产品被存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如第一方面所述的方法。In a sixth aspect, a computer program product is provided, the computer program product is stored in a non-transitory storage medium, the computer program product is executed by at least one processor to implement the method of the first aspect.
在本申请实施例中,在播放第一视频的情况下,如果接收到第一输入,则在所述第一视频中的第一图像与第二图像之间插入至少一帧第三图像,这样由于插入的第三图像的内容与第一图像的内容相关,从而丰富了第一视频的内容,以便于在播放插入所述第三图像后的第一视频时,可以使得用户观看到更多细节,并在避免视频数据过多的占用空间的基础上,实现了视频播 放时的细节呈现。In the embodiment of the present application, when the first video is played, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video, so that Since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch more details , and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
附图说明Description of drawings
图1是本申请实施例的视频播放方法的流程图之一;Fig. 1 is one of the flowcharts of the video playing method of the embodiment of the present application;
图2是本申请实施例的插帧处理的示意图;2 is a schematic diagram of frame insertion processing according to an embodiment of the present application;
图3是本申请实施例的慢动作画面的示意图;3 is a schematic diagram of a slow motion picture according to an embodiment of the present application;
图4是本申请实施例的第二目标图像的示意图;4 is a schematic diagram of a second target image according to an embodiment of the present application;
图5是本申请实施例的第三目标图像的示意图;5 is a schematic diagram of a third target image according to an embodiment of the present application;
图6是本申请实施例的第一输入的压力值变化曲线示意图;6 is a schematic diagram of a pressure value change curve of a first input in an embodiment of the present application;
图7是本申请实施例的视频播放方法的流程图之二;7 is the second flowchart of the video playback method according to the embodiment of the present application;
图8是本申请实施例的视频播放装置的框图;8 is a block diagram of a video playback device according to an embodiment of the present application;
图9是本申请实施例的电子设备的框图;9 is a block diagram of an electronic device according to an embodiment of the present application;
图10是本申请实施例的电子设备的硬件结构示意图。FIG. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between "first", "second", etc. The objects are usually of one type, and the number of objects is not limited. For example, the first object may be one or more than one. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the associated objects are in an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的图视频播放方法的进行详细地说明。The following describes the image and video playback method provided by the embodiments of the present application in detail through specific embodiments and application scenarios with reference to the accompanying drawings.
如图1所示,本申请实施例提供了一种视频播放方法,具体可以包括以 下步骤:As shown in Figure 1, the embodiment of the present application provides a kind of video playing method, specifically can include the following steps:
步骤11:在播放第一视频的情况下,接收对第一对象的第一输入。Step 11: In the case of playing the first video, receive a first input to the first object.
其中,所述第一对象为所述第一视频中的第一图像,或者所述第一对象与所述第一视频中的第一图像关联。The first object is the first image in the first video, or the first object is associated with the first image in the first video.
可选地,该第一视频可以是一段完整视频中的一部分,如一段完整视频的图像为:包含A对象的若干帧图像,包含B对象的若干帧图像等,其中该第一视频的图像可以是包含A对象的若干帧图像。Optionally, the first video may be a part of a complete video. For example, the image of a complete video is: several frames of images containing the A object, several frames of images containing the B object, etc., wherein the images of the first video can be are several frames of images containing the A object.
可选地,该第一视频也可以是一段完整的视频,如该视频可以是短视频、gif图像等,本申请实施例不以此为限。Optionally, the first video may also be a complete video, for example, the video may be a short video, a gif image, or the like, which is not limited in this embodiment of the present application.
可选地,所述第一对象为所述第一视频中的第一图像,即该第一输入可以是在播放所述第一视频的过程中,针对当前播放的第一图像的第一输入。其中,该第一输入的形式不限,如第一输入可以是按压输入,连续点击输入,预定轨迹的滑动输入等。Optionally, the first object is the first image in the first video, that is, the first input may be the first input for the currently playing first image during the process of playing the first video. . The form of the first input is not limited, for example, the first input may be a pressing input, a continuous click input, a sliding input of a predetermined track, and the like.
可选地,所述第一对象可以是视频播放的进度条,所述第一对象与所述第一视频中的第一图像关联,即该第一输入可以是针对所述进度条中与第一图像关联的相应区域的长按操作等,其中长按操作是指按压时长超过预设门限的操作,当然还可以是其他按压操作等,本申请实施例不以此为限。Optionally, the first object may be a progress bar of video playback, and the first object is associated with the first image in the first video, that is, the first input may be for the progress bar with the first image. A long-press operation on a corresponding area associated with an image, etc., where a long-press operation refers to an operation whose pressing duration exceeds a preset threshold, and of course other pressing operations, etc., are not limited to this embodiment of the present application.
可选地,所述第一对象可以是第一视频中当前显示的图像中的目标对象,所述第一对象与所述第一图像关联,即该第一输入可以是针对所述第一视频中当前显示的图像的第一输入,根据所述第一输入提取所述当前显示的图像中的目标对象(如该目标对象可以是对应所述第一输入的操作位置的对象),将位于所述当前显示的图像之前包含所述目标对象的图像确定为所述第一图像;或者,在该当前显示的图像之间不存在包含所述目标对象的图像的情况下,将该当前显示的图像确定为所述第一图像。Optionally, the first object may be a target object in an image currently displayed in the first video, and the first object is associated with the first image, that is, the first input may be for the first video The first input of the image currently displayed in the first input, extract the target object in the currently displayed image according to the first input (for example, the target object may be the object corresponding to the operation position of the first input), and will be located in the The image containing the target object before the currently displayed image is determined as the first image; or, in the case that there is no image containing the target object between the currently displayed images, the currently displayed image identified as the first image.
步骤12:响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频。Step 12: In response to the first input, insert at least one frame of a third image between the first image and the second image, and play the first video after inserting the third image.
其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
可选地,响应于所述第一输入,可以在第一图像与所述第一图像之后的第二图像之间,插入至少一帧第三图像;或者,响应于所述第一输入,可以在第一图像与所述第一图像之前的第二图像之间,插入至少一帧第三图像;或者,响应于所述第一输入,可以在两帧第二图像之间,插入至少一帧第三图像,其中,所述第一图像位于所述两帧第二图像之间。Optionally, in response to the first input, at least one frame of a third image may be inserted between the first image and the second image following the first image; or, in response to the first input, may At least one frame of a third image is inserted between the first image and a second image preceding the first image; alternatively, in response to the first input, at least one frame may be inserted between two frames of the second image A third image, wherein the first image is located between the two frames of the second image.
可选地,该第一图像和第二图像的内容相关,即第一图像和第二图像中均包含目标对象;第三图像和第一图像的内容相关,即第一图像和第三图像中均包含目标对象;或者第一图像、第二图像和第三图像的内容均相关,即第一图像、第二图像和第三图像中均包含目标对象。Optionally, the content of the first image and the second image are related, that is, the first image and the second image both contain the target object; the third image is related to the content of the first image, that is, the first image and the third image are related. All contain the target object; or the contents of the first image, the second image and the third image are all related, that is, the first image, the second image and the third image all contain the target object.
可选地,所述播放插入所述第三图像后的第一视频数据的步骤,可以具体包括:Optionally, the step of playing the first video data inserted into the third image may specifically include:
在所述第二图像位于所述第一图像之前的情况下,从所述第二图像开始播放插入所述第三图像后的第一视频数据;In the case that the second image is located before the first image, playing the first video data inserted into the third image from the second image;
在所述第二图像位于所述第一图像之后的情况下,从所述第一图像开始播放插入所述第三图像后的第一视频数据。In a case where the second image is located after the first image, the first video data inserted into the third image is played from the first image.
例如:在第一视频是一段完整的视频的情况下,播放插入所述第三图像后的第一视频,即为播放插入第三图像后的完整视频。For example, if the first video is a complete video, playing the first video after inserting the third image is to play the complete video after inserting the third image.
又例如:在该第一视频是一段完整视频中的一部分的情况下,播放插入所述第三图像后的第一视频可以包括:播放插入第三图像后的完整视频;或者仅播放插入所述第三图像后对应的第一视频的段落,如在第一图像与所述第一图像之后的第二图像之间插入至少一帧第三图像时,从第一图像开始播放到所述第二图像结束;如在第一图像与所述第一图像之前的第二图像之间插入至少一帧第三图像的情况下,从所述第二图像开始播放到所述第一图像结束;如在第一图像位于两帧第二图像之间,且在该两帧第二图像之间插入至少一帧第三图像的情况下,从位于所述第一图像之前的第二图像开始播放到位于所述第一图像之后的第二图像结束。Another example: when the first video is a part of a complete video, playing the first video after inserting the third image may include: playing the complete video after inserting the third image; The paragraph of the first video corresponding to the third image, for example, when at least one frame of the third image is inserted between the first image and the second image after the first image, the first image is played from the first image to the second image. the end of the image; as in the case of inserting at least one frame of the third image between the first image and the second image preceding the first image, play from the second image to the end of the first image; as in The first image is located between two frames of the second image, and when at least one frame of the third image is inserted between the two frames of the second image, the playback starts from the second image located before the first image to the location where the second image is located. The second image after the first image ends.
可选地,在播放插入第三图像的第一视频时,可以是在播放第一视频的播放窗口内显示弹窗,并在该弹窗内播放插入第三图像的第一视频,即通过弹窗的方式预览插帧后的第一视频,即本申请中播放插入第三图像的第一视 频可以理解为针对播放过程中的第一视频的实时插帧播放的方式,这样可以减少对电子设备的内存空间的占用。Optionally, when playing the first video with the third image inserted, a pop-up window can be displayed in the playback window for playing the first video, and the first video with the third image inserted is played in the pop-up window, that is, by pop-up. The first video after the frame insertion is previewed in the window mode, that is, playing the first video in which the third image is inserted in the present application can be understood as the real-time frame insertion playback mode for the first video in the playback process, which can reduce the need for electronic equipment. memory space usage.
例如:在播放第一视频的过程中,若用户需要查看其相应细节的片段或者某个区域,则可以通过长按相应视频区域,这样电子设备在接收到用户输入的情况下,可以自动智能对该视频区域进行实时插帧处理,使得该视频区域在播放时能够显示更多细节,以及流畅连续性的慢动作。For example: in the process of playing the first video, if the user needs to view a segment or a certain area of its corresponding details, he can press and hold the corresponding video area, so that the electronic device can automatically and intelligently adjust the The video area performs real-time frame insertion processing, so that the video area can display more details and smooth and continuous slow motion during playback.
可选地,响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频之后,还可以包括:在所述第一输入结束的情况下,显示提示信息,所述提示信息用于提示用户是否保存插帧之后的所述第一视频。Optionally, in response to the first input, after inserting at least one frame of a third image between the first image and the second image, and playing the first video after the insertion of the third image, the method may further include: : When the first input ends, display prompt information, where the prompt information is used to prompt the user whether to save the first video after frame insertion.
例如:在上述第一输入(如长按输入)的输入过程中,对该第一视频进行实时插帧处理,当第一输入结束(如第一输入的操作物体与电子设备分离)的情况下,通过显示提示信息的方式提示用户是否需要保存插帧处理之后的第一视频,这样在减少内存空间占用的情况下,还可以提供用户存储插帧处理之后的第一视频的选择,进一步保证实用效果。For example: during the input process of the above-mentioned first input (such as long-press input), real-time frame interpolation processing is performed on the first video, and when the first input ends (such as when the operating object of the first input is separated from the electronic device) , prompting the user whether to save the first video after frame insertion processing by displaying prompt information, so that the user can choose to store the first video after frame insertion processing while reducing memory space occupation, further ensuring practical Effect.
可选地,在第一输入结束的情况下,所述第一视频恢复为初始播放状态(即插帧处理之前的播放状态),这样可以满足用户在播放视频的任意过程中实时对所播放的视频进行处理的需求,以及减少内存空间的占用,并且操作简单便捷,降低了需要专业视频处理的难度。Optionally, in the case of the end of the first input, the first video is restored to the initial playback state (that is, the playback state before frame insertion processing), which can satisfy the user's real-time response to the played video in any process of playing the video. The need for video processing, as well as reducing the occupation of memory space, and the operation is simple and convenient, reducing the difficulty of requiring professional video processing.
本申请的上述方案中,在播放第一视频的情况下,如果接收到第一输入,则在所述第一视频中的第一图像与第二图像之间插入至少一帧第三图像,这样由于插入的第三图像的内容与第一图像的内容相关,从而丰富了第一视频的内容,以便于在播放插入所述第三图像后的第一视频时,可以使得用户观看到更多细节,并在避免视频数据过多的占用空间的基础上,实现了视频播放时的细节呈现。In the above solution of the present application, when the first video is played, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video, so that Since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch more details , and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
可选地,所述在所述第一图像与第二图像之间插入至少一帧第三图像的步骤,可以具体包括:Optionally, the step of inserting at least one frame of a third image between the first image and the second image may specifically include:
对第一目标图像进行复制处理,得到至少一帧第三图像;其中,所述第一目标图像为:从所述第一图像到所述第二图像之间的部分或全部图像;Duplicating the first target image to obtain at least one frame of a third image; wherein the first target image is: a part or all of the images from the first image to the second image;
将所述第三图像插入至与所述第三图像对应的第一目标图像相邻的位置。The third image is inserted adjacent to the first target image corresponding to the third image.
例如:在播放第一视频的过程中,可以基于实时读取视频前后帧图像,并进行人工智能(Artificial Intelligence,AI)学习,得到重复的图像,在前后帧中以一定比例数量插入该学习得到的重复图像,使得播放的视频数据具有更多细节、更加清晰流畅,从而实现直观快速地得到慢动作图像。For example: in the process of playing the first video, you can read the frame images before and after the video in real time, and perform artificial intelligence (AI) learning to obtain repeated images, and insert the learning in a certain proportion in the frames before and after. The repeated images make the played video data more detailed, clearer and smoother, so that the slow-motion images can be obtained intuitively and quickly.
以下结合第一视频中的每一帧图像均包含目标对象为例进行说明:The following description is given by taking the example that each frame of image in the first video contains the target object:
例如:在播放第一视频的同时,对该第一视频中的每一帧图像相邻的位置上都自动插入AI学习到的重复图像。如图2(a)所示,一个空白矩形区域代表初始视频中的一帧图像,经过AI学习之后,在每一帧初始图像相邻的位置插入一帧重复图像,如图2(b)中横线填充的矩形区域所示;当然,根据初始视频中的帧数,需要获得的慢动作细节程度等,还可以在每一帧初始图像相邻的位置插入多帧重复图像,如图2(c)中横线填充的矩形区域,以及网格填充的矩形区域所示。For example, while playing the first video, the repeated images learned by AI are automatically inserted into adjacent positions of each frame of the first video. As shown in Figure 2(a), a blank rectangular area represents a frame of image in the initial video. After AI learning, a repeated frame of image is inserted adjacent to the initial image of each frame, as shown in Figure 2(b) The rectangular area filled with horizontal lines is shown; of course, according to the number of frames in the initial video, the degree of slow-motion detail that needs to be obtained, etc., multiple frames of repeated images can also be inserted adjacent to the initial image of each frame, as shown in Figure 2 ( c) The rectangular area filled by horizontal lines and the rectangular area filled by grid are shown.
又例如:在播放第一视频的同时,可以对该第一视频中的部分帧图像相邻的位置上自动插入AI学习到的重复图像,如第一视频包括10帧图像,可以在第1、3、5、7、9帧图像相邻的位置插入一帧或多帧AI学习的重复图像,或者还可以在3、4、5、6、7帧图像响铃的位置插入一帧或多帧AI学习的重复图像等,本申请实施例不以此为限。Another example: while playing the first video, the repeated images learned by AI can be automatically inserted into the adjacent positions of some frame images in the first video. 3, 5, 7, and 9 frames of images are adjacent to insert one or more frames of repeated images learned by AI, or one or more frames can be inserted at the position where the 3, 4, 5, 6, and 7 frame images ring Repeated images learned by AI, etc., are not limited to this embodiment of the present application.
可选地,所述在所述第一图像与第二图像之间插入至少一帧第三图像的步骤,可以具体包括:Optionally, the step of inserting at least one frame of a third image between the first image and the second image may specifically include:
根据第二目标图像和第三目标图像的内容,生成第三图像;其中,所述第三图像的内容与所述第二目标图像和所述第三目标图像的内容不同,所述第二目标图像和所述第三目标图像为:从所述第一图像到所述第二图像之间相邻的任意两帧图像;According to the content of the second target image and the third target image, a third image is generated; wherein the content of the third image is different from the content of the second target image and the third target image, and the second target image The image and the third target image are: any two adjacent frames of images from the first image to the second image;
将所述第三图像插入至所述第二目标图像和所述第三目标图像之间。The third image is inserted between the second target image and the third target image.
其中,相邻的第二目标图像和第三目标图像中均包含相同的目标对象(这里相同的目标对象是指同一物体,其动作、位置、形状可以相同或不同),即表示第二目标图像和第三目标图像的内容相关。例如:第二目标图像中的目标对象为图3中的对象A,第二目标图像中的目标对象为图3中的对象E, 两者方向位置可以不同,但是均为“滑雪对象”,则将其确定为相同的目标对象,或者第二目标图像和第三目标图像中包含的目标对象的动作、位置、形状等也可以相同。Among them, the adjacent second target image and the third target image both contain the same target object (here the same target object refers to the same object, and its action, position and shape may be the same or different), which means the second target image It is related to the content of the third target image. For example: the target object in the second target image is the object A in FIG. 3 , the target object in the second target image is the object E in FIG. 3 , the direction and position of the two may be different, but they are both “skiing objects”, then It is determined to be the same target object, or the motion, position, shape, etc. of the target objects contained in the second target image and the third target image may also be the same.
其中,所述第三图像的内容与所述第二目标图像和所述第三目标图像的内容不同,可以是指第三图像与第二目标图像和第三目标图像中包含相同的目标对象,但是目标对象的内容不同(如目标对象的位置、动作、形状等中的至少一个可以不同)。Wherein, the content of the third image is different from the content of the second target image and the third target image, which may mean that the third image contains the same target object as the second target image and the third target image, But the content of the target object is different (eg, at least one of the position, action, shape, etc. of the target object may be different).
该实施例中的插帧处理的原理是:基于运动预估和运动补偿算法,实时进行插帧处理。简单来说,视频实时插帧技术可以根据两个相邻帧的关系,估算物体运动轨迹,插入一帧或多帧中间图像,提升视频帧率,以保证视频播放画面更流畅,运动细节呈现更清晰。The principle of frame insertion processing in this embodiment is: based on motion estimation and motion compensation algorithms, frame insertion processing is performed in real time. To put it simply, real-time video frame insertion technology can estimate the motion trajectory of objects based on the relationship between two adjacent frames, insert one or more intermediate images, and increase the video frame rate to ensure smoother video playback and better motion details. clear.
例如:初始视频的帧率为24帧,在面对高的刷新率时,在一些高速场景下会出现画面的不连贯与模糊,极大的影响观影体验,这样通过实时插帧技术,即通过相邻帧之间的关系估算运动轨迹,并生成多帧中间图像,从而可以把原来的24帧提升到60帧,以增强观影体验。For example: the frame rate of the initial video is 24 frames. In the face of high refresh rate, in some high-speed scenes, the picture will appear incoherent and blurred, which greatly affects the viewing experience. In this way, through the real-time frame insertion technology, namely The motion trajectory is estimated by the relationship between adjacent frames, and multi-frame intermediate images are generated, so that the original 24 frames can be increased to 60 frames to enhance the viewing experience.
又例如:在将插帧倍率提升8倍,16倍等更高倍率,通过插帧处理得到240帧及以上的视频,则能体现出视频播放画面变缓慢,即上述所说慢动作呈现。插帧过程可参见图2,横线填充的矩形区域为估算轨迹后得到的中间图像,插入补偿的中间图像后轨迹比较连贯,网格填充的矩形区域为估算运动轨迹后通过学习前/后帧图像,插入的重复中间图像,在进一步插入中间图像后浏览比较流畅。当然,还可以根据相邻两帧图像的关系,基于运动轨迹估算直接生成多帧中间图像,本申请实施例不以此为限。Another example: when the frame insertion ratio is increased by 8 times, 16 times and other higher magnifications, and a video of 240 frames or more is obtained through frame insertion processing, it can reflect that the video playback screen becomes slow, that is, the above-mentioned slow motion rendering. The frame insertion process can be seen in Figure 2. The rectangular area filled with horizontal lines is the intermediate image obtained after estimating the trajectory. After inserting the compensated intermediate image, the trajectory is relatively coherent. The rectangular area filled with grids is the pre/post frame after learning the estimated motion trajectory. Images, inserted repeating intermediate images, smoother browsing after further intermediate images are inserted. Of course, it is also possible to directly generate multiple frames of intermediate images based on the motion trajectory estimation according to the relationship between two adjacent frames of images, which is not limited to this embodiment of the present application.
可选地,所述根据第二目标图像和第三目标图像的内容,生成第三图像的步骤,可以具体包括:Optionally, the step of generating the third image according to the content of the second target image and the third target image may specifically include:
根据所述第二目标图像和所述第三目标图像中包含的目标对象,确定所述目标对象的运动轨迹;determining the motion trajectory of the target object according to the target object contained in the second target image and the third target image;
根据所述目标对象的运动轨迹,生成包含所述目标对象的第三图像;generating a third image including the target object according to the motion trajectory of the target object;
其中,所述第三图像中包含的目标对象在所述运动轨迹上的位置,与所述第二目标图像和所述第三目标图像中包含的目标对象在所述运动轨迹上的 位置不同。Wherein, the position of the target object contained in the third image on the motion trajectory is different from the position of the target object contained in the second target image and the third target image on the motion trajectory.
可选地,该目标对象可以根据第一输入的操作位置确定,如在接收到对第一图像的第一输入的情况下,响应于所述第一输入,提取所述第一图像中对应第一输入的操作位置处的对象作为所述目标对象,并根据所述第二目标图像和所述第三目标图像中包含的目标对象,确定所述目标对象的运动轨迹。Optionally, the target object may be determined according to the operation position of the first input, for example, in the case of receiving the first input to the first image, in response to the first input, extract the corresponding first image in the first image. An object at an input operation position is used as the target object, and the movement track of the target object is determined according to the target objects contained in the second target image and the third target image.
如图3给出了一种慢动作画面的显示示意图,在该慢动作画面31中,初始视频中包含对象A的第二目标图像41如图4所示,包含对象E的第三目标图像51如图5所示。例如:基于第二目标图像中的对象A和第三目标对象中的对象E,可以估算得到目标对象的运动轨迹如图3中虚线所示,进一步在确定了运动轨迹之后,可以基于对象A和对象E的动作通过AI学习,确定多个对象B,即得到一帧第三图像,当然也可以通过对象A和对象E的动作通过AI学习,确定多个对象B、C、D,即得到多帧第三图像,本申请实施例不以此为限。这样,基于运动轨迹估算以及AI学习可以保证插入中间图像后播放的慢动作画面31的动作细节更生动具体,保证视频播放画面更流畅。FIG. 3 shows a schematic diagram of a slow motion picture. In the slow motion picture 31, the second target image 41 including the object A in the initial video is shown in FIG. 4, and the third target image 51 including the object E is shown in FIG. 4 . As shown in Figure 5. For example: based on the object A in the second target image and the object E in the third target object, the motion trajectory of the target object can be estimated as shown by the dotted line in Figure 3. After the motion trajectory is determined, the motion trajectory of the target object can be estimated based on the object A and the The action of object E is learned through AI, and multiple objects B are determined, that is, a third image is obtained. Of course, the actions of object A and object E can also be learned through AI to determine multiple objects B, C, and D, that is, multiple objects B, C, and D can be determined. Frame the third image, which is not limited in this embodiment of the present application. In this way, based on motion trajectory estimation and AI learning, it is possible to ensure that the action details of the slow-motion picture 31 played after inserting the intermediate image are more vivid and specific, and the video playback picture can be guaranteed to be smoother.
可选地,所述在所述第一图像与第二图像之间插入至少一帧第三图像的步骤,可以具体包括:Optionally, the step of inserting at least one frame of a third image between the first image and the second image may specifically include:
确定与所述第一输入的输入参数对应的播放帧率;determining the playback frame rate corresponding to the input parameter of the first input;
根据所述播放帧率,确定在所述第一图像与所述第二图像之间插入的第三图像的帧数N,并在所述第一图像与所述第二图像之间插入N帧第三图像,N为正整数。According to the playback frame rate, determine the frame number N of the third image inserted between the first image and the second image, and insert N frames between the first image and the second image For the third image, N is a positive integer.
可选地,在该第一输入为长按输入的情况下,该输入参数可以为所述长按输入的输入时长,如:按压时长越长,则插入的第三图像的帧数N越大,则体现的运动对象的动作越慢;或者,在该第一输入为按压输入的情况下,该输入参数可以为按压的压力值,如:按压的压力值越大,则插入的第三图像的帧数N越大,则体现的运动对象的动作越慢。Optionally, in the case that the first input is a long-press input, the input parameter may be the input duration of the long-press input, for example: the longer the pressing duration is, the larger the frame number N of the inserted third image is. , the motion of the embodied moving object is slower; or, in the case that the first input is a pressing input, the input parameter may be the pressure value of pressing, for example: the greater the pressure value of pressing, the inserted third image The larger the number of frames N, the slower the motion of the embodied moving object.
可选地,所述播放插入所述第三图像后的第一视频的步骤,可以具体包括:Optionally, the step of playing the first video after inserting the third image may specifically include:
确定与所述第一输入的输入参数对应的播放时长;determining the playback duration corresponding to the input parameter of the first input;
将插入所述第三图像后的第一视频中的目标视频部分,按照所述播放时长进行播放;Playing the target video part in the first video after inserting the third image according to the playback duration;
其中,所述目标视频部分对应的图像为:所述第一图像、所述第二图像和所述第三图像。The images corresponding to the target video part are: the first image, the second image and the third image.
可选地,在该第一输入为长按输入的情况下,该输入参数可以为所述长按输入的输入时长,如:若按压时长越长,则播放时长越小,则呈现延时快动作播放,若按压时长越短,则播放时长越大,则呈现慢动作播放;或者,在该第一输入为按压输入的情况下,该输入参数可以为按压的压力值,如:若按压的压力值越大,则播放时长越小,则呈现延时快动作播放,若按压的压力值越小,则播放时长越大,则呈现慢动作播放。Optionally, in the case that the first input is a long-press input, the input parameter may be the input duration of the long-press input, for example: if the pressing duration is longer, the playback duration is shorter, and the presentation delay is fast. Action playback, if the pressing time is shorter, the longer the playing time is, the slow-motion playback will appear; or, in the case that the first input is a pressing input, the input parameter can be the pressure value of pressing, such as: if the pressing The larger the pressure value, the shorter the playback time, and the delayed fast-motion playback is displayed. If the pressure value is smaller, the longer the playback time is, and the slow-motion playback is displayed.
可选地,在第一视频的播放过程中,电子设备检测到有按压输入的情况下,启用实时帧图学习,对该第一视频中的部分或全部帧图像进行实时插帧处理,这样用户可以实时浏览到该第一视频中目标对象的慢动作呈现。进一步地,可以将按压输入的压力值大小对应交互定义为插帧的帧图倍数,如:可以预先设定按压中间值,如图6中A-B段所示,在按压输入的压力值为该按压中间值的情况下,按照初始状态播放该第一视频;在该按压输入的压力值小于该按压中间值的情况下,如图6中的C-D段,若按压输入的压力值越大,呈现出运动对象的动作越慢;在该按压输入的压力值大于该按压中间值的情况下,如图6中的E-F段,若按压输入的压力值越小,呈现出运动对象的动作越快。Optionally, during the playback of the first video, when the electronic device detects that there is a pressing input, real-time frame image learning is enabled, and real-time frame insertion is performed on some or all of the frame images in the first video, so that the user The slow-motion presentation of the target object in the first video can be browsed in real time. Further, the corresponding interaction of the pressure value of the pressing input can be defined as the frame image multiple of the inserted frame, for example: the middle value of the pressing can be preset, as shown in paragraphs A-B in FIG. 6 , the pressure value of the pressing input is the pressing value. In the case of the middle value, the first video is played according to the initial state; when the pressure value of the press input is less than the middle value of the press, as shown in section C-D in Figure 6, if the pressure value of the press input is larger, the The slower the movement of the moving object; when the pressure value of the pressing input is greater than the middle value of the pressing, as shown in the E-F segment in Figure 6, if the pressure value of the pressing input is smaller, the faster the movement of the moving object is displayed.
该实施例中,基于第一输入的输入参数与视频播放帧率的对应关系,可以实时预览不同帧率的第一视频,且该操作方式方便快捷,避免多次操作调整,在一定程度上有利于简化用户操作。In this embodiment, based on the corresponding relationship between the input parameters of the first input and the video playback frame rate, the first video with different frame rates can be previewed in real time, and the operation method is convenient and fast, avoiding multiple operation adjustments, and to a certain extent Conducive to simplifying user operations.
如图7所示,本申请实施例还提供了一种视频播放方法的流程图,具体包括:As shown in FIG. 7 , an embodiment of the present application also provides a flowchart of a video playback method, which specifically includes:
步骤701:在播放第一视频时,电子设备实时检测是否有按压输入。Step 701: When playing the first video, the electronic device detects in real time whether there is a pressing input.
例如:电子设备实时检测屏幕上的按压区域和时间。For example: the electronic device detects the pressing area and time on the screen in real time.
步骤702:根据所述第一输入,确定起始帧。Step 702: Determine a starting frame according to the first input.
例如:利用获取到的坐标值来确定当前图像中的目标对象,将该目标对 象在第一视频播放过程中第一次出现的图像作为起始帧。或者,将当前显示的第一图像作为起始帧等,本申请实施例不以此为限。For example, the obtained coordinate value is used to determine the target object in the current image, and the image that the target object first appears in the first video playback process is used as the starting frame. Alternatively, the currently displayed first image is used as the starting frame, etc., which is not limited in this embodiment of the present application.
步骤703:将按压输入的压力值与预先设定的中间值进行对比。Step 703: Compare the pressure value of the pressing input with a preset intermediate value.
步骤704:若按压输入的压力值大于预先设定的中间值,且越来越大,则表示需要插帧的倍率逐步提升;若按压输入的压力值小于预先设定的中间值,且越来越小,则表示需要插帧的倍率逐步下降。Step 704: If the pressure value of the pressing input is greater than the preset intermediate value, and becomes larger and larger, it means that the magnification of the frame interpolation needs to be gradually increased; The smaller the value, the lower the magnification that needs to be interpolated.
步骤705:若按压输入的压力值等于该预先设定的中间值,或者按压输入的压力值为零,则恢复正常播放。Step 705: If the pressure value of the pressing input is equal to the preset intermediate value, or the pressure value of the pressing input is zero, resume normal playback.
步骤706:根据上述步骤704确定的倍率,实时插入帧图,和/或,根据按压输入的压力值确定视频播放的时间。Step 706: Insert a frame image in real time according to the magnification determined in the above step 704, and/or determine the video playback time according to the pressure value input by pressing.
步骤707:播放插入帧图后的第一视频。例如:在上述步骤705中确定了播放时间的情况下,根据该播放时间播放插入帧图后的第一视频,以呈现出慢动作播放,或者快动作播放。Step 707: Play the first video after inserting the frame image. For example, in the case where the playback time is determined in the above step 705, the first video after the frame image is inserted is played according to the playback time, so as to present slow motion playback or fast motion playback.
步骤708:缓存该插入帧图后的第一视频。例如:实时插帧的效果也可以在数据库中缓存。Step 708: Cache the first video after inserting the frame image. For example: the effect of real-time frame insertion can also be cached in the database.
步骤709:在接收到用户的合成输入的情况下,可以将插帧后的第一视频与原视频的其他片段进行合成。Step 709 : in the case of receiving the synthesis input from the user, the first video after frame insertion may be synthesized with other segments of the original video.
步骤710:在接收到用户的格式选择输入的情况下,可以确定目标格式,并将该合成后的视频按照所述目标格式保存在本地,若为接收到用户的合成输入,则缓存释放该插帧后的第一视频。Step 710: In the case of receiving the user's format selection input, the target format can be determined, and the composited video can be saved locally according to the target format. If the user's composite input is received, the cache releases the insert. The first video after the frame.
本申请的上述方案,在播放第一视频的过程中,用户可以通过按压输入,使得电子设备针对该第一视频进行实时插帧处理,从而使得播放的插帧后的第一视频的画面具有更多细节、更加清晰流畅。并且该方案基于按压输入的压力值与视频播放帧率的对应关系,可以实时预览不同帧率的第一视频,且该操作方式方便快捷,避免多次操作调整,在一定程度上有利于简化用户操作,并且通过缓存的方式避免占用过多的内存空间,以及通过提供合成并保存的方式,还便于后续观看以及分享。。In the above solution of the present application, in the process of playing the first video, the user can press the input to cause the electronic device to perform real-time frame insertion processing on the first video, so that the played frame-inserted first video has a better picture. More details, clearer and smoother. Moreover, based on the corresponding relationship between the pressure value of the pressing input and the video playback frame rate, the solution can preview the first video of different frame rates in real time, and the operation method is convenient and fast, avoiding multiple operation adjustments, which is beneficial to simplify the user to a certain extent. operation, and avoid occupying too much memory space by means of caching, and by providing a way to combine and save, it is also convenient for subsequent viewing and sharing. .
需要说明的是,本申请实施例提供的视频播放方法,执行主体可以为视频播放装置,或者该视频播放装置中的用于执行视频播放方法的控制模块。 本申请实施例中以视频播放装置执行视频播放方法为例,说明本申请实施例提供的视频播放装置。It should be noted that, in the video playback method provided by the embodiments of the present application, the execution body may be a video playback device, or a control module in the video playback device for executing the video playback method. In the embodiment of the present application, the video playing device provided by the embodiment of the present application is described by taking a video playing device executing a video playing method as an example.
如图8所示,本申请实施例还提供了一种视频播放装置800,包括:As shown in FIG. 8 , an embodiment of the present application further provides a video playback device 800, including:
接收模块810,用于在播放第一视频的情况下,接收对第一对象的第一输入;其中,所述第一对象为所述第一视频中的第一图像,或者所述第一对象与所述第一视频中的第一图像关联;A receiving module 810, configured to receive a first input of a first object when the first video is played; wherein the first object is the first image in the first video, or the first object associated with a first image in the first video;
响应模块820,用于响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频;a response module 820, configured to, in response to the first input, insert at least one frame of a third image between the first image and the second image, and play the first video after inserting the third image;
其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
可选地,所述响应模块820包括:Optionally, the response module 820 includes:
复制子模块,用于对第一目标图像进行复制处理,得到至少一帧第三图像;其中,所述第一目标图像为:从所述第一图像到所述第二图像之间的部分或全部图像;A copying sub-module, configured to perform copying processing on the first target image to obtain at least one frame of third image; wherein, the first target image is: the part from the first image to the second image or all images;
第一插帧子模块,用于将所述第三图像插入至与所述第三图像对应的第一目标图像相邻的位置。A first frame insertion submodule, configured to insert the third image into a position adjacent to the first target image corresponding to the third image.
可选地,所述响应模块820包括:Optionally, the response module 820 includes:
生成子模块,用于根据第二目标图像和第三目标图像的内容,生成第三图像;其中,所述第三图像的内容与所述第二目标图像和所述第三目标图像的内容不同,所述第二目标图像和所述第三目标图像为:从所述第一图像到所述第二图像之间相邻的任意两帧图像;A generating submodule for generating a third image according to the content of the second target image and the third target image; wherein the content of the third image is different from the content of the second target image and the third target image , the second target image and the third target image are: any two adjacent frames of images from the first image to the second image;
第二插帧子模块,用于将所述第三图像插入至所述第二目标图像和所述第三目标图像之间。A second frame insertion submodule, configured to insert the third image between the second target image and the third target image.
可选地,所述生成子模块包括:Optionally, the generating submodule includes:
确定单元,用于根据所述第二目标图像和所述第三目标图像中包含的目标对象,确定所述目标对象的运动轨迹;a determining unit, configured to determine the motion trajectory of the target object according to the target object contained in the second target image and the third target image;
生成单元,用于根据所述目标对象的运动轨迹,生成包含所述目标对象的第三图像;a generating unit, configured to generate a third image including the target object according to the motion trajectory of the target object;
其中,所述第三图像中包含的目标对象在所述运动轨迹上的位置,与所述第二目标图像和所述第三目标图像中包含的目标对象在所述运动轨迹上的位置不同。Wherein, the position of the target object included in the third image on the motion track is different from the position of the target object included in the second target image and the third target image on the motion track.
可选地,所述响应模块820包括:Optionally, the response module 820 includes:
第一确定子模块,用于确定与所述第一输入的输入参数对应的播放帧率;a first determination submodule, configured to determine the playback frame rate corresponding to the input parameter of the first input;
第二确定子模块,用于根据所述播放帧率,确定在所述第一图像与所述第二图像之间插入的第三图像的帧数N,并在所述第一图像与所述第二图像之间插入N帧第三图像,N为正整数。The second determination submodule is configured to determine the frame number N of the third image inserted between the first image and the second image according to the playback frame rate, and determine the frame number N of the third image to be inserted between the first image and the second image N frames of third images are inserted between the second images, where N is a positive integer.
可选地,所述响应模块820包括:Optionally, the response module 820 includes:
第一播放子模块,用于在所述第二图像位于所述第一图像之前的情况下,从所述第二图像开始播放插入所述第三图像后的第一视频数据;a first playing submodule, configured to play the first video data inserted into the third image from the second image when the second image is located before the first image;
第二播放子模块,用于在所述第二图像位于所述第一图像之后的情况下,从所述第一图像开始播放插入所述第三图像后的第一视频数据。A second playing submodule, configured to play the first video data inserted into the third image from the first image when the second image is located after the first image.
可选地,所述响应模块820包括:Optionally, the response module 820 includes:
第三确定子模块,用于确定与所述第一输入的输入参数对应的播放时长;a third determination submodule, configured to determine the playback duration corresponding to the input parameter of the first input;
第三播放子模块,用于将插入所述第三图像后的第一视频中的目标视频部分,按照所述播放时长进行播放;The third playing submodule is used to play the target video part in the first video after inserting the third image according to the playing duration;
其中,所述目标视频部分对应的图像为:所述第一图像、所述第二图像和所述第三图像。The images corresponding to the target video part are: the first image, the second image and the third image.
本申请实施例中的视频播放装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The video playback device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The apparatus may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant). assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的视频播放装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可 能的操作系统,本申请实施例不作具体限定。The video playback device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
本申请实施例提供的视频播放装置能够实现图1至图7的方法实施例实现的各个过程,为避免重复,这里不再赘述。The video playback device provided in the embodiment of the present application can implement each process implemented by the method embodiments in FIG. 1 to FIG. 7 , and to avoid repetition, details are not repeated here.
本申请实施例中的装置800,在播放第一视频的情况下,如果接收到第一输入,则在所述第一视频中的第一图像与第二图像之间插入至少一帧第三图像,这样由于插入的第三图像的内容与第一图像的内容相关,从而丰富了第一视频的内容,以便于在播放插入所述第三图像后的第一视频时,可以使得用户观看到更多细节,并在避免视频数据过多的占用空间的基础上,实现了视频播放时的细节呈现。In the apparatus 800 in this embodiment of the present application, when the first video is played, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video , in this way, since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch more More details, and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
可选的,如图9所示,本申请实施例还提供一种电子设备900,包括处理器901,存储器902,存储在存储器902上并可在所述处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述视频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 9 , an embodiment of the present application further provides an electronic device 900, including a processor 901, a memory 902, a program or instruction stored in the memory 902 and executable on the processor 901, When the program or instruction is executed by the processor 901, each process of the above video playback method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.
需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
图10为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc. part.
本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图10中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power functions. consumption management and other functions. The structure of the electronic device shown in FIG. 10 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
其中,射频单元1001,用于在播放第一视频的情况下,接收对第一对象的第一输入;其中,所述第一对象为所述第一视频中的第一图像,或者所述第一对象与所述第一视频中的第一图像关联。Wherein, the radio frequency unit 1001 is configured to receive a first input of a first object when the first video is played; wherein, the first object is the first image in the first video, or the first object An object is associated with the first image in the first video.
处理器1010,用于响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并通过显示单元1006播放插入所述第三图像后的 第一视频,或者通过音频输出单元1003和显示单元1006播放插入所述第三图像后的第一视频。The processor 1010 is configured to, in response to the first input, insert at least one frame of a third image between the first image and the second image, and play the first image after the insertion of the third image through the display unit 1006 video, or play the first video after inserting the third image through the audio output unit 1003 and the display unit 1006 .
其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
可选地,处理器1010,用于对第一目标图像进行复制处理,得到至少一帧第三图像;其中,所述第一目标图像为:从所述第一图像到所述第二图像之间的部分或全部图像;将所述第三图像插入至与所述第三图像对应的第一目标图像相邻的位置。Optionally, the processor 1010 is configured to perform duplication processing on the first target image to obtain at least one frame of the third image; wherein the first target image is: from the first image to the second image Part or all of the images in between; inserting the third image to a position adjacent to the first target image corresponding to the third image.
可选地,处理器1010,还用于根据第二目标图像和第三目标图像的内容,生成第三图像;其中,所述第三图像的内容与所述第二目标图像和所述第三目标图像的内容不同,所述第二目标图像和所述第三目标图像为:从所述第一图像到所述第二图像之间相邻的任意两帧图像;将所述第三图像插入至所述第二目标图像和所述第三目标图像之间。Optionally, the processor 1010 is further configured to generate a third image according to the content of the second target image and the third target image; wherein the content of the third image is the same as the second target image and the third target image. The contents of the target images are different, and the second target image and the third target image are: any two adjacent frames of images from the first image to the second image; insert the third image into the to between the second target image and the third target image.
可选地,处理器1010,还用于根据所述第二目标图像和所述第三目标图像中包含的目标对象,确定所述目标对象的运动轨迹;根据所述目标对象的运动轨迹,生成包含所述目标对象的第三图像;其中,所述第三图像中包含的目标对象在所述运动轨迹上的位置,与所述第二目标图像和所述第三目标图像中包含的目标对象在所述运动轨迹上的位置不同。Optionally, the processor 1010 is further configured to determine the motion trajectory of the target object according to the target object contained in the second target image and the third target image; generate a motion trajectory according to the target object a third image including the target object; wherein, the position of the target object included in the third image on the motion track is the same as the target object included in the second target image and the third target image The positions on the motion trajectory are different.
可选地,处理器1010,还用于确定与所述第一输入的输入参数对应的播放帧率;根据所述播放帧率,确定在所述第一图像与所述第二图像之间插入的第三图像的帧数N,并在所述第一图像与所述第二图像之间插入N帧第三图像,N为正整数。Optionally, the processor 1010 is further configured to determine a playback frame rate corresponding to the input parameter of the first input; according to the playback frame rate, determine to insert between the first image and the second image The frame number N of the third image is N, and N frames of the third image are inserted between the first image and the second image, where N is a positive integer.
可选地,处理器1010,还用于在所述第二图像位于所述第一图像之前的情况下,从所述第二图像开始,通过显示单元1006播放插入所述第三图像后的第一视频数据,或者通过音频输出单元1003和显示单元1006播放插入所述第三图像后的第一视频数据;Optionally, the processor 1010 is further configured to, when the second image is located before the first image, start from the second image and play the first image after the third image is inserted through the display unit 1006. a video data, or play the first video data after inserting the third image through the audio output unit 1003 and the display unit 1006;
可选地,处理器1010,还用于在所述第二图像位于所述第一图像之后的情况下,从所述第一图像开始,通过显示单元1006播放插入所述第三图像后 的第一视频数据,或者通过音频输出单元1003和显示单元1006播放插入所述第三图像后的第一视频数据。Optionally, the processor 1010 is further configured to, when the second image is located after the first image, start from the first image and play the first image after the third image is inserted through the display unit 1006 a video data, or play the first video data inserted into the third image through the audio output unit 1003 and the display unit 1006 .
可选地,处理器1010,还用于确定与所述第一输入的输入参数对应的播放时长;通过显示单元1006将插入所述第三图像后的第一视频中的目标视频部分,按照所述播放时长进行播放,或者通过音频输出单元1003和显示单元1006将插入所述第三图像后的第一视频中的目标视频部分,按照所述播放时长进行播放。Optionally, the processor 1010 is further configured to determine the playback duration corresponding to the input parameter of the first input; the display unit 1006 inserts the target video part in the first video after the third image according to the The audio output unit 1003 and the display unit 1006 play the target video part in the first video inserted after the third image according to the playback duration.
其中,所述目标视频部分对应的图像为:所述第一图像、所述第二图像和所述第三图像。The images corresponding to the target video part are: the first image, the second image and the third image.
本申请实施例中的电子设备1000,在播放第一视频的情况下,如果接收到第一输入,则在所述第一视频中的第一图像与第二图像之间插入至少一帧第三图像,这样由于插入的第三图像的内容与第一图像的内容相关,从而丰富了第一视频的内容,以便于在播放插入所述第三图像后的第一视频时,可以使得用户观看到更多细节,并在避免视频数据过多的占用空间的基础上,实现了视频播放时的细节呈现。In the electronic device 1000 in this embodiment of the present application, in the case of playing the first video, if the first input is received, at least one frame of the third image is inserted between the first image and the second image in the first video. In this way, since the content of the inserted third image is related to the content of the first image, the content of the first video is enriched, so that when the first video after the insertion of the third image is played, the user can watch the More details, and on the basis of avoiding the excessive occupation of video data, the detailed presentation of the video playback is realized.
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。It should be understood that, in this embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. Such as camera) to obtain still pictures or video image data for processing. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and other input devices 10072 . The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and application programs, and the like, and the modem processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1010.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程 序或指令,该程序或指令被处理器执行时实现上述视频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the above video playback method embodiment can be achieved, and the same can be achieved. In order to avoid repetition, the technical effect will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the foregoing embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述视频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above video playback method embodiments. Each process can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
本申请实施例另提供了一种计算机程序产品,其中,所述计算机程序产品被存储在非瞬态的可读存储介质中,所述计算机程序产品被至少一个处理执行以实现上述图1方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides 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 process to implement the above method in FIG. 1 . In order to avoid repetition, the details are not repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in the reverse order depending on the functions involved. To perform functions, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of this application, without departing from the scope of protection of the purpose of this application and the claims, many forms can be made, which all fall within the protection of this application.

Claims (19)

  1. 一种视频播放方法,包括:A video playback method, comprising:
    在播放第一视频的情况下,接收对第一对象的第一输入;其中,所述第一对象为所述第一视频中的第一图像,或者所述第一对象与所述第一视频中的第一图像关联;In the case of playing the first video, a first input of a first object is received; wherein the first object is a first image in the first video, or the first object and the first video The first image association in ;
    响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频;In response to the first input, inserting at least one frame of a third image between the first image and the second image, and playing the first video after inserting the third image;
    其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  2. 根据权利要求1所述的视频播放方法,其中,所述在所述第一图像与第二图像之间插入至少一帧第三图像,包括:The video playback method according to claim 1, wherein inserting at least one frame of a third image between the first image and the second image comprises:
    对第一目标图像进行复制处理,得到至少一帧第三图像;其中,所述第一目标图像为:从所述第一图像到所述第二图像之间的部分或全部图像;Duplicating the first target image to obtain at least one frame of a third image; wherein the first target image is: a part or all of the images from the first image to the second image;
    将所述第三图像插入至与所述第三图像对应的第一目标图像相邻的位置。The third image is inserted adjacent to the first target image corresponding to the third image.
  3. 根据权利要求1所述的视频播放方法,其中,所述在所述第一图像与第二图像之间插入至少一帧第三图像,包括:The video playback method according to claim 1, wherein inserting at least one frame of a third image between the first image and the second image comprises:
    根据第二目标图像和第三目标图像的内容,生成第三图像;其中,所述第三图像的内容与所述第二目标图像和所述第三目标图像的内容不同,所述第二目标图像和所述第三目标图像为:从所述第一图像到所述第二图像之间相邻的任意两帧图像;According to the content of the second target image and the third target image, a third image is generated; wherein the content of the third image is different from the content of the second target image and the third target image, and the second target image The image and the third target image are: any two adjacent frames of images from the first image to the second image;
    将所述第三图像插入至所述第二目标图像和所述第三目标图像之间。The third image is inserted between the second target image and the third target image.
  4. 根据权利要求3所述的视频播放方法,其中,所述根据第二目标图像和第三目标图像的内容,生成第三图像,包括:The video playback method according to claim 3, wherein the generating the third image according to the content of the second target image and the third target image comprises:
    根据所述第二目标图像和所述第三目标图像中包含的目标对象,确定所述目标对象的运动轨迹;determining the motion trajectory of the target object according to the target object contained in the second target image and the third target image;
    根据所述目标对象的运动轨迹,生成包含所述目标对象的第三图像;generating a third image including the target object according to the motion trajectory of the target object;
    其中,所述第三图像中包含的目标对象在所述运动轨迹上的位置,与所 述第二目标图像和所述第三目标图像中包含的目标对象在所述运动轨迹上的位置不同。Wherein, the position of the target object contained in the third image on the motion trajectory is different from the position of the target object contained in the second target image and the third target image on the motion trajectory.
  5. 根据权利要求1所述的视频播放方法,其中,所述在所述第一图像与第二图像之间插入至少一帧第三图像,包括:The video playback method according to claim 1, wherein inserting at least one frame of a third image between the first image and the second image comprises:
    确定与所述第一输入的输入参数对应的播放帧率;determining the playback frame rate corresponding to the input parameter of the first input;
    根据所述播放帧率,确定在所述第一图像与所述第二图像之间插入的第三图像的帧数N,并在所述第一图像与所述第二图像之间插入N帧第三图像,N为正整数。According to the playback frame rate, determine the frame number N of the third image inserted between the first image and the second image, and insert N frames between the first image and the second image For the third image, N is a positive integer.
  6. 根据权利要求1所述的视频播放方法,其中,所述播放插入所述第三图像后的第一视频,包括:The video playing method according to claim 1, wherein the playing the first video after inserting the third image comprises:
    在所述第二图像位于所述第一图像之前的情况下,从所述第二图像开始播放插入所述第三图像后的第一视频;In the case that the second image is located before the first image, playing the first video after inserting the third image from the second image;
    在所述第二图像位于所述第一图像之后的情况下,从所述第一图像开始播放插入所述第三图像后的第一视频。In the case where the second image is located after the first image, the first video inserted into the third image is played from the first image.
  7. 根据权利要求1所述的视频播放方法,其中,所述播放插入所述第三图像后的第一视频,包括:The video playing method according to claim 1, wherein the playing the first video after inserting the third image comprises:
    确定与所述第一输入的输入参数对应的播放时长;determining the playback duration corresponding to the input parameter of the first input;
    将插入所述第三图像后的第一视频中的目标视频部分,按照所述播放时长进行播放;Playing the target video part in the first video after inserting the third image according to the playback duration;
    其中,所述目标视频部分对应的图像为:所述第一图像、所述第二图像和所述第三图像。The images corresponding to the target video part are: the first image, the second image and the third image.
  8. 一种视频播放装置,包括:A video playback device, comprising:
    接收模块,用于在播放第一视频的情况下,接收对第一对象的第一输入;其中,所述第一对象为所述第一视频中的第一图像,或者所述第一对象与所述第一视频中的第一图像关联;a receiving module, configured to receive a first input to a first object when the first video is played; wherein, the first object is the first image in the first video, or the first object is related to a first image association in the first video;
    响应模块,用于响应于所述第一输入,在所述第一图像与第二图像之间插入至少一帧第三图像,并播放插入所述第三图像后的第一视频;a response module, configured to insert at least one frame of a third image between the first image and the second image in response to the first input, and play the first video after inserting the third image;
    其中,所述第三图像的内容与所述第一图像的内容相关,所述第二图像包括:所述第一视频中位于所述第一图像之前的一帧图像和位于所述第一图 像之后的一帧图像中的至少一个。Wherein, the content of the third image is related to the content of the first image, and the second image includes: a frame of image in the first video that is located before the first image and a frame of image located in the first image at least one of the following frame images.
  9. 根据权利要求8所述的视频播放装置,其中,所述响应模块包括:The video playback device according to claim 8, wherein the response module comprises:
    复制子模块,用于对第一目标图像进行复制处理,得到至少一帧第三图像;其中,所述第一目标图像为:从所述第一图像到所述第二图像之间的部分或全部图像;A copying sub-module, configured to perform copying processing on the first target image to obtain at least one frame of a third image; wherein, the first target image is: the part from the first image to the second image or all images;
    第一插帧子模块,用于将所述第三图像插入至与所述第三图像对应的第一目标图像相邻的位置。A first frame insertion submodule, configured to insert the third image into a position adjacent to the first target image corresponding to the third image.
  10. 根据权利要求8所述的视频播放装置,其中,所述响应模块包括:The video playback device according to claim 8, wherein the response module comprises:
    生成子模块,用于根据第二目标图像和第三目标图像的内容,生成第三图像;其中,所述第三图像的内容与所述第二目标图像和所述第三目标图像的内容不同,所述第二目标图像和所述第三目标图像为:从所述第一图像到所述第二图像之间相邻的任意两帧图像;A generating submodule for generating a third image according to the content of the second target image and the third target image; wherein the content of the third image is different from the content of the second target image and the third target image , the second target image and the third target image are: any two adjacent frames of images from the first image to the second image;
    第二插帧子模块,用于将所述第三图像插入至所述第二目标图像和所述第三目标图像之间。A second frame insertion submodule, configured to insert the third image between the second target image and the third target image.
  11. 根据权利要求10所述的视频播放装置,其中,所述生成子模块包括:The video playback device according to claim 10, wherein the generating submodule comprises:
    确定单元,用于根据所述第二目标图像和所述第三目标图像中包含的目标对象,确定所述目标对象的运动轨迹;a determining unit, configured to determine the motion trajectory of the target object according to the target object contained in the second target image and the third target image;
    生成单元,用于根据所述目标对象的运动轨迹,生成包含所述目标对象的第三图像;a generating unit, configured to generate a third image including the target object according to the motion trajectory of the target object;
    其中,所述第三图像中包含的目标对象在所述运动轨迹上的位置,与所述第二目标图像和所述第三目标图像中包含的目标对象在所述运动轨迹上的位置不同。Wherein, the position of the target object included in the third image on the motion track is different from the position of the target object included in the second target image and the third target image on the motion track.
  12. 根据权利要求8所述的视频播放装置,其中,所述响应模块包括:The video playback device according to claim 8, wherein the response module comprises:
    第一确定子模块,用于确定与所述第一输入的输入参数对应的播放帧率;a first determination submodule, configured to determine the playback frame rate corresponding to the input parameter of the first input;
    第二确定子模块,用于根据所述播放帧率,确定在所述第一图像与所述第二图像之间插入的第三图像的帧数N,并在所述第一图像与所述第二图像之间插入N帧第三图像,N为正整数。The second determination submodule is configured to determine the frame number N of the third image inserted between the first image and the second image according to the playback frame rate, and determine the frame number N of the third image to be inserted between the first image and the second image N frames of third images are inserted between the second images, where N is a positive integer.
  13. 根据权利要求8所述的视频播放装置,其中,所述响应模块包括:The video playback device according to claim 8, wherein the response module comprises:
    第一播放子模块,用于在所述第二图像位于所述第一图像之前的情况下, 从所述第二图像开始播放插入所述第三图像后的第一视频数据;a first playing submodule, configured to play the first video data inserted into the third image from the second image when the second image is located before the first image;
    第二播放子模块,用于在所述第二图像位于所述第一图像之后的情况下,从所述第一图像开始播放插入所述第三图像后的第一视频数据。A second playing submodule, configured to play the first video data inserted into the third image from the first image when the second image is located after the first image.
  14. 根据权利要求8所述的视频播放装置,其中,所述响应模块包括:The video playback device according to claim 8, wherein the response module comprises:
    第三确定子模块,用于确定与所述第一输入的输入参数对应的播放时长;a third determination submodule, configured to determine the playback duration corresponding to the input parameter of the first input;
    第三播放子模块,用于将插入所述第三图像后的第一视频中的目标视频部分,按照所述播放时长进行播放;The third playing submodule is used to play the target video part in the first video after inserting the third image according to the playing duration;
    其中,所述目标视频部分对应的图像为:所述第一图像、所述第二图像和所述第三图像。The images corresponding to the target video part are: the first image, the second image and the third image.
  15. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1至7中任一项所述的视频播放方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, wherein the program or instruction is executed by the processor to achieve as claimed in claim 1 Steps of the video playback method described in any one of to 7.
  16. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1-7中任一项所述的视频播放方法的步骤。A readable storage medium on which a program or an instruction is stored, wherein, when the program or instruction is executed by a processor, the steps of the video playback method according to any one of claims 1-7 are implemented .
  17. 一种芯片,包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-7中任一项所述的视频播放方法的步骤。A chip, comprising a processor and a communication interface, wherein the communication interface is coupled with the processor, and the processor is used to run a program or an instruction to implement the video playback according to any one of claims 1-7 steps of the method.
  18. 一种计算机程序产品,其中,所述计算机程序产品被存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-7中任一项所述的视频播放方法的步骤。A computer program product, wherein the computer program product is stored in a non-transitory storage medium, the computer program product being executed by at least one processor to implement any one of claims 1-7 The steps of the video playback method.
  19. 一种电子设备,其特征在于,包括所述电子设备用于执行如权利要求1-7任一项所述的视频播放方法的步骤。An electronic device, characterized in that it includes the steps that the electronic device is used to execute the video playback method according to any one of claims 1-7.
PCT/CN2021/134313 2020-12-04 2021-11-30 Video playback method and apparatus, and electronic device WO2022116962A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011408989.1A CN112565868B (en) 2020-12-04 2020-12-04 Video playing method and device and electronic equipment
CN202011408989.1 2020-12-04

Publications (1)

Publication Number Publication Date
WO2022116962A1 true WO2022116962A1 (en) 2022-06-09

Family

ID=75048256

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134313 WO2022116962A1 (en) 2020-12-04 2021-11-30 Video playback method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN112565868B (en)
WO (1) WO2022116962A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565868B (en) * 2020-12-04 2022-12-06 维沃移动通信有限公司 Video playing method and device and electronic equipment
CN113271494B (en) * 2021-04-16 2023-04-11 维沃移动通信有限公司 Video frame processing method and device and electronic equipment
CN113207038B (en) * 2021-04-21 2023-04-28 维沃移动通信(杭州)有限公司 Video processing method, video processing device and electronic equipment
CN115103054B (en) * 2021-09-22 2023-10-13 维沃移动通信(杭州)有限公司 Information processing method, device, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160259478A1 (en) * 2015-03-06 2016-09-08 Apple Inc. Dynamic artifact compensation systems and methods
CN110913260A (en) * 2018-09-18 2020-03-24 优酷网络技术(北京)有限公司 Display control method, display control device and electronic equipment
CN111064863A (en) * 2019-12-25 2020-04-24 Oppo广东移动通信有限公司 Image data processing method and related device
CN111083417A (en) * 2019-12-10 2020-04-28 Oppo广东移动通信有限公司 Image processing method and related product
CN112565868A (en) * 2020-12-04 2021-03-26 维沃移动通信有限公司 Video playing method and device and electronic equipment
CN113014937A (en) * 2021-02-24 2021-06-22 北京百度网讯科技有限公司 Video frame insertion method, device, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10165245B2 (en) * 2012-07-06 2018-12-25 Kaltura, Inc. Pre-fetching video content
CN107396165B (en) * 2016-05-16 2019-11-22 杭州海康威视数字技术股份有限公司 A kind of video broadcasting method and device
CN110933315B (en) * 2019-12-10 2021-09-07 Oppo广东移动通信有限公司 Image data processing method and related equipment
CN110996170B (en) * 2019-12-10 2022-02-15 Oppo广东移动通信有限公司 Video file playing method and related equipment
CN111813490A (en) * 2020-08-14 2020-10-23 Oppo广东移动通信有限公司 Method and device for processing interpolation frame
CN111918099A (en) * 2020-09-16 2020-11-10 Oppo广东移动通信有限公司 Video processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160259478A1 (en) * 2015-03-06 2016-09-08 Apple Inc. Dynamic artifact compensation systems and methods
CN110913260A (en) * 2018-09-18 2020-03-24 优酷网络技术(北京)有限公司 Display control method, display control device and electronic equipment
CN111083417A (en) * 2019-12-10 2020-04-28 Oppo广东移动通信有限公司 Image processing method and related product
CN111064863A (en) * 2019-12-25 2020-04-24 Oppo广东移动通信有限公司 Image data processing method and related device
CN112565868A (en) * 2020-12-04 2021-03-26 维沃移动通信有限公司 Video playing method and device and electronic equipment
CN113014937A (en) * 2021-02-24 2021-06-22 北京百度网讯科技有限公司 Video frame insertion method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112565868A (en) 2021-03-26
CN112565868B (en) 2022-12-06

Similar Documents

Publication Publication Date Title
WO2022116962A1 (en) Video playback method and apparatus, and electronic device
JP6321301B2 (en) Video special effect processing method, apparatus, terminal device, program, and recording medium
WO2021175054A1 (en) Image data processing method, and related apparatus
WO2022063022A1 (en) Video preview method and apparatus and electronic device
JP7038226B2 (en) Video processing methods, devices, terminals and media
US20210225406A1 (en) Video acquisition method and device, terminal and medium
CN111615682B (en) Method and apparatus for selecting a presentation mode based on a viewing angle
WO2022161383A1 (en) Filming control method and apparatus, and electronic device
WO2018184436A1 (en) Method and device for displaying image
JP6708734B2 (en) Navigation image drawing method, device and storage medium
WO2022143525A1 (en) Video playing method and apparatus, and electronic device
WO2022143971A1 (en) Video processing method and apparatus, and electronic device
JP2016537918A (en) Method and apparatus for parallax of captions on images when scrolling
WO2022171054A1 (en) Display refreshing method and apparatus, and electronic device
EP3544012A1 (en) An apparatus and associated methods for video presentation
CN114613306A (en) Display control chip, display panel and related equipment, method and device
CN107450911A (en) Player method, device and the electronic equipment of animated element
CN113923514B (en) Display device and MEMC repeated frame discarding method
CN114125297B (en) Video shooting method, device, electronic equipment and storage medium
WO2022166753A1 (en) Page display method and apparatus
CN113099038B (en) Image super-resolution processing method, image super-resolution processing device and storage medium
WO2022068311A1 (en) Multimedia resource switching method and apparatus
WO2013108438A1 (en) Display device, display method and display program
KR20230120668A (en) Video call method and device
CN111757177B (en) Video clipping method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21899993

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21899993

Country of ref document: EP

Kind code of ref document: A1