CN105554514B - Handle the method and system of piece of video cephalic flexure - Google Patents

Handle the method and system of piece of video cephalic flexure Download PDF

Info

Publication number
CN105554514B
CN105554514B CN201510904172.6A CN201510904172A CN105554514B CN 105554514 B CN105554514 B CN 105554514B CN 201510904172 A CN201510904172 A CN 201510904172A CN 105554514 B CN105554514 B CN 105554514B
Authority
CN
China
Prior art keywords
video
frame
frames
similar
same
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
CN201510904172.6A
Other languages
Chinese (zh)
Other versions
CN105554514A (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.)
Fujian TQ Digital Co Ltd
Original Assignee
Fujian TQ Digital 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 Fujian TQ Digital Co Ltd filed Critical Fujian TQ Digital Co Ltd
Priority to CN201510904172.6A priority Critical patent/CN105554514B/en
Publication of CN105554514A publication Critical patent/CN105554514A/en
Application granted granted Critical
Publication of CN105554514B publication Critical patent/CN105554514B/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/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
    • 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

Abstract

The invention discloses a kind of method and system for handling piece of video cephalic flexure, and wherein method includes decoding the raw frames of the first video and the second video, obtain the first material and the second material;Since first frame, compare the first material and the second material frame by frame, obtains same number of frames;Continuous same number of frames is intercepted from the first video, the second video, and saves as head video file.By the above-mentioned means, the present invention is capable of the Presence of the Moment of the multiple videos of quick obtaining, and it is kept separately so as to save server storage and server bandwidth.

Description

