CN110121098B - Video playing method and device, storage medium and electronic device - Google Patents

Video playing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN110121098B
CN110121098B CN201810111768.4A CN201810111768A CN110121098B CN 110121098 B CN110121098 B CN 110121098B CN 201810111768 A CN201810111768 A CN 201810111768A CN 110121098 B CN110121098 B CN 110121098B
Authority
CN
China
Prior art keywords
video
target
video frame
playing
speed
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
CN201810111768.4A
Other languages
Chinese (zh)
Other versions
CN110121098A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810111768.4A priority Critical patent/CN110121098B/en
Publication of CN110121098A publication Critical patent/CN110121098A/en
Application granted granted Critical
Publication of CN110121098B publication Critical patent/CN110121098B/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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/4508Management of client data or end-user data
    • H04N21/4532Management of client data or end-user data involving end-user characteristics, e.g. viewer profile, preferences

Abstract

The invention discloses a video playing method, a video playing device, a storage medium and an electronic device. Wherein, the method comprises the following steps: in the process of playing a target video at a double speed, acquiring a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame; skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label; and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value. The invention solves the technical problem of low efficiency of related technologies in video double-speed playing.

Description

Video playing method and device, storage medium and electronic device
Technical Field
The invention relates to the field of videos, in particular to a video playing method, a video playing device, a storage medium and an electronic device.
Background
Currently, when playing a video, for some video segments that are not interesting to the user, a progress bar dragging method is usually used to skip. However, since the position of the progress bar at the time of the dragging is too vague, it is difficult to reach the precision, and especially in the case where the screen itself of the terminal is small, the progress bar dragging may not be very precise. Therefore, when playing a video, the video is usually played at double speed.
The double speed playing usually adopts a fixed frame skipping mode to achieve the purpose, and the player is enabled to skip a certain number of pictures fixedly according to the multiple set by the user and the frequency of the frames played per second, so as to achieve the purpose of video double speed.
Although the above method is simple, frame skipping is only fixedly carried out according to one number, interest points of users and hot spot areas of video contents are not considered, so that both wonderful contents and non-wonderful contents in videos can be skipped equally, and the hot spot areas of films cannot be fully displayed to the users, thereby wasting film resources, affecting the wonderness and the viewability of the videos, not really meeting the purpose of video double-speed playing, and having the problem of low efficiency when the videos are played at double speed.
In view of the above-mentioned problem of low efficiency in video double-speed playing, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a video playing method, a video playing device, a storage medium and an electronic device, which are used for at least solving the technical problem of low efficiency of related technologies in video double-speed playing.
According to an aspect of an embodiment of the present invention, a video playing method is provided. The video playing method comprises the following steps: in the process of playing a target video at a double speed, acquiring a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame; skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label; and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
According to an aspect of the embodiment of the present invention, a video playing method is also provided. The method comprises the following steps: in the process that a client plays a target video at a double speed, the client acquires a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame; under the condition that the label of the first video frame is different from the preset target label, the client skips the playing of the first video frame; and under the condition that the label of the first video frame is the same as the target label, the client plays the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
According to another aspect of the embodiment of the invention, a video playing device is also provided. The video playing device comprises: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a label of a first video frame to be played in a target video in the process of playing the target video at a double speed, and the label of the first video frame is used for indicating the content type of the first video frame; the skipping unit is used for skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label; and the playing unit is used for playing the first video frame according to the target playing speed under the condition that the label of the first video frame is the same as the target label, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
According to another aspect of the embodiment of the invention, a video playing device is also provided. The device includes: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for enabling a client to acquire a label of a first video frame to be played in a target video in the process that the client plays the target video at a double speed, and the label of the first video frame is used for indicating the content type of the first video frame; the skipping unit is used for skipping the playing of the first video frame by the client under the condition that the label of the first video frame is different from the preset target label; and the playing unit is used for enabling the client to play the first video frame according to the target playing speed under the condition that the label of the first video frame is the same as the target label, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium. The storage medium has stored therein a computer program, wherein the computer program is arranged to execute the video playback method of an embodiment of the invention when running.
According to another aspect of the embodiment of the invention, an electronic device is also provided. The electronic device comprises a memory and a processor, and is characterized in that the memory stores a computer program, and the processor is configured to execute the video playing method of the embodiment of the invention through the computer program.
In the embodiment of the invention, in the process of performing double-speed playing on a target video, a label of a first video frame to be played in the target video is acquired, wherein the label of the first video frame is used for indicating the content type of the first video frame; skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label; and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value. After the target video is played at the double speed, skipping the first video frame with the label different from the preset target label, and playing the first video frame with the label same as the preset target label at the target playing speed, that is, skipping the video frame which is not interested by the user, and playing the video frame which is interested by the user at the target playing speed, so as to avoid fixed skipping of a certain number of video frames, which causes the video frames which are interested by the user and not interested by the user to be skipped the same, and influence the efficiency of the video in the double speed playing, thereby realizing the technical effect of improving the efficiency of the video in the double speed playing, and further solving the technical problem of low efficiency of the related technology in the double speed playing of the video.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of a hardware environment of a video playing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a video playing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another video playing method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a video double-speed playing apparatus according to an embodiment of the present invention;
FIG. 5 is a flowchart of a calibration method of an intelligent calibration module according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a transcoding server according to an embodiment of the present invention;
fig. 7 is a flowchart of a video playing method of a player according to an embodiment of the present invention;
FIG. 8A is a schematic view of a video playback scene according to an embodiment of the present invention;
FIG. 8B is a schematic view of another video playback scene according to an embodiment of the present invention;
FIG. 8C is a schematic view of another video playback scene according to an embodiment of the present invention;
FIG. 8D is a schematic diagram of another video playback scene according to an embodiment of the invention;
fig. 9 is a schematic diagram of a video playback device according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of another video playback device according to an embodiment of the present invention; and
fig. 11 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, there is provided an embodiment of a video playing method.
Alternatively, in the present embodiment, the video playing method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. Fig. 1 is a schematic diagram of a hardware environment of a video playing method according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The video playing method according to the embodiment of the present invention may be executed by the server 102, or executed by the terminal 104, or executed by both the server 102 and the terminal 104. The terminal 104 may execute the video playing method according to the embodiment of the present invention by a client installed thereon.
Fig. 2 is a flowchart of a video playing method according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
step S202, in the process of playing the target video at double speed, the label of the first video frame to be played in the target video is obtained.
In the technical solution provided in the foregoing step S202 of the present application, in the process of performing double-speed playing on a target video, a tag of a first video frame to be played in the target video is obtained, where the tag of the first video frame is used to indicate a content type of the first video frame.
In this embodiment, the target video may be a video that the user needs to play, and the target video may be played through a video player or a browser. The target video is played in a double-speed playing mode, for example, the target video is played at an accelerated speed twice the original playing speed.
Optionally, a target request is sent to the server, where the target request is used to request to obtain a Uniform Resource Locator (URL) of the target video. After the URL of the target video is obtained, the target video is obtained according to the URL, for example, a video stream of the target video is obtained.
Optionally, the target video of this embodiment comprises media package data and audiovisual data. And analyzing the media packaging data and the audio and video data in the target video, and if the target video is played in a normal playing mode, playing the target video until the end.
Optionally, if the target video is played in a double-speed playing manner, the first video frame to be played in the target video may be acquired within a unit time, where the unit time may be 1 second, and the video frame in the target video is an image frame in the target video. In the case that the current playing speed of the target video does not satisfy the double speed requirement, the tag of the first video frame is obtained, for example, the target video is decoded, and the tag of the first video frame is obtained from the obtained decoded data, and the tag of the first video frame may be used to indicate the content type of the first video frame, for example, the content type is a person, a landscape, a gunfight, a martial arts, a love, a beauty, a man, and the like, without any limitation here.
And step S204, skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label.
In the technical solution provided in the above step S204, after the tag of the first video frame to be played in the target video is obtained, whether the tag of the first video frame is the same as the preset target tag is determined, and whether the tag of the first video frame is the same as the preset target tag may be determined in the scene matching module. And if the label of the first video frame is not the same as the preset target label, skipping the playing of the first video frame.
In this embodiment, the preset target tag may be an interest tag of the user, and is used for indicating the interest of the user. Optionally, the data indicating the viewing behavior of the user is counted by the backend server, and the interest of the user is calibrated to obtain a preset target tag, where the preset target tag may be used to indicate any one of people, scenery, gunfight, martial arts, love, beauty, and spirit, and is not limited herein.
After the label of the first video frame is judged to be different from the preset target label, if the label of the first video frame is different from the preset target label, it is indicated that the content type indicated by the label of the first video frame is not in accordance with the interest of the user, that is, the video content presented during playing of the first video frame is not the video content in which the user is interested, the playing of the first video frame is skipped, for example, the plot of the video in which the user is not interested is skipped at high speed, so that the observability of the target video is improved, and the efficiency of the target video during double-speed playing is improved.
And step S206, under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed.
In the technical solution provided in the foregoing step S206 of the present application, after determining whether the tag of the first video frame is the same as the preset target tag, if the tag of the first video frame is the same as the target tag, the first video frame is played at the target play speed, where a difference between the target play speed and the original play speed of the first video frame is within a first target threshold.
In this embodiment, if the tag of the first video frame is the same as the target tag, it indicates that the content type indicated by the tag of the first video frame matches with the interest of the user, that is, the target tag matches with the tag of the first video frame, the video content presented during playing of the first video frame is the video content interested by the user, and the first video frame may be played at the target playing speed, that is, the video content of the first video frame interested by the user may be played at the target playing speed. Optionally, the first video frame is played at its original play speed or at a slightly faster speed.
Optionally, in a case that the target video already meets the current speed doubling requirement, the first video frame may be played at the original playing speed of the first video frame; under the condition that the target video frame does not meet the requirement of the current speed doubling, the number of video frames needing to be skipped to meet the set speed doubling value can be determined according to the set speed doubling value, the number of skipped video frames is obtained, the difference between the number of the video frames needing to be skipped and the number of the skipped video frames is determined as the number of the video frames needing to be skipped, the target playing speed for playing the first video frame is determined according to the number of the video frames needing to be skipped, the target playing speed is slightly higher than the original playing speed, but the target playing speed and the original playing speed are within a first target threshold value, so that the user cannot influence the user to watch the interested video content in the target video.
Optionally, in this embodiment, in a unit time, when the number of skipped video frames reaches the number of video frames that need to be skipped corresponding to the double speed value of the target video, the remaining unplayed video frames in the unit time may be played normally, and the remaining unplayed video frames may include video frames that are interesting to the user or may include video frames that are not interesting to the user; if the determined frame number of the skipped video frame does not reach the video frame number which needs to be skipped and corresponds to the double speed value of the target video in unit time, the motion compensation module can be further entered, the frame skipping is selected according to the similarity between the adjacent video frames, one video frame in the two adjacent video frames with high similarity is skipped, and the other video frame is played, so that the video frame which needs to be skipped and the video frame which needs to be played in unit time are determined, and the playing speed of the target video in the double speed playing is met.
And in the next unit time, the skipping or the playing of the video frame of the target video can be selected according to the method, so that the content which is interested by the user in the target video is displayed to the user to the maximum extent, and the efficiency of the video in double-speed playing is improved.
Through the steps S202 to S206, in the process of performing double-speed playing on the target video, a tag of a first video frame to be played in the target video is obtained, where the tag of the first video frame is used to indicate a content type of the first video frame; skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label; and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value. After the target video is played at the double speed, skipping the first video frame with the label different from the preset target label, and playing the first video frame with the label same as the preset target label at the target playing speed, that is, skipping the video frame which is not interested by the user, and playing the video frame which is interested by the user at the target playing speed, so as to avoid fixed skipping of a certain number of video frames, which causes the video frames which are interested by the user and not interested by the user to be skipped the same, and influence the efficiency of the video in the double speed playing, thereby realizing the technical effect of improving the efficiency of the video in the double speed playing, and further solving the technical problem of low efficiency of the related technology in the double speed playing of the video.
As an alternative implementation manner, after the playing the first video frame at the target playing speed in step S206, the method further includes: and skipping the playing of the second video frame when the similarity between the second video frame and the first video frame is larger than a second target threshold, wherein the second video frame is the next video frame of the first video frame in the target video.
In this embodiment, in a unit time, after the first video frame is played at the target playing speed, a next second video frame in the target video frame is acquired, that is, the second video frame and the first video frame are two consecutive video frames in the target video, and the similarity between the second video frame and the first video frame can be acquired. Optionally, the similarity between the second video frame and the first video frame is determined according to a correlation between the second video frame and the first video frame. After the similarity between the second video frame and the first video frame is obtained, it is determined whether the similarity between the second video frame and the first video frame is greater than a second target threshold, which may be determined according to a double speed value of the target video at the current playing time, for example, a frame skipping coefficient V0 is determined according to the double speed value, and a product between the frame skipping coefficient V0 and a target value T0 is determined as the second target threshold. After judging whether the similarity between the second video frame and the first video frame is greater than the second target threshold, if the similarity between the second video frame and the first video frame is greater than the second target threshold, the second video frame can be determined to be a redundant video frame of the first video frame, and the playing of the second video frame is skipped, so that the wonderful content in the target video is displayed to the user to the maximum extent, and the efficiency of the video in double-speed playing is improved.
Optionally, in the embodiment, the first video frame and the second video frame to be played in the target video may also be simultaneously acquired in the process of performing double-speed playing on the target video. Under the condition that the similarity between the first video frame and the second video frame is larger than the second target threshold, the similarity between the first video frame and the second video frame can be determined to be higher, one video frame with higher video quality is selected from the first video frame and the second video frame to be played, and the other video frame is skipped to be played, wherein the video quality can be the definition of the video frame during playing and the like, and other parameters which can be used for indicating the playing quality of the video frame and the like, so that the wonderful content in the target video is displayed to the user to the maximum extent, and the efficiency of the video during double-speed playing is improved.
Optionally, in the embodiment, in the process of performing double-speed playing on the target video, a plurality of video frames including the first video frame and the second video frame may be simultaneously acquired, and when the similarity between the plurality of video frames is greater than a second target threshold, it may be determined that the similarity of the plurality of video frames is high, and one video frame with the highest video quality is selected from the plurality of video frames to be played, and the playing of other video frames is skipped, so that the highlight content in the target video is maximally presented to the user, and the efficiency of the video in double-speed playing is improved.
As an optional implementation manner, before skipping the playing of the first video frame in step S204, or before playing the first video frame at the target playing speed in step S206, the method further includes: acquiring a tag set, wherein the tag set comprises a plurality of target tags, each target tag is used for indicating one viewing interest of a target object, and the target object is an object for viewing a target video; in the case that the tag of the first video frame and the target tag are not the same, skipping playback of the first video frame includes: skipping the playing of the first video frame under the condition that the label of the first video frame is different from the plurality of target labels in the label set; under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed comprises the following steps: and under the condition that the label of the first video frame is the same as one target label in the label set, playing the first video frame according to the target playing speed.
In this embodiment, the tag set includes a plurality of target tags, each of which is used to indicate a viewing interest of the target object, for example, the viewing interest of the target object may be a person, a landscape, a gunfight, martial arts, love, beauty, a man, etc., without any limitation. The target tag set may be obtained by counting the viewing behavior of the target object, for example, counting the viewing behavior of the target object, and calibrating the viewing behavior of the target object, for example, calibrating the viewing behavior to be people, scenery, gunfight, martial arts, love, beauty, and the like, so as to obtain a plurality of target tags, and during the target video double-speed playing process, comparing the tags of the video frame with the plurality of target tags in the tag set.
In the process of target video double-speed playing, under the condition that the tag of the first video frame is different from a plurality of target tags in the tag set, that is, the tag of the first video frame does not accord with the interest of the target object counted at present, the first video frame may be a video frame which is not interested by the target object, and the playing of the first video frame is skipped at this time. Under the condition that the label of the first video frame is the same as one target label in the label set, the first video frame is consistent with one interest of a target object which is counted at present, the first video frame may be a video frame which is interesting to the target object, and the first video frame is played at a target playing speed, for example, the first video frame is played at an original playing speed or at a speed slightly higher than the original playing speed, so that a highlight segment in the target video is displayed to a user to the maximum extent, the efficiency of the video in double-speed playing is improved, and the experience of the user in watching the target video is further improved.
As an optional implementation, obtaining the tag set includes: the method comprises the steps of obtaining a tag set sent by a first server, wherein the tag set is generated by the first server according to historical viewing behaviors of a target object, and the historical viewing behaviors are associated with viewing interests of the target object.
In this embodiment, the target tag set may be obtained by a behavior statistics module, for example, by counting, by the first server, the viewing behavior of the target object, and the background server may collect a large amount of data indicating the viewing behavior of the target object, where the viewing behavior is associated with the viewing interest of the target object, for example, the viewing interest of the target object is landscape, the viewing behavior of the target object is video in a landscape class, or web pages in a landscape class, or the like, that is, the viewing interest of the target object corresponds to the viewing behavior of the target object. The embodiment may calibrate the viewing behavior of the target object by the first server, thereby obtaining a tag set comprising a plurality of target tags. The first server may be a background server.
As an alternative implementation, after skipping the playing of the first video frame in step S204, or after playing the first video frame at the target playing speed in step S206, the method further includes: responding to the target operation instruction, and playing the video in the target playing progress in the target video; and adding a label of the content type of the video indicating the target playing progress to the label set so as to update the label set.
In this embodiment, the tag set including the plurality of target tags may be updated after skipping playback of the first video frame or after playing the first video frame at the target playback speed. And acquiring a target operation instruction, where the target operation instruction may be an operation instruction generated when the target object readjusts the playing progress of the target video to the target playing progress after the target video is played at the double speed, for example, an operation instruction generated when a user drags to a relevant playing position of the target video again for watching is obtained. Responding to the target operation instruction, playing the video at the target playing progress in the target video, wherein the video at the target playing progress can be the video content interested by the target object, acquiring a label of the content type of the video for indicating the target playing progress, such as people, scenery, gunfight, martial arts, love, beauty, and the like, adding the label of the content type of the video for indicating the target playing progress to the label set to update the label set, so that whether the video frame is the video frame interested by the target object is judged by comparing with the label of the video frame in the process of target video double-speed playing, whether skipping is determined, thereby maximally satisfying the condition that the user watches the interested content when the video is played at double-speed, protecting the wonderness of the video content, and improving the watching performance of the video, the efficiency of the video in the double speed playing is improved.
As an optional implementation manner, the target playing progress is used to indicate a position of an unplayed video in the target video, or to indicate a position of a played video in the target video.
In this embodiment, the target playing progress may be used to indicate a position of an unplayed video in the target video, for example, a user knows that video content in a certain period of unplayed video in the target video is interesting video content by introducing the video, and may adjust the target playing progress to the playing time of the certain period of unplayed video for watching.
Optionally, the target playing progress of this embodiment may also be a position of a played video in the target video. Because a certain speed doubling value is set when the target video is played at the speed doubling value, if the frame number of the video frame skipped by the target video during the speed doubling playing meets the video frame number which needs to be skipped and corresponds to the speed doubling value in unit time, the remaining video frames in the unit time are normally played, and the video content of the normal remaining video frames may be interesting for the user or not. The user can adjust the playing progress of the target video to the playing position corresponding to the played video in the target video, the played video can be the video which is interested by the user, the label of the content type of the played video is obtained, the label is added to the label set, and therefore the label set is updated, so that the label set can be compared with the label of the video frame in the process of playing the target video at the double speed, whether the video frame is the video frame which is interested by the target object or not is judged, whether the video frame is skipped or not is determined, the watching performance of the video is improved, and the efficiency of the video in the double speed playing process is improved.
As an alternative implementation, after skipping the playing of the first video frame in step S204, the method further includes: determining the frame number of a video frame needing to be skipped over when the target video is played at a double speed as a first frame number, wherein the first frame number is determined by the playing speed of the target video when the target video is played at the double speed; determining the frame number of the skipped video frame of the target video as a second frame number; determining the difference between the first frame number and the second frame number as a third frame number, wherein the third frame number is the frame number of a video frame to be skipped by the target video; and under the condition that the third frame number is 0, acquiring a second video frame in the target video frame, wherein the second video frame is the next video frame of the first video frame in the target video.
In this embodiment, in the process of performing double-speed playing on the target video, after skipping playing of the first video frame in unit time, the number of video frames that the target video needs to skip when performing double-speed playing is determined as the first frame number. Optionally, according to a playing speed corresponding to a double-speed value of the target video during double-speed playing, determining a number of video frames that the target video needs to skip in a unit time, for example, determining a number of video frames that the target video needs to skip per second, where the number of video frames that the target video needs to skip per second is the first number of frames, that is, when the number of video frames that the target video needs to skip during double-speed playing is the first number of frames, the playing speed of the target video during double-speed playing is satisfied.
The embodiment determines that the frame number of the video frame skipped by the target video is the second frame number, determines the difference between the first frame number and the second frame number as the third frame number, and the third frame number is the video frame number to be skipped by the target video in unit time, that is, the target video still needs to skip the video frame of the third frame number in unit time to meet the play speed of the target video in the double-speed play, and can enter the motion compensation module to enable the play speed of the target video in the double-speed play to meet the play speed corresponding to the set double-speed value.
If the third frame number is 0, that is, the target video does not need to skip the video frame any more in the unit time, a second video frame in the target video can be obtained, and the second video frame is the next video frame of the first video frame in the target video. And if the unit time is not finished, normally playing the second video frame, and if the unit time is finished and the next unit time is reached, acquiring a label of the second video frame, wherein the label of the second video frame is used for indicating the content type of the second video frame. Skipping the playing of the second video frame when the label of the second video frame is different from the preset target label, playing the second video frame at a certain playing speed when the label of the second video frame is the same as the target label, wherein the difference between the certain playing speed and the original playing speed of the second video frame is within a first target threshold, for example, playing the second video frame at the original playing speed of the second video frame, or playing the second video frame at a playing speed slightly higher than the original playing speed of the second video frame, so as to ensure the playing quality of the second video frame.
As an optional implementation, after determining the difference between the first frame number and the second frame number as a third frame number, the method further includes: under the condition that the third frame number is larger than 0, acquiring a target video frame group where the first video frame is located, wherein the target video frame group comprises a plurality of continuous video frames with the same label in a target video; determining the frame number of the video frame which is not played in the target video frame group as a fourth frame number; in the case where the fourth frame number is 0, the second video frame among the target video frames is acquired.
After the difference between the first frame number and the second frame number is determined as a third frame number in unit time, if the third frame number is greater than 0, the target video still needs to skip the video frame of the third frame number in unit time, so as to meet the playing speed of the target video during double-speed playing. And under the condition that the third frame number is greater than 0, acquiring a target video frame group in which the first video frame is positioned, wherein the target video frame group comprises a plurality of continuous video frames with the same label in the target video.
In a unit time, after the target video frame group where the first video frame is located is acquired, the number of frames of video frames which are not played in the target video frame group is determined to be a fourth frame number, that is, the number of frames Y0 of the remaining video frames in the target video frame group where the first video frame is located is acquired. And if the fourth frame number is 0, namely the frame number of the residual video frames in the target video frame group with the same label is 0, acquiring a second video frame in the target video frame, wherein the second video frame is the next video frame of the first video frame in the target video. If the unit time is not finished, the second video frame is played normally, if the unit time is finished, and the next unit time, the label of the second video frame is acquired, the label of the second video frame is used for indicating the content type of the second video frame, and when the label of the second video frame is different from the preset target label, the playing of the second video frame is skipped, playing the second video frame at a certain playing speed under the condition that the label of the second video frame is the same as the target label, the difference between the certain play speed and the original play speed of the second video frame is within a first target threshold, for example, the second video frame is played at the original play speed of the second video frame, or the second video frame is played at a playing speed slightly higher than the original playing speed of the second video frame, so as to ensure the playing quality of the second video frame.
As an optional implementation manner, after determining that the frame number of the video frame not played in the target video frame group is the fourth frame number, the method further includes: under the condition that the fourth frame number is greater than 0, acquiring the similarity between a second video frame and a third video frame, wherein the third video frame is the next video frame of the second video frame in the target video; in the case that the similarity exceeds a second target threshold, the playing of the second video frame or the third video frame is skipped.
After the frame number of the video frame which is not played in the target video frame group is determined to be the fourth frame number, if the fourth frame number is greater than 0, that is, the frame number of the remaining video frame in the target video frame group with the same label is greater than 0, then entering a motion compensation module, so that the video frame number skipped by the target video in unit time meets the video frame number which needs to be skipped and corresponds to the set double speed value, and the play speed of the target video in double speed play is met.
The embodiment obtains the similarity between the second video frame and the third video frame, and the similarity between the second video frame and the third video frame, which is the next video frame of the second video frame in the target video, can be obtained through Histogram of Oriented Gradients (HOG). Whether the similarity between the second video frame and the third video frame is greater than a second target threshold is judged, and the second target threshold can be determined according to the double speed value of the target video when the target video is currently played, for example, the frame skipping coefficient V0 is determined according to the double speed value, and the product between the frame skipping coefficient V0 and the target value T0 is determined as the second target threshold. After judging whether the similarity between the second video frame and the third video frame is greater than the second target threshold, if the similarity between the second video frame and the third video frame is judged to be greater than the second target threshold, determining that the similarity between the second video frame and the third video frame is higher, and the video frame can be regarded as a redundant video frame, and at this time, playing of the second video frame or the third video frame can be skipped.
Optionally, in the embodiment, a video frame with higher playing quality is selected from the second video frame and the third video frame to be played, so that on the basis of determining whether to skip the video frame by comparing the video frame tag with a predetermined target tag, the video frame of the target video is skipped within a unit time to meet the requirement of double-speed playing, and then the wonderful content in the target video is displayed to the user to the maximum extent, so that the user experience is further improved, and the efficiency of the video in double-speed playing is improved.
Optionally, in a case that the similarity between the second video frame and the third video frame does not exceed the second target threshold, the remaining video frame numbers in the target video frame group are continuously acquired. If the number of the remaining video frames in the target video frame group is 0, acquiring a next fourth video frame of the third video frame, if the unit time has not ended, playing the fourth video frame normally, if the unit time has ended, and when the unit time reaches the next unit time, acquiring a tag of the fourth video frame, where the tag of the fourth video frame is used to indicate the content type of the fourth video frame, skipping the playing of the fourth video frame if the tag of the fourth video frame is not the same as the preset target tag, playing the fourth video frame at a certain playing speed if the tag of the fourth video frame is the same as the target tag, where the difference between the certain playing speed and the original playing speed of the fourth video frame is within a first target threshold, for example, playing the fourth video frame at the original playing speed of the fourth video frame, or playing the fourth video frame at a playing speed slightly faster than the original playing speed of the fourth video frame, to ensure the playing quality of the fourth video frame.
If the number of the remaining video frames in the target video frame group is greater than 0, a fourth video frame and a fifth video frame can be acquired, the fifth video frame is the next video frame of the fourth video frame in the target video, the similarity between the fourth video frame and the fifth video frame is further judged, and if the similarity between the fourth video frame and the fifth video frame is greater than a second target threshold value, the fourth video frame or the fifth video frame is skipped. Optionally, one video frame with lower quality in the fourth video frame and the fifth video frame is selected to skip and the other video frame is played normally, so that the highlight content in the target video is displayed to the user to the maximum extent, and the efficiency of the video in double-speed playing is improved.
As an optional implementation manner, acquiring the target video frame group in which the first video frame is located includes: and acquiring a target video frame group where the first video frame sent by the second server is located, wherein the target video is transcoded by the second server to obtain a plurality of video frames, the second server divides the plurality of video frames into a plurality of video frame groups, each video frame group comprises a plurality of continuous video frames with the same label in the target video, and the plurality of video frame groups comprise the target video frame group.
In this embodiment, when the target video frame group where the first video frame is located is obtained, the target video frame group where the first video frame is located sent by a second server may be obtained, where the second server may be a transcoding server, and the transcoding server is used to transcode the target video.
Optionally, the embodiment divides a plurality of consecutive video frames with the same label in the target video into a video frame group when the target video is transcoded by the transcoding server. Optionally, for the target video, the transcoding server starts transcoding and enters the intelligent calibration module. The intelligent calibration module intelligently analyzes the transcoded target video by using artificial intelligence while transcoding, analyzes one video frame in the target video, extracts a label of the video frame as K0, and sets a video frame group as S0. And reading a next video frame in the target video, analyzing the next video frame in the target video, and extracting a label K of the next video frame, wherein the next video frame is the current video frame. If the label K of the current video frame is different from the label K0 of the previous video frame, the current video frame is set to belong to a new video frame group Sn. The previous video frame group S0 completes the grouping. If the label K of the current video frame is the same as that of the previous video frame, the current video frame is added to the group of video frames to which the previous video frame belongs, and the label K0 is the label of this group of video frames, so that consecutive video frames having the same label are grouped into one group of video frames,
optionally, the number of consecutive video frames with the same label is maximum, and minimum is 1 frame, of the video frames played by the target video in 1 second. After the division of one video frame group is completed, the intelligent calibration module is withdrawn, the transcoding of the target video is continuously completed, and a plurality of video frames in the target video frame are continuously grouped under the condition that the transcoding is not completed. Thereby dividing the plurality of video frames in the target video into a plurality of video frame groups, each video frame group comprising a consecutive plurality of video frames in the target video having the same tag, the plurality of video frame groups comprising the target video frame group.
As an alternative embodiment, in the case that the tag of the first video frame is the same as the target tag, playing the first video frame at the target playing speed includes: under the condition that the speed value of the target video in the speed-multiplying playing reaches the target speed value, playing a first video frame at a target playing speed equal to the original playing speed; and under the condition that the speed value of the target video in the speed doubling playing process does not reach the target speed value, playing the first video frame at a target playing speed which is higher than the original playing speed.
In this embodiment, when the first video frame is played at the target playing speed, it may be determined whether a speed doubling value of the target video during speed doubling playing reaches a target speed doubling value, where the target speed doubling value may be a speed doubling value set by a user. If the speed value of the target video in the speed-doubling playing process reaches the target speed value, playing the first video frame at a target playing speed equal to the original playing speed; if the speed value of the target video in the double-speed playing is not yet reached, the first video frame needs to be played at a target playing speed greater than the original playing speed in order to meet the target speed value.
Optionally, the number of video frames to be skipped to meet the target multiple speed value may be determined according to the target multiple speed value, the number of skipped video frames is obtained, the difference between the number of video frames to be skipped and the number of skipped video frames is determined as the number of video frames to be skipped, and the target playing speed for playing the first video frame is determined according to the number of video frames to be skipped, where the target playing speed may be slightly faster than the original playing speed, but the target playing speed and the original playing speed are within a first target threshold, so as not to affect the user to watch the video content of interest in the target video.
As an alternative implementation manner, the quotient between the sum of the number of skipped video frames and the number of played video frames of the target video in the unit time and the number of played video frames in the unit time at the original playing speed is the double speed value of the target video in the double speed playing.
In this embodiment, the double speed value of the target video during double speed playing is the quotient of the playing speed of the target video during double speed playing and the original playing speed of the target video. In a unit time, acquiring the sum of the number of video frames skipped by the target video and the number of played video frames, acquiring the number of the played video frames when played in the unit time according to the original playing speed, for example, acquiring the sum A of the number of the video frames skipped by the target video and the number of the played video frames within 1 second, and acquiring the number B of the played video frames when played in the unit time according to the original playing speed, wherein the quotient between A and B is the speed doubling value of the target video when played at the current speed doubling speed.
Fig. 3 is a flowchart of another video playing method according to an embodiment of the present invention. As shown in fig. 3, the method comprises the steps of:
step S302, in the process that the client terminal plays the target video at double speed, the client terminal obtains the label of the first video frame to be played in the target video.
In the technical solution provided in the above step S302 of the present application, in a process that a client performs double-speed playing on a target video, the client obtains a tag of a first video frame to be played in the target video, where the tag of the first video frame is used to indicate a content type of the first video frame.
In this embodiment, the target video may be a video that the user needs to play by the client, and the target video may be played by the video client. The target video is played in a double-speed playing mode.
Optionally, the client sends a target request to the server, where the target request is used for the client to request to obtain the URL of the target video. After the client acquires the URL of the target video, the client acquires the target video according to the URL, for example, the client acquires a video stream of the target video.
Optionally, the target video of this embodiment comprises media package data and audiovisual data. And the client analyzes the media packaging data and the audio and video data in the target video, and if the client plays the target video in a normal playing mode, the client plays the target video until the end.
Optionally, if the client plays the target video in a double-speed playing manner, the client may acquire a first video frame to be played in the target video within a unit time. When the current playing speed of the target video does not meet the speed doubling requirement, the client acquires the tag of the first video frame, for example, the client decodes the target video, and acquires the tag of the first video frame from the obtained decoded data, where the tag of the first video frame may be used to indicate the content type of the first video frame.
Step S304, the client skips playing the first video frame when the tag of the first video frame is different from the preset target tag.
In the technical solution provided in step S304 of the present application, after the client obtains the tag of the first video frame to be played in the target video, the client determines whether the tag of the first video frame is the same as the preset target tag, and the client may determine whether the tag of the first video frame is the same as the preset target tag in the scene matching module. And if the label of the first video frame is different from the preset target label, the client skips the playing of the first video frame.
In this embodiment, the preset target tag may be an interest tag of the user, and is used for indicating the interest of the user. After the client determines that the tag of the first video frame is different from the preset target tag, if the tag of the first video frame is different from the preset target tag, it indicates that the content type indicated by the tag of the first video frame is not in accordance with the interest of the user, that is, the video content presented during playing of the first video frame is not the video content in which the user is interested, the client skips playing of the first video frame, for example, skips the plot of the video in which the user is not interested at high speed, so that the observability of the target video is improved, and the efficiency of the target video during double-speed playing is improved.
Step S306, in the case that the tag of the first video frame is the same as the target tag, the client plays the first video frame according to the target play speed.
In the technical solution provided in the foregoing step S306 of the present application, under the condition that the tag of the first video frame is the same as the target tag, the client plays the first video frame according to the target play speed, where a difference between the target play speed and the original play speed of the first video frame is within a first target threshold.
After the client judges whether the label of the first video frame is the same as the preset target label, if the label of the first video frame is the same as the target label, the client plays the first video frame according to the target playing speed, and the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
In this embodiment, if the tag of the first video frame is the same as the target tag, it indicates that the content type indicated by the tag of the first video frame matches with the interest of the user, that is, the target tag matches with the tag of the first video frame, the video content presented when the first video frame is played is the video content interested by the user, and the client may play the first video frame at the target play speed, that is, the client plays the video content of the first video frame interested by the user at the target play speed. Optionally, the first video frame is played at its original play speed or at a slightly faster speed.
Optionally, in a case that the target video already meets the current speed doubling requirement, the client may play the first video frame at the original play speed of the first video frame; under the condition that the target video frame does not meet the requirement of the current speed doubling, the client can determine the number of video frames needing to be skipped to meet the set speed doubling value according to the set speed doubling value, acquire the number of skipped video frames, determine the difference between the number of the video frames needing to be skipped and the number of the skipped video frames as the number of the video frames needing to be skipped, and determine the target playing speed for playing the first video frame according to the number of the video frames needing to be skipped, wherein the target playing speed is slightly higher than the original playing speed, but the target playing speed and the original playing speed are within a first target threshold, so that the user cannot influence the user to watch the interested video content in the target video.
Optionally, in this embodiment, in unit time, when the number of frames of video frames that have been skipped by the client reaches the number of video frames that need to be skipped and correspond to the double-speed value of the target video, the remaining unplayed video frames in unit time may be played normally, and the remaining unplayed video frames may include video frames that are interesting to the user or may include video frames that are not interesting to the user; if the determined frame number of the skipped video frame does not reach the video frame number which needs to be skipped and corresponds to the double speed value of the target video in unit time, the client can further enter a motion compensation module to select the skipped frame according to the similarity between the adjacent video frames, skip one video frame of the two adjacent video frames with high similarity and play the other video frame, thereby determining the video frame which needs to be skipped and the video frame which needs to be played in unit time by the client so as to meet the playing speed of the target video in double speed playing.
The client selects to skip or play the video frame of the target video according to the method in one unit time, and can also select to skip or play the video frame of the target video according to the method in the next unit time, so that the content which is interested by the user in the target video is displayed to the user to the maximum extent, and the efficiency of the video in double-speed playing is improved.
Through the steps S302 to S306, in the process that the client performs double-speed playing on the target video, the client acquires a tag of a first video frame to be played in the target video, wherein the tag of the first video frame is used for indicating the content type of the first video frame; under the condition that the label of the first video frame is different from the preset target label, the client skips the playing of the first video frame; and under the condition that the label of the first video frame is the same as the target label, the client plays the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value. After the target video is played at double speed, the client skips over the first video frame with the label different from the preset target label, and plays the first video frame with the label identical to the preset target label at the target playing speed, that is, the client skips over the video frame which is not interested by the user, and plays the video frame which is interested by the user at the target playing speed, so that the technical effect of improving the efficiency of the video at double speed playing is realized, and the technical problem of low efficiency of the related technology at the video at double speed playing is solved.
The embodiment can distinguish the content of the target video by using an artificial intelligence algorithm, and after the target video is played at a double speed, the video content which is interested by the user is played at the original speed or is played at a slightly higher speed, and the video content which is not interested by the user is skipped at a higher speed. The similar video frame between adjacent video frames can be skipped over in an artificial intelligence mode to further improve the user experience, so that the double-speed watching experience of the user on the video is improved, the wonderful content of the video can be displayed to the user to the maximum extent, and the efficiency of the video in double-speed playing is improved.
The technical solution of the present invention will be described below with reference to preferred embodiments.
The embodiment provides a video double-speed playing device, which is mainly applied to a player or a browser and meets the requirement that a user uses accelerated playing to watch a video quickly in the playing process.
Optionally, the video double-speed playing apparatus of this embodiment distinguishes video contents by using an artificial intelligence algorithm. After the user uses the double-speed playing, the content which is interested by the user is played at the original speed or is played at a slightly fast speed, and the content which is not interested by the user is skipped at a high speed; and on the basis of artificial intelligence identification, skipping the video frames according to the correlation between adjacent images can be selected, so that the double-speed watching experience of the user on the video can be greatly improved, and the wonderful content of the video can be displayed to the user to the maximum extent.
Fig. 4 is a schematic diagram of a video double-speed playing apparatus according to an embodiment of the present invention. As shown in fig. 4, the video double-speed playing apparatus includes: the system comprises an intelligent calibration module 1, a scene matching module 2, a motion compensation module 3 and a behavior statistic module 4.
The intelligent calibration module 1 is used for transcoding the video at the transcoding end, and simultaneously performing intelligent analysis on the transcoded source video by using artificial intelligence, and forming a group by using continuous frames with the same label, wherein the continuous frames maximally comprise the number of video frames normally played in 1 second of the video, and the minimum frame can be one frame.
Fig. 5 is a flowchart of a calibration method of an intelligent calibration module according to an embodiment of the present invention. As shown in fig. 5, the method comprises the steps of:
step S501, a first frame image of the video is analyzed, and a label of the extracted first frame image is K0.
In the embodiment, transcoding is started for the video source through the transcoding server, and the video source enters the intelligent calibration module. The first frame image of the video may be analyzed based on the visual library OpenCV, the label of the extracted first frame image is K0, and the settings are grouped as S0. OpenCV is a cross-platform computer vision library, which can run on an operating system.
Step S502, analyzing the second frame image of the video, and extracting the label of the second frame image as K.
A new frame of image is read, analyzed using OpenCV, and the tag is extracted as K.
In step S503, it is determined whether the label K0 of the first frame image is the same as the label K of the second frame image.
After the second frame image of the video is analyzed and the label K of the second frame image is extracted, it is determined whether the label K0 of the first frame image is the same as the label K of the second frame image. If it is determined that the tab K0 of the first frame image is identical to the tab K of the second frame image, step S504 is performed, and if it is determined that the tab K0 of the first frame image is not identical to the tab K of the second frame image, step S505 is performed.
Step S504, adding the second frame image to the packet to which the first frame image belongs, where the label is the label of the packet.
After judging whether the label K0 of the first frame image is the same as the label K of the second frame image, if the label K0 of the first frame image is the same as the label K of the second frame image, the second frame image is added to the group to which the first frame image belongs, the label being the label of this group.
In step S505, the second frame image is set to belong to the new packet Sn.
After judging whether the label K0 of the first frame image is the same as the label K of the second frame image, if the label K0 of the first frame image is not the same as the label K of the second frame image, the second frame image is set to belong to the new group Sn. The previous grouping S0 completes the grouping.
And S506, exiting the intelligent calibration module.
And exiting the intelligent calibration module after adding the second frame image into the group to which the first frame image belongs and the label is the label of the group, or after setting the second frame image to belong to a new group Sn.
And step S507, continuing to finish transcoding of the video.
Step S508, determine whether transcoding is completed.
If the transcoding is not completed, executing the method after the step S501, and continuously grouping a plurality of video frames in the video; if the transcoding is not completed, the execution flow is ended.
Fig. 6 is a schematic diagram of a transcoding server according to an embodiment of the present invention. As shown in fig. 6, a media encoder in the transcoding server acquires media data sent by an audio/video input device, encodes the media data to obtain a video stream, and inputs the video stream into a server having a HyperText transfer Protocol (HTTP) to process the video stream into a certain type of media file. And the video stream is distributed to a webpage server and is sent to a client through an HTTP protocol, so that the video source is transcoded.
And the scene matching module 2 is used for comparing the label of each frame with the interest label of the user and selectively skipping the unmatched video frame according to the double speed if the user plays the video at the double speed in the playing process of the player.
And the motion compensation module 3 enters the motion compensation module 3 after skipping frames through the scene matching module if the requirement of the target video in double-speed playing cannot be met. The motion compensation module 3 essentially predetermines a window determined from successive frames having the same label. The window size is the number of consecutive frames with the same label. Starting with the second video frame in the window, calculating whether the similarity between the two continuous video frames exceeds a threshold value according to the correlation between the previous video frame and the current video frame, if so, considering that the similarity between the two video frames is higher, and selecting one of the two video frames with poor playing quality to skip. Alternatively, the threshold value of this embodiment may be determined according to the double speed value currently set by the video.
And the behavior statistical module 4 is used for analyzing the behaviors of the user at the double speed and the video tags each time to continuously update the interest tags of the user so as to match the user behaviors during subsequent video playing at the double speed.
In this embodiment, the user's viewing behavior may be counted by the backend server, and the user's interest may be calibrated, for example, the user's behavior may be calibrated to be people, landscape, gunfight, martial arts, love, beauty, and the like, without any limitation here.
The following describes the player of this embodiment.
Fig. 7 is a flowchart of a video playing method of a player according to an embodiment of the present invention. As shown in fig. 7, the method comprises the steps of:
step S701 requests the URL of the target video.
The URL of the target video is requested according to the user's needs. And requesting the video stream of the target video from the server according to the URL of the target video.
Step S702, receiving the video stream sent by the server.
Step S703, the media package data and the audio/video data in the video stream are analyzed.
Step S704, detecting whether the target video sets a double-speed playing.
If detecting that the target video is not set to play at double speed, executing step S705; if it is detected that the target video is set to double-speed play, step S706 is performed.
Step S705, the normal play is performed until the play is finished.
Step S706, a current video frame of the target video is acquired in unit time.
Step S707, in case that the target video needs to be doubled, acquiring the label of the current video frame.
Under the condition that the target video needs to be subjected to double speed, the current video frame can be decoded to obtain the label of the current video frame.
Step S708, determine whether the tag of the current video frame is the same as the user interest tag.
After the label of the current video frame is obtained, whether the label of the current video frame is the same as the user interest label is judged. If the label of the current video frame is judged to be the same as the user interest label, executing the step S709; if the tag of the current video frame is not the same as the user interest tag, step S710 is performed.
Step S709, play the current video frame.
In step S710, the current video frame is skipped.
In step S711, the frame number Tn of the video frame that needs to be skipped in the unit time is acquired.
The number of frames of the video frame to be skipped in a unit time can be determined according to the double speed value set by the current target video, and the difference between the number of frames of the video frame to be skipped in the unit time and the number of frames of the video frame to be skipped currently is determined as the number of frames Tn of the video frame to be skipped.
In step S712, it is determined whether Tn is equal to 0.
After the frame number Tn of a video frame which needs to be skipped in a unit time is acquired, whether Tn is larger than 0 is judged. If Tn is not equal to 0, go to step S713; if Tn is equal to 0, go to step S706.
In step S713, the remaining number of frames Y0 of the S group in which the current video frame exists is acquired.
After judging whether Tn is greater than 0, if Tn is not equal to 0, the remaining frame number Y0 of the S group where the current video frame is located is obtained.
In step S714, it is judged whether or not the remaining frame number Y0 is equal to 0.
After the remaining frame number Y0 of the S group where the current video frame is located is acquired, it is judged whether the remaining frame number Y0 is equal to 0. If the remaining frame number Y0 is judged to be equal to 0, executing the step S706; if it is judged that the remaining frame number Y0 is not equal to 0, step S715 is performed.
In step S715, the frame skipping coefficient V0 and the target value T0 are acquired according to the currently set double speed value.
After judging whether the remaining frame number Y0 is equal to 0, if it is judged that the remaining frame number Y0 is not equal to 0, the frame skipping coefficient V0 and the target value T0 are obtained according to the currently set speed doubling value, and T0 × V0 is determined as the threshold.
Step S716, enter the motion compensation module, and obtain a new current video frame.
In step S717, the new current video frame and the next video frame are analyzed to obtain the similarity between the current video frame and the next video frame.
Step S718, determining whether the similarity between the current video frame and the next video frame exceeds a threshold.
After analyzing the new current video frame and the next video frame to obtain the similarity between the current video frame and the next video frame, judging whether the similarity between the current video frame and the next video frame exceeds a threshold value T0V 0. If the similarity between the current video frame and the next video frame is judged to exceed the threshold value T0 × V0, executing step S719; if the similarity between the current video frame and the next video frame is not greater than the threshold T0V 0, step S713 is executed.
In step S719, a new current video frame is skipped.
The behavior statistics module 4 of this embodiment may update the matching tag in the speed doubling process of the user. Optionally, if the user drags to the relevant position again for viewing after playing at double speed, the tag at the current position is analyzed, and the interest tag of the user is updated.
The double-speed playing device provided by the embodiment can distinguish the contents of the video by applying an artificial intelligent algorithm. After the video uses the double-speed play function, the content that is interested in the user is played at the original speed or is played at a slightly faster speed, and the content that is not interested in the user is skipped at a higher speed. Video frames with the same similarity can be skipped through an artificial intelligence mode, and therefore user experience is further improved. Therefore, the double-speed watching experience of the user can be greatly improved, and the wonderful content of the video can be displayed to the user to the maximum extent.
By the intelligent calibration module 1 of the embodiment, videos are calibrated and grouped during transcoding; comparing the interest tag of the user with the tag of the current video frame through the scene matching module 2, and skipping over the video frame which is not interested by the user; if the scene matching module 2 can not meet the requirement of speed doubling after frame skipping, the motion compensation module 3 compares the similarity of front and rear pictures in a window to meet the requirement of speed doubling of a user; the behavior counting module 4 counts and updates the labels of the users according to the behaviors of the users playing at double speed every time, so that the interested contents can be seen when the users play at double speed to the maximum extent, the wonderness of the video contents can be protected, and the watching performance of the video is improved.
The application environment of the embodiment of the present invention may refer to the application environment in the above embodiments, but is not described herein again. The embodiment of the invention provides an optional specific application for implementing the video playing method.
Fig. 8A is a scene schematic diagram of video playing according to an embodiment of the present invention. As shown in fig. 8A, the user watches the playing time length for 36 minutes using the terminal: and 20 seconds of video, wherein the terminal is not limited to a PC, a mobile phone, a tablet computer and the like. In the process of video playing, a 'speed doubling' function button is displayed at the upper right corner of the display interface and is used for playing video at a speed doubling speed.
Fig. 8B is a schematic view of another video playing scene according to an embodiment of the present invention. As shown in fig. 8B, in the process of playing the video, an operation instruction of the user is received through a "double speed" function button of the display interface, different double speed values are displayed in the pull-down option, for example, double speed values 1.5 ×, 2 ×, 2.5 ×, 3 ×, etc. are displayed, and the user can also input a customized double speed value, so that the currently played video is played at the double speed according to the set double speed value.
Fig. 8C is a schematic view of another video playing scene according to the embodiment of the present invention. As shown in fig. 8C, the double speed value of the video double speed playback is set to 2.5 ×, and the playback progress of the video starts displaying the landscape video content at the position a of 00:20 seconds, and the video content between ab is about to be the landscape video content. In the embodiment, the content of the video can be distinguished by applying an artificial intelligence algorithm, the interest label of the user is compared with the label of the video frame to be played currently, and if the interest label of the user is different from the label of the video frame to be played currently, the scenic video content to be played currently can be determined to be video content which is not interested by the user.
Fig. 8D is a schematic diagram of another video playing scene according to an embodiment of the present invention. As shown in fig. 8D, since the landscape video content between ab shown in fig. 8C is a video content that is not of interest to the user, this embodiment directly skips the playback of the video frame between ab and directly displays the personal video content to be played next, while ensuring that the double speed value of the video playback is 2.5 ×. In the embodiment, the content of the video is distinguished by using an artificial intelligence algorithm, and the label of the video frame corresponding to the character video content is the same as the interest label of the user, so that the video frame corresponding to the character video content is played at the original speed or is played at a higher speed under the condition that the double-speed value of video playing is ensured to be 2.5 multiplied.
Optionally, the embodiment may also skip a similar video frame between adjacent video frames in an artificial intelligence manner to further improve user experience, thereby improving the double-speed viewing experience of the user on the video, also displaying the highlight content of the video to the user to the maximum extent, and improving the efficiency of the video in double-speed playing.
It should be noted that the application scenarios of video playing are only examples of the embodiment of the present invention, and do not represent that the application scenarios of the present invention are only limited to the application scenarios, and other application scenarios that can implement video double-speed playing by using the video playing method of the embodiment of the present invention and improve the efficiency of video double-speed playing are also included, which is not illustrated here.
The embodiment can be applied to products such as live video and on-demand video. The embodiment starts from different interest points of each user by using an artificial intelligence method, so that the user can furthest ensure the completeness and the wonderful degree of video watching during double-speed playing. Meanwhile, the user experience of rapidly watching videos can be provided, the product competitiveness is improved, the video wonderness and the watching performance can be improved, the situation that the wonderful speed doubling mode is damaged simply and roughly to prevent the video wonderful speed doubling mode from damaging the video wonderful performance and the watching performance is prevented, and the efficiency of the video in the speed-loving playing is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiment of the present invention, there is also provided a video playing apparatus for implementing the video playing method. Fig. 9 is a schematic diagram of a video playback device according to an embodiment of the present invention. As shown in fig. 9, the apparatus may include: an acquisition unit 10, a skip unit 20, and a playback unit 30.
The acquiring unit 10 is configured to acquire a tag of a first video frame to be played in the target video in a process of performing double-speed playing on the target video, where the tag of the first video frame is used to indicate a content type of the first video frame.
And a skipping unit 20, configured to skip playing of the first video frame when the tag of the first video frame is different from the preset target tag.
The playing unit 30 is configured to play the first video frame at a target playing speed if the tag of the first video frame is the same as the target tag, where a difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold.
It should be noted that the obtaining unit 10 in this embodiment may be configured to execute step S202 in this embodiment, the skipping unit 20 in this embodiment may be configured to execute step S204 in this embodiment, and the playing unit 30 in this embodiment may be configured to execute step S206 in this embodiment.
According to another aspect of the embodiment of the present invention, there is also provided a video playing apparatus for implementing the video playing method. Fig. 10 is a schematic diagram of a video playback device according to an embodiment of the present invention. As shown in fig. 10, the apparatus may include: an acquisition unit 40, a skip unit 50, and a playback unit 60.
The acquiring unit 40 is configured to enable a client to acquire a tag of a first video frame to be played in a target video in a process that the client performs double-speed playing on the target video, where the tag of the first video frame is used to indicate a content type of the first video frame;
a skipping unit 50, configured to skip the playing of the first video frame by the client when the tag of the first video frame is different from the preset target tag;
and a playing unit 60, configured to, in a case that the tag of the first video frame is the same as the target tag, enable the client to play the first video frame at a target playing speed, where a difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold.
It should be noted that the obtaining unit 30 in this embodiment may be configured to execute step S302 in this embodiment, the skipping unit 40 in this embodiment may be configured to execute step S304 in this embodiment, and the playing unit 50 in this embodiment may be configured to execute step S306 in this embodiment.
According to the embodiment, after the target video is played at the double speed, the first video frames with different labels and preset target labels are skipped over, the first video frames with the same labels and preset target labels are played at the target playing speed, that is, the video frames which are not interesting to the user are skipped over, and the video frames which are interesting to the user are played at the target playing speed, so that the technical effect of improving the efficiency of the video in the double speed playing is realized, and the technical problem of low efficiency of the related technology in the double speed playing of the video is solved.
It should be noted here that the above units are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the above units as a part of the apparatus may operate in a hardware environment as shown in fig. 1, may be implemented by software, and may also be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the video playing method. As shown in fig. 11, fig. 11 is a block diagram of an electronic device according to an embodiment of the invention. The electronic device includes: processor 111, memory 113. The memory has stored therein a computer program, and the processor is arranged to execute the steps of any of the above method embodiments by means of the computer program. Optionally, as shown in fig. 11, the electronic apparatus may further include a transmission device 115 and an input-output device 117.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Among them, the memory 113 is used to store an application program in particular.
Alternatively, in this embodiment, the processor 111 may be configured to execute the following steps by a computer program:
in the process of playing a target video at a double speed, acquiring a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame;
skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label;
and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
The processor 111 is further configured to perform the following steps: and after the first video frame is played at the target playing speed, skipping the playing of the second video frame under the condition that the similarity between the second video frame and the first video frame is greater than a second target threshold value, wherein the second video frame is the next video frame of the first video frame in the target video.
The processor 111 is further configured to perform the following steps: before skipping the playing of the first video frame or before playing the first video frame according to the target playing speed, acquiring a tag set, wherein the tag set comprises a plurality of target tags, each target tag is used for indicating one viewing interest of a target object, and the target object is an object for viewing the target video; skipping the playing of the first video frame under the condition that the label of the first video frame is different from the plurality of target labels in the label set; under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed comprises the following steps: and under the condition that the label of the first video frame is the same as one target label in the label set, playing the first video frame according to the target playing speed.
The processor 111 is further configured to perform the following steps: the method comprises the steps of obtaining a tag set sent by a first server, wherein the tag set is generated by the first server according to historical viewing behaviors of a target object, and the historical viewing behaviors are associated with viewing interests of the target object.
The processor 111 is further configured to perform the following steps: after skipping the playing of the first video frame, or after playing the first video frame according to the target playing speed, responding to the target operation instruction, and playing the video at the target playing progress in the target video; and adding a label of the content type of the video indicating the target playing progress to the label set so as to update the label set.
The processor 111 is further configured to perform the following steps: after skipping the playing of the first video frame, determining the frame number of the video frame needing to be skipped when the target video is subjected to speed doubling playing as a first frame number, wherein the first frame number is determined by the playing speed of the target video when the target video is subjected to speed doubling playing; determining the frame number of the skipped video frame of the target video as a second frame number; determining the difference between the first frame number and the second frame number as a third frame number, wherein the third frame number is the frame number of a video frame to be skipped by the target video; and under the condition that the third frame number is 0, acquiring a second video frame in the target video frame, wherein the second video frame is the next video frame of the first video frame in the target video.
The processor 111 is further configured to perform the following steps: after the difference between the first frame number and the second frame number is determined as a third frame number, under the condition that the third frame number is greater than 0, acquiring a target video frame group where the first video frame is located, wherein the target video frame group comprises a plurality of continuous video frames with the same label in a target video; determining the frame number of the video frame which is not played in the target video frame group as a fourth frame number; in the case where the fourth frame number is 0, the second video frame among the target video frames is acquired.
The processor 111 is further configured to perform the following steps: after the frame number of the video frame which is not played in the target video frame group is determined to be a fourth frame number, under the condition that the fourth frame number is greater than 0, the similarity between the second video frame and a third video frame is obtained, wherein the third video frame is the next video frame of the second video frame in the target video; in the case that the similarity exceeds a second target threshold, the playing of the second video frame or the third video frame is skipped.
The processor 111 is further configured to perform the following steps: and acquiring a target video frame group where the first video frame sent by the second server is located, wherein the target video is transcoded by the second server to obtain a plurality of video frames, the second server divides the plurality of video frames into a plurality of video frame groups, each video frame group comprises a plurality of continuous video frames with the same label in the target video, and the plurality of video frame groups comprise the target video frame group.
The processor 111 is further configured to perform the following steps: under the condition that the speed value of the target video in the speed-multiplying playing reaches the target speed value, playing a first video frame at a target playing speed equal to the original playing speed; and under the condition that the speed value of the target video in the speed doubling playing process does not reach the target speed value, playing the first video frame at a target playing speed which is higher than the original playing speed.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 11 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 11 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 11, or have a different configuration than shown in FIG. 11.
The memory 113 may be used to store software programs and modules, such as program instructions/modules corresponding to the video playing method and apparatus in the embodiments of the present invention, and the processor 111 executes various functional applications and data processing by running the software programs and modules stored in the memory 113, that is, implements the video playing method. The memory 113 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 113 may further include memory located remotely from the processor 111, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 115 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 115 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 115 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
By adopting the embodiment of the invention, in the process of playing the target video at double speed, the label of the first video frame to be played in the target video is obtained, wherein the label of the first video frame is used for indicating the content type of the first video frame; skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label; and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value. After the target video is played at the double speed, skipping the first video frame with the label different from the preset target label, and playing the first video frame with the label same as the preset target label at the target playing speed, that is, skipping the video frame which is not interested by the user, and playing the video frame which is interested by the user at the target playing speed, so as to avoid fixed skipping of a certain number of video frames, which causes the video frames which are interested by the user and not interested by the user to be skipped the same, and influence the efficiency of the video in the double speed playing, thereby realizing the technical effect of improving the efficiency of the video in the double speed playing, and further solving the technical problem of low efficiency of the related technology in the double speed playing of the video.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
in the process of playing a target video at a double speed, acquiring a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame;
skipping the playing of the first video frame under the condition that the label of the first video frame is different from the preset target label;
and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed, wherein the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and after the first video frame is played at the target playing speed, skipping the playing of the second video frame under the condition that the similarity between the second video frame and the first video frame is greater than a second target threshold value, wherein the second video frame is the next video frame of the first video frame in the target video.
Optionally, the storage medium is further arranged to store program code for performing the steps of: before skipping the playing of the first video frame or before playing the first video frame according to the target playing speed, acquiring a tag set, wherein the tag set comprises a plurality of target tags, each target tag is used for indicating one viewing interest of a target object, and the target object is an object for viewing the target video; in the case that the tag of the first video frame and the target tag are not the same, skipping playback of the first video frame includes: skipping the playing of the first video frame under the condition that the label of the first video frame is different from the plurality of target labels in the label set; and under the condition that the label of the first video frame is the same as one target label in the label set, playing the first video frame according to the target playing speed.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the method comprises the steps of obtaining a tag set sent by a first server, wherein the tag set is generated by the first server according to historical viewing behaviors of a target object, and the historical viewing behaviors are associated with viewing interests of the target object.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after skipping the playing of the first video frame, or after playing the first video frame according to the target playing speed, responding to the target operation instruction, and playing the video at the target playing progress in the target video; and adding a label of the content type of the video indicating the target playing progress to the label set so as to update the label set.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the target playing progress is used for indicating the position of the video which is not played in the target video, or is used for indicating the position of the video which is played in the target video.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after skipping the playing of the first video frame, determining the frame number of the video frame needing to be skipped when the target video is subjected to speed doubling playing as a first frame number, wherein the first frame number is determined by the playing speed of the target video when the target video is subjected to speed doubling playing; determining the frame number of the skipped video frame of the target video as a second frame number; determining the difference between the first frame number and the second frame number as a third frame number, wherein the third frame number is the frame number of a video frame to be skipped by the target video; and under the condition that the third frame number is 0, acquiring a second video frame in the target video frame, wherein the second video frame is the next video frame of the first video frame in the target video.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the difference between the first frame number and the second frame number is determined as a third frame number, under the condition that the third frame number is greater than 0, acquiring a target video frame group where the first video frame is located, wherein the target video frame group comprises a plurality of continuous video frames with the same label in a target video; determining the frame number of the video frame which is not played in the target video frame group as a fourth frame number; in the case where the fourth frame number is 0, the second video frame among the target video frames is acquired.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the frame number of the video frame which is not played in the target video frame group is determined to be a fourth frame number, under the condition that the fourth frame number is greater than 0, the similarity between the second video frame and a third video frame is obtained, wherein the third video frame is the next video frame of the second video frame in the target video; in the case that the similarity exceeds a second target threshold, the playing of the second video frame or the third video frame is skipped.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and acquiring a target video frame group where the first video frame sent by the second server is located, wherein the target video is transcoded by the second server to obtain a plurality of video frames, the second server divides the plurality of video frames into a plurality of video frame groups, each video frame group comprises a plurality of continuous video frames with the same label in the target video, and the plurality of video frame groups comprise the target video frame group.
Optionally, the storage medium is further arranged to store program code for performing the steps of: under the condition that the speed value of the target video in the speed-multiplying playing reaches the target speed value, playing a first video frame at a target playing speed equal to the original playing speed; and under the condition that the speed value of the target video in the speed doubling playing process does not reach the target speed value, playing the first video frame at a target playing speed which is higher than the original playing speed.
Optionally, the storage medium is further configured to store a computer program for executing the steps included in the method in the foregoing embodiment, which is not described in detail in this embodiment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (15)

