CN108833938A - Method and apparatus for selecting video cover - Google Patents

Method and apparatus for selecting video cover Download PDF

Info

Publication number
CN108833938A
CN108833938A CN201810635762.7A CN201810635762A CN108833938A CN 108833938 A CN108833938 A CN 108833938A CN 201810635762 A CN201810635762 A CN 201810635762A CN 108833938 A CN108833938 A CN 108833938A
Authority
CN
China
Prior art keywords
key frame
pixel
preset condition
value
video cover
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.)
Granted
Application number
CN201810635762.7A
Other languages
Chinese (zh)
Other versions
CN108833938B (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.)
Nanjing Shangwang Network Technology Co.,Ltd.
Original Assignee
Shanghai Lianshang Network 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 Shanghai Lianshang Network Technology Co Ltd filed Critical Shanghai Lianshang Network Technology Co Ltd
Priority to CN201810635762.7A priority Critical patent/CN108833938B/en
Publication of CN108833938A publication Critical patent/CN108833938A/en
Application granted granted Critical
Publication of CN108833938B publication Critical patent/CN108833938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
    • 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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving 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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8549Creating video summaries, e.g. movie trailer

Abstract

The embodiment of the present application discloses the method and apparatus for selecting video cover.One specific embodiment of the method for selecting video cover includes:Obtain original video stream;Key frame set is extracted from original video stream;It determines in key frame set with the presence or absence of the key frame for meeting preset condition;In response to determining the key frame for existing in key frame set and meeting preset condition, key frame is selected from the key frame for meet preset condition as video cover.The embodiment can select the higher video cover of image quality, help to promote user experience, and then improve video click rate.

Description