Handle the method and system of piece of video cephalic flexure
Technical field
The present invention relates to technical field of video processing, more particularly, to a kind of method and system for handling piece of video cephalic flexure.
Background technique
At present there is duplicate Presence of the Moment in video mostly, and content is identical, and server stores a large amount of repeated data wave Take disk space, user's repeated downloads, waste bandwidth.
Existing Chinese patent application (application number: 201110262643.X) discloses a kind of detection of TV play teaser or tail Method, technical solution are the time zones that setting will detect head;Video finger print feature extraction is carried out in the time zone; Head detection is carried out using obtained video finger print.But this scheme needs previously given time zone out, therefore is equivalent to It needs to open video file in advance, it is known that the video frame of its teaser or tail, and its duration is obtained, operability is not strong, uses Family Experience Degree is poor.
Summary of the invention
The technical problems to be solved by the present invention are: obtaining identical Presence of the Moment present in multiple videos, and it is kept separately Save server storage and bandwidth.
In order to solve the above-mentioned technical problem, the technical solution adopted by the present invention are as follows: a kind of processing piece of video cephalic flexure is provided Method, comprising:
The raw frames of the first video and the second video are decoded, the first material and the second material are obtained;
Since first frame, compare the first material and the second material frame by frame, obtains same number of frames;
Continuous same number of frames is intercepted from the first video, the second video, and saves as head video file.
To solve the above problems, the present invention also provides a kind of systems for handling piece of video cephalic flexure, comprising:
Decoder module obtains the first material and for decoding the raw frames of video the first video and the second video Two materials;
Comparison module obtains same number of frames for since first frame, comparing the first material and the second material frame by frame;
Memory module for intercepting continuous same number of frames from the first video, the second video, and saves as head video text Part.
The beneficial effects of the present invention are: it is different from the prior art, the present invention passes through the raw frames of decoding different video, Corresponding material is obtained, and compares material frame by frame, obtains same number of frames.Same number of frames is intercepted, i.e. acquisition head video file.By upper Mode is stated, the present invention can be with the Presence of the Moment of the multiple videos of quick obtaining, and is kept separately so as to save server storage And server bandwidth.
Detailed description of the invention
Fig. 1 is the flow diagram of embodiment of the present invention method one;
Fig. 2 is the structural block diagram of present system embodiment two.
Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached Figure is explained.
The most critical design of the present invention is: comparing out the portion for starting continuous identical content by parsing video frame by frame Point, it starting and end time will intercept out respectively, Presence of the Moment will be splitted out.
Fig. 1 is please referred to, the embodiment of the present invention one provides a kind of method for handling piece of video cephalic flexure, comprising:
S1: decoding the raw frames of the first video and the second video, obtains the first material and the second material;
S2: since first frame, compare the first material and the second material frame by frame, obtain same number of frames;
S3: continuous same number of frames is intercepted from the first video, the second video, and saves as head video file.
It is different from the prior art, the embodiment of the present invention one obtains corresponding element by the raw frames of decoding different video Material, and material is compared frame by frame, obtain same number of frames.Same number of frames is intercepted, i.e. acquisition head video file.By the above-mentioned means, this hair It is bright can be with the Presence of the Moment of the multiple videos of quick obtaining, and be kept separately so as to save server storage and server Bandwidth.
Wherein, step S2 specifically:
The screen resolution of first material and the second material is reduced to 1/4;
The color tolerance for comparing pixel in the first material and the second material video frame one by one, obtains similar frame;
The continuous similar frame that duration meets preset condition is obtained, as same number of frames.
Wherein, it when obtaining the step of similar frame, can also be operated by following manner:
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is greater than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
And when obtaining the step of same number of frames, it can also be carried out by following manner:
The compared pixels point tolerance frame by frame on the first material and the second material obtains continuous similar frame;
Judge whether the duration of continuous similar frame is greater than scheduled duration;
If so, the confirmation continuous similar frame is same number of frames;
Conversely, then confirming that the continuous similar frame is not same number of frames.
Wherein, in a specific example, after obtaining head video file, it can also save, specifically include respectively:
The first video, the second video remaining video frame after interception are saved as into first content video file, second respectively Audio content file;
Head video file and first content video file, head video file and the second audio content file are obtained respectively Related information, and be saved in database.
In actual operation, user needs to obtain out all collection numbers an of film.
Then by first collection, second collection video raw frames are decoded since first frame, with second collection first frame into Row compares.
It is whether identical or can also compare whether the pixel of two frames exactly matches to compare two frames.But in some cases Under, the exact matching of compared pixels point is relatively difficult to realize exactly match for video compression frames.
Specifically, by the way that screen resolution is reduced to such as 1/4, experimental data and reality is can be used in resolution ratio reduction Conclusion progress is tested, such as 1/2 or 1/8 can also be reduced to.A possibility that resolution ratio due to will appear two videos is different, because This is compared with a low point resolution can be to avoid certain situations: such as video is compressed into the color occurred after small resolution ratio Difference just has large error compared with high-resolution.Because video be also possible to repeatedly compress be compressed to low resolution have turn At high-resolution, actual color is to have lost.After the resolution ratio of the present invention preferably 1/4, and it can modify according to time situation. For example the video of 1920x1080 and the video of 1280x720 compare, and resolution ratio are reduced to point all lower than the two numerical value Resolution compares, and could reduce in this way due to video compress bring error.The video erection of 1920x1080 is h.265 to damage pressure Contracting format rather than original video, color therein will be supplemented with difference arithmetic, and such supplement will lead to mistake when comparison Difference is very big, and such error can be reduced by reducing resolution ratio, excludes the pixel that difference is calculated.
After reducing resolution ratio, then compare each pixel color tolerance ((each component value of R, G, B be [0~ 255]), the value of three colors compares (10,10,10) respectively and (12,8,13) take wherein maximum difference 13-10=3, R and G poor 2) value absolute value is all.After comparison, predetermined ratio value can be selected to be both less than for the tolerance of 90% color based on experience value 10, then determine that two content frames are approximately uniform.
It should be understood that 90% is predetermined ratio value, it can rule of thumb judge to come, actual conditions tune can also be passed through It is whole and obtain.Similarly, 10 be predetermined tolerance, can also rule of thumb be judged, can also pass through actual conditions and adjust acquisition.
If with second to collect the first content frame approximately uniform for the first collection first frame, continue to compare first the second frame of collection and the Two the second frames of collection, until two frames are not approximately uniform.If consecutive identical frame number is greater than 10 seconds, (i.e. scheduled duration, can root Adjusted according to actual conditions), then determine that there are continuous same number of frames for two collection.
The former frame of first collection first frame to the frame number for not being same number of frames is intercepted out, saves as individual head video File.
Finally, can collect remaining frame number for first saves as first content video file, collects remaining frame number for second and save as Second audio content file.This similar method can also be applied to the 3rd collection, the 4th collection etc..
By in head video file and first content video file related information deposit database, head video file and the Two audio content file association informations are stored in database.It only needs to take out corresponding head according to related information after in this way and regard Frequency file and audio content document order play the effect can reach and playing originally.
For convenience of it will be appreciated by those skilled in the art that being illustrated below by way of a specific example.
Such as: " the fiery shadow person of bearing " this film first compares the first collection and the second collection.By the first collection, the second collection video The raw frames that resolution ratio is 640X480 are decoded since first frame and resolution ratio is reduced to 320X240, with the second collection First frame is compared.Compare since first pixel of the picture of first frame, coordinate is the pixel of (x, y)=(0,0) It is compared with the respective coordinates of the second collection for the color of the pixel of (x, y)=(0,0), such as first pixel of collection The color of the pixel of (x, y)=(0,0) is that (10,10,10) and (12,8,13) take wherein maximum difference 13-10=3, R and G Absolute difference is all 2) then to determine that two pixel colors of two collection are approximate.Then comparison (x, y)=(0,1), (x, y)= (0,2) until until (x, y)=(319,239).Then ratio of the pixel tolerance less than 10 for counting all is greater than 90% Then determine that this two content frame is approximately uniform.
If with second to collect the first content frame approximately uniform for the first collection first frame, continue to compare first the second frame of collection and the Two the second frames of collection, until two frames are not approximately uniform.If consecutive identical frame number is greater than 10 seconds, there are continuous phases for two collection It is at same frame.
The former frame of first collection first frame to not approximately uniform frame number is intercepted out, saves as individual head video File.
Collect remaining frame number for first and save as audio content file 1, collects remaining frame number for second and save as video file 2. This similar method can also be applied to the 3rd collection, the 4th collection.
Head video file and 1 related information of audio content file are stored in database, head video file and content 2 related information of video file is stored in database.Only need to be taken out according to related information later corresponding head video file with Audio content document order plays the effect that can reach as playing originally.
Accordingly, second embodiment of the present invention provides a kind of systems 100 for handling piece of video cephalic flexure, comprising:
Decoder module 110, for decoding the raw frames of video the first video and the second video, obtain the first material with Second material;
Comparison module 120 obtains same number of frames for since first frame, comparing the first material and the second material frame by frame;
Memory module 130 for intercepting continuous same number of frames from the first video, the second video, and saves as head view Frequency file.
Wherein, the memory module 130 further include:
Content storage unit, for the first video, the second video remaining video frame after interception to be saved as first respectively Audio content file, the second audio content file;
Associated storage unit, for obtaining head video file and first content video file, head video file respectively With the related information of the second audio content file, and it is saved in database.
The comparison module 120 further include:
Resolution elements, for the screen resolution of the first material and the second material to be reduced to 1/4;
Similar frame unit is obtained for comparing the color tolerance of pixel in the first material and the second material video frame one by one Obtain similar frame;
Identical frame unit meets the continuous similar frame of preset condition for obtaining duration, as same number of frames.
Further, the similar frame unit is also used to:
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is less than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
The identical frame unit is also used to:
The compared pixels point tolerance frame by frame on the first material and the second material obtains continuous similar frame;
Judge whether the duration of continuous similar frame is greater than scheduled duration;
If so, the confirmation continuous similar frame is same number of frames;
Conversely, then confirming that the continuous similar frame is not same number of frames.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in relevant technical field, similarly include In scope of patent protection of the invention.

