CN108012164B - Video playing method and device and electronic equipment - Google Patents

Video playing method and device and electronic equipment Download PDF

Info

Publication number
CN108012164B
CN108012164B CN201711271019.XA CN201711271019A CN108012164B CN 108012164 B CN108012164 B CN 108012164B CN 201711271019 A CN201711271019 A CN 201711271019A CN 108012164 B CN108012164 B CN 108012164B
Authority
CN
China
Prior art keywords
video
played
point
frame
operation information
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
CN201711271019.XA
Other languages
Chinese (zh)
Other versions
CN108012164A (en
Inventor
李恒
兰根顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201711271019.XA priority Critical patent/CN108012164B/en
Publication of CN108012164A publication Critical patent/CN108012164A/en
Application granted granted Critical
Publication of CN108012164B publication Critical patent/CN108012164B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • 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 or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a video playing method, a video playing device and electronic equipment, wherein the method comprises the following steps: when frame skipping playing information of a video to be played after frame skipping playing preprocessing of a user is detected, a currently played video frame is determined, in the video to be played after preprocessing, a boundary point which corresponds to the frame skipping playing information and is closest to the currently played video frame is determined as a frame skipping playing boundary point, and the video to be played after preprocessing is played from a next video frame corresponding to the frame skipping playing boundary point. By the video playing method provided by the embodiment of the invention, after the frame skipping playing information is detected, video frames which are not interesting to a user can be quickly skipped, and the video to be played after the preprocessing is played from the next video frame corresponding to the frame skipping playing demarcation point, so that the time for searching interesting video frames by the user can be reduced, the time overhead of the user is saved, and the user experience is improved.

Description

Video playing method and device and electronic equipment
Technical Field
The present invention relates to the field of video image processing technologies, and in particular, to a video playing method and apparatus, and an electronic device.
Background
With the development of internet technology, the development of internet videos is also driven, and users can view any videos wanted through the internet. However, with the development of internet videos, the requirement of users on videos is higher and higher, and users may choose to skip frames for playing videos or videos frames that are not interesting when watching videos.
At present, when a user skips frames for playing, the commonly used skipping frame playing mode is as follows: skipping uninteresting shots or video frames by clicking a mouse, directly skipping to the shots or video frames selected by the user to continue playing, or moving a plurality of video frames forward by fast forward to continue playing.
However, the inventor finds that the prior art has at least the following problems in the process of implementing the invention:
the user cannot know the position of the target video frame to be watched in the video accurately, and when the frame skipping is played, the user may skip to the first frames or the last frames of the target video frame and then may skip to the target video frame through a plurality of operations, such as frame skipping, fast forward, fast backward, and the like.
Disclosure of Invention
The embodiment of the invention aims to provide a video playing method, a video playing device and electronic equipment, so as to improve the video skipping efficiency and save the time overhead of a user. The specific technical scheme is as follows:
in one aspect of the present invention, there is provided a video playing method, including:
when frame skipping playing information of a video to be played after frame skipping playing preprocessing of a user is detected, determining a video frame to be played currently, wherein the video to be played after preprocessing is the video to be played after a boundary point is added or the video to be played after the boundary point is adjusted;
in the preprocessed video to be played, determining a boundary point which corresponds to the frame skipping playing information and is closest to the currently played video frame as a frame skipping playing boundary point;
and playing the preprocessed video to be played from the next video frame corresponding to the frame skipping playing demarcation point.
Optionally, the process of preprocessing the video to be played includes:
extracting a feature vector of each video frame in a video to be played;
calculating the similarity of the feature vectors of any two adjacent video frames aiming at the feature vectors of the two adjacent video frames;
judging whether the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold value or not;
when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, determining the middle position of the two adjacent video frames as a dividing point adding position;
and adding the demarcation point to the video to be played according to the addition position of the demarcation point to obtain the video to be played after the demarcation point is added.
Optionally, extracting a feature vector of each video frame in the video to be played includes:
acquiring a color value of each pixel point of a video frame aiming at any video frame in a video to be played;
calculating the average color value of all pixel points of the video frame according to the color value of each pixel point;
comparing the color value of each pixel point of the video frame with the average color value respectively;
calculating the characteristic value of a pixel point with a color value larger than the average color value in the video frame as 1, and calculating the characteristic value of a pixel point with a color value smaller than the average color value as 0;
and combining the characteristic values of all pixel points of the video frame to obtain the characteristic vector of each video frame in the video to be played.
Optionally, when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, determining the middle position of the two adjacent video frames as a boundary point adding position, including:
when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, two time labels corresponding to the two adjacent video frames are obtained, and the middle position of the two time labels corresponding to the two adjacent video frames is determined as a demarcation point adding position.
Optionally, after adding a demarcation point to a video to be played according to the addition position of the demarcation point to obtain the video to be played after the addition of the demarcation point, the video playing method according to the embodiment of the present invention further includes:
establishing a demarcation point corresponding to the demarcation point and an index of a video frame;
in the process of playing the video to be played after the addition of the demarcation point, when the cursor is detected to be at the demarcation point, displaying at least one video frame before the demarcation point and/or a thumbnail of at least one video frame after the demarcation point according to the indexes of the demarcation point and the video frames.
Optionally, after adding a demarcation point to a video to be played according to the addition position of the demarcation point to obtain the video to be played after the addition of the demarcation point, the video playing method according to the embodiment of the present invention further includes:
recording first operation information and second operation information when different users play videos to be played after adding demarcation points, wherein the first operation information comprises the time for starting frame skipping or video frames, and the second operation information comprises the time for finishing frame skipping or video frames;
judging whether the first operation information after the second operation information meets a preset condition or not;
when first operation information after second operation information meets a preset condition, judging whether the number of the first operation information meeting the preset condition is larger than the number of the first preset information or not and whether the number of the second operation information is larger than the number of the second preset information or not;
if the difference is greater than the preset value, respectively adding a first adjustment boundary point for the video frame corresponding to the first operation information meeting the preset condition, and adding a second adjustment boundary point for the video frame corresponding to the second operation information;
and adjusting the demarcation point of the video to be played after the demarcation point is added according to the first adjustment demarcation point and the second adjustment demarcation point to obtain the video to be played after the demarcation point is adjusted.
Optionally, the preset condition is that a video frame number between the first operation information and the second operation information after the second operation information is greater than or equal to a preset video frame number; or
The time length between the first operation information and the second operation information after the second operation information is greater than or equal to the preset time length.
Optionally, adjusting the demarcation point of the video to be played after the addition of the demarcation point includes:
and adding, deleting or modifying the demarcation point of the video to be played after the demarcation point is added.
In another aspect of the present invention, there is also provided a video playing apparatus, including:
the first video frame determining module is used for determining a currently played video frame after frame skipping playing information of a preprocessed video to be played is detected, wherein the preprocessed video to be played is the video to be played after a boundary point is added or the video to be played after the boundary point is adjusted;
the frame skipping playing demarcation point determining module is used for determining a demarcation point which corresponds to frame skipping playing information and is closest to a currently played video frame as a frame skipping playing demarcation point in the preprocessed video to be played;
and the playing module is used for playing the preprocessed video to be played from the next video frame corresponding to the frame skipping playing demarcation point.
Optionally, a video playing apparatus according to an embodiment of the present invention further includes:
the characteristic vector extraction module is used for extracting the characteristic vector of each video frame in the video to be played;
the similarity calculation module is used for calculating the similarity of the feature vectors of any two adjacent video frames aiming at the feature vectors of the two adjacent video frames;
the judging module is used for judging whether the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold value or not;
the boundary point adding position determining module is used for determining the middle position of two adjacent video frames as a boundary point adding position when the similarity of the feature vectors of the two adjacent video frames is smaller than a preset similarity threshold;
and the demarcation point adding module is used for adding demarcation points to the video to be played according to the addition positions of the demarcation points to obtain the video to be played after the demarcation points are added.
Optionally, the feature vector extracting module includes:
the color value acquisition submodule is used for acquiring the color value of each pixel point of a video frame aiming at any video frame in a video to be played;
the average color value calculation submodule is used for calculating the average color value of all the pixel points of the video frame according to the color value of each pixel point;
the comparison submodule is used for comparing the color value of each pixel point of the video frame with the average color value;
the characteristic value endowing submodule is used for calculating the characteristic value of the pixel point with the color value larger than the average color value in the video frame as 1 and calculating the characteristic value of the pixel point with the color value smaller than the average color value as 0;
and the characteristic value combining submodule is used for combining the characteristic values of all the pixel points of the video frame to obtain the characteristic vector of each video frame in the video to be played.
Optionally, the dividing point adding position determining module is specifically configured to:
when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, two time labels corresponding to the two adjacent video frames are obtained, and the middle position of the two time labels corresponding to the two adjacent video frames is determined as a demarcation point adding position.
Optionally, a video playing apparatus according to an embodiment of the present invention further includes:
the index establishing module is used for establishing indexes of the demarcation point corresponding to the demarcation point and the video frame;
and the thumbnail display module is used for displaying at least one video frame before the dividing point and/or a thumbnail of at least one video frame after the dividing point according to the indexes of the dividing point and the video frames when the cursor is detected to be positioned at the dividing point in the process of playing the video to be played after the dividing point is added.
Optionally, a video playing apparatus according to an embodiment of the present invention further includes:
the recording submodule is used for recording first operation information and second operation information when different users play videos to be played after the addition of the demarcation points, wherein the first operation information comprises the time for starting frame skipping or video frames, and the second operation information comprises the time for finishing frame skipping or video frames;
the first judgment submodule is used for judging whether the first operation information after the second operation information meets the preset condition or not;
the second judgment sub-module is used for judging whether the number of the first operation information meeting the preset condition is larger than the number of the first preset information and whether the number of the second operation information is larger than the number of the second preset information when the first operation information after the second operation information meets the preset condition;
the adjustment dividing point adding submodule is used for respectively adding a first adjustment dividing point for the video frame corresponding to the first operation information meeting the preset condition and adding a second adjustment dividing point for the video frame corresponding to the second operation information if the adjustment dividing points are larger than the preset condition;
and the demarcation point adjusting submodule is used for adjusting the demarcation point of the video to be played after the demarcation point is added according to the first adjusting demarcation point and the second adjusting demarcation point to obtain the video to be played after the demarcation point is adjusted.
Optionally, the preset condition is that a video frame number between the first operation information and the second operation information after the second operation information is greater than or equal to a preset video frame number; or
The time length between the first operation information and the second operation information after the second operation information is greater than or equal to the preset time length.
Optionally, the demarcation point adjusting submodule is specifically configured to:
and adding, deleting or modifying the demarcation point of the video to be played after the demarcation point is added according to the first adjustment demarcation point and the second adjustment demarcation point to obtain the video to be played after the demarcation point is adjusted.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the video playing methods when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute a video playback method as described in any one of the above.
In another aspect of the present invention, there is also provided a computer program product including instructions, which when run on a computer, causes the computer to execute any one of the video playing methods described above.
According to the video playing method, the video playing device and the electronic equipment, provided by the embodiment of the invention, after the frame skipping playing information is detected, the video frame which is not interesting to the user can be quickly skipped, and the video to be played after the preprocessing is played from the next video frame corresponding to the frame skipping playing demarcation point, so that the time for searching the interesting video frame by the user can be reduced, the time expense of the user is saved, and the user experience is improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a first implementation manner of a video playing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a second implementation manner of a video playing method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a video to be played after being preprocessed by a video playing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a first implementation of a video playback device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a second implementation manner of a video playback device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device to which an embodiment of the invention is applied.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to solve the problems in the prior art, embodiments of the present invention provide a video playing method, an apparatus, and an electronic device, so as to implement that after frame skipping play information is detected, a preprocessed video to be played can be played from a next video frame corresponding to a frame skipping play demarcation point, thereby reducing time for searching for an interesting video frame, saving time overhead of a user, and improving user experience.
First, the video playing method according to the embodiment of the present invention may be applied to various electronic devices supporting video playing, such as a personal computer, a notebook computer, a palm computer, a smart phone, and the like. In some examples, when the video playing method according to the embodiment of the present invention is applied to the electronic device to play a video to be played, the video to be played may be a preprocessed video to be played.
First, a video playing method according to an embodiment of the present invention is described below, as shown in fig. 1, which is a flowchart of a first implementation manner of a video playing method according to an embodiment of the present invention, where the method may include:
s101, when frame skipping playing information of the video to be played after frame skipping playing preprocessing of a user is detected, determining a currently played video frame.
The preprocessed video to be played can be the video to be played after adding the demarcation point or the video to be played after adjusting the demarcation point. The frame skipping playing comprises the following steps: fast forward play, fast backward play, click skip frame play, slide skip frame play, etc. The frame skipping playing information is used for describing a frame skipping playing action when a user skips the frame skipping playing.
In some examples, the video to be played after the addition of the demarcation point may be a video to be played after the addition of the demarcation point to the video to be played. There may be at least one way to add a cut point to the video to be played, for example, by manually adding a cut point to the video to be played in advance.
In some examples, the video to be played after the cut point is adjusted is a video obtained after the cut point is adjusted for the video to be played after the cut point is added. The video playing method provided by the embodiment of the invention can also play the video to be played after the demarcation point is adjusted.
Specifically, after playing the video to be played after adding the demarcation point for multiple times, the user may count the motion information of the video to be played after the user plays the video to be played after adding the demarcation point, and then may adjust the demarcation point of the video to be played after adding the demarcation point according to the motion information obtained by the counting, so as to obtain the video to be played after adjusting the demarcation point.
In some examples, the manner of adjusting the cut point for the video to be played after adding the cut point may also be at least one, for example: and manually adjusting the demarcation point of the video to be played after the demarcation point is added in advance.
In some examples, when the video playing method provided by the embodiment of the present invention is used to play a preprocessed video to be played, an electronic device using the video playing method according to the embodiment of the present invention may detect whether a frame skipping playing action exists when a user plays each frame of the video to be played.
Specifically, when the user performs the frame skipping play action, the electronic device may receive a signal corresponding to the frame skipping play action input by the user, so as to generate corresponding frame skipping play information, and therefore, the electronic device may detect the frame skipping play information. The frame skipping play information corresponds to a frame skipping play action of the user.
After the electronic device detects frame skipping playing information of frame skipping playing of the user, a currently played video frame can be determined from the frame skipping playing information.
In some examples, after the electronic device detects the frame skipping play information, the time for generating the frame skipping play information may be determined, so that the play time of the video to be played corresponding to the time for generating the frame skipping play information may be found, and thus it may be determined that the video frame corresponding to the play time is the currently played video frame.
In some examples, after the electronic device detects the frame skipping play information, it may determine a video frame corresponding to the frame skipping play information, and determine the video frame corresponding to the frame skipping play information as a currently played video frame.
In some examples, when the frame skipping play action is a click frame skipping play, the video frame at the click may be determined as the current video frame, and when the frame skipping play action is a slide frame skipping play, the corresponding video frame at the end of the slide action may be determined as the current video frame.
S102, in the preprocessed video to be played, determining a boundary point which corresponds to the frame skipping playing information and is closest to the currently played video frame as a frame skipping playing boundary point.
The preprocessed video to be played is added with a demarcation point in advance, and the similarity between the video frame before the demarcation point and the video frame after the demarcation point is lower.
In some examples, when the frame skip play cut point is determined, the determined frame skip play cut point is associated with frame skip play information.
Specifically, when the frame skipping play information describes a fast forward play action, the frame skipping play boundary point determined through the above steps may be a boundary point that is closest to and subsequent to the currently played video frame.
When the frame skipping play information describes a fast-rewinding play action, the frame skipping play boundary point determined through the above steps may be a boundary point which is closest to and before the currently played video frame.
When the frame skipping playing information describes a frame skipping playing action of clicking, the position relation between the video frame corresponding to the clicking position and the currently played video frame can be determined, and then the frame skipping playing boundary point can be determined through the steps.
Specifically, when the video frame corresponding to the clicked point is located before the currently played video frame, the boundary point which is closest to and before the currently played video frame may be determined as the frame skip playing boundary point. When the video frame corresponding to the clicked point is located behind the currently played video frame, a boundary point which is closest to and behind the currently played video frame may be determined as a frame skip playing boundary point.
In some examples, when a slide skip frame play action is described in the skip frame play information, it may be first determined whether the slide action is a forward slide or a backward slide. When the sliding motion is forward sliding, a boundary point which is closest to and before the currently played video frame may be determined as a frame skip playing boundary point. When the sliding motion is a backward sliding, a boundary point which is closest to and behind the currently played video frame may be determined as a frame skip playing boundary point.
And S103, starting from the next video frame corresponding to the frame skipping playing demarcation point, playing the preprocessed video to be played.
After the frame skipping playing demarcation point is determined, in this step, the electronic device may skip at least one video frame between the current playing frame and the frame skipping playing demarcation point, and start playing the preprocessed video frame to be played from the next video frame corresponding to the frame skipping playing demarcation point.
By the video playing method provided by the embodiment of the invention, after the frame skipping playing information is detected, video frames which are not interesting to a user can be quickly skipped, and the video to be played after the preprocessing is played from the next video frame corresponding to the frame skipping playing demarcation point, so that the time for searching interesting video frames by the user can be reduced, the time overhead of the user is saved, and the user experience is improved.
In the above embodiment, the pre-processed video to be played may be the video to be played after the demarcation point is manually added in advance. When there are few videos to be played, it is feasible to use a method of manually adding a boundary point, but when there are many videos to be played, the method of manually adding a boundary point increases not only the time overhead but also the workload of personnel, and the accuracy of manually adding a boundary point cannot be guaranteed, so an embodiment of the present invention further provides a video playing method to implement the preprocessing of the videos to be played, as shown in fig. 2, which is a flowchart of a second implementation manner of the video playing method of the embodiment of the present invention, and the method may include:
s201, extracting the characteristic vector of each video frame in the video to be played.
Specifically, in some examples, an overall histogram of each video frame in the video frames to be played may be extracted, for each video frame, a corresponding global feature may be obtained according to the overall histogram corresponding to each video frame, then, the video frame may be divided into a plurality of image blocks, a local histogram of each image block may be extracted again to obtain a plurality of local histograms corresponding to the video frame, and then, a feature vector of the video frame may be obtained by using the global feature of the video frame and the plurality of local histograms, so that a feature vector of each video frame in the video to be played may be obtained.
In some examples, a video playing method according to an embodiment of the present invention further provides a method for extracting feature vectors of video frames in a video to be played, where the method may include:
and step A, aiming at any video frame in the video to be played, acquiring the color value of each pixel point of the video frame.
The color value may be a color value corresponding to an RGB (Red, Green, Blue) color mode, a color value corresponding to an HSB (Hues, Saturation, Brightness) color mode, or a color value corresponding to a CMYK (Cyan, Magenta, Yellow, Key Plate (black) color mode.
Specifically, each pixel of each video frame has a corresponding color value. Therefore, in the embodiment of the present invention, the color value of each pixel point corresponding to each video frame may be obtained first.
For example, if there is a video frame a in the video to be played, and the video frame a has 1024 × 796 pixels, the color value of each pixel in the 1024 × 796 pixels can be obtained respectively.
In some examples, the color value of each pixel point in the corresponding color mode may be used as the color value corresponding to the pixel point, and the color value of each pixel point in the corresponding color mode may also be appropriately calculated to obtain the total numerical value of each pixel point, and then the total numerical value is used as the color value corresponding to each pixel point.
For example, by the following formula
Figure BDA0001495585220000111
Or
Figure BDA0001495585220000112
Calculating the total RBG value of each pixeli,jThen, RBG can be calculated as the total valuei,jAs the color value of the pixel.
And step B, calculating the average color value of all the pixel points of the video frame through the color value of each pixel point.
Specifically, after the color value of each pixel point of the video frame is obtained, an average value of the color values of all the pixel points of the video frame may be calculated.
In some examples, when the color value is a color value corresponding to an RGB color mode, an average value of R values, an average value of G values, and an average value of B values in all pixel points may be calculated respectively, and then combined to obtain an average color value of all pixel points. For example, assume that the color values of all pixels of video frame A are (r)1,1,g1,1,b1,1)、…(r1,j,g1,j,b1,j)、…(ri,j,gi,j,bi,j)、…(r1024,796,g1024,796,b1024,796),
In calculating the average color value, the following formula may be followed:
Figure BDA0001495585220000113
Figure BDA0001495585220000114
Figure BDA0001495585220000115
respectively calculating the average value R of R valuesavgAverage value G of G valuesavgAnd average B of B valuesavgThen combining the R value, G value and B value to obtain the average color value of (R)avg,gavg,bavg). Wherein i represents the column of the pixel point in the video frame, i is more than or equal to 1 and less than or equal to 1024, j represents the row of the pixel point in the video frame, i is more than or equal to 1 and less than or equal to 796, (r)i*j,gi*j,bi*j) And the RGB value of the pixel point of the jth row and the ith column is represented.
In some examples, the following formula may be used:
Figure BDA0001495585220000121
calculating the average color value RGBavg
And step C, comparing the color value of each pixel point of the video frame with the average color value.
Specifically, after the color value of each pixel point is obtained and the average color value of the video frame is calculated, the color value of each pixel point of the video frame may be compared with the average color value.
And D, calculating the characteristic value of the pixel point with the color value larger than the average color value in the video frame as 1, and calculating the characteristic value of the pixel point with the color value smaller than the average color value as 0.
In some examples, when there is a pixel having a color value greater than the average color value, the characteristic value of the pixel having the color value greater than the average color value may be counted as 1; when there is a pixel having a color value smaller than the average color value, the characteristic value of the pixel having the color value smaller than the average color value may be counted as 0. Therefore, the characteristic values corresponding to all the pixel points of the video frame can be obtained.
And E, combining the characteristic values of all the pixel points of the video frame to obtain the characteristic vector of each video frame in the video to be played.
Specifically, after the feature values of all the pixels of the video frame are obtained, the feature values of all the pixels may be combined according to the corresponding relationship between the pixel points and the feature values of the video frame, so as to obtain the feature vector of the video frame. And combining the characteristic values of all pixel points of each video frame according to the steps to obtain the characteristic vectors of all video frames in the video to be played.
The feature vector of the video frame is calculated by the video playing method provided by the embodiment of the invention, so that the complexity of calculating the feature vector of the video frame can be reduced, the calculation speed is increased, and the time overhead is reduced.
S202, calculating the similarity of the feature vectors of any two adjacent video frames according to the feature vectors of the two adjacent video frames.
In some examples, after the feature vector of each video frame is extracted, in order to obtain a boundary point of the video to be played, a similarity of the feature vectors of any two adjacent video frames in the video to be played may be calculated for the feature vectors of the two adjacent video frames.
Specifically, when the similarity of the feature vectors of two adjacent video frames is greater, it can be shown that the two adjacent video frames are more similar, and the association degree of the two adjacent video frames is higher; when the similarity of the feature vectors of two adjacent video frames is smaller, it can be shown that the two adjacent video frames are more dissimilar, the association degree of the two adjacent video frames is lower, and for two adjacent video frames with the similarity of the feature vectors smaller than a specific threshold, a demarcation point can be added to the two adjacent video frames.
In some examples, the euclidean distance between the feature vectors of the two adjacent video frames may be taken as the similarity of the feature vectors of the two adjacent video frames.
In some examples, the cosine distance between the feature vectors of the two adjacent video frames may also be used as the similarity of the feature vectors of the two adjacent video frames.
S203, judging whether the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold value.
The preset similarity threshold may be a threshold set empirically or a threshold obtained by analyzing historical data. In some examples, the preset similarity threshold may also be adjusted.
In some examples, after calculating the similarity between the feature vectors of any two adjacent video frames, in order to be able to add a cut point at a suitable position of the video to be played, here, the similarity between the feature vectors of the two adjacent video frames may be compared with a preset similarity threshold to determine whether to add a cut point between the two adjacent video frames.
And S204, when the similarity of the feature vectors of the two adjacent video frames is smaller than a preset similarity threshold, determining the middle position of the two adjacent video frames as a demarcation point adding position.
Specifically, in the judgment process, when two adjacent video frames with the similarity of the feature vector smaller than the preset similarity threshold exist, the electronic device applying the video playing method of the embodiment of the present invention may determine the middle position of the two adjacent video frames as the boundary point adding position.
In some examples, the cut point addition location may be an identification that facilitates distinguishing the two adjacent video frames, such as: and (4) marking the position.
Through the step, all the adding positions of the demarcation points in the video to be played can be obtained.
And S205, adding a demarcation point to the video to be played according to the addition position of the demarcation point, and obtaining the video to be played after the demarcation point is added.
Specifically, after obtaining all the adding positions of the demarcation points in the video to be played, the electronic device may add the demarcation points to the video to be played according to the adding positions of the demarcation points, so as to obtain the video to be played after adding the demarcation points.
For example, through the above steps, if 5 adding positions of the boundary points of the video to be played are obtained, then according to the 5 adding positions of the boundary points, 5 boundary points are respectively added at the 5 adding positions of the boundary points.
After adding the demarcation point to the video to be played through the steps, the electronic device applying the video playing method of the embodiment of the invention can directly determine the demarcation point corresponding to the frame skipping playing information when detecting that the user skips the frame skipping playing information of the video to be played, and then plays the video from the next video frame of the demarcation point, thereby reducing the time for searching the video frame of interest by the user, saving the time expense of the user and improving the user experience.
Specifically, under the condition that the frame rate is fixed, the video to be played may have a fixed playing duration, and therefore, each video frame of the video to be played may have a corresponding time tag. To this end, an embodiment of the present invention further provides a possible implementation manner, and specifically, when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, determining a middle position of the two adjacent video frames as a dividing point adding position may include:
when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, two time labels corresponding to the two adjacent video frames are obtained, and the middle position of the two time labels corresponding to the two adjacent video frames is determined as a demarcation point adding position.
Under the condition that the frame rate is fixed, the video to be played can have a fixed playing duration, and each video frame in the video to be played can have a corresponding time tag.
Specifically, when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, the time label corresponding to each of the two adjacent video frames may be obtained, so as to obtain two time labels, and then, the middle position of the two time labels may be determined as the addition position of the demarcation point.
When a user performs frame skipping playing through the electronic device using the video playing method according to the embodiment of the present invention, in order to enable the user to preview a video frame near a demarcation point, the video playing method according to the embodiment of the present invention further provides a possible implementation manner:
specifically, after adding a demarcation point to a video to be played according to the addition position of the demarcation point to obtain the video to be played after the addition of the demarcation point, the video playing method according to the embodiment of the present invention may further include:
and step A, establishing an index of a demarcation point corresponding to the demarcation point and a video frame.
Specifically, after adding a demarcation point to a video to be played, each demarcation point and at least one video frame near the demarcation point can be obtained, and then, for each demarcation point, an index relationship is established between the at least one video frame near the demarcation point and the demarcation point.
In some examples, when the index is established, when there are a plurality of selected video frames, the plurality of video frames may be selected continuously or may be selected intermittently, and the index relationship with the dividing point is established.
And step B, in the process of playing the video to be played after the addition of the demarcation point, when the cursor is detected to be positioned at the demarcation point, displaying at least one video frame in front of the demarcation point and/or a thumbnail of at least one video frame behind the demarcation point according to the indexes of the demarcation point and the video frames.
In some examples, after the dividing point and the index of the video frame are established, in order to enable a user to know the video frame near the dividing point in time when the user performs frame skipping playing, a possible implementation manner is further provided in an embodiment of the present invention.
In some examples, the at least one video frame may be at least one video frame before the cut point or one video frame after the cut point.
In some examples, when the acquired video frames are multiple in terms of the index of the dividing point and the video frame, thumbnails of the multiple video frames may be dynamically displayed.
By the video playing method provided by the embodiment of the invention, a user can timely watch the content of the video frame near the demarcation point to decide whether to continue frame skipping playing in advance, so that the time overhead of watching the video to be played by the user is saved.
In a possible implementation manner of the embodiment of the present invention, after adding a demarcation point to a video to be played according to a position of the demarcation point to obtain the video to be played after the addition of the demarcation point, in order to make the demarcation point more reasonable, meet the use habits of most users, and improve the viewing experience of the users, the video playing method of the embodiment of the present invention may further adjust the demarcation point of the video to be played.
Specifically, after adding a demarcation point to a video to be played according to the addition position of the demarcation point to obtain the video to be played after the addition of the demarcation point, the video playing method of the embodiment of the present invention may further include:
and step A, recording first operation information and second operation information when different users play the video to be played after the demarcation point is added.
The first operation information comprises the time for starting frame skipping or a video frame, and the second operation information comprises the time for finishing frame skipping or the video frame.
In some examples, the user may skip the frame of the video to be played multiple times, and therefore, there may be multiple start frame skipping times or video frames, or there may be multiple end frame skipping times or video frames, and therefore, there may be multiple first operation information and multiple second operation information.
Specifically, the electronic device may record frame skipping actions of different users when playing the video to be played, and then may classify the frame skipping actions into a start frame skipping action and an end frame skipping action. For the frame start skipping action, there may be a frame start skipping time or a video frame corresponding to the frame start skipping, and for the frame end skipping action, there may be a frame end skipping time or a video frame corresponding to the frame end skipping. Therefore, the electronic device described above may record the time to start frame skipping or the video frame as the first operation information, and record the time to end frame skipping or the video frame as the second operation information.
Step B, judging whether the first operation information after the second operation information meets a preset condition or not;
wherein the preset condition may be:
the preset condition is that the number of video frames between the first operation information and the second operation information after the second operation information is greater than or equal to a preset number of video frames; or
The time length between the first operation information and the second operation information after the second operation information is greater than or equal to the preset time length.
The preset video frame number and the preset duration may be set empirically or obtained through analysis of historical data.
In order to reasonably adjust the boundary point of the video frame to be played when the boundary point is adjusted, in this step, the first operation information and the second operation information of the user can be judged, so as to avoid that the boundary point in the video frame to be played cannot be correctly adjusted by the adjusted boundary point obtained in the subsequent step.
Specifically, it may be determined whether first operation information after the second operation information meets a preset condition, and when the first operation information after the second operation information meets the preset condition, it may be stated that a video frame between a video frame corresponding to the second operation information and a video frame corresponding to the first operation information after the second operation information has a greater association, and is a video frame that is interested by the user. When the first operation information after the second operation information does not satisfy the preset condition, it may be stated that the video frame corresponding to the first operation information after the second operation information may be a video frame that is not interested by the user, and the user may skip the video frame by skipping frame playing.
And step C, when the first operation information after the second operation information meets the preset condition, judging whether the number of the first operation information meeting the preset condition is larger than the number of the first preset information or not and whether the number of the second operation information is larger than the number of the second preset information or not.
Specifically, in order to enable the video to be played after the adjustment of the cut point to meet the watching habits of most users, in the video playing method according to the embodiment of the present invention, when the first operation information after the second operation information meets the preset condition, it may be determined whether the number of the first operation information meeting the preset condition is greater than the number of the first preset information, and whether the number of the second operation information is greater than the number of the second preset information.
The first preset number of pieces of information and the second preset number of pieces of information may be numbers of pieces of information set according to experience. The number of the first operation information may be obtained by counting after recording first operation information of different users playing the video to be played after adding the demarcation point, and the number of the second operation information may be obtained by counting after recording second operation information of different users playing the video to be played after adding the demarcation point.
And D, if the difference is larger than the preset value, respectively adding a first adjustment demarcation point for the video frame corresponding to the first operation information meeting the preset condition, and adding a second adjustment demarcation point for the video frame corresponding to the second operation information.
Specifically, after the determination through the above steps, when the first operation information and the second operation information are greater than the predetermined threshold, a first adjustment cut point may be added to the video frame corresponding to the first operation information that meets the predetermined condition, and a second adjustment cut point may be added to the video frame corresponding to the second operation information.
In some examples, when adding the first adjustment cut point, the first adjustment cut point may be added after the video frame corresponding to the first operation information satisfying the preset condition, or may be added to the video frame corresponding to the first operation information satisfying the preset condition; when the second adjustment cut point is added, the second adjustment cut point may be added after the video frame corresponding to the second operation information, or the second adjustment cut point may be added to the video frame corresponding to the second operation information.
And E, adjusting the demarcation point of the video to be played after the demarcation point is added according to the first adjustment demarcation point and the second adjustment demarcation point to obtain the video to be played after the demarcation point is adjusted.
Specifically, after the first adjustment demarcation point and the second adjustment demarcation point are respectively added in the step D, the demarcation point of the video to be played after the demarcation point is added can be adjusted according to the first adjustment demarcation point and the second adjustment demarcation point, so that the video to be played after the demarcation point is adjusted can meet the watching requirements of most users, the time cost for watching the video to be played after the demarcation point is adjusted by the users is reduced, and the user experience is improved.
In some examples, when the demarcation point of the video to be played after the addition of the demarcation point is adjusted, the demarcation point of the video to be played after the addition of the demarcation point may be increased, the demarcation point of the video to be played after the addition of the demarcation point may be deleted, and the demarcation point of the video to be played after the addition of the demarcation point may be modified.
According to the video playing method provided by the embodiment of the invention, the demarcation point of the video to be played after the addition of the demarcation point is adjusted, so that the setting of the demarcation point is more reasonable, the video to be played after the adjustment of the demarcation point can better meet the watching requirements of most users, and the watching experience of the users can be improved.
Specifically, in order to more clearly describe the video playing method according to the embodiment of the present invention, a description is given below with reference to fig. 3 for a video playing method according to the embodiment of the present invention, and as shown in fig. 3, the video playing method according to the embodiment of the present invention is a schematic diagram of playing a video to be played after being preprocessed by applying the video playing method according to the embodiment of the present invention;
when the preprocessed video to be played is the video to which the demarcation point is added, the first demarcation point 311, the second demarcation point 312, and the third demarcation point 313 shown in fig. 3 may be the demarcation points of the video to be played to which the demarcation point is added.
When the pre-processed video to be played is the video after the adjustment of the demarcation point, the pre-processed video to be played may further include a fourth demarcation point 314 in addition to the first demarcation point 311, the second demarcation point 312 and the third demarcation point 313, and the fourth demarcation point 314 may be the demarcation point after the adjustment of the demarcation point for the video to be played after the addition of the demarcation point.
In the figure, a time progress bar 310 may be further included, and the time progress bar 310 may reflect a total playing time length of the preprocessed video to be played and a current time length of playing the preprocessed video to be played. A first thumbnail 315, a second thumbnail 316, a third thumbnail 317, a fourth thumbnail 318, and a fifth thumbnail 319 may also be included.
When the user plays the video to be played after the preprocessing, the user can display at least one video frame before the dividing point and/or the thumbnail of at least one video frame after the dividing point by detecting that the cursor is at the dividing point.
For example, assuming that the cursor is monitored at the third demarcation point 313, the first thumbnail 315, the second thumbnail 316 before the third demarcation point 313, and the third thumbnail 317, the fourth thumbnail 318, and the fifth thumbnail 319 after the third demarcation point may be displayed.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a video playing apparatus, as shown in fig. 4, which is a schematic structural diagram of a first implementation manner of the video playing apparatus according to the embodiment of the present invention, and the apparatus may include:
the first video frame determining module 401 is configured to determine a currently played video frame after frame skipping playing information of a pre-processed video to be played by a user is detected, where the pre-processed video to be played is a video to be played after a boundary point is added or a video to be played after a boundary point is adjusted;
a frame skipping playing boundary point determining module 402, configured to determine, in the pre-processed video to be played, a boundary point corresponding to frame skipping playing information and closest to a currently played video frame as a frame skipping playing boundary point;
the playing module 403 is configured to play the preprocessed video to be played from the next video frame corresponding to the frame skipping playing boundary point.
By the video playing device provided by the embodiment of the invention, after the frame skipping playing information is detected, video frames which are not interesting to a user can be quickly skipped, and the video to be played after the preprocessing is started from the next video frame corresponding to the frame skipping playing demarcation point, so that the time for searching interesting video frames by the user can be reduced, the time overhead of the user is saved, and the user experience is improved.
In some examples, a video playing apparatus according to an embodiment of the present invention may further perform preprocessing on a video to be played, as shown in fig. 5, which is a schematic structural diagram of a second implementation manner of the video playing apparatus according to an embodiment of the present invention, and the apparatus may further include:
a feature vector extraction module 501, configured to extract feature vectors of video frames in a video to be played;
a similarity calculation module 502, configured to calculate, for feature vectors of any two adjacent video frames, a similarity of the feature vectors of the two adjacent video frames;
the judging module 503 is configured to judge whether the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold;
a boundary point adding position determining module 504, configured to determine an intermediate position of two adjacent video frames as a boundary point adding position when a similarity of feature vectors of the two adjacent video frames is smaller than a preset similarity threshold;
and a demarcation point adding module 505, configured to add a demarcation point to the video to be played according to the addition position of the demarcation point, so as to obtain the video to be played after the addition of the demarcation point.
By adding the boundary point to the video to be played, when the device detects that the user skips frames to play the skip frame playing information of the video to be played, the boundary point corresponding to the skip frame playing information can be directly determined, and then the next video frame of the boundary point is played, so that the time for the user to search for the interested video frame can be reduced, the time overhead of the user is saved, and the user experience is improved.
Specifically, the feature vector extraction module 501 includes:
the color value acquisition submodule is used for acquiring the color value of each pixel point of a video frame aiming at any video frame in a video to be played;
the average color value calculation submodule is used for calculating the average color value of all the pixel points of the video frame according to the color value of each pixel point;
the comparison submodule is used for comparing the color value of each pixel point of the video frame with the average color value;
the characteristic value endowing submodule is used for calculating the characteristic value of the pixel point with the color value larger than the average color value in the video frame as 1 and calculating the characteristic value of the pixel point with the color value smaller than the average color value as 0;
and the characteristic value combining submodule is used for combining the characteristic values of all the pixel points of the video frame to obtain the characteristic vector of each video frame in the video to be played.
Specifically, the demarcation point adding position determining module 504 is specifically configured to:
when the similarity of the feature vectors of two adjacent video frames is smaller than a preset similarity threshold, two time labels corresponding to the two adjacent video frames are obtained, and the middle position of the two time labels corresponding to the two adjacent video frames is determined as a demarcation point adding position.
Specifically, the video playing device according to the embodiment of the present invention further includes:
the index establishing module is used for establishing indexes of the demarcation point corresponding to the demarcation point and the video frame;
and the thumbnail display module is used for displaying at least one video frame before the dividing point and/or a thumbnail of at least one video frame after the dividing point according to the index of the dividing point and the video frame when the cursor is detected to be positioned at the dividing point in the process of playing the video to be played after the dividing point is added.
Specifically, the video playing apparatus according to the embodiment of the present invention may further include:
the recording submodule is used for recording first operation information and second operation information when different users play videos to be played after the addition of the demarcation points, wherein the first operation information comprises the time for starting frame skipping or video frames, and the second operation information comprises the time for finishing frame skipping or video frames;
the first judgment submodule is used for judging whether the first operation information after the second operation information meets the preset condition or not;
the second judgment sub-module is used for judging whether the number of the first operation information meeting the preset condition is larger than the number of the first preset information and whether the number of the second operation information is larger than the number of the second preset information when the first operation information after the second operation information meets the preset condition;
the adjustment dividing point adding submodule is used for respectively adding a first adjustment dividing point for the video frame corresponding to the first operation information meeting the preset condition and adding a second adjustment dividing point for the video frame corresponding to the second operation information if the adjustment dividing points are larger than the preset condition;
and the demarcation point adjusting submodule is used for adjusting the demarcation point of the video to be played after the demarcation point is added according to the first adjusting demarcation point and the second adjusting demarcation point to obtain the video to be played after the demarcation point is adjusted.
Specifically, the preset condition is that the number of video frames between the first operation information and the second operation information after the second operation information is greater than or equal to a preset number of video frames; or
The time length between the first operation information and the second operation information after the second operation information is greater than or equal to the preset time length.
Specifically, the cut point adjusting submodule is specifically configured to:
and adding, deleting or modifying the demarcation point of the video to be played after the demarcation point is added according to the first adjustment demarcation point and the second adjustment demarcation point to obtain the video to be played after the demarcation point is adjusted.
An electronic device according to an embodiment of the present invention is further provided, as shown in fig. 6, which is a schematic structural diagram of an electronic device to which an embodiment of the present invention is applied, and the electronic device may include a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
when frame skipping playing information of a video to be played after frame skipping playing preprocessing of a user is detected, determining a video frame to be played currently, wherein the video to be played after preprocessing is the video to be played after a boundary point is added or the video to be played after the boundary point is adjusted;
in the preprocessed video to be played, determining a boundary point which corresponds to the frame skipping playing information and is closest to the currently played video frame as a frame skipping playing boundary point;
and playing the preprocessed video to be played from the next video frame corresponding to the frame skipping playing demarcation point.
By the electronic equipment for video playing provided by the embodiment of the invention, after the frame skipping playing information is detected, the video frame which is not interested by the user can be quickly skipped, the video to be played after the preprocessing is played from the next video frame corresponding to the frame skipping playing demarcation point, the time for the user to search for the interested video frame can be reduced, the time overhead of the user is saved, and the user experience is improved
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the computer is caused to execute a video playing method as described in any one of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform a video playback method as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A video playback method, the method comprising:
when frame skipping playing information of a video to be played after frame skipping playing preprocessing of a user is detected, determining a video frame to be played currently, wherein the video to be played after preprocessing is a video to be played after a boundary point is added or a video to be played after the boundary point is adjusted;
in the preprocessed video to be played, determining a boundary point corresponding to the frame skipping playing information and closest to the currently played video frame as a frame skipping playing boundary point;
starting to play the preprocessed video to be played from the next video frame corresponding to the frame skipping playing demarcation point;
the process of preprocessing the video to be played comprises the following steps:
acquiring a color value of each pixel point of a video frame aiming at any video frame in a video to be played;
calculating the average color value of all pixel points of the video frame according to the color value of each pixel point;
comparing the color value of each pixel point of the video frame with the average color value respectively;
calculating the characteristic value of the pixel point with the color value larger than the average color value in the video frame as 1, and calculating the characteristic value of the pixel point with the color value smaller than the average color value as 0;
combining the characteristic values of all pixel points of the video frame to obtain the characteristic vector of each video frame in the video to be played;
calculating the similarity of the feature vectors of any two adjacent video frames aiming at the feature vectors of the two adjacent video frames;
judging whether the similarity of the feature vectors of the two adjacent video frames is smaller than a preset similarity threshold value or not;
when the similarity of the feature vectors of the two adjacent video frames is smaller than the preset similarity threshold, determining the middle position of the two adjacent video frames as a demarcation point adding position;
adding a demarcation point to the video to be played according to the addition position of the demarcation point to obtain the video to be played after the demarcation point is added;
recording first operation information and second operation information of different users when the videos to be played after the addition of the demarcation points are played, wherein the first operation information comprises the time for starting frame skipping or video frames, and the second operation information comprises the time for finishing frame skipping or video frames;
judging whether first operation information after the second operation information meets a preset condition or not;
when first operation information after the second operation information meets a preset condition, judging whether the number of the first operation information meeting the preset condition is larger than the number of first preset information or not and whether the number of the second operation information is larger than the number of second preset information or not;
if the difference is greater than the preset value, respectively adding a first adjustment boundary point for the video frame corresponding to the first operation information meeting the preset condition, and adding a second adjustment boundary point for the video frame corresponding to the second operation information;
and adjusting the demarcation point of the video to be played after the demarcation point is added according to the first adjustment demarcation point and the second adjustment demarcation point to obtain the video to be played after the demarcation point is adjusted.
2. The method according to claim 1, wherein when the similarity of the feature vectors of the two adjacent video frames is smaller than the preset similarity threshold, determining the middle position of the two adjacent video frames as a boundary point adding position comprises:
when the similarity of the feature vectors of the two adjacent video frames is smaller than the preset similarity threshold, acquiring two time labels corresponding to the two adjacent video frames, and determining the middle position of the two time labels corresponding to the two adjacent video frames as a dividing point adding position.
3. The method according to claim 1, wherein after the adding of the cut point to the video to be played according to the cut point adding position to obtain the video to be played after the cut point is added, the method further comprises:
establishing an index of a demarcation point corresponding to the demarcation point and a video frame;
and in the process of playing the video to be played after the addition of the demarcation point, when a cursor is detected to be positioned at the demarcation point, displaying at least one video frame before the demarcation point and/or a thumbnail of at least one video frame after the demarcation point according to the indexes of the demarcation point and the video frames.
4. The method according to claim 1, wherein the preset condition is that a video frame number between first operation information subsequent to the second operation information and the second operation information is greater than or equal to a preset video frame number; or
The time length between the first operation information and the second operation information after the second operation information is greater than or equal to a preset time length.
5. The method according to claim 1, wherein the adjusting the cut point of the video to be played after the addition of the cut point comprises:
and adding, deleting or modifying the demarcation point of the video to be played after the demarcation point is added.
6. A video playback apparatus, comprising:
the first video frame determining module is used for determining a currently played video frame after frame skipping playing information of a preprocessed video to be played is detected, wherein the preprocessed video to be played is the video to be played after a boundary point is added or the video to be played after the boundary point is adjusted;
a frame skipping playing demarcation point determining module, configured to determine, in the preprocessed video to be played, a demarcation point corresponding to the frame skipping playing information and closest to the currently played video frame as a frame skipping playing demarcation point;
the playing module is used for playing the preprocessed video to be played from the next video frame corresponding to the frame skipping playing demarcation point;
the color value acquisition submodule is used for acquiring the color value of each pixel point of a video frame aiming at any video frame in a video to be played;
the average color value calculation submodule is used for calculating the average color value of all the pixel points of the video frame according to the color value of each pixel point;
the comparison submodule is used for comparing the color value of each pixel point of the video frame with the average color value;
the characteristic value endowing submodule is used for calculating the characteristic value of the pixel point with the color value larger than the average color value in the video frame as 1 and calculating the characteristic value of the pixel point with the color value smaller than the average color value as 0;
the characteristic value combining submodule is used for combining the characteristic values of all pixel points of the video frame to obtain the characteristic vector of each video frame in the video to be played;
the similarity calculation module is used for calculating the similarity of the feature vectors of any two adjacent video frames aiming at the feature vectors of the two adjacent video frames;
the judging module is used for judging whether the similarity of the feature vectors of the two adjacent video frames is smaller than a preset similarity threshold value or not;
the dividing point adding position determining module is used for determining the middle position of the two adjacent video frames as the dividing point adding position when the similarity of the feature vectors of the two adjacent video frames is smaller than the preset similarity threshold;
the dividing point adding module is used for adding dividing points to the video to be played according to the dividing point adding positions to obtain the video to be played after the dividing points are added;
the recording submodule is used for recording first operation information and second operation information when different users play the video to be played after the addition of the demarcation point, wherein the first operation information comprises the time or the video frame for starting frame skipping and the second operation information comprises the time or the video frame for finishing frame skipping;
the first judgment submodule is used for judging whether the first operation information after the second operation information meets a preset condition or not;
the second judging submodule is used for judging whether the number of pieces of first operation information meeting the preset condition is larger than the number of pieces of first preset information or not and whether the number of pieces of second operation information is larger than the number of pieces of second preset information or not when the first operation information after the second operation information meets the preset condition;
the adjustment dividing point adding submodule is used for respectively adding a first adjustment dividing point for the video frame corresponding to the first operation information meeting the preset condition and adding a second adjustment dividing point for the video frame corresponding to the second operation information if the adjustment dividing points are larger than the preset condition;
and the demarcation point adjusting submodule is used for adjusting the demarcation point of the video to be played after the demarcation point is added according to the first adjusting demarcation point and the second adjusting demarcation point to obtain the video to be played after the demarcation point is adjusted.
7. The apparatus of claim 6, wherein the demarcation point addition location determination module is specifically configured to:
when the similarity of the feature vectors of the two adjacent video frames is smaller than the preset similarity threshold, acquiring two time labels corresponding to the two adjacent video frames, and determining the middle position of the two time labels corresponding to the two adjacent video frames as a dividing point adding position.
8. The apparatus of claim 6, further comprising:
the index establishing module is used for establishing an index of a demarcation point corresponding to the demarcation point and a video frame;
and the thumbnail display module is used for displaying at least one video frame before the dividing point and/or a thumbnail of at least one video frame after the dividing point according to the indexes of the dividing point and the video frames when a cursor is detected to be positioned at the dividing point in the process of playing the video to be played after the dividing point is added.
9. The apparatus according to claim 6, wherein the preset condition is that a video frame number between first operation information subsequent to the second operation information and the second operation information is greater than or equal to a preset video frame number; or
The time length between the first operation information and the second operation information after the second operation information is greater than or equal to a preset time length.
10. The apparatus of claim 6, wherein the cut point adjustment submodule is specifically configured to:
and adding, deleting or modifying the demarcation point of the video to be played after the demarcation point is added according to the first adjustment demarcation point and the second adjustment demarcation point to obtain the video to be played after the demarcation point is adjusted.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
CN201711271019.XA 2017-12-05 2017-12-05 Video playing method and device and electronic equipment Active CN108012164B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711271019.XA CN108012164B (en) 2017-12-05 2017-12-05 Video playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711271019.XA CN108012164B (en) 2017-12-05 2017-12-05 Video playing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN108012164A CN108012164A (en) 2018-05-08
CN108012164B true CN108012164B (en) 2021-07-30