1. A video playback method, comprising:
in the process of performing double-speed playing on a target video, acquiring a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame;
skipping the playing of the first video frame under the condition that the label of the first video frame is different from a preset target label;
and under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to a target playing speed, wherein the target playing speed is the original playing speed of the first video frame or a speed higher than the original playing speed of the first video frame, and the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
2. The method of claim 1, wherein after playing the first video frame at the target playback speed, the method further comprises:
and skipping the playing of a second video frame when the similarity between the second video frame and the first video frame is larger than a second target threshold, wherein the second video frame is the next video frame of the first video frame in the target video.
3. The method of claim 1,
before skipping playback of the first video frame, or before playing the first video frame at the target playback speed, the method further comprises: acquiring a tag set, wherein the tag set comprises a plurality of target tags, each target tag is used for indicating one viewing interest of a target object, and the target object is an object for viewing the target video;
under the condition that the label of the first video frame is not the same as the target label, skipping playing of the first video frame comprises the following steps: skipping playback of the first video frame if the tag of the first video frame and the plurality of target tags in the set of tags are different;
under the condition that the label of the first video frame is the same as the target label, playing the first video frame according to the target playing speed comprises the following steps: and under the condition that the label of the first video frame is the same as one target label in the label set, playing the first video frame according to the target playing speed.
4. The method of claim 3, wherein obtaining the set of tags comprises:
obtaining the tag set sent by a first server, wherein the tag set is generated by the first server according to historical viewing behavior of the target object, and the historical viewing behavior is associated with the viewing interest of the target object.
5. The method of claim 3, wherein after skipping playback of the first video frame or after playing the first video frame at the target playback speed, the method further comprises:
responding to a target operation instruction, and playing a video in a target playing progress in the target video;
adding a tag of a content type of the video indicating the target playing progress to the tag set to update the tag set.
6. The method of claim 5, wherein the target playing progress is used for indicating a position of an unplayed video in the target video or a position of a played video in the target video.
7. The method of claim 1, wherein after skipping playback of the first video frame, the method further comprises:
determining the frame number of a video frame which needs to be skipped over when the target video is played at a double speed as a first frame number, wherein the first frame number is determined by the playing speed of the target video when the target video is played at the double speed;
determining the frame number of the skipped video frame of the target video as a second frame number;
determining the difference between the first frame number and the second frame number as a third frame number, wherein the third frame number is the frame number of a video frame to be skipped by the target video;
and under the condition that the third frame number is 0, acquiring a second video frame in the target video frame, wherein the second video frame is the next video frame of the first video frame in the target video.
8. The method of claim 7, wherein after determining the difference between the first frame number and the second frame number as the third frame number, the method further comprises:
under the condition that the third frame number is larger than 0, acquiring a target video frame group where the first video frame is located, wherein the target video frame group comprises a plurality of continuous video frames with the same label in the target video;
determining the frame number of the video frame which is not played in the target video frame group as a fourth frame number;
and under the condition that the fourth frame number is 0, acquiring the second video frame in the target video frame.
9. The method of claim 8, wherein after determining the number of video frames to be skipped in the target set of video frames to be the fourth number of frames, the method further comprises:
under the condition that the fourth frame number is greater than 0, acquiring the similarity between the second video frame and a third video frame, wherein the third video frame is the next video frame of the second video frame in the target video;
skipping playback of the second video frame or the third video frame if the similarity exceeds a second target threshold.
10. The method of claim 8, wherein obtaining the set of target video frames in which the first video frame is located comprises:
the method comprises the steps of obtaining a target video frame group where a first video frame sent by a second server is located, wherein the target video is transcoded by the second server to obtain a plurality of video frames, the second server divides the video frames into a plurality of video frame groups, each video frame group comprises a plurality of continuous video frames with the same label in the target video, and the plurality of video frame groups comprise the target video frame group.
11. A video playback method, comprising:
in the process that a client plays a target video at a double speed, the client acquires a label of a first video frame to be played in the target video, wherein the label of the first video frame is used for indicating the content type of the first video frame;
under the condition that the label of the first video frame is different from a preset target label, the client skips the playing of the first video frame;
and under the condition that the label of the first video frame is the same as the target label, the client plays the first video frame according to a target play speed, wherein the target play speed is the original play speed of the first video frame or a speed higher than the original play speed of the first video frame, and the difference between the target play speed and the original play speed of the first video frame is within a first target threshold value.
12. A video playback apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring a label of a first video frame to be played in a target video in the process of playing the target video at a double speed, and the label of the first video frame is used for indicating the content type of the first video frame;
the skipping unit is used for skipping the playing of the first video frame under the condition that the label of the first video frame is different from a preset target label;
the playing unit is configured to play the first video frame at a target playing speed under the condition that the tag of the first video frame is the same as the target tag, where the target playing speed is an original playing speed of the first video frame or a speed greater than the original playing speed of the first video frame, and a difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold.
13. A video playback apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for enabling a client to acquire a label of a first video frame to be played in a target video in the process that the client plays the target video at a double speed, and the label of the first video frame is used for indicating the content type of the first video frame;
a skipping unit, configured to skip the playing of the first video frame by the client when the tag of the first video frame is different from a preset target tag;
and the playing unit is used for enabling the client to play the first video frame according to a target playing speed under the condition that the label of the first video frame is the same as the target label, wherein the target playing speed is the original playing speed of the first video frame or a speed higher than the original playing speed of the first video frame, and the difference between the target playing speed and the original playing speed of the first video frame is within a first target threshold value.
14. A storage medium having stored thereon a computer program, wherein the computer program is arranged to execute the video playback method of any one of claims 1 to 11 when executed.
15. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the video playback method according to any one of claims 1 to 11 by the computer program.
CN201810111768.4A 2018-02-05 2018-02-05 Video playing method and device, storage medium and electronic device Active CN110121098B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810111768.4A CN110121098B (en) 2018-02-05 2018-02-05 Video playing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810111768.4A CN110121098B (en) 2018-02-05 2018-02-05 Video playing method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110121098A CN110121098A (en) 2019-08-13
CN110121098B true CN110121098B (en) 2021-08-17

Family

ID=67519611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810111768.4A Active CN110121098B (en) 2018-02-05 2018-02-05 Video playing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN110121098B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110674349B (en) * 2019-09-27 2023-03-14 北京字节跳动网络技术有限公司 Video POI (Point of interest) identification method and device and electronic equipment
CN111131883B (en) * 2019-12-31 2022-08-30 深圳Tcl数字技术有限公司 Video progress adjusting method, television and storage medium
CN111343483B (en) * 2020-02-18 2022-07-19 北京奇艺世纪科技有限公司 Method and device for prompting media content segment, storage medium and electronic device
CN111491203B (en) * 2020-03-16 2023-01-24 浙江大华技术股份有限公司 Video playback method, device, equipment and computer readable storage medium
CN112004117B (en) * 2020-09-02 2023-03-24 维沃移动通信有限公司 Video playing method and device
CN112565909B (en) * 2020-11-30 2023-04-11 维沃移动通信有限公司 Video playing method and device, electronic equipment and readable storage medium
CN112866805A (en) * 2021-04-23 2021-05-28 北京金和网络股份有限公司 Video acceleration processing method and device and electronic equipment
CN113766299B (en) * 2021-05-06 2024-04-19 腾讯科技(深圳)有限公司 Video data playing method, device, equipment and medium
CN113347475B (en) * 2021-05-31 2023-02-28 北京达佳互联信息技术有限公司 Method and device for adjusting playing speed of multimedia information
CN114745600B (en) * 2022-06-10 2022-09-27 中国传媒大学 Video label labeling method and device based on SEI

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517124A (en) * 2012-06-29 2014-01-15 鸿富锦精密工业(深圳)有限公司 Video playing method and electronic device using same
CN104025465A (en) * 2011-09-13 2014-09-03 索尼公司 Logging events in media files including frame matching
WO2015168092A1 (en) * 2014-04-28 2015-11-05 Arris Enterprises, Inc. User interface with video frame tiles
CN105359544A (en) * 2013-07-12 2016-02-24 苹果公司 Trick play in digital video streaming
CN106792154A (en) * 2016-12-02 2017-05-31 广东赛特斯信息科技有限公司 The frame-skipping synchronization system and its control method of video player
CN106878767A (en) * 2017-01-05 2017-06-20 腾讯科技(深圳)有限公司 Video broadcasting method and device
CN106911961A (en) * 2017-02-22 2017-06-30 北京小米移动软件有限公司 Multimedia data playing method and device
CN107454475A (en) * 2017-07-28 2017-12-08 珠海市魅族科技有限公司 Control method and device, computer installation and the readable storage medium storing program for executing of video playback
CN107592568A (en) * 2017-09-08 2018-01-16 维沃移动通信有限公司 A kind of video broadcasting method and terminal device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8279946B2 (en) * 2007-11-23 2012-10-02 Research In Motion Limited System and method for providing a variable frame rate and adaptive frame skipping on a mobile device
US8407747B1 (en) * 2012-03-13 2013-03-26 Google Inc. Adaptive trick play streaming
CN103686411A (en) * 2013-12-11 2014-03-26 深圳Tcl新技术有限公司 Method for playing video and multimedia device
CN104602117B (en) * 2015-01-31 2018-03-16 华为技术有限公司 A kind of speed plays the method and device of video
CN106454417B (en) * 2016-11-11 2019-08-09 青岛海信宽带多媒体技术有限公司 Streaming Media speed playback method and device
CN107172475B (en) * 2017-04-21 2019-09-13 腾讯科技(深圳)有限公司 The playing method and device of video

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104025465A (en) * 2011-09-13 2014-09-03 索尼公司 Logging events in media files including frame matching
CN103517124A (en) * 2012-06-29 2014-01-15 鸿富锦精密工业(深圳)有限公司 Video playing method and electronic device using same
CN105359544A (en) * 2013-07-12 2016-02-24 苹果公司 Trick play in digital video streaming
WO2015168092A1 (en) * 2014-04-28 2015-11-05 Arris Enterprises, Inc. User interface with video frame tiles
CN106792154A (en) * 2016-12-02 2017-05-31 广东赛特斯信息科技有限公司 The frame-skipping synchronization system and its control method of video player
CN106878767A (en) * 2017-01-05 2017-06-20 腾讯科技(深圳)有限公司 Video broadcasting method and device
CN106911961A (en) * 2017-02-22 2017-06-30 北京小米移动软件有限公司 Multimedia data playing method and device
CN107454475A (en) * 2017-07-28 2017-12-08 珠海市魅族科技有限公司 Control method and device, computer installation and the readable storage medium storing program for executing of video playback
CN107592568A (en) * 2017-09-08 2018-01-16 维沃移动通信有限公司 A kind of video broadcasting method and terminal device

Also Published As

Publication number Publication date
CN110121098A (en) 2019-08-13

Similar Documents

Publication Publication Date Title
CN110121098B (en) Video playing method and device, storage medium and electronic device
CN109145784B (en) Method and apparatus for processing video
US20200349385A1 (en) Multimedia resource matching method and apparatus, storage medium, and electronic apparatus
CN109844736B (en) Summarizing video content
CN106326391B (en) Multimedia resource recommendation method and device
US10115022B2 (en) Thumbnail management
CN107404656B (en) Live video recommended method, device and server
CN110309795B (en) Video detection method, device, electronic equipment and storage medium
CN104244101A (en) Method and device for commenting multimedia content
US9930412B2 (en) Network set-top box and its operating method
CN112291634B (en) Video processing method and device
CN110248195B (en) Method and apparatus for outputting information
CN111046230A (en) Content recommendation method and device, electronic equipment and storable medium
CN112929728A (en) Video rendering method, device and system, electronic equipment and storage medium
CN117014649A (en) Video processing method and device and electronic equipment
CN114827735A (en) Video review method, device, equipment and storage medium
CN110677692B (en) Video decoding method and device and video encoding method and device
CN113420809A (en) Video quality evaluation method and device and electronic equipment
CN113553505A (en) Video recommendation method and device and computing equipment
EP3607723B1 (en) Systems and methods for improving accuracy of device maps using media viewing data
US20160105731A1 (en) Systems and methods for identifying and acquiring information regarding remotely displayed video content
CN112437332A (en) Method and device for playing target multimedia information
CN114095763B (en) Video list pushing method and play quality assessment method
CN111953959A (en) VR video quality evaluation method and device
US20240137619A1 (en) Bullet-screen comment display

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
GR01 Patent grant
GR01 Patent grant