Claims (8)

1. a kind of method for handling piece of video cephalic flexure characterized by comprising
The raw frames of the first video and the second video are decoded, the first material and the second material are obtained;
Since first frame, compare the first material and the second material frame by frame, obtains same number of frames;
Interception starts continuous same number of frames from the first video, the second video, and saves as head video file;
Wherein, further includes:
The first video, the second video remaining video frame after interception are saved as into first content video file, the second content respectively Video file;
The pass of head video file and first content video file, head video file and the second audio content file is obtained respectively Join information, and is saved in database.
2. a kind of method for handling piece of video cephalic flexure according to claim 1, which is characterized in that since first frame, frame by frame The step of comparing the first material and the second material, obtaining same number of frames specifically:
The screen resolution of first material and the second material is reduced;
The color tolerance for comparing pixel in the first material and the second material video frame one by one, obtains similar frame;
The continuous similar frame that duration meets preset condition is obtained, as same number of frames.
3. according to claim 2 it is a kind of handle piece of video cephalic flexure method, which is characterized in that compare one by one the first material with The color tolerance of pixel in second material video frame, the step of obtaining similar frame specifically:
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is greater than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
4. a kind of method for handling piece of video cephalic flexure according to claim 2, which is characterized in that obtain duration and meet default item The continuous similar frame of part, the step of as same number of frames specifically:
The compared pixels point tolerance frame by frame on the first material and the second material obtains continuous similar frame;
Judge whether the duration of continuous similar frame is greater than scheduled duration;
If so, the confirmation continuous similar frame is same number of frames;
Conversely, then confirming that the continuous similar frame is not same number of frames.
5. a kind of system for handling piece of video cephalic flexure characterized by comprising
Decoder module obtains the first material and the second element for decoding the raw frames of video the first video and the second video Material;
Comparison module obtains same number of frames for since first frame, comparing the first material and the second material frame by frame;
Memory module for the continuous same number of frames of interception beginning from the first video, the second video, and saves as head video text Part;
Wherein, the memory module further include:
Content storage unit, for the first video, the second video remaining video frame after interception to be saved as first content respectively Video file, the second audio content file;
Associated storage unit, for obtaining head video file and first content video file, head video file and the respectively The related information of two audio content files, and be saved in database.
6. a kind of system for handling piece of video cephalic flexure according to claim 5, which is characterized in that the comparison module is also wrapped It includes:
Resolution elements, for reducing the screen resolution of the first material and the second material;
Similar frame unit obtains phase for comparing the color tolerance of pixel in the first material and the second material video frame one by one Like frame;
Identical frame unit meets the continuous similar frame of preset condition for obtaining duration, as same number of frames.
7. a kind of system for handling piece of video cephalic flexure according to claim 6, which is characterized in that the similar frame unit is also used In:
The RGB component value of pixel in the first material and the second material video frame is compared one by one;
Judge whether maximum tolerance is less than predetermined tolerance in component value;
If so, thinking that pixel color is similar;
It is on the contrary, then it is assumed that pixel color is dissimilar;
The similar pixel total number of color is obtained, determines whether the total number ratio is greater than predetermined ratio value;
If so, the video frame that confirmation compares is similar frame;
Conversely, then confirming that the video frame of comparison is not similar frame.
8. a kind of system for handling piece of video cephalic flexure according to claim 6, which is characterized in that the identical frame unit is also used In:
The compared pixels point tolerance frame by frame on the first material and the second material obtains continuous similar frame;
Judge whether the duration of continuous similar frame is greater than scheduled duration;
If so, the confirmation continuous similar frame is same number of frames;
Conversely, then confirming that the continuous similar frame is not same number of frames.
CN201510904172.6A 2015-12-09 2015-12-09 Handle the method and system of piece of video cephalic flexure Active CN105554514B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510904172.6A CN105554514B (en) 2015-12-09 2015-12-09 Handle the method and system of piece of video cephalic flexure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510904172.6A CN105554514B (en) 2015-12-09 2015-12-09 Handle the method and system of piece of video cephalic flexure