Family

ID=62057054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711271019.XA Active CN108012164B (en) 2017-12-05 2017-12-05 Video playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108012164B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111757156B (en) * 2019-03-29 2023-04-07 杭州海康威视数字技术股份有限公司 Video playing method, device and equipment
CN112565909B (en) * 2020-11-30 2023-04-11 维沃移动通信有限公司 Video playing method and device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257615A (en) * 2007-10-25 2008-09-03 复旦大学 User VCR operation method and stream medium distributing based on video dividing technique
CN104717571A (en) * 2013-12-13 2015-06-17 中国移动通信集团公司 Key playing time point determination method, video playing method and related device
CN105979267A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video compression and play method and device
CN107105342A (en) * 2017-04-27 2017-08-29 维沃移动通信有限公司 A kind of video playing control method and mobile terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007174195A (en) * 2005-12-21 2007-07-05 Toshiba Corp Electronic equipment, and automatic scene skipping method, and program
CN102780919A (en) * 2012-08-24 2012-11-14 乐视网信息技术(北京)股份有限公司 Method for carrying out video location and displaying through key frame
CN107333182A (en) * 2017-06-19 2017-11-07 北京小米移动软件有限公司 The player method and device of multimedia file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257615A (en) * 2007-10-25 2008-09-03 复旦大学 User VCR operation method and stream medium distributing based on video dividing technique
CN104717571A (en) * 2013-12-13 2015-06-17 中国移动通信集团公司 Key playing time point determination method, video playing method and related device
CN105979267A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video compression and play method and device
CN107105342A (en) * 2017-04-27 2017-08-29 维沃移动通信有限公司 A kind of video playing control method and mobile terminal