Method and apparatus for selecting video cover
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for selecting video cover.
Background technique
With the continuous development of science and technology and society, all kinds of videos emerge in multitude the spiritual civilization of extreme enrichment people Life.To make user faster, more accurately obtain video or improving user clicks, it usually needs phase is arranged for each video The video cover answered.
Currently, it mainly includes two kinds that common video cover, which chooses mode,.First, the first frame of selecting video is sealed as video Face.However, a part of video frame can will lead to select so complete white using complete white frame or completely black frame before partial video Frame or completely black frame are as video cover.Second, randomly selecting a frame video frame at certain moment as video cover.However, random The quality of the video frame of selection is irregular, may select more fuzzy video frame as video cover.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for selecting video cover.
In a first aspect, the embodiment of the present application provides a kind of method for selecting video cover, including:Obtain original view Frequency flows;Key frame set is extracted from original video stream;It determines in key frame set with the presence or absence of the key for meeting preset condition Frame;In response to determining the key frame for existing in key frame set and meeting preset condition, selected from the key frame for meet preset condition Key frame is taken out as video cover.
In some embodiments, preset condition includes following at least one:The variance of the pixel value of the pixel of image is not Less than the pixel value of default variance threshold values, the pixel of image meet default distribution, frequency domain image pixel pixel The mean value of value is not less than default mean value threshold value.
In some embodiments, preset condition includes that the variance of the pixel value of the pixel of image is not less than default variance threshold Value;And determine with the presence or absence of the key frame for meeting preset condition in key frame set, including:Calculate the pass in key frame set The variance of the pixel value of the pixel of key frame;Variance is compared with default variance threshold values, obtains the first comparison result;It is based on First comparison result determines in key frame set with the presence or absence of the key frame for meeting preset condition.
In some embodiments, preset condition includes that the pixel value of the pixel of image meets default distribution;And it determines With the presence or absence of the key frame for meeting preset condition in key frame set, including:Generate the pixel of the key frame in key frame set The pixel value distribution histogram of point, as the first pixel value distribution histogram;First pixel value distribution histogram is counted Analysis, obtains the first pixel value distribution situation;Based on the first pixel value distribution situation, determine in key frame set with the presence or absence of full The key frame of sufficient preset condition.
In some embodiments, preset condition includes the mean value of the pixel value of the pixel of the image of frequency domain not less than pre- If mean value threshold value;And determine with the presence or absence of the key frame for meeting preset condition in key frame set, including:Utilize discrete cosine Key frame in key frame set is transformed from a spatial domain to frequency domain by transformation, obtains the key frame set of frequency domain;Calculate frequency The mean value of the pixel value of the pixel of key frame in the key frame set in rate domain, as the first mean value;By the first mean value and in advance If mean value threshold value is compared, the second comparison result is obtained;Based on the second comparison result, determining whether there is in key frame set Meet the key frame of preset condition.
In some embodiments, preset condition further includes that the pixel value of the pixel of image meets default distribution;And base In the first comparison result, determine with the presence or absence of the key frame for meeting preset condition in key frame set, including:If first compares knot Fruit indicates there is the key frame that an at least frame variance is not less than default variance threshold values in key frame set, is based on an at least frame variance Key frame not less than default variance threshold values generates the first candidate video cover set;It generates in the first candidate video cover set The first candidate video cover pixel pixel value distribution histogram, as the second pixel value distribution histogram;To second Pixel value distribution histogram is for statistical analysis, obtains the second pixel value distribution situation;Based on the second pixel value distribution situation, really With the presence or absence of the first candidate video cover for meeting preset condition in fixed first candidate video cover set.
In some embodiments, preset condition further includes that the mean value of the pixel value of the pixel of the image of frequency domain is not less than Default mean value threshold value;And it is based on the second pixel value distribution situation, it determines in the first candidate video cover set with the presence or absence of full First candidate video cover of sufficient preset condition, including:If the second pixel value distribution situation indicates the first candidate video cover collection There is the first candidate video cover that an at least frame meets default distribution in conjunction, meets the first of default distribution based on an at least frame Candidate video cover generates the second candidate video cover set;It will be in the second candidate video cover set using discrete cosine transform The second candidate video cover transform from a spatial domain to frequency domain, obtain the second candidate video cover set of frequency domain;It calculates The mean value of the pixel value of the pixel of the second candidate video cover in second candidate video cover set of frequency domain, as Second mean value;Second mean value is compared with default mean value threshold value, obtains third comparison result;Based on third comparison result, It determines in the second candidate video cover set with the presence or absence of the second candidate video cover for meeting preset condition.
In some embodiments, it is based on third comparison result, is determined in the second candidate video cover set with the presence or absence of full Second candidate video cover of sufficient preset condition, including:If third comparison result indicates to deposit in the second candidate video cover set It is not less than the second candidate video cover of default mean value threshold value at least second mean value of frame, determines the second candidate video cover collection There is the second candidate video cover for meeting preset condition in conjunction, wherein meet the second candidate video cover packet of preset condition Include the second candidate video cover that the second mean value is not less than default mean value threshold value;If third comparison result indicates the second candidate video There is no the second candidate video cover that the second mean value is not less than default mean value threshold value in cover set, the second candidate video is determined There is no the second candidate video covers for meeting preset condition in cover set.
In some embodiments, before calculating the variance of the pixel value of pixel of the key frame in key frame set, Further include:The rgb value of the pixel of key frame in key frame set is converted into YUV value;By the key in key frame set The pixel value of Y value in the YUV value of the pixel of frame as the pixel of the key frame in key frame set.
In some embodiments, original video stream is obtained, including:Obtain video file;Video file is decapsulated, Obtain video compress stream;Video compress stream is unziped it, original video stream is obtained.
In some embodiments, this method further includes:In response to determining, there is no meet preset condition in key frame set Key frame, determine in original video stream with the presence or absence of meeting the video frame of preset condition;In response to determining in original video stream In the presence of the video frame for meeting preset condition, video frame is selected from the video frame for meet preset condition as video cover.
Second aspect, the embodiment of the present application provide a kind of device for selecting video cover, including:Acquiring unit, It is configured to obtain original video stream;Extraction unit is configured to extract key frame set from original video stream;First determines Unit is configured to determine in key frame set with the presence or absence of the key frame for meeting preset condition;First selection unit, is configured At in response to determining the key frame for existing in key frame set and meeting preset condition, chosen from the key frame for meet preset condition Key frame is as video cover out.
In some embodiments, preset condition includes following at least one:The variance of the pixel value of the pixel of image is not Less than the pixel value of default variance threshold values, the pixel of image meet default distribution, frequency domain image pixel pixel The mean value of value is not less than default mean value threshold value.
In some embodiments, preset condition includes that the variance of the pixel value of the pixel of image is not less than default variance threshold Value;And first determination unit include:First computation subunit is configured to calculate the pixel of the key frame in key frame set The variance of the pixel value of point;First comparing subunit is configured to for variance being compared with default variance threshold values, obtains first Comparison result;First determines subelement, is configured to determine in key frame set based on the first comparison result with the presence or absence of satisfaction The key frame of preset condition.
In some embodiments, preset condition includes that the pixel value of the pixel of image meets default distribution;And first Determination unit includes:Subelement is generated, is configured to generate the pixel Distribution value of the pixel of the key frame in key frame set Histogram, as the first pixel value distribution histogram;Subelement is analyzed, is configured to carry out the first pixel value distribution histogram Statistical analysis, obtains the first pixel value distribution situation;Second determines subelement, is configured to based on the first pixel Distribution value feelings Condition determines in key frame set with the presence or absence of the key frame for meeting preset condition.
In some embodiments, preset condition includes the mean value of the pixel value of the pixel of the image of frequency domain not less than pre- If mean value threshold value;And first determination unit include:Subelement is converted, is configured to utilize discrete cosine transform by key frame collection Key frame in conjunction transforms from a spatial domain to frequency domain, obtains the key frame set of frequency domain;Second computation subunit, is configured At the mean value of the pixel value of the pixel of the key frame in the key frame set for calculating frequency domain, as the first mean value;Second ratio Compared with subelement, it is configured to for the first mean value being compared with default mean value threshold value, obtains the second comparison result;Third determines son Unit is configured to determine based on the second comparison result in key frame set with the presence or absence of the key frame for meeting preset condition.
In some embodiments, preset condition further includes that the pixel value of the pixel of image meets default distribution;And the One determines that subelement includes:First generation module, if being configured to exist at least in the first comparison result instruction key frame set One frame variance is not less than the key frame of default variance threshold values, and the key frame of default variance threshold values is not less than based on an at least frame variance Generate the first candidate video cover set;Second generation module is configured to generate in the first candidate video cover set The pixel value distribution histogram of the pixel of one candidate video cover, as the second pixel value distribution histogram;Analysis module, quilt It is configured to for statistical analysis to the second pixel value distribution histogram, obtains the second pixel value distribution situation;Determining module is matched It is set to based on the second pixel value distribution situation, determines in the first candidate video cover set with the presence or absence of meeting the of preset condition One candidate video cover.
In some embodiments, preset condition further includes that the mean value of the pixel value of the pixel of the image of frequency domain is not less than Default mean value threshold value;And determining module includes:Submodule is generated, if being configured to the second pixel value distribution situation instruction first There is the first candidate video cover that an at least frame meets default distribution in candidate video cover set, is met based on an at least frame First candidate video cover of default distribution generates the second candidate video cover set;Transformation submodule, be configured to using from It dissipates cosine transform and the second candidate video cover in the second candidate video cover set is transformed from a spatial domain into frequency domain, obtain Second candidate video cover set of frequency domain;Computational submodule is configured to calculate the second candidate video cover of frequency domain The mean value of the pixel value of the pixel of the second candidate video cover in set, as the second mean value;Comparative sub-module is configured It is compared at by the second mean value with default mean value threshold value, obtains third comparison result;It determines submodule, is configured to based on the Three comparison results determine in the second candidate video cover set with the presence or absence of the second candidate video cover for meeting preset condition.
In some embodiments, determine that submodule is further configured to:If the candidate view of third comparison result instruction second There is the second candidate video cover that at least second mean value of frame is not less than default mean value threshold value in frequency cover set, determines second There is the second candidate video cover for meeting preset condition in candidate video cover set, wherein meet the second of preset condition Candidate video cover includes the second candidate video cover that the second mean value is not less than default mean value threshold value;If third comparison result refers to Show that there is no the second candidate video covers that the second mean value is not less than default mean value threshold value in the second candidate video cover set, really There is no the second candidate video covers for meeting preset condition in fixed second candidate video cover set.
In some embodiments, the first determination unit further includes:Conversion subunit, being configured to will be in key frame set The rgb value of the pixel of key frame is converted to YUV value;By the Y value in the YUV value of the pixel of the key frame in key frame set The pixel value of pixel as the key frame in key frame set.
In some embodiments, acquiring unit includes:Subelement is obtained, is configured to obtain video file;Decapsulation Unit is configured to decapsulate video file, obtains video compress stream;Decompression unit, is configured to video Compression stream unzips it, and obtains original video stream.
In some embodiments, wherein the device for selecting video cover further includes:Second determination unit, is configured At in response to determining in key frame set there is no the key frame for meeting preset condition, determine in original video stream with the presence or absence of full The video frame of sufficient preset condition;Second selection unit is configured in response to determine in original video stream to exist to meet and presets item The video frame of part selects video frame as video cover from the video frame for meet preset condition.The third aspect, the application are real It applies example and provides a kind of network equipment, which includes:One or more processors;Storage device stores one thereon Or multiple programs;When one or more programs are executed by one or more processors, so that one or more processors are realized such as The method of any implementation description in first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should The method as described in implementation any in first aspect is realized when computer program is executed by processor.
Method and apparatus provided by the embodiments of the present application for selecting video cover, is extracted from original video stream first Key frame set;Then key frame set is analyzed, it is determined whether there is the key frame for meeting preset condition;Finally depositing In the case where meeting the key frame of preset condition, video cover is selected from the key frame for meet preset condition.Key frame It is encoded using intraframe coding method, distortion is less, and image quality is relatively high, and view is chosen from the key frame for meet preset condition Frequency cover can select the higher video cover of image quality, help to promote user experience, and then improve video and click Rate.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, purpose and high point will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for selecting video cover of the application;
Fig. 3 is the flow chart according to another embodiment of the method for selecting video cover of the application;
Fig. 4 is the schematic diagram provided by Fig. 3 for an application scenarios of the method for selecting video cover;
Fig. 5 is the flow chart according to another embodiment of the method for selecting video cover of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the network equipment of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the exemplary system architecture 100 of the method for selecting video cover of the application.
As shown in Figure 1, system architecture 100 may include video storaging equipment 101, network 102 and the network equipment 103.Net Network 102 between video storaging equipment 101 and the network equipment 103 to provide the medium of communication link.Network 102 may include Various connection types, such as wired, wireless communication link or fiber optic cables etc..
Video storaging equipment 101 can be interacted by network 102 with the network equipment 103, to receive or send video etc..Depending on Frequency storage equipment 101 can be the electronic equipment for being stored with multitude of video, including but not limited to smart phone, tablet computer, knee Mo(u)ld top half portable computer, desktop computer and server etc..
The network equipment 103 can be support network connection to provide the hardware device or software of various network services.When When the network equipment is hardware, it can be the various electronic equipments for supporting video cover to choose function, including but not limited to intelligently Mobile phone, tablet computer, pocket computer on knee, desktop computer and server etc..It at this moment, can as hardware device To be implemented as the distributed network equipment group that multiple network equipments form, single network equipment also may be implemented into.When network is set When for being software, it may be mounted in above-mentioned cited electronic equipment.At this moment, as software, may be implemented into for example with The multiple softwares or software module of Distributed Services are provided, single software or software module also may be implemented into.It does not do herein It is specific to limit.
The network equipment 103 can provide various services.For example, the network equipment 103 can be obtained to from video storaging equipment 101 The video taken carries out the processing such as analyzing, and generates processing result (such as video cover).
It should be noted that the method provided by the embodiment of the present application for selecting video cover can be by the network equipment 103 execute.
It should be understood that the number of video storaging equipment, network and the network equipment in Fig. 1 is only schematical.According to It realizes and needs, can have any number of video storaging equipment, network and the network equipment.It is stored in the network equipment 103 In the case where video, system architecture 100 can be not provided with video storaging equipment 101.
With continued reference to Fig. 2, it illustrates according to one embodiment of the method for selecting video cover of the application Process 200.The method for being used for selecting video cover includes the following steps:
Step 201, original video stream is obtained.
In the present embodiment, for the executing subject of the method for selecting video cover (such as the network equipment shown in FIG. 1 103) available original video stream.Wherein, original video stream can be uncompressed, un-encapsulated video flowing.
In some optional implementations of the present embodiment, video storaging equipment (such as video storage shown in FIG. 1 is set It is standby 101) in can store a large amount of original video streams.In this way, above-mentioned executing subject can be by wired connection mode or wireless Connection type obtains original video stream from video storaging equipment.
In some optional implementations of the present embodiment, it can store great lot video files in video storaging equipment. In this way, above-mentioned executing subject can obtain video file from video storaging equipment first;Then video file is decapsulated, Obtain video compress stream;Finally video compress stream is unziped it, obtains original video stream.Wherein, video file can be Original video stream is generated through overcompression, encapsulation.Currently, common video compression coding standard can include but is not limited to H.264, H.265, MPEG-2, MPEG-4 etc..Common video encapsulation standard can include but is not limited to MP4, AVI, FLV, MOV etc..
In some optional implementations of the present embodiment, above-mentioned executing subject can store a large amount of original video streams or Video file.In this way, above-mentioned executing subject can obtain original video stream from local, or from local acquisition video file, it is right Video file is decapsulated, is decompressed, and original video stream is obtained.
Step 202, key frame set is extracted from original video stream.
In the present embodiment, above-mentioned executing subject can extract key frame set from original video stream.Wherein, original Video flowing may include an at least frame video frame.One frame video frame is exactly a picture in original video stream.Video frame can be with Including I frame, P frame and B frame.I frame, that is, intracoded frame is a kind of independent frame of included all information, without reference to other videos Frame can be independently decoded.P frame, that is, forward-predictive-coded frames, by before it P frame or I frame prediction from, be basis Distilled edition frame data are carried out in the difference of this frame and adjacent former frame (I frame or P frame).B frame, that is, bi-directional predicted interpolation coding frame is According to the difference of adjacent former frame, this frame and latter frame data come distilled edition frame data.
It should be noted that original video stream carries out tissue usually as unit of sequence, a sequence is an original view Frequency flow section, is started with I frame, arrives next I frame end.Wherein, the first frame video frame of a sequence is called every IDR frame, every IDR frame Belong to I frame.Key frame in the present embodiment typically refers to every IDR frame, from original video stream extract key frame set can be by The every IDR frame set of at least frame every IDR frame composition.
Step 203, it determines in key frame set with the presence or absence of the key frame for meeting preset condition.
In the present embodiment, above-mentioned executing subject can analyze every frame key frame in key frame set one by one, Determine whether every frame key frame in key frame set meets preset condition.If at least frame key frame in key frame set is full Sufficient preset condition determines the key frame for existing in key frame set and meeting preset condition.In such cases, step is continued to execute 204.If preset condition is not satisfied in all key frames in key frame set, determine default there is no meeting in key frame set The key frame of condition.Wherein, preset condition can be pre-set various conditions.For example, preset condition may include but not It is limited to following at least one:The variance of the pixel value of the pixel of image is not less than the pixel for presetting variance threshold values, image Pixel value meets default distribution, the mean value of pixel value of pixel of image of frequency domain is not less than default mean value threshold value etc..
In some optional implementations of the present embodiment, preset condition may include the pixel value of the pixel of image Variance be not less than default variance threshold values.At this point, above-mentioned executing subject can calculate the key frame in key frame set first The variance of the pixel value of pixel;Then variance is compared with default variance threshold values, obtains the first comparison result;Last base In the first comparison result, determine in key frame set with the presence or absence of the key frame for meeting preset condition.In practice, if the picture of image The variance of the pixel value of vegetarian refreshments is equal to zero, is complete white frame or completely black frame then illustrating to only exist a kind of color in the image.If figure The variance of the pixel value of the pixel of picture is smaller, then illustrating that color category present in the image is less, image content is logical Often do not enrich.If the variance of the pixel value of the pixel of image is larger, then illustrating that color category present in the image may More, image content is usually relatively abundant.For example, for every frame key frame in key frame set, above-mentioned executing subject can be with The variance for calculating the pixel value of the pixel of the key frame, by the variance of the pixel value of the pixel of the key frame and default variance Threshold value is compared.If the variance of the pixel value of the pixel of the key frame is not less than default variance threshold values, it is determined that key frame There is the key frame for meeting preset condition in set.Wherein, which belongs to the key frame for meeting preset condition.If key frame The variance of the pixel value of the pixel of all key frames in set is respectively less than default variance threshold values, it is determined that in key frame set There is no the key frames for meeting preset condition.Wherein, default variance threshold values can self-setting according to demand.In general, default side Poor threshold value is bigger, and the quantity of what is selected the meet key frame of preset condition is fewer, and it is higher to choose precision;Default variance threshold values Smaller, the quantity of what is selected the meet key frame of preset condition is more, and it is lower to choose precision.
It should be noted that the variance of the pixel value of pixel can be not less than default variance threshold values by above-mentioned executing subject Key frame directly as the key frame for meeting preset condition, can also be to the variance of the pixel value of pixel not less than default side The key frame further progress of poor threshold value is analyzed, and is therefrom selected and is met other preset conditions (such as picture of the pixel of image Element value meets default distribution, the mean value of pixel value of pixel of image of frequency domain is not less than default mean value threshold value) key Frame is as the key frame for meeting preset condition.In some optional implementations of the present embodiment, preset condition may include The pixel value of the pixel of image meets default distribution.At this point, above-mentioned executing subject can firstly generate in key frame set The pixel value distribution histogram of the pixel of key frame, as the first pixel value distribution histogram;Then to the first pixel value point Cloth histogram is for statistical analysis, obtains the first pixel value distribution situation;It is finally based on the first pixel value distribution situation, determines and closes With the presence or absence of the key frame for meeting preset condition in key frame set.In practice, if the pixel Distribution value histogram of the pixel of image Group number in figure is more, and frequency is fewer, then illustrating that color category present in the image is more, image content is usually richer It is rich.If the group number in the pixel value distribution histogram of the pixel of image is fewer, frequency is more, then illustrating exist in the image Color category it is fewer, image content does not enrich usually.For example, for every frame key frame in key frame set, it is above-mentioned to hold The pixel value distribution histogram of the pixel of the key frame can be generated in row main body, counts the pixel value of the pixel of the key frame Group number and frequency in distribution histogram, if the group number in the pixel value distribution histogram of the pixel of the key frame is not less than pre- If organizing number, frequency is not more than default frequency, it is determined that there is the key frame for meeting preset condition in key frame set.Wherein, should Key frame belongs to the key frame for meeting preset condition.If the pixel Distribution value of the pixel of all key frames in key frame set Group number in histogram is respectively less than preset group number, and frequency is greater than default frequency, it is determined that pre- there is no meeting in key frame set If the key frame of condition.Wherein, preset group number and default frequency can self-settinies according to demand.In general, preset group number is bigger, Default frequency is smaller, and the quantity of what is selected the meet key frame of preset condition is fewer, and it is higher to choose precision;Preset group number is got over Small, the quantity for the key frame of preset condition of presetting that frequency is bigger, and what is selected meet is more, and it is lower to choose precision.
It should be noted that the key frame that the pixel value of pixel can be met default distribution by above-mentioned executing subject is direct As the key frame for meeting preset condition, the key frame further progress of default distribution can also be met to the pixel value of pixel Analysis therefrom selects and meets other preset conditions (such as the variance of the pixel value of the pixel of image is not less than default variance The mean value of the pixel value of the pixel of the image of threshold value, frequency domain is not less than default mean value threshold value) key frame it is pre- as meeting If the key frame of condition.
In some optional implementations of the present embodiment, preset condition may include the pixel of the image of frequency domain The mean value of pixel value be not less than default mean value threshold value.At this point, above-mentioned executing subject can be first with discrete cosine transform Key frame in key frame set is transformed from a spatial domain to frequency domain by (Discrete Cosine Transform, DCT), is obtained To the key frame set of frequency domain;The equal of the pixel value of the pixel of the key frame in the key frame set of frequency domain is calculated later Value, as the first mean value;Then the first mean value is compared with default mean value threshold value, obtains the second comparison result;Last base In the second comparison result, determine in key frame set with the presence or absence of the key frame for meeting preset condition.In practice, if frequency domain The mean value of the pixel value of the pixel of image is bigger, then illustrating that the picture of the image is more clear.If the picture of the image of frequency domain The mean value of the pixel value of vegetarian refreshments is smaller, then illustrating that the picture of the image is fuzzyyer.For example, for every frame in key frame set Key frame, above-mentioned executing subject can use discrete cosine transform and the key frame transformed from a spatial domain to frequency domain, obtain frequency The key frame in rate domain, calculates the mean value of the pixel value of the pixel of the key frame of frequency domain, by the key frame of frequency domain The mean value of pixel value of pixel be compared with default mean value threshold value.If the pixel of the pixel of the key frame of frequency domain The mean value of value is not less than default mean value threshold value, it is determined that there is the key frame for meeting preset condition in key frame set.Wherein, should Key frame belongs to the key frame for meeting preset condition.If the picture of the pixel of all key frames in the key frame set of frequency domain The mean value of element value is respectively less than default mean value threshold value, it is determined that there is no the key frames for meeting preset condition in key frame set.Its In, presetting mean value threshold value can self-setting according to demand.In general, default mean value threshold value is bigger, the satisfaction selected presets item The quantity of the key frame of part is fewer, and it is higher to choose precision;Default mean value threshold value is smaller, and what is selected meets the pass of preset condition The quantity of key frame is more, and it is lower to choose precision.
It should be noted that above-mentioned executing subject can be by the mean value of the pixel value of the pixel of frequency domain not less than default The key frame of mean value threshold value, can also be to the pixel value of the pixel of frequency domain directly as the key frame for meeting preset condition Mean value is not less than the key frame further progress analysis of default mean value threshold value, therefrom select meet other preset conditions (such as The variance of the pixel value of the pixel of image meets default point not less than the pixel value of default variance threshold values, the pixel of image Cloth) key frame as the key frame for meeting preset condition.
Step 204, key frame is selected from the key frame for meet preset condition as video cover.
In the present embodiment, in the case where there is the key frame for meeting preset condition in key frame set, above-mentioned execution Main body can select key frame as video cover from the key frame for meet preset condition.For example, can be default from meeting A frame key frame is randomly selected out in the key frame of condition as video cover.It is provided by the embodiments of the present application to be used for selecting video The method of cover extracts key frame set first from original video stream;Then key frame set is analyzed, it is determined whether In the presence of the key frame for meeting preset condition;Finally in the case where there is the key frame for meeting preset condition, item is preset from meeting Video cover is selected in the key frame of part.Key frame is encoded using intraframe coding method, and distortion is less, and image quality is relatively Height, the selecting video cover from the key frame for meet preset condition can select the higher video cover of image quality, help In promotion user experience, and then improve video click rate.
With further reference to Fig. 3, it illustrates another implementations according to the method for selecting video cover of the application The process 300 of example.The method for being used for selecting video cover includes the following steps:
Step 301, original video stream is obtained.
Step 302, key frame set is extracted from original video stream.
In the present embodiment, the behaviour of the concrete operations of step 301-302 and step 201-202 in embodiment shown in Fig. 2 Make essentially identical, details are not described herein.
Step 303, the variance of the pixel value of the pixel of the key frame in key frame set is calculated.
In the present embodiment, for every frame key frame in key frame set, method for selecting video cover is held Row main body (such as network equipment 103 shown in FIG. 1) can calculate the variance of the pixel value of the pixel of the key frame.
In practice, if the variance of the pixel value of the pixel of key frame is equal to zero, then illustrating to only exist in the key frame A kind of color is complete white frame or completely black frame.If the variance of the pixel value of the pixel of key frame is smaller, then illustrating the key frame Present in color category it is less, image content does not enrich usually.If the variance of the pixel value of the pixel of key frame is larger, So illustrate that color category present in the key frame may be more, image content is usually relatively abundant.
In some optional implementations of the present embodiment, above-mentioned executing subject can first will be in key frame set The rgb value of the pixel of key frame is converted to YUV value;It then will be in the YUV value of the pixel of the key frame in key frame set Y value as the key frame in key frame set pixel pixel value;Then execute step 303.Wherein, rgb color mould Formula is a kind of color standard of industry, be by red (R), green (G), blue (B) three Color Channels variation and they To obtain miscellaneous color, RGB is the color for representing three channels of red, green, blue for mutual superposition.YUV is A kind of colour coding method used by eurovision system, " Y " indicate brightness (Luminance or Luma), that is, Grayscale value;And that " U " and " V " is indicated is then coloration (Chrominance or Chroma), effect is description colors of image and saturation Degree, the color for specified pixel.
Step 304, variance is compared with default variance threshold values, obtains the first comparison result.
In the present embodiment, above-mentioned executing subject can be by the pixel of the pixel of every frame key frame in key frame set The variance of value is compared one by one with default variance threshold values, to obtain the first comparison result.It wherein, can in the first comparison result To include that variance is not less than the key frame for presetting variance threshold values and/or variance less than the key frame for presetting variance threshold values.Default side Poor threshold value can self-setting according to demand.In general, default variance threshold values are bigger, the variance in the first comparison result is no more than pre- If the quantity of the key frame of variance threshold values is fewer;Default variance threshold values are smaller, and the variance in the first comparison result is no more than default The quantity of the key frame of variance threshold values is more.
Step 305, if there is an at least frame variance in the first comparison result instruction key frame set is not less than default variance The key frame of threshold value, the key frame for being not less than default variance threshold values based on an at least frame variance generate the first candidate video cover collection It closes.
In the present embodiment, there is an at least frame variance not less than default in the first comparison result instruction key frame set In the case where the key frame of variance threshold values, an at least frame variance can be not less than the pass of default variance threshold values by above-mentioned executing subject Key frame is used as at least frame the first candidate video cover, generates the first candidate video cover set.Wherein, the first candidate video seals Color category present in the first candidate video cover in the set of face is usually more, and image content is usually relatively abundant.
Step 306, the pixel value of the pixel of the first candidate video cover in the first candidate video cover set is generated Distribution histogram, as the second pixel value distribution histogram.
In the present embodiment, above-mentioned to hold for every frame the first candidate video cover in the first candidate video cover set The pixel value distribution histogram of the pixel of the first candidate video cover can be generated in row main body, as the second pixel Distribution value Histogram.Wherein, pixel value distribution histogram can be rectangular by the rectangular wide pixel value section for representing corresponding group Gao represents the pixel frequency of corresponding group.In this way, pixel value histogram can not only clearly show that each group frequency disribution situation, also It is easy to show the difference of frequency between each group.
In practice, if group number is more in the second pixel value distribution histogram corresponding with the first candidate video cover, frequency Fewer, then illustrating that color category present in the first candidate video cover is more, image content is usually relatively abundant.If with In the corresponding second pixel value distribution histogram of first candidate video cover organize number it is fewer, frequency is more, then illustrate this first Color category present in candidate video cover is fewer, and image content does not enrich usually.
Step 307, for statistical analysis to the second pixel value distribution histogram, obtain the second pixel value distribution situation.
In the present embodiment, above-mentioned to hold for every frame the first candidate video cover in the first candidate video cover set Row main body can be for statistical analysis to the second pixel value distribution histogram corresponding with the first candidate video cover, thus To the pixel value distribution situation of the first candidate video cover, as the second pixel value corresponding with the first candidate video cover Distribution situation.For example, pixel value distribution situation may include the group number and frequency of pixel value distribution histogram.In this way, above-mentioned hold Row main body can count group number and frequency in the second pixel value distribution histogram corresponding with the first candidate video cover, if Group number in the second pixel value distribution histogram corresponding with the first candidate video cover is not less than preset group number, and frequency is little In default frequency, it is determined that the first candidate video cover meets default distribution.
Step 308, expire in the first candidate video cover set in the presence of an at least frame if the second pixel value distribution situation indicates First candidate video cover of the default distribution of foot generates the based on the first candidate video cover that an at least frame meets default distribution Two candidate video cover sets.
In the present embodiment, indicate there is at least one in the first candidate video cover set in the second pixel value distribution situation In the case that frame meets the first candidate video cover of default distribution, an at least frame can be met default point by above-mentioned executing subject First candidate video cover of cloth is used as at least frame the second candidate video cover, generates the second candidate video cover set.Its In, color category present in the second candidate video cover in the second candidate video cover set is more, image content compared with It is abundant.
Step 309, using discrete cosine transform by the second candidate video cover in the second candidate video cover set from Space field transformation obtains the second candidate video cover set of frequency domain to frequency domain.
In the present embodiment, above-mentioned to hold for every frame the second candidate video cover in the second candidate video cover set Row main body can use discrete cosine transform and the second candidate video cover transformed from a spatial domain to frequency domain.
It should be noted that above-mentioned executing subject can also be waited using such as other transform methods of Fourier transformation by second Video cover is selected to transform from a spatial domain to frequency domain, here to specific transform method without limiting.
Step 310, the pixel of the second candidate video cover in the second candidate video cover set of frequency domain is calculated Pixel value mean value, as the second mean value.
In the present embodiment, the second candidate video of every frame in the second candidate video cover set of frequency domain is sealed Face, above-mentioned executing subject can calculate the mean value of the pixel value of the pixel of the second candidate video cover of frequency domain, as The second mean value corresponding with the second candidate video cover.
In practice, if the second mean value corresponding with the second candidate video cover is bigger, then illustrating the second candidate view The picture of frequency cover is more clear.If the second mean value corresponding with the second candidate video cover is smaller, then illustrating second time Select the picture of video cover fuzzyyer.
Step 311, the second mean value is compared with default mean value threshold value, obtains third comparison result.
In the present embodiment, above-mentioned executing subject can by the second candidate video cover set of frequency domain with every frame Corresponding second mean value of second candidate video cover is compared with default mean value threshold value, to obtain third comparison result.Its In, it may include the second candidate video cover and/or that the second mean value is not less than default mean value threshold value in third comparison result Two mean values are less than the second candidate video cover of default mean value threshold value.Wherein, presetting mean value threshold value can voluntarily set according to demand It sets.In general, default mean value threshold value is bigger, the second mean value in third comparison result is not less than the second candidate of default mean value threshold value The quantity of video cover is fewer;Default mean value threshold value is smaller, and the second mean value in third comparison result is not less than default mean value threshold The quantity of second candidate video cover of value is more.
Step 312, it is based on third comparison result, is determined in the second candidate video cover set with the presence or absence of the default item of satisfaction Second candidate video cover of part.
In the present embodiment, above-mentioned executing subject can be based on third comparison result, determine the second candidate video cover collection With the presence or absence of the second candidate video cover for meeting preset condition in conjunction.Exist in the second candidate video cover set and meets in advance If continuing to execute step 313 in the case where the second candidate video cover of condition.
In some optional implementations of the present embodiment, the second candidate video cover collection is indicated in third comparison result In the case where there is the second candidate video cover that at least second mean value of frame is not less than default mean value threshold value in conjunction, second is determined There is the second candidate video cover for meeting preset condition in candidate video cover set, wherein meet the second of preset condition Candidate video cover includes the second candidate video cover that the second mean value is not less than default mean value threshold value.Refer in third comparison result Show that there is no the second mean values to be not less than the second candidate video cover of default mean value threshold value in the second candidate video cover set In the case of, determine that there is no the second candidate video covers for meeting preset condition in the second candidate video cover set.
Step 313, the second candidate video cover conduct is selected from the second candidate video cover for meeting preset condition Video cover.
In the present embodiment, there is the second candidate video envelope for meeting preset condition in the second candidate video cover set In the case where face, above-mentioned executing subject can select the second candidate view from the second candidate video cover for meeting preset condition Frequency cover is as video cover.For example, a frame can be randomly selected out from the second candidate video cover for meeting preset condition Second candidate video cover is as video cover.Wherein, meet the second usual image content of candidate video cover of preset condition Both it enriched, picture is again clear.
It is showing for an application scenarios of the method for selecting video cover provided by Fig. 3 with continued reference to Fig. 4, Fig. 4 It is intended to.In the application scenarios of Fig. 3, firstly, the network equipment obtains a documentary film about giant panda being locally stored, to discipline Record piece is decapsulated, is decompressed, and the original video stream of documentary film is obtained.Later, terminal device extracts in original video stream Every IDR frame set, the variance that at least pixel value of a frame pixel is extracted from every IDR frame set are not less than default variance threshold values Every IDR frame generates the first candidate video cover set.Then, pixel Distribution value is extracted from the first candidate video cover set Situation meets the first candidate video cover of default distribution, generates the second candidate video cover set.Then, from the second candidate view The mean value that the pixel value of the pixel of frequency domain is selected in frequency cover set is not less than the second candidate view of default mean value threshold value Frequency cover set.Finally, the second candidate video cover set never less than default mean value threshold value randomly selects out a frame second Video cover is added on documentary film by candidate video cover as video cover.At this point, the network equipment is shown as shown in 401 Documentary film after can showing addition video cover in display screen.
From figure 3, it can be seen that compared with the corresponding embodiment of Fig. 2, in the present embodiment for selecting video cover The process 300 of method highlights the step of key frame for meeting preset condition in determining key frame set.The present embodiment as a result, The scheme of description can select image content compared with abundant and more visible picture video cover.
With further reference to Fig. 5, it illustrates another implementations according to the method for selecting video cover of the application The process 500 of example.The method for being used for selecting video cover includes the following steps:
Step 501, original video stream is obtained.
Step 502, key frame set is extracted from original video stream.
Step 503, it determines in key frame set with the presence or absence of the key frame for meeting preset condition.
In the present embodiment, the behaviour of the concrete operations of step 501-503 and step 201-203 in embodiment shown in Fig. 2 Make essentially identical, details are not described herein.
Step 504, it determines in original video stream with the presence or absence of the video frame for meeting preset condition.
In the present embodiment, in the case where the key frame for meeting preset condition is not present in key frame set, for selecting Take the executing subject (such as network equipment 103 shown in FIG. 1) of the method for video cover can be to every frame in original video stream Video frame is analyzed one by one, is determined in original video stream with the presence or absence of the video frame for meeting preset condition.If original video stream In an at least frame video frame meet preset condition, determine to exist in original video stream and meet the video frame of preset condition.It is such In the case of, continue to execute step 505.If preset condition is not satisfied in all video frames in original video stream, original view is determined There is no the video frames for meeting preset condition in frequency stream.Wherein, preset condition can be pre-set various conditions.For example, Preset condition can include but is not limited at least one of following:The variance of the pixel value of the pixel of image is not less than default variance Threshold value, image pixel pixel value meet default distribution, frequency domain image pixel pixel value mean value not under In default mean value threshold value etc..
It should be noted that determine original video stream in the presence or absence of meet preset condition video frame concrete operations with Determine that the concrete operations that whether there is the key frame for meeting preset condition in key frame set are essentially identical, details are not described herein.
Step 505, video frame is selected from the video frame for meet preset condition as video cover.
In the present embodiment, in the case where there is the video frame for meeting preset condition in original video stream, above-mentioned execution Main body can select video frame as video cover from the video frame for meet preset condition.For example, can be default from meeting A frame video frame is randomly selected out in the video frame of condition as video cover
From figure 5 it can be seen that compared with the corresponding embodiment of Fig. 2, in the present embodiment for selecting video cover The process 500 of method increases selecting video cover in the case where the key frame for meeting preset condition is not present in key frame set The step of.There is no the feelings for the key frame for meeting preset condition in key frame set in the scheme of the present embodiment description as a result, The higher video cover of image quality can also be selected under condition.
Below with reference to Fig. 6, it is (such as shown in FIG. 1 that it illustrates the network equipments for being suitable for being used to realize the embodiment of the present application The network equipment 103) computer system 600 structural schematic diagram.The network equipment shown in Fig. 6 is only an example, is not answered Any restrictions are brought to the function and use scope of the embodiment of the present application.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component:Importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 701, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer-readable medium either the two any combination.Computer-readable medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable medium can include but is not limited to:Electrical connection, portable meter with one or more conducting wires Calculation machine disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer-readable medium, which can be, any includes or storage program has Shape medium, the program can be commanded execution system, device or device use or in connection.And in the application In, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, wherein Carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to electric Magnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Jie Any computer-readable medium other than matter, the computer-readable medium can be sent, propagated or transmitted for being held by instruction Row system, device or device use or program in connection.The program code for including on computer-readable medium It can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned any conjunction Suitable combination.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof Machine program code, described program design language include object-oriented programming language-such as Java, Smalltalk, C+ +, further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as:A kind of processor packet Include acquiring unit, extraction unit, the first determination unit and the first selection unit.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself, for example, acquiring unit is also described as " obtaining the list of original video stream Member ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in the network equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying network equipment. Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are held by the network equipment When row, so that the network equipment:Obtain original video stream;Key frame set is extracted from original video stream;Determine key frame collection With the presence or absence of the key frame for meeting preset condition in conjunction;In response to determining the key for existing in key frame set and meeting preset condition Frame selects key frame as video cover from the key frame for meet preset condition.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (13)