Publications (2)

Publication Number Publication Date
CN105554514A CN105554514A (en) 2016-05-04
CN105554514B true CN105554514B (en) 2019-01-18

Family

ID=55833419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510904172.6A Active CN105554514B (en) 2015-12-09 2015-12-09 Handle the method and system of piece of video cephalic flexure

Country Status (1)

Country Link
CN (1) CN105554514B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108259992B (en) * 2018-04-25 2021-02-23 浙江博尚电子有限公司 Network television set top box video transmission method
CN108924586B (en) * 2018-06-20 2021-01-08 北京奇艺世纪科技有限公司 Video frame detection method and device and electronic equipment
CN110290420A (en) * 2019-07-05 2019-09-27 山东云缦智能科技有限公司 A method of TV play head/run-out automatic identification is realized based on frame feature
CN110996149A (en) * 2019-12-23 2020-04-10 联想(北京)有限公司 Information processing method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076115A (en) * 2006-12-26 2007-11-21 腾讯科技(深圳)有限公司 System and method for verifying video content
CN103108033A (en) * 2013-01-09 2013-05-15 广东一一五科技有限公司 File uploading method and system
CN103118045A (en) * 2011-11-17 2013-05-22 腾讯科技(深圳)有限公司 Method and system of off-line downloading
CN103618911A (en) * 2013-10-12 2014-03-05 北京视博云科技有限公司 Video streaming providing method and device based on video attribute information

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006304272A (en) * 2005-03-25 2006-11-02 Matsushita Electric Ind Co Ltd Transmitting device
JP4948147B2 (en) * 2006-12-15 2012-06-06 富士通株式会社 Method and apparatus for editing composite content file
CN101354745B (en) * 2008-09-03 2011-05-04 深圳市迅雷网络技术有限公司 Method and apparatus for recognizing video document

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101076115A (en) * 2006-12-26 2007-11-21 腾讯科技(深圳)有限公司 System and method for verifying video content
CN103118045A (en) * 2011-11-17 2013-05-22 腾讯科技(深圳)有限公司 Method and system of off-line downloading
CN103108033A (en) * 2013-01-09 2013-05-15 广东一一五科技有限公司 File uploading method and system
CN103618911A (en) * 2013-10-12 2014-03-05 北京视博云科技有限公司 Video streaming providing method and device based on video attribute information