Also Published As

Publication number Publication date
CN108012164A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
US10299011B2 (en) Method and system for user interaction with objects in a video linked to internet-accessible information about the objects
US20200183977A1 (en) Providing relevant cover frame in response to a video search query
US11132555B2 (en) Video detection method, server and storage medium
US10452919B2 (en) Detecting segments of a video program through image comparisons
US8515933B2 (en) Video search method, video search system, and method thereof for establishing video database
US20170255830A1 (en) Method, apparatus, and system for identifying objects in video images and displaying information of same
US20120185905A1 (en) Content Overlay System
US9137574B2 (en) Method or system to predict media content preferences
CN112291634B (en) Video processing method and device
US9549162B2 (en) Image processing apparatus, image processing method, and program
US20210182566A1 (en) Image pre-processing method, apparatus, and computer program
CN109408652B (en) Picture searching method, device and equipment
CN108012164B (en) Video playing method and device and electronic equipment
US20180046631A1 (en) Display apparatus and method for controlling the same
CN114025242A (en) Video processing method, video processing device and electronic equipment
US20170013309A1 (en) System and method for product placement
CN110324707B (en) Video playing time consumption testing method and device
CN116777555A (en) Data marketing method and system for building recommendation model based on convolutional neural network
CN105678254A (en) Method and device for detecting video
CN115080792A (en) Video association method and device, electronic equipment and storage medium
CN112069357A (en) Video resource processing method and device, electronic equipment and storage medium
US10489460B2 (en) Method and apparatus for providing local search suggestion
US20140189769A1 (en) Information management device, server, and control method
US20150016719A1 (en) Methods of sifting out significant visual patterns from visual data
US11544314B2 (en) Providing media based on image analysis

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