1. a kind of method for selecting video cover, including:
Obtain original video stream;
Key frame set is extracted from the original video stream;
It determines in the key frame set with the presence or absence of the key frame for meeting preset condition;
Meet the key frame of the preset condition in response to existing in the determination key frame set, from meeting the preset condition Key frame in select key frame as video cover.
2. according to the method described in claim 1, wherein, the preset condition includes following at least one:The pixel of image Pixel value variance be not less than default variance threshold values, the pixel value of pixel of image meets the figure of default distribution, frequency domain The mean value of the pixel value of the pixel of picture is not less than default mean value threshold value.
3. according to the method described in claim 2, wherein, the preset condition includes the variance of the pixel value of the pixel of image Not less than default variance threshold values;And
With the presence or absence of the key frame for meeting preset condition in the determination key frame set, including:
Calculate the variance of the pixel value of the pixel of the key frame in the key frame set;
The variance is compared with the default variance threshold values, obtains the first comparison result;
Based on first comparison result, determine in the key frame set with the presence or absence of the key for meeting the preset condition Frame.
4. according to the method described in claim 2, wherein, the preset condition includes that the pixel value of the pixel of image meets in advance If distribution;And
With the presence or absence of the key frame for meeting preset condition in the determination key frame set, including:
The pixel value distribution histogram for generating the pixel of the key frame in the key frame set, as the first pixel Distribution value Histogram;
It is for statistical analysis to the first pixel value distribution histogram, obtain the first pixel value distribution situation;
Based on the first pixel value distribution situation, determining, which whether there is in the key frame set, meets the preset condition Key frame.
5. according to the method described in claim 2, wherein, the preset condition includes the pixel of the pixel of the image of frequency domain The mean value of value is not less than default mean value threshold value;And
With the presence or absence of the key frame for meeting preset condition in the determination key frame set, including:
The key frame in the key frame set is transformed from a spatial domain into frequency domain using discrete cosine transform, obtains frequency domain Key frame set;
The mean value for calculating the pixel value of the pixel of the key frame in the key frame set of the frequency domain, as the first mean value;
First mean value is compared with the default mean value threshold value, obtains the second comparison result;
Based on second comparison result, determine in the key frame set with the presence or absence of the key for meeting the preset condition Frame.
6. according to the method described in claim 3, wherein, the preset condition further includes that the pixel value of the pixel of image meets Default distribution;And
It is described to be based on first comparison result, it determines in the key frame set with the presence or absence of the pass for meeting the preset condition Key frame, including:
If first comparison result indicates that there is an at least frame variance in the key frame set is not less than the default variance The key frame of threshold value generates the first candidate view not less than the key frame of the default variance threshold values based on an at least frame variance Frequency cover set;
Generate the pixel Distribution value histogram of the pixel of the first candidate video cover in the first candidate video cover set Figure, as the second pixel value distribution histogram;
It is for statistical analysis to the second pixel value distribution histogram, obtain the second pixel value distribution situation;
Based on the second pixel value distribution situation, determine in the first candidate video cover set with the presence or absence of described in satisfaction First candidate video cover of preset condition.
7. according to the method described in claim 6, wherein, the preset condition further includes the picture of the pixel of the image of frequency domain The mean value of element value is not less than default mean value threshold value;And
It is described to be based on the second pixel value distribution situation, it determines in the first candidate video cover set with the presence or absence of satisfaction First candidate video cover of the preset condition, including:
If the second pixel value distribution situation indicates that there is an at least frame in the first candidate video cover set meets institute The the first candidate video cover for stating default distribution, the first candidate video cover for meeting the default distribution based on an at least frame are raw At the second candidate video cover set;
The second candidate video cover in the second candidate video cover set is become from spatial domain using discrete cosine transform Frequency domain is changed to, the second candidate video cover set of frequency domain is obtained;
Calculate the pixel value of the pixel of the second candidate video cover in the second candidate video cover set of the frequency domain Mean value, as the second mean value;
Second mean value is compared with the default mean value threshold value, obtains third comparison result;
Based on the third comparison result, determining, which whether there is in the second candidate video cover set, meets the default item Second candidate video cover of part.
8. it is described to be based on the third comparison result according to the method described in claim 7, wherein, determine that described second is candidate With the presence or absence of the second candidate video cover for meeting the preset condition in video cover set, including:
If the third comparison result indicates not small in the presence of at least second mean value of frame in the second candidate video cover set In the second candidate video cover of the default mean value threshold value, determine in the second candidate video cover set exist meet institute State the second candidate video cover of preset condition, wherein the second candidate video cover for meeting the preset condition includes second Mean value is not less than the second candidate video cover of the default mean value threshold value;
If the third comparison result indicates that there is no the second mean values not less than described in the second candidate video cover set Second candidate video cover of default mean value threshold value determines described pre- there is no meeting in the second candidate video cover set If the second candidate video cover of condition.
9. according to the method described in claim 3, wherein, in the pixel for calculating the key frame in the key frame set Pixel value variance before, further include:
The rgb value of the pixel of key frame in the key frame set is converted into YUV value;
Using the Y value in the YUV value of the pixel of the key frame in the key frame set as the pass in the key frame set The pixel value of the pixel of key frame.
10. according to the method described in claim 1, wherein, the acquisition original video stream, including:
Obtain video file;
The video file is decapsulated, video compress stream is obtained;
The video compress stream is unziped it, the original video stream is obtained.
11. method described in one of -10 according to claim 1, wherein the method also includes:
In response to, there is no the key frame for meeting the preset condition, determining the original video in the determination key frame set With the presence or absence of the video frame for meeting the preset condition in stream;
Meet the video frame of the preset condition in response to existing in the determination original video stream, from meeting the preset condition Video frame in select video frame as video cover.
12. a kind of network equipment, including:
One or more processors;
Storage device stores one or more programs thereon;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-11.
13. a kind of computer readable storage medium, is stored thereon with computer program, the computer program is executed by processor Method of the Shi Shixian as described in any in claim 1-11.
CN201810635762.7A 2018-06-20 2018-06-20 Method and apparatus for selecting video covers Active CN108833938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810635762.7A CN108833938B (en) 2018-06-20 2018-06-20 Method and apparatus for selecting video covers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810635762.7A CN108833938B (en) 2018-06-20 2018-06-20 Method and apparatus for selecting video covers

