The seed file processing method and processing device of video
Technical field
The present invention relates to the seed file processing method and processing device of technical field of video processing, more particularly to video.
Background technology
For a long time, seed file always carries out a kind of main way of the resources of movie & TV download, common seed file
Form has torrent, qsed etc..Seed file only comprising the seed information for carrying download relevant information, volume very little, is adapted to
Propagated on the net.
Although seed file has the advantage that small volume is easily propagated, but carry download relevant information because itself is only stored
Seed information, therefore the content of video resource to be downloaded can not be directly displayed, it is impossible to give the intuitively visual experience of user one.Although
Preview can be carried out by first downloading the picture inside seed, but process is cumbersome, and Consumer's Experience is poor.
The content of the invention
The embodiment of the present invention provides a kind of seed file processing method of video, to realize the pass of seed information and picture
Connection, the video viewing experience of user is improved, the popularization for being advantageous to video resource is propagated, and this method includes:
Obtain the seed information of video;
Obtain the picture associated with the video;
The seed information is write into the picture, generates the picture seed file of the video;
Player obtains and parses the picture seed file, obtains the seed information;
According to the seed information, obtain and play the video, including:
Sectional drawing, the seed information in the picture is the video include the picture in the video
During the sectional drawing time, according to the sectional drawing timi requirement play position, the video is commenced play out from the play position.
In one embodiment, the picture associated with the video is obtained, including:
Obtain JPEG (Joint Photographic Experts Group, the joint image associated with the video
Panel of expert) form or TIFF (Tagged Image File Format, tag tmage file) forms or RIFF (Resource
Interchange File Format, Resource Interchange File) form picture;
The seed information is write into the picture, including:
The seed information is set up to the EXIF of the picture in the jpeg format or tiff format or RIFF forms
In (Exchangeable Image File, exchangeable image file) information.
In one embodiment, the picture associated with the video is obtained, including:
Obtaining the image exchange GIF associated with the video, (Graphics Interchange Format, image are mutual
Change) picture of form;
The seed information is write into the picture, including:
The seed information is set up in the content field of the picture of the GIF forms.
In one embodiment, the picture associated with the video is obtained, including:
Obtain BMP (Bitmap, the bitmap) form or PNG (Portable Network associated with the video
Graphic Format, portable network graphic) form picture;
The seed information is write into the picture, including:
The seed information is appended to the tail of file of the picture of the BMP forms or PNG format.
The embodiment of the present invention also provides a kind of seed file processing unit of video, to realize seed information and picture
Association, the video viewing experience of user is improved, the popularization for being advantageous to video resource is propagated, and the device includes:
Information acquisition module, for obtaining the seed information of video;
Picture obtains module, for obtaining the picture associated with the video;
File generating module, for the seed information to be write into the picture, generate the picture kind Ziwen of the video
Part;
Picture parsing module, for obtaining and parsing the picture seed file, obtain the seed information;
Video playback module, for according to the seed information, obtaining and playing the video, including:
Sectional drawing, the seed information in the picture is the video include the picture in the video
During the sectional drawing time, according to the sectional drawing timi requirement play position, the video is commenced play out from the play position.
In one embodiment, the picture obtains module and is specifically used for:
Obtain the jpeg format or the picture of tiff format or RIFF form associated with the video;
The file generating module is specifically used for:
The seed information is set up to the EXIF information of the picture in the jpeg format or tiff format or RIFF forms
In.
In one embodiment, the picture obtains module and is specifically used for:
Obtain the picture of the GIF form associated with the video;
The file generating module is specifically used for:
The seed information is set up in the content field of the picture of the GIF forms.
In one embodiment, the picture obtains module and is specifically used for:
Obtain the picture of the BMP form associated with the video or PNG format;
The file generating module is specifically used for:
The seed information is appended to the tail of file of the picture of the BMP forms or PNG format.The embodiment of the present invention
In, the seed information of video and the picture associated with video are obtained, seed information is write into picture, generates the picture kind of video
Subfile, it is achieved thereby that seed information and picture associate, by adding seed information in picture, make one
" picture seed ", video content is presented in front of the user in a manner of more intuitive, picture seed file realizes real " institute
See i.e. gained ", Consumer's Experience is improved, the popularization for being advantageous to video resource is propagated.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.In the accompanying drawings:
Fig. 1 is the process chart of the seed file processing method of video in the embodiment of the present invention;
Fig. 2 is the process chart of the instantiation of the seed file processing method of video in the embodiment of the present invention;
Fig. 3 is the structural representation of the seed file processing unit of video in the embodiment of the present invention.
Embodiment
For the purpose, technical scheme and advantage of the embodiment of the present invention are more clearly understood, below in conjunction with the accompanying drawings to this hair
Bright embodiment is described in further details.Here, the schematic description and description of the present invention is used to explain the present invention, but simultaneously
It is not as a limitation of the invention.
Fig. 1 is the process chart of the seed file processing method of video in the embodiment of the present invention.As shown in figure 1, this hair
The seed file processing method of video can include in bright embodiment:
Step 101, the seed information for obtaining video;
Step 102, obtain the picture associated with the video;The execution of step 102 and step 101 is successively suitable in implementation
Sequence has no effect on the specific implementation of the present embodiment video seed file processing method;
Step 103, the seed information write into the picture, generate the picture seed file of the video.
Flow is it is known that in the embodiment of the present invention as shown in Figure 1, obtains the seed information of video and associated with video
Picture, seed information is write into picture, generates the picture seed file of video, it is achieved thereby that the pass of seed information and picture
Connection, by adding seed information in picture, one " picture seed " is made, is in by video content in a manner of more intuitive
Now in front of the user, picture seed file realizes real " What You See Is What You Get ", improves Consumer's Experience, is advantageous to video money
The popularization in source is propagated.
When it is implemented, the picture associated with video can be video interception, poster, stage photo, performer's picture etc. with regarding
Frequently relevant picture.The picture associated with video can have multiple format, such as can be the picture of jpeg format, can be with
It is the picture of the forms such as TIFF, RIFF, BMP, PNG or GIF.The seed information of video can include much information, such as can
With including:The source-information of video, such as storage address, the source web information of video etc. of video in local, specifically, example
Such as can be seed address or URL (the Uniform/Universal Resource of source video sequence website of video
Locator, URL) or be hash corresponding to video (Hash) value etc..The seed information of video for example may be used also
With including:The information related to video such as the title of video, file size, playing duration.If picture is the sectional drawing in video,
The seed information of video can also include:The sectional drawing time of picture, such as picture is 20:00 carries out sectional drawing, or picture is 9:
00 carries out sectional drawing;Or it can include:The sectional drawing time of picture in video, such as certain picture are 5 minutes after video starts
When sectional drawing, or the sectional drawing at 5 minutes before video terminates, or when video playback passes through total playing duration 1/3
Sectional drawing etc..
When it is implemented, the mode of the seed information write-in picture associated with video can be had a variety of.For example, obtaining
After the picture for obtaining the jpeg format associated with video or tiff format or RIFF forms, seed information can be set up in
In the EXIF information of the picture of jpeg format or tiff format or RIFF forms.As an example, believe in the EXIF of jpeg format picture
Set up the seed information of following video in breath, the picture of tiff format or RIFF forms is similar:
1)Exif.Image.Copyright:Store seed address;
2)Exif.Image.ImageDescription:Store URL (browsing referer, i.e. source website address);
3)Exif.Image.Model:Store hash;
4)Exif.Image.Artist:Store film name;
5)Exif.Image.Make:Storage file size;
6)Exif.Photo.DataTimeOriginal:Store the sectional drawing time;
7)Exif.Photo.SubSecTimeOriginal:Store time (by second calculate) of the sectional drawing in film.
And for example, after the picture of the GIF form associated with video is obtained, seed information can be set up in GIF lattice
In content (Comment) field of the picture of formula.
And for example, seed information can be appended to the tail of file of picture associated with video, i.e., whole picture file
Afterbody, several last bytes of picture file.For example added in the picture file afterbody of the forms such as BMP or PNG into video
Seed information, the picture format for carrying video seed information in implementing certainly in a manner of picture file afterbody adds by this may be used also
To be other forms, such as the picture of the form such as JPEG is also feasible when implementing, and those skilled in the art can be according to reality
The applicable picture format of selection is needed, so that the figure of the video seed file processing method compatibility different-format of the embodiment of the present invention
Piece.
When it is implemented, form when the seed information of video is appended to picture file afterbody can also be according to being actually needed
Setting, such as each information field can be separated with vertical line " | ".As an example:
Seed address | URL (browses referer) | hash | film name | file size | the sectional drawing time | sectional drawing is in film
Time (by the second calculate).
Because the picture of every kind of form has the image information end mark of its own, therefore the seed information of video is with addition
Mode when being added to the tail of file of picture, have no effect on the normal display of picture.By taking the picture of BMP forms as an example:
BMP bitmap files can be regarded as to be made up of 4 parts:Bitmap file head (bitmap-file header), bitmap letter
Cease head (bitmap-information header), color table (color table) and the array of bytes for defining bitmap.In place
In figure information header, the following information such as the size of bitmap is saved:
Picture reading software can calculate the size of the array of bytes of the view data of bitmap by information above, read
After view data, content below is just no longer managed, this also make it that the idea in tail of file addition extraneous information is achieved.
Other types of picture, simply fileinfo form is different, and principle is the same.
When it is implemented, the picture seed file progress of above-mentioned generation and broadcasting for picture associated video can also be utilized
Put.Specifically, player can obtain picture seed file, picture seed file is parsed, obtains picture seed file
The video seed information of middle carrying, the seed information obtained further according to parsing obtain and play the video of association.Resolving has
Body can be using for example, in picture as jpeg format picture and when seed information is set up into the EXIF information in picture, can be to JPEG
EXIF information is parsed in the picture of form, obtains the seed information for setting up the video in EXIF information;And for example, it is in picture
The picture of GIF forms, and seed information is set up when Comment fields, Comment fields can be parsed, obtained
Set up in the seed information of the video of Comment fields;And for example, in the picture that picture is BMP forms or PNG format, and will kind
When sub-information is appended to picture file afterbody, the tail of file information of picture can be parsed, acquisition is appended to picture text
The seed information of the video of part afterbody.
When it is implemented, if picture includes section of picture in video for the sectional drawing in video, the seed information of video
Scheme the time, then, can be according to sectional drawing timi requirement play position, from being positioned when playing video according to the seed information of video
Play position commence play out video.Such as the sectional drawing that picture is film, it is possible to achieve automatic slow after picture is dragged in into player
The position of sectional drawing is flushed to, continues to play.So, user is directly targeted to play position by video interception, may be constructed perfection
Consumer's Experience.
The video seed file processing method of the embodiment of the present invention can be implemented by that can realize the device of its function,
The device can be hardware entities, such as some Video Codecs or software module, such as some can handle video
Software of information etc. or realized, such as be implanted at a video in a manner of software module is combined by hardware entities
Software is managed, and the Video processing unit equipment of information exchange is carried out by the Video processing software.
Fig. 2 is the process chart of the instantiation of the seed file processing method of video in the embodiment of the present invention.Such as Fig. 2
It is shown, in the seed file processing method of the video of this example, the picture associated with video be video in sectional drawing, video playback
Device software is firstly received the instruction of user's sectional drawing, calls the pictures of sectional drawing interface intercepts one of playing module, and operation layer is sentenced again
Break currently playing film whether network file, if eligible, that is, pass through mixed-media network modules mixed-media take out network file seed believe
Breath, then seed information is written in sectional drawing picture according to corresponding rule, concrete processing procedure can include:
Step 201, receive the sectional drawing instruction that user sends to the film played;
Step 202, according to the sectional drawing of user instruction to film carry out sectional drawing, internal memory obtain a sectional drawing picture;
Step 203, the sectional drawing picture in internal memory preserved to hard disk;
Step 204, judge whether the film that current sectional drawing picture associates is network file;It is no if then performing step 205
Then terminate to handle;
The seed letter such as step 205, the network file task type for obtaining film, hash, URL, task size, seed address
Breath;
Step 206, judge film network file task type whether be P2P (Peer to Peer, peer-to-peer network) or
Task in Online Video player;If then performing step 207, otherwise terminate to handle;
Step 207, the form for judging sectional drawing picture;If jpeg format, then step 208 is performed;If BMP forms, then
Perform step 210;If GIF forms, then step 212 is performed;
Step 208, by seed information write jpeg format picture in EXIF information;
Step 209, save as JPEG picture seed file, end processing;
Step 210, seed information pressed into qvod:// form writes the tail of file of BMP format pictures;
Step 211, save as BMP format picture seed files, end processing;
Step 212, seed information pressed into qvod:In the Comment fields of // form write-in GIF format pictures;
Step 213, save as GIF format picture seed files, end processing.
Based on same inventive concept, a kind of seed file processing unit of video is additionally provided in the embodiment of the present invention, such as
Described in the following examples.The seed file for solving the principle of problem and video due to the seed file processing unit of video is handled
Method is similar, therefore the implementation of the seed file processing unit of video may refer to the reality of the seed file processing method of video
Apply, repeat part and repeat no more.
Fig. 3 is the structural representation of the seed file processing unit of video in the embodiment of the present invention.As shown in figure 3, this hair
The seed file processing unit of video can include in bright embodiment:
Information acquisition module 301, for obtaining the seed information of video;
Picture obtains module 302, for obtaining the picture associated with the video;
File generating module 303, for the seed information to be write into the picture, generate the picture seed of the video
File.
Specifically it can be used for when it is implemented, the picture obtains module 302:
Obtain, jpeg format associated with the video or the picture of tiff format or RIFF forms;
The file generating module 303 specifically can be used for:
The seed information is set up to the EXIF information of the picture in the jpeg format or tiff format or RIFF forms
In.
Specifically it can be used for when it is implemented, the picture obtains module 302:
Obtain the picture of the GIF form associated with the video;
The file generating module 303 specifically can be used for:
The seed information is set up in the content field of the picture of the GIF forms.
Specifically it can be used for when it is implemented, the picture obtains module 302:
Obtain the picture of the BMP form associated with the video or PNG format;
The file generating module 303 specifically can be used for:
The seed information is appended to the tail of file of the picture of BMP forms or PNG format.
When it is implemented, the seed file processing unit of video can also include in the embodiment of the present invention:
Picture parsing module, for obtaining and parsing the picture seed file, obtain the seed information;
Video playback module, for according to the seed information, obtaining and playing the video.
When it is implemented, the video playback module specifically can be used for:
Sectional drawing, the seed information in the picture is the video include the picture in the video
During the sectional drawing time, according to the sectional drawing timi requirement play position, the video is commenced play out from the play position.
In summary, in the embodiment of the present invention, the seed information of video and the picture associated with video are obtained, by seed
Information writes picture, generates the picture seed file of video, it is achieved thereby that seed information and picture associate, by picture
In add seed information, make one " picture seed ", in a manner of more intuitive by video content present in front of the user,
Picture seed file realizes real " What You See Is What You Get ", improves Consumer's Experience, and the popularization for being advantageous to video resource is propagated.
User's (carrying seed information) after the picture oneself liked is seen, picture directly can be dragged in video player viewing shadow
Piece;It if the sectional drawing of film, can also realize after being dragged in video player, the position of automatic buffer to sectional drawing, continue to play,
Perfect play is formed to experience.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Particular embodiments described above, the purpose of the present invention, technical scheme and beneficial effect are carried out further in detail
Describe in detail it is bright, should be understood that the foregoing is only the present invention specific embodiment, the guarantor being not intended to limit the present invention
Scope is protected, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc., should be included in this
Within the protection domain of invention.