Also Published As

Publication number Publication date
CN105554514A (en) 2016-05-04

Similar Documents

Publication Publication Date Title
CN105554514B (en) Handle the method and system of piece of video cephalic flexure
US8400566B2 (en) Feature optimization and reliability for audio and video signature generation and detection
US8373616B2 (en) Locating and displaying method upon a specific video region of a computer screen
CN107682714B (en) Method and device for acquiring online video screenshot
EP2109313B1 (en) Television receiver and method
US11023115B2 (en) Circular video player controls
JP5820986B2 (en) Video receiving apparatus and image recognition method for received video
WO2017135133A1 (en) Communication apparatus, communication control method, and computer program
US20110064129A1 (en) Video capture and generation at variable frame rates
US10250838B1 (en) System and method for converting live action alpha-numeric text to re-rendered and embedded pixel information for video overlay
US20150007236A1 (en) Methods, systems, and media for presenting media content using integrated content sources
WO2017113602A1 (en) Method for previewing video program and smart tv
CN105491395B (en) Server video management method and system
US20170188086A1 (en) Video frame bookmarking user interface component
US10359847B2 (en) Advertisement viewing bypass prevention user interface component
US20130121588A1 (en) Method, apparatus, and program for compressing images, and method, apparatus, and program for decompressing images
EP3107283A1 (en) Method and apparatus for transmitting video signal
US20190103071A1 (en) Frame drop processing method and system for played ppt
CN102724582A (en) Method for displaying color key based on user interface
EP1251702A3 (en) Video encoding and decoding
US8873642B2 (en) Video content analysis methods and systems
US9071881B2 (en) Identifying an end of a television program
CN104754367A (en) Multimedia information processing method and device
US20130229575A1 (en) Digital TV Data Processing Method and System Thereof
CN103686348B (en) The coding/decoding method of image and device

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
GR01 Patent grant