Publications (2)

Publication Number Publication Date
CN108833938A true CN108833938A (en) 2018-11-16
CN108833938B CN108833938B (en) 2021-05-28

Family

ID=64142753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810635762.7A Active CN108833938B (en) 2018-06-20 2018-06-20 Method and apparatus for selecting video covers

Country Status (1)

Country Link
CN (1) CN108833938B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392306A (en) * 2019-07-29 2019-10-29 腾讯科技(深圳)有限公司 A kind of data processing method and equipment
CN111491209A (en) * 2020-04-08 2020-08-04 咪咕文化科技有限公司 Video cover determining method and device, electronic equipment and storage medium
CN111581435A (en) * 2020-05-25 2020-08-25 北京达佳互联信息技术有限公司 Video cover image generation method and device, electronic equipment and storage medium
CN111651633A (en) * 2020-04-29 2020-09-11 上海推乐信息技术服务有限公司 Video cover selection method and system
CN111901679A (en) * 2020-08-10 2020-11-06 广州繁星互娱信息科技有限公司 Method and device for determining cover image, computer equipment and readable storage medium
CN112312200A (en) * 2019-08-06 2021-02-02 北京字节跳动网络技术有限公司 Video cover generation method and device and electronic equipment
CN113055706A (en) * 2019-12-27 2021-06-29 北京达佳互联信息技术有限公司 Video synthesis method and device, electronic equipment and storage medium
WO2021227531A1 (en) * 2020-05-15 2021-11-18 上海哔哩哔哩科技有限公司 Cover generation method and system based on browser
CN114401445A (en) * 2021-12-31 2022-04-26 深圳云天励飞技术股份有限公司 Video processing control method and device, monitoring equipment, client and storage medium
CN114443894A (en) * 2022-01-05 2022-05-06 荣耀终端有限公司 Data processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087652A (en) * 2009-12-08 2011-06-08 百度在线网络技术(北京)有限公司 Method for screening images and system thereof
CN104244024A (en) * 2014-09-26 2014-12-24 北京金山安全软件有限公司 Video cover generation method and device and terminal
CN106559697A (en) * 2016-11-22 2017-04-05 深圳创维数字技术有限公司 A kind of recorded file front cover display packing and system based on PVR Set Top Boxes
CN107147939A (en) * 2017-05-05 2017-09-08 百度在线网络技术(北京)有限公司 Method and apparatus for adjusting net cast front cover
CN107832725A (en) * 2017-11-17 2018-03-23 北京奇虎科技有限公司 Video front cover extracting method and device based on evaluation index
CN107886518A (en) * 2017-11-23 2018-04-06 广州优视网络科技有限公司 Picture detection method, device, electronic equipment and read/write memory medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102087652A (en) * 2009-12-08 2011-06-08 百度在线网络技术(北京)有限公司 Method for screening images and system thereof
CN104244024A (en) * 2014-09-26 2014-12-24 北京金山安全软件有限公司 Video cover generation method and device and terminal
CN106559697A (en) * 2016-11-22 2017-04-05 深圳创维数字技术有限公司 A kind of recorded file front cover display packing and system based on PVR Set Top Boxes
CN107147939A (en) * 2017-05-05 2017-09-08 百度在线网络技术(北京)有限公司 Method and apparatus for adjusting net cast front cover
CN107832725A (en) * 2017-11-17 2018-03-23 北京奇虎科技有限公司 Video front cover extracting method and device based on evaluation index
CN107886518A (en) * 2017-11-23 2018-04-06 广州优视网络科技有限公司 Picture detection method, device, electronic equipment and read/write memory medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392306A (en) * 2019-07-29 2019-10-29 腾讯科技(深圳)有限公司 A kind of data processing method and equipment
CN112312200A (en) * 2019-08-06 2021-02-02 北京字节跳动网络技术有限公司 Video cover generation method and device and electronic equipment
CN113055706B (en) * 2019-12-27 2023-06-20 北京达佳互联信息技术有限公司 Video synthesis method, device, electronic equipment and storage medium
CN113055706A (en) * 2019-12-27 2021-06-29 北京达佳互联信息技术有限公司 Video synthesis method and device, electronic equipment and storage medium
CN111491209A (en) * 2020-04-08 2020-08-04 咪咕文化科技有限公司 Video cover determining method and device, electronic equipment and storage medium
CN111651633A (en) * 2020-04-29 2020-09-11 上海推乐信息技术服务有限公司 Video cover selection method and system
WO2021227531A1 (en) * 2020-05-15 2021-11-18 上海哔哩哔哩科技有限公司 Cover generation method and system based on browser
CN111581435A (en) * 2020-05-25 2020-08-25 北京达佳互联信息技术有限公司 Video cover image generation method and device, electronic equipment and storage medium
CN111581435B (en) * 2020-05-25 2023-12-01 北京达佳互联信息技术有限公司 Video cover image generation method and device, electronic equipment and storage medium
CN111901679A (en) * 2020-08-10 2020-11-06 广州繁星互娱信息科技有限公司 Method and device for determining cover image, computer equipment and readable storage medium
CN114401445A (en) * 2021-12-31 2022-04-26 深圳云天励飞技术股份有限公司 Video processing control method and device, monitoring equipment, client and storage medium
CN114401445B (en) * 2021-12-31 2024-03-22 深圳云天励飞技术股份有限公司 Video processing control method, device, monitoring equipment, client and storage medium
CN114443894A (en) * 2022-01-05 2022-05-06 荣耀终端有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108833938B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN108833938A (en) Method and apparatus for selecting video cover
US11200426B2 (en) Video frame extraction method and apparatus, computer-readable medium
US20180192063A1 (en) Method and System for Virtual Reality (VR) Video Transcode By Extracting Residual From Different Resolutions
KR102087533B1 (en) Communication devices, communication control methods, and computer programs
JP3793142B2 (en) Moving image processing method and apparatus
CA2842560C (en) Transmission of reconstruction data in a tiered signal quality hierarchy
CN109040792B (en) Processing method for video redirection, cloud terminal and cloud desktop server
EP3561704A1 (en) Segmented media content rights management
US20030001964A1 (en) Method of converting format of encoded video data and apparatus therefor
CN107750461A (en) The method, apparatus and computer program of media data and metadata are obtained from the encapsulation bit stream that operating point descriptor can be dynamically set
US20090262136A1 (en) Methods, Systems, and Products for Transforming and Rendering Media Data
US8630500B2 (en) Method for the encoding by segmentation of a picture
CN110650255B (en) Method and device for editing color ring back tone, color ring back tone editing unit and storage medium
Furht Multimedia Systems and Techniques
WO2020030958A1 (en) Method for adding watermark, device, apparatus/terminal/server, and storage medium
KR101805550B1 (en) Image data encoding method for presentation virtualization and server therefor
KR20070084442A (en) Supporting fidelity range extensions in advanced video codec file format
CN111031389B (en) Video processing method, electronic device and storage medium
US7570180B2 (en) Method for syntactically analyzing a bit stream using a schema and a method of generating a bit stream based thereon
CN107959814A (en) A kind of picture output method and device
CN109495789B (en) Media file playing method, equipment and communication system
CN110891195A (en) Method, device and equipment for generating screen image and storage medium
CN113141352B (en) Multimedia data transmission method and device, computer equipment and storage medium
CN112165631B (en) Media resource processing method and device, storage medium and electronic equipment
KR101183861B1 (en) Method of performing a processing of a multimedia content

Legal Events

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

Effective date of registration: 20200707

Address after: Room 909, No. 12, Huangshan Road, Jianye District, Nanjing City, Jiangsu Province

Applicant after: Nanjing Shangwang Network Technology Co.,Ltd.

Address before: 201306, N2025 building, 24 building, Xincheng Road, 2 mud town, Shanghai, Pudong New Area

Applicant before: SHANGHAI LIANSHANG NETWORK TECHNOLOGY Co.,Ltd.

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