CN108259991B - Video processing method and device - Google Patents

Video processing method and device Download PDF

Info

Publication number
CN108259991B
CN108259991B CN201810209546.6A CN201810209546A CN108259991B CN 108259991 B CN108259991 B CN 108259991B CN 201810209546 A CN201810209546 A CN 201810209546A CN 108259991 B CN108259991 B CN 108259991B
Authority
CN
China
Prior art keywords
video frame
video
frame sequence
frames
sequence
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810209546.6A
Other languages
Chinese (zh)
Other versions
CN108259991A (en
Inventor
钱晓薇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Youku Technology Co Ltd
Original Assignee
Alibaba China Co Ltd
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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN201810209546.6A priority Critical patent/CN108259991B/en
Publication of CN108259991A publication Critical patent/CN108259991A/en
Application granted granted Critical
Publication of CN108259991B publication Critical patent/CN108259991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • 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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream

Abstract

The present disclosure relates to a video processing method and apparatus. The method comprises the following steps: in response to a screenshot instruction, intercepting a first video frame sequence of a video; reserving video frames containing subtitles in the first video frame sequence to obtain a second video frame sequence; reserving a video frame with a subtitle different from that of an adjacent video frame and one video frame in a plurality of continuous video frames with the same subtitle to obtain a third video frame sequence; reserving a video frame of which the image similarity with an adjacent video frame does not meet the condition and one of a plurality of continuous video frames of which the image similarity meets the condition, and merging subtitles of the plurality of continuous video frames of which the image similarity meets the condition into the reserved video frame to obtain a fourth video frame sequence; and splicing the video frames in the fourth video frame sequence to obtain a jigsaw corresponding to the fourth video frame sequence. The method for obtaining the jigsaw puzzle through video processing is simple in operation for users, and the jigsaw puzzle can reflect richer video information and is easy to share.

Description

Video processing method and device
Technical Field
The present disclosure relates to the field of video technologies, and in particular, to a video processing method and apparatus.
Background
In the related art, if a user wants to share video content with a friend, a title and a link of a video are commonly shared with the friend, or a screenshot of the video is shared with the friend, or a video clip of the video is captured and shared with the friend. In a way of sharing titles or links of videos to friends, it is difficult for the friends to quickly and intuitively know the content of the videos. In a mode of sharing the screenshot of the video to the friend, the friend can only obtain the information of the screenshot, and the content of the video is difficult to be fully known through the information of the screenshot. In a method of sharing video clips of a video to friends, sharing is often difficult due to format limitations of shared content.
Disclosure of Invention
In view of this, the present disclosure provides a video processing method and apparatus.
According to an aspect of the present disclosure, there is provided a video processing method, which is applied in a first terminal, the method including:
receiving a screenshot instruction aiming at a video;
intercepting a first video frame sequence of the video in response to the screenshot instruction;
reserving video frames containing subtitles in the first video frame sequence to obtain a second video frame sequence;
in the second video frame sequence, reserving a video frame with a subtitle different from that of an adjacent video frame and one video frame in a plurality of continuous video frames with the same subtitle to obtain a third video frame sequence;
in the third video frame sequence, reserving a video frame of which the image similarity with an adjacent video frame does not meet the condition and one of a plurality of continuous video frames of which the image similarity meets the condition, and merging subtitles of the plurality of continuous video frames of which the image similarity meets the condition into the reserved video frame to obtain a fourth video frame sequence;
and splicing the video frames in the fourth video frame sequence to obtain a jigsaw corresponding to the fourth video frame sequence.
In one possible implementation, after obtaining the tile corresponding to the fourth video frame sequence, the method further includes:
and if a sharing request aiming at the jigsaw puzzle is received, sharing the jigsaw puzzle to a sharing object corresponding to the sharing request.
In one possible implementation, the video is played in the second terminal.
In one possible implementation, before receiving a screenshot instruction for a video, the method further includes:
acquiring a screen image of the second terminal;
and synchronously displaying the screen image of the second terminal in the first terminal.
In a possible implementation manner, the screenshot command includes a screenshot starting command and a screenshot ending command;
in response to the screenshot instruction, intercepting a first sequence of video frames of the video, comprising:
continuously intercepting video frames of the video at a first frequency in response to the screenshot starting instruction;
and responding to the screenshot ending instruction, stopping intercepting the video frames of the video, and determining a first video frame sequence according to the intercepted video frames.
In one possible implementation manner, in the third video frame sequence, a video frame whose image similarity with an adjacent video frame does not satisfy the condition and one video frame of consecutive video frames whose image similarity satisfies the condition are retained, and subtitles of consecutive video frames whose image similarity satisfies the condition are merged into the retained video frame, so as to obtain a fourth video frame sequence, where the fourth video frame sequence includes:
in the third video frame sequence, if the similarity between a certain video frame and the last video frame of the video frame is greater than a threshold value, marking the video frame;
for a marked video frame in the third video frame sequence, adding the subtitle of the video frame to the last unmarked video frame of the video frame;
and reserving the unmarked video frames in the third video frame sequence to obtain a fourth video frame sequence.
According to another aspect of the present disclosure, there is provided a video processing apparatus, the apparatus including:
the receiving module is used for receiving a screenshot instruction aiming at a video;
the intercepting module is used for responding to the screenshot instruction and intercepting a first video frame sequence of the video;
the first retaining module is used for retaining the video frames containing the subtitles in the first video frame sequence to obtain a second video frame sequence;
the second reservation module is used for reserving a video frame with a subtitle different from that of an adjacent video frame and one video frame in a plurality of continuous video frames with the same subtitle in the second video frame sequence to obtain a third video frame sequence;
a third reserving module, configured to reserve, in the third video frame sequence, a video frame whose image similarity to an adjacent video frame does not meet a condition, and one of a plurality of consecutive video frames whose image similarity meets the condition, and merge subtitles of the plurality of consecutive video frames whose image similarity meets the condition into the reserved video frame to obtain a fourth video frame sequence;
and the splicing module is used for splicing the video frames in the fourth video frame sequence to obtain a jigsaw corresponding to the fourth video frame sequence.
In one possible implementation, the apparatus further includes:
and the sharing module is used for sharing the jigsaw puzzle to a sharing object corresponding to the sharing request if the sharing request aiming at the jigsaw puzzle is received.
In one possible implementation, the video is played in the second terminal.
In one possible implementation, the apparatus further includes:
the acquisition module is used for acquiring a screen image of the second terminal;
and the display module is used for synchronously displaying the screen image of the second terminal in the first terminal.
In a possible implementation manner, the screenshot command includes a screenshot starting command and a screenshot ending command;
the intercept module comprises:
the intercepting submodule is used for responding to the screenshot starting instruction and continuously intercepting video frames of the video at a first frequency;
and the determining submodule is used for responding to the screenshot ending instruction, stopping intercepting the video frames of the video and determining a first video frame sequence according to the intercepted video frames.
In one possible implementation, the third reserving module includes:
a marking sub-module, configured to mark, in the third video frame sequence, a video frame if a similarity between the video frame and a previous video frame of the video frame is greater than a threshold;
an adding submodule, configured to add, to a marked video frame in the third video frame sequence, a subtitle of the video frame to a previous unmarked video frame of the video frame;
and the reservation submodule is used for reserving the video frames which are not marked in the third video frame sequence to obtain a fourth video frame sequence.
According to another aspect of the present disclosure, there is provided a video processing apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the above method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the above-described method.
The video processing method and apparatus of the aspects of the disclosure obtain a third video frame sequence by receiving a screenshot instruction for a video, intercepting a first video frame sequence of the video in response to the screenshot instruction, reserving video frames including subtitles in the first video frame sequence, obtaining the second video frame sequence, reserving a video frame different from subtitles of an adjacent video frame and one video frame of a plurality of consecutive video frames having the same subtitles in the second video frame sequence, obtaining a third video frame sequence, reserving a video frame having an image similarity with the adjacent video frame that does not satisfy a condition and one video frame of the plurality of consecutive video frames having the image similarity that satisfies the condition in the third video frame sequence, merging the subtitles of the plurality of consecutive video frames having the image similarity that satisfies the condition into the reserved video frames, obtaining a fourth video frame sequence, and splicing the video frames in the fourth video frame sequence, and obtaining the jigsaw corresponding to the fourth video frame sequence, wherein the method for obtaining the jigsaw by video processing is simple in operation for users, and the jigsaw can reflect richer video information and is easy to share.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flow diagram of a video processing method according to an embodiment of the present disclosure.
Fig. 2 illustrates an exemplary flow diagram of a video processing method according to an embodiment of the present disclosure.
Fig. 3 is a schematic diagram illustrating a sharing button in a video processing method according to an embodiment of the disclosure.
Fig. 4 illustrates an exemplary flow diagram of a video processing method according to an embodiment of the present disclosure.
Fig. 5 is a schematic diagram illustrating a first terminal synchronously displaying a screen image of a second terminal in a video processing method according to an embodiment of the present disclosure.
Fig. 6 shows an exemplary flowchart of step S12 of the video processing method according to an embodiment of the present disclosure.
Fig. 7 illustrates a schematic diagram of an end button in a video processing method according to an embodiment of the present disclosure.
Fig. 8 is a schematic diagram illustrating a process of generating a mosaic in a video processing method according to an embodiment of the present disclosure.
Fig. 9 shows an exemplary flowchart of step S15 of the video processing method according to an embodiment of the present disclosure.
Fig. 10 shows a block diagram of a video processing apparatus according to an embodiment of the present disclosure.
Fig. 11 illustrates an exemplary block diagram of a video processing device according to an embodiment of the present disclosure.
Fig. 12 is a block diagram illustrating an apparatus 800 for video processing according to an example embodiment.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Fig. 1 shows a flow diagram of a video processing method according to an embodiment of the present disclosure. The method is applied to the first terminal. The first terminal may be a terminal such as a mobile phone, a tablet Computer, a notebook Computer, or a PC (Personal Computer), which is not limited herein. As shown in fig. 1, the method includes steps S11 through S16.
In step S11, a screenshot instruction for a video is received.
In one possible implementation, the video may be played in the second terminal. The second terminal may be a terminal with a video playing function, such as a television, a PC, a notebook computer, or a tablet computer, which is not limited herein. In the implementation manner, when the second terminal plays the video, the video frame sequence of the video can be intercepted by the first terminal and the jigsaw puzzle is generated, so that cross-end screen capture and processing of the video are realized.
In another possible implementation, the video may be played in the first terminal.
In step S12, in response to the screenshot command, a first video frame sequence of the video is intercepted.
In one possible implementation, after intercepting the first video frame sequence of the video, the video frames of the first video frame sequence may be stored in a buffer in a temporal order of the video frames of the first video frame sequence.
For example, the first sequence of video frames includes video frames P1 through P10.
In step S13, the video frames including subtitles in the first video frame sequence are retained, and a second video frame sequence is obtained.
In one possible implementation, video frames of the first video frame sequence that contain subtitles may be retained in the buffer, and video frames of the first video frame sequence that do not contain subtitles may be deleted from the buffer.
For example, in the first video frame sequence, the video frame P2, the video frame P6, and the video frame P10 do not contain subtitles, and the video frame P1, the video frame P3, the video frame P4, the video frame P5, the video frame P7, the video frame P8, and the video frame P9 contain subtitles, it may be determined that the second video frame sequence includes the video frame P1, the video frame P3, the video frame P4, the video frame P5, the video frame P7, the video frame P8, and the video frame P9.
In step S14, in the second video frame sequence, a video frame with a subtitle different from that of the adjacent video frame and one of a plurality of consecutive video frames with the same subtitle are retained, so as to obtain a third video frame sequence.
In one possible implementation, a video frame of the second sequence of video frames that is different from the subtitle of the neighboring video frame and one of the consecutive video frames that have the same subtitle may be retained in the buffer, and other video frames of the consecutive video frames that have the same subtitle may be deleted from the buffer.
For example, in the second video frame sequence, the subtitles of the video frames P1, P3, P7, P8 and P9 are different from those of the adjacent video frames, and the subtitles of the video frames P4 and P5 are the same, the subtitles of the video frames P1, P3, P4, P7, P8 and P9 may be retained, or the subtitles of the video frames P1, P3, P5, P7, P8 and P9 may be retained, resulting in a third video frame sequence.
In step S15, in the third video frame sequence, a video frame whose image similarity to the adjacent video frame does not satisfy the condition and one of the consecutive video frames whose image similarity satisfies the condition are retained, and the subtitles of the consecutive video frames whose image similarity satisfies the condition are merged into the retained video frame, so as to obtain a fourth video frame sequence.
In one possible implementation manner, a video frame whose image similarity with an adjacent video frame does not satisfy the condition and one of consecutive video frames whose image similarity satisfies the condition may be retained in the buffer, and the other of the consecutive video frames whose image similarity satisfies the condition may be deleted from the buffer.
Wherein, the image similarity with the adjacent video frame does not satisfy the condition, which may mean that the image similarity with the adjacent video frame is less than the threshold; the image similarity with the neighboring video frame satisfying the condition may mean that the image similarity with the neighboring video frame is greater than or equal to a threshold. For example, the third sequence of video frames includes video frame P1, video frame P3, video frame P4, video frame P7, video frame P8, and video frame P9. If the image similarity between the video frame P4 and the video frame P3 is less than the threshold value, and the image similarity between the video frame P4 and the video frame P7 is less than the threshold value, it may be determined that the image similarity between the video frame P4 and the adjacent video frame does not satisfy the condition. If the similarity between the video frame P7 and the video frame P8 is greater than the threshold value, and the similarity between the video frame P8 and the video frame P9 is greater than the threshold value, it can be determined that the image similarities of the video frame P7, the video frame P8, and the video frame P9 satisfy the condition. In this case, one of the video frame P7, the video frame P8, and the video frame P9 may be retained. For example, the video frame P7 of the video frames P7, P8, and P9 may be retained, and the subtitles of the video frames P8 and P9 may be incorporated into the video frame P7. A fourth sequence of video frames may thus be obtained comprising video frame P1, video frame P3, video frame P4 and video frame P7, wherein video frame P7 contains subtitles for video frame P7, video frame P8 and video frame P9.
In step S16, the video frames in the fourth video frame sequence are spliced to obtain a mosaic corresponding to the fourth video frame sequence.
In a possible implementation manner, video frames in the fourth video frame sequence may be stitched into a long map from top to bottom in a time sequence, so as to obtain a mosaic corresponding to the fourth video frame sequence.
The embodiment obtains a jigsaw puzzle corresponding to a fourth video frame sequence by receiving a screenshot instruction for a video, responding to the screenshot instruction, capturing a first video frame sequence of the video, reserving video frames containing subtitles in the first video frame sequence to obtain a second video frame sequence, reserving a video frame which is different from subtitles of adjacent video frames and one video frame in a plurality of continuous video frames with the same subtitles in the second video frame sequence to obtain a third video frame sequence, reserving a video frame which does not satisfy a condition of image similarity with the adjacent video frames and one video frame in the plurality of continuous video frames with the condition of image similarity, merging the subtitles of the plurality of continuous video frames with the condition of image similarity into the reserved video frames in the third video frame sequence to obtain the fourth video frame sequence, and splicing the video frames in the fourth video frame sequence, the method for processing the video to obtain the jigsaw puzzle is simple in operation of the user, and the jigsaw puzzle can reflect rich video information. Since the puzzle obtained by video processing in this embodiment is a static image, not a moving image or a short video, it is easy to share. In addition, the data size of the puzzle obtained according to the embodiment is small, so that transmission traffic can be saved if the puzzle is shared, and storage space can be saved if the puzzle is stored locally.
Fig. 2 illustrates an exemplary flow diagram of a video processing method according to an embodiment of the present disclosure. As shown in fig. 2, the method may include steps S11 through S17.
In step S11, a screenshot instruction for a video is received.
In step S12, in response to the screenshot command, a first video frame sequence of the video is intercepted.
In step S13, the video frames including subtitles in the first video frame sequence are retained, and a second video frame sequence is obtained.
In step S14, in the second video frame sequence, a video frame with a subtitle different from that of the adjacent video frame and one of a plurality of consecutive video frames with the same subtitle are retained, so as to obtain a third video frame sequence.
In step S15, in the third video frame sequence, a video frame whose image similarity to the adjacent video frame does not satisfy the condition and one of the consecutive video frames whose image similarity satisfies the condition are retained, and the subtitles of the consecutive video frames whose image similarity satisfies the condition are merged into the retained video frame, so as to obtain a fourth video frame sequence.
In step S16, the video frames in the fourth video frame sequence are spliced to obtain a mosaic corresponding to the fourth video frame sequence.
In step S17, if a sharing request for the tile is received, the tile is shared with the sharing object corresponding to the sharing request.
Fig. 3 is a schematic diagram illustrating a sharing button in a video processing method according to an embodiment of the disclosure. As shown in fig. 3, after the tile corresponding to the fourth video frame sequence is obtained, the tile may be displayed, and the share button may be displayed. If the share button is triggered, it may be determined that a share request for the tile is received.
In one possible implementation, after obtaining a tile corresponding to the fourth video frame sequence, the method may further include: if a saving instruction for the puzzle is received, the puzzle can be saved to the local album. As shown in FIG. 3, while the tile is being presented, a save local button may also be displayed. If the save local button is triggered, it may be determined that a save instruction for the tile is received.
Fig. 4 illustrates an exemplary flow diagram of a video processing method according to an embodiment of the present disclosure. As shown in fig. 4, the method may include steps S21 through S28.
In step S21, a screen image of the second terminal is acquired.
In this embodiment, the screen image of the second terminal may be acquired in real time.
In step S22, the screen image of the second terminal is synchronously presented in the first terminal.
For example, the first terminal may acquire the screen image of the second terminal through Wi-Fi (Wireless Fidelity) technology, and may synchronously display the screen image of the second terminal in the first terminal.
Fig. 5 is a schematic diagram illustrating a first terminal synchronously displaying a screen image of a second terminal in a video processing method according to an embodiment of the present disclosure.
In step S23, a screenshot instruction for a video is received.
Wherein, for step S23, refer to the description above for step S11.
In step S24, in response to the screenshot command, a first video frame sequence of the video is intercepted.
Wherein, for step S24, refer to the description above for step S12.
In step S25, the video frames including subtitles in the first video frame sequence are retained, and a second video frame sequence is obtained.
Wherein, for step S25, refer to the description above for step S13.
In step S26, in the second video frame sequence, a video frame with a subtitle different from that of the adjacent video frame and one of a plurality of consecutive video frames with the same subtitle are retained, so as to obtain a third video frame sequence.
Wherein, for step S26, refer to the description above for step S14.
In step S27, in the third video frame sequence, a video frame whose image similarity to the adjacent video frame does not satisfy the condition and one of the consecutive video frames whose image similarity satisfies the condition are retained, and the subtitles of the consecutive video frames whose image similarity satisfies the condition are merged into the retained video frame, so as to obtain a fourth video frame sequence.
Wherein, for step S27, refer to the description above for step S15.
In step S28, the video frames in the fourth video frame sequence are spliced to obtain a mosaic corresponding to the fourth video frame sequence.
Wherein, for step S28, refer to the description above for step S16.
In one possible implementation, the screenshot command includes a screenshot start command and a screenshot end command. Fig. 6 shows an exemplary flowchart of step S12 of the video processing method according to an embodiment of the present disclosure. As shown in fig. 6, step S12 may include step S121 and step S122.
In step S121, in response to a screenshot start instruction, video frames of the video are continuously intercepted at a first frequency.
For example, the first frequency is 5 sheets/second.
In one possible implementation, the truncated video frames may be saved to a buffer.
As shown in fig. 5, for example, if it is detected that the dialog box is triggered, it may be determined that a screenshot start instruction is received.
In step S122, in response to the screenshot ending instruction, stopping the capturing of the video frames of the video, and determining a first video frame sequence according to the captured video frames.
Fig. 7 illustrates a schematic diagram of an end button in a video processing method according to an embodiment of the present disclosure. As shown in fig. 7, for example, if it is detected that the end button is triggered, it may be determined that a screenshot end instruction is received.
Fig. 8 is a schematic diagram illustrating a process of generating a mosaic in a video processing method according to an embodiment of the present disclosure. As shown in fig. 8, after intercepting the first sequence of video frames, a "in-dialogue composition" prompt may be presented in the interface to prompt the user that a puzzle is being generated, before the puzzle is obtained.
Fig. 9 shows an exemplary flowchart of step S15 of the video processing method according to an embodiment of the present disclosure. As shown in fig. 9, step S15 may include steps S151 to S153.
In step S151, in the third video frame sequence, if the similarity between a certain video frame and the previous video frame of the video frame is greater than the threshold, the video frame is marked.
For example, the third sequence of video frames includes video frame P1, video frame P3, video frame P4, video frame P7, video frame P8, and video frame P9. If the similarity between the video frame P7 and the video frame P8 is greater than the threshold value, and the similarity between the video frame P8 and the video frame P9 is greater than the threshold value, the video frame P8 and the video frame P9 can be marked.
In step S152, for a marked video frame in the third video frame sequence, the subtitle of the video frame is added to the last unmarked video frame of the video frame.
For example, if the marked video frames in the third sequence of video frames include video frame P8 and video frame P9, the last unmarked video frame of video frame P8 is video frame P7, and the last unmarked video frame of video frame P9 is video frame P7, the subtitles for video frame P8 and video frame P9 may be added to video frame P7.
In step S153, the unlabeled video frames in the third video frame sequence are retained to obtain a fourth video frame sequence.
For example, if the marked video frames in the third sequence of video frames include video frame P8 and video frame P9, and the unmarked video frames include video frame P1, video frame P3, video frame P4, and video frame P7, then it may be determined that the fourth sequence of video frames includes video frame P1, video frame P3, video frame P4, and video frame P7.
Fig. 10 shows a block diagram of a video processing apparatus according to an embodiment of the present disclosure. As shown in fig. 10, the apparatus includes: a receiving module 31, configured to receive a screenshot instruction for a video; an intercepting module 32, configured to respond to a screenshot instruction, to intercept a first video frame sequence of the video; a first retaining module 33, configured to retain video frames including subtitles in the first video frame sequence to obtain a second video frame sequence; a second reserving module 34, configured to reserve, in the second video frame sequence, a video frame with a subtitle different from that of an adjacent video frame and one video frame of a plurality of consecutive video frames with the same subtitle, so as to obtain a third video frame sequence; a third reserving module 35, configured to reserve, in the third video frame sequence, a video frame whose image similarity to an adjacent video frame does not meet the condition, and one video frame of the consecutive video frames whose image similarity meets the condition, and merge subtitles of the consecutive video frames whose image similarity meets the condition into the reserved video frame to obtain a fourth video frame sequence; and a splicing module 36, configured to splice video frames in the fourth video frame sequence to obtain a mosaic corresponding to the fourth video frame sequence.
Fig. 11 illustrates an exemplary block diagram of a video processing device according to an embodiment of the present disclosure. As shown in fig. 11:
in one possible implementation, the apparatus further includes: the sharing module 37 is configured to, if a sharing request for the tile is received, share the tile with a sharing object corresponding to the sharing request.
In one possible implementation, the video is played in the second terminal.
In one possible implementation, the apparatus further includes: an obtaining module 38, configured to obtain a screen image of the second terminal; and a display module 39, configured to synchronously display the screen image of the second terminal in the first terminal.
In one possible implementation manner, the screenshot command includes a screenshot starting command and a screenshot ending command; the intercept module 32 comprises: an intercepting submodule 321, configured to respond to a screenshot starting instruction, and continuously intercept video frames of the video at a first frequency; and the determining submodule 322 is configured to, in response to the screenshot ending instruction, stop the capturing of the video frames of the video, and determine the first video frame sequence according to the captured video frames.
In one possible implementation, the third reservation module 35 includes: the marking submodule 351 is configured to mark, in the third video frame sequence, a video frame if the similarity between the video frame and a previous video frame of the video frame is greater than a threshold; an adding sub-module 352, configured to add, for a marked video frame in the third video frame sequence, a subtitle of the video frame to a previous unmarked video frame of the video frame; the reservation submodule 353 is configured to reserve unmarked video frames in the third video frame sequence to obtain a fourth video frame sequence.
The embodiment obtains a jigsaw puzzle corresponding to a fourth video frame sequence by receiving a screenshot instruction for a video, responding to the screenshot instruction, capturing a first video frame sequence of the video, reserving video frames containing subtitles in the first video frame sequence to obtain a second video frame sequence, reserving a video frame which is different from subtitles of adjacent video frames and one video frame in a plurality of continuous video frames with the same subtitles in the second video frame sequence to obtain a third video frame sequence, reserving a video frame which does not satisfy a condition of image similarity with the adjacent video frames and one video frame in the plurality of continuous video frames with the condition of image similarity, merging the subtitles of the plurality of continuous video frames with the condition of image similarity into the reserved video frames in the third video frame sequence to obtain the fourth video frame sequence, and splicing the video frames in the fourth video frame sequence, the method for obtaining the jigsaw puzzle through video processing is simple in operation of users, and the jigsaw puzzle can reflect abundant video information and is easy to share.
Fig. 12 is a block diagram illustrating an apparatus 800 for video processing according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 12, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the device 800 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method for sharing videos played in a television is applied to a first terminal of the television different from the videos played, wherein the first terminal is a mobile phone or a tablet computer, and the method comprises the following steps:
receiving a screenshot instruction aiming at a video played in a television;
intercepting a first video frame sequence of the video in response to the screenshot instruction;
reserving video frames containing subtitles in the first video frame sequence to obtain a second video frame sequence;
in the second video frame sequence, reserving a video frame with a subtitle different from that of an adjacent video frame and one video frame in a plurality of continuous video frames with the same subtitle to obtain a third video frame sequence;
in the third video frame sequence, reserving a video frame of which the image similarity with an adjacent video frame does not meet the condition and one of a plurality of continuous video frames of which the image similarity meets the condition, and merging subtitles of the plurality of continuous video frames of which the image similarity meets the condition into the reserved video frame to obtain a fourth video frame sequence;
splicing the video frames in the fourth video frame sequence to obtain a jigsaw corresponding to the fourth video frame sequence, displaying the jigsaw, and displaying a sharing button;
and if the sharing button is triggered, determining that a sharing request aiming at the jigsaw is received, and sharing the jigsaw to a sharing object corresponding to the sharing request.
2. The method of claim 1, wherein prior to receiving a screenshot instruction for a video, the method further comprises:
acquiring a screen image of the television;
and synchronously displaying the screen image of the television in the first terminal.
3. The method of claim 1, wherein the screenshot command comprises a screenshot starting command and a screenshot ending command;
in response to the screenshot instruction, intercepting a first sequence of video frames of the video, comprising:
continuously intercepting video frames of the video at a first frequency in response to the screenshot starting instruction;
and responding to the screenshot ending instruction, stopping intercepting the video frames of the video, and determining a first video frame sequence according to the intercepted video frames.
4. The method according to claim 1, wherein in the third video frame sequence, retaining the video frame whose image similarity with the adjacent video frame does not satisfy the condition and one of the consecutive video frames whose image similarity satisfies the condition, and merging subtitles of the consecutive video frames whose image similarity satisfies the condition into the retained video frame to obtain a fourth video frame sequence, comprises:
in the third video frame sequence, if the similarity between a certain video frame and the last video frame of the video frame is greater than a threshold value, marking the video frame;
for a marked video frame in the third video frame sequence, adding the subtitle of the video frame to the last unmarked video frame of the video frame;
and reserving the unmarked video frames in the third video frame sequence to obtain a fourth video frame sequence.
5. An apparatus for sharing video played in a television, the apparatus being a mobile phone or a tablet computer different from the television playing the video, the apparatus comprising:
the receiving module is used for receiving a screenshot instruction aiming at a video played in a television;
the intercepting module is used for responding to the screenshot instruction and intercepting a first video frame sequence of the video;
the first retaining module is used for retaining the video frames containing the subtitles in the first video frame sequence to obtain a second video frame sequence;
the second reservation module is used for reserving a video frame with a subtitle different from that of an adjacent video frame and one video frame in a plurality of continuous video frames with the same subtitle in the second video frame sequence to obtain a third video frame sequence;
a third reserving module, configured to reserve, in the third video frame sequence, a video frame whose image similarity to an adjacent video frame does not meet a condition, and one of a plurality of consecutive video frames whose image similarity meets the condition, and merge subtitles of the plurality of consecutive video frames whose image similarity meets the condition into the reserved video frame to obtain a fourth video frame sequence;
the splicing module is used for splicing the video frames in the fourth video frame sequence to obtain a jigsaw corresponding to the fourth video frame sequence, displaying the jigsaw and displaying the sharing button;
and the sharing module is used for determining that a sharing request aiming at the jigsaw is received if the sharing button is triggered, and sharing the jigsaw to a sharing object corresponding to the sharing request.
6. The apparatus of claim 5, further comprising:
the acquisition module is used for acquiring the screen image of the television;
and the display module is used for synchronously displaying the screen image of the television in the device.
7. The device of claim 5, wherein the screenshot command comprises a screenshot starting command and a screenshot ending command;
the intercept module comprises:
the intercepting submodule is used for responding to the screenshot starting instruction and continuously intercepting video frames of the video at a first frequency;
and the determining submodule is used for responding to the screenshot ending instruction, stopping intercepting the video frames of the video and determining a first video frame sequence according to the intercepted video frames.
8. The apparatus of claim 5, wherein the third reservation module comprises:
a marking sub-module, configured to mark, in the third video frame sequence, a video frame if a similarity between the video frame and a previous video frame of the video frame is greater than a threshold;
an adding submodule, configured to add, to a marked video frame in the third video frame sequence, a subtitle of the video frame to a previous unmarked video frame of the video frame;
and the reservation submodule is used for reserving the video frames which are not marked in the third video frame sequence to obtain a fourth video frame sequence.
9. A video processing apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 4.
10. A non-transitory computer readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the method of any of claims 1 to 4.
CN201810209546.6A 2018-03-14 2018-03-14 Video processing method and device Active CN108259991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810209546.6A CN108259991B (en) 2018-03-14 2018-03-14 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810209546.6A CN108259991B (en) 2018-03-14 2018-03-14 Video processing method and device

Publications (2)

Publication Number Publication Date
CN108259991A CN108259991A (en) 2018-07-06
CN108259991B true CN108259991B (en) 2020-11-27

Family

ID=62745888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810209546.6A Active CN108259991B (en) 2018-03-14 2018-03-14 Video processing method and device

Country Status (1)

Country Link
CN (1) CN108259991B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032470B (en) * 2018-07-11 2021-03-26 Oppo(重庆)智能科技有限公司 Screenshot method, screenshot device, terminal and computer-readable storage medium
CN110166795B (en) * 2018-07-19 2022-02-18 腾讯科技(深圳)有限公司 Video screenshot method and device
CN108924626B (en) * 2018-08-17 2021-02-23 腾讯科技(深圳)有限公司 Picture generation method, device, equipment and storage medium
CN109040825A (en) * 2018-10-29 2018-12-18 北京奇艺世纪科技有限公司 A kind of subtitle intercept method and device
CN112929745B (en) * 2018-12-18 2022-04-08 腾讯科技(深圳)有限公司 Video data processing method, device, computer readable storage medium and equipment
CN109803180B (en) * 2019-03-08 2022-05-20 腾讯科技(深圳)有限公司 Video preview generation method and device, computer equipment and storage medium
CN110147745B (en) * 2019-05-09 2024-03-29 深圳市腾讯计算机系统有限公司 Video key frame detection method and device
CN110248117A (en) * 2019-06-25 2019-09-17 新华智云科技有限公司 Video mosaic generation method, device, electronic equipment and storage medium
CN110781345B (en) * 2019-10-31 2022-12-27 北京达佳互联信息技术有限公司 Video description generation model obtaining method, video description generation method and device
CN110968391A (en) * 2019-11-28 2020-04-07 珠海格力电器股份有限公司 Screenshot method, screenshot device, terminal equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770701A (en) * 2008-12-30 2010-07-07 北京新学堂网络科技有限公司 Movie comic book manufacturing method for foreign language learning
CN105872810B (en) * 2016-05-26 2019-05-03 网易传媒科技(北京)有限公司 A kind of media content sharing method and device
CN106454151A (en) * 2016-10-18 2017-02-22 珠海市魅族科技有限公司 Video image stitching method and device
CN107484018B (en) * 2017-07-31 2019-05-17 维沃移动通信有限公司 A kind of video interception method, mobile terminal

Also Published As

Publication number Publication date
CN108259991A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108259991B (en) Video processing method and device
EP3276976A1 (en) Method, apparatus, host terminal, server and system for processing live broadcasting information
CN108093315B (en) Video generation method and device
EP3188066A1 (en) A method and an apparatus for managing an application
CN107948708B (en) Bullet screen display method and device
CN107729522B (en) Multimedia resource fragment intercepting method and device
US9800666B2 (en) Method and client terminal for remote assistance
EP3147802B1 (en) Method and apparatus for processing information
CN107820131B (en) Comment information sharing method and device
CN110519655B (en) Video editing method, device and storage medium
CN108495168B (en) Bullet screen information display method and device
CN107277628B (en) video preview display method and device
CN106919629B (en) Method and device for realizing information screening in group chat
US20210090610A1 (en) Video processing method, video playing method, devices and storage medium
CN109063101B (en) Video cover generation method and device
KR101826326B1 (en) Method and device for generating panorama
EP3327548A1 (en) Method, device and terminal for processing live shows
CN106991018B (en) Interface skin changing method and device
CN108174269B (en) Visual audio playing method and device
CN106998493B (en) Video previewing method and device
CN110085066B (en) Method and device for displaying reading information and electronic equipment
CN109756783B (en) Poster generation method and device
CN110121115B (en) Method and device for determining wonderful video clip
CN108965976B (en) Display control method and device for video window
CN110858921A (en) Program video processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200429

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 100080 Beijing Haidian District city Haidian street A Sinosteel International Plaza No. 8 block 5 layer A, C

Applicant before: Youku network technology (Beijing) Co., Ltd

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210425

Address after: 100102 room 2601, 26 / F, building 9, District 4, Wangjing East Garden, Chaoyang District, Beijing

Patentee after: BEIJING YOUKU TECHNOLOGY Co.,Ltd.

Address before: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Alibaba (China) Co.,Ltd.

TR01 Transfer of patent right