For providing the method and apparatus of video segment set
Technical field
The present invention relates to video technique field, particularly relating to a kind of for providing method and the device of video segment set.
Background technology
User often wishes to watch the video segment set be made up of one or more video segment, and such as, user may wish the goal video segment set etc. watching certain soccer star.
Each video segment collected normally carries out decompressing by traditional video service providing (such as video website etc.) respectively, splice, transcoding, is saved in server to be distributed to user afterwards as a new file.
But the links such as the decompression in this mode, splicing, transcoding can bring the trouble in process.And, the new file that this mode produces is repetition with some video segment of having stored on server in terms of content, this repeated storage to same content wastes server stores resources, and the storage of the many places of identical content is also not easy to unified management.In addition, the new file produced also is not easy to amendment.
Summary of the invention
In view of this, the present invention proposes a kind of for providing the method for video segment set, to overcome above-mentioned shortcoming of the prior art.
According to an aspect of the present invention, propose a kind of for providing the method for video segment set, the method comprises: send the request for video segment set, and described video segment set comprises at least one video segment; Receive the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment; Each video segment is read based on described document of agreement; And based on described document of agreement, read video segment is shown.
According to a further aspect in the invention, propose a kind of for providing the method for video segment set, the method comprises: receive the request for video segment set, and described video segment set comprises at least one video segment; Send the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment; And provide each video segment for display based on described document of agreement.
According to a further aspect in the invention, propose that a kind of this device comprises: transmit block for providing the device of video segment set, for sending the request for video segment set, described video segment set comprises at least one video segment; Receiving-member, for receiving the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment; Fetch unit, for reading each video segment based on described document of agreement; And display unit, for showing read video segment based on described document of agreement.
According to a further aspect in the invention, propose that a kind of this device comprises: receiving-member for providing the device of video segment set, for receiving the request for video segment set, described video segment set comprises at least one video segment; Transmit block, for sending the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment; And video segment provides parts, for providing each video segment for display based on described document of agreement.
According to each aspect of the present invention, avoid the process that in conventional method, decoding, splicing, transcoding etc. are complicated, because each video segment keeps original storage mode constant, new video file is not generated yet, therefore the repeated storage to identical content is avoided, save memory space, be also convenient to management simultaneously.In addition, owing to carrying out based on document of agreement the reading of video segment and display, therefore by amendment document of agreement, reading and the display mode (such as DISPLAY ORDER etc.) of video segment can just be changed, more easy compared to revising conventional method.
According to below with reference to the accompanying drawings to detailed description of illustrative embodiments, further feature of the present invention and aspect will become clear.
Accompanying drawing explanation
Comprise in the description and form the accompanying drawing of a part for specification and specification together illustrates exemplary embodiment of the present invention, characteristic sum aspect, and for explaining principle of the present invention.
Fig. 1 illustrates according to an embodiment of the invention for providing the flow chart of the method for video segment set.
Fig. 2 illustrates the flow chart of the method for providing video segment set of an example according to the embodiment of the present invention.
Fig. 3 illustrates according to another embodiment of the present invention for providing the flow chart of the method for video segment set.
Fig. 4 illustrates according to another embodiment of the present invention for providing the structured flowchart of the device of video segment set.
Fig. 5 illustrates according to another embodiment of the present invention for providing the structured flowchart of the device of video segment set.
Fig. 6 shows a kind of for providing the structured flowchart of the equipment of video segment set of an alternative embodiment of the invention.
Embodiment
Various exemplary embodiment of the present invention, characteristic sum aspect is described in detail below with reference to accompanying drawing.The same or analogous element of Reference numeral presentation function identical in accompanying drawing.Although the various aspects of embodiment shown in the drawings, unless otherwise indicated, accompanying drawing need not be drawn in proportion.
Word " exemplary " special here means " as example, embodiment or illustrative ".Here need not be interpreted as being better than or being better than other embodiment as any embodiment illustrated by " exemplary ".
In addition, in order to better the present invention is described, in embodiment hereafter, give numerous details.It will be appreciated by those skilled in the art that do not have some detail, the present invention can implement equally.In some instances, the method known for those skilled in the art, means, element and circuit are not described in detail, so that highlight purport of the present invention.
embodiment 1
Fig. 1 illustrates according to an embodiment of the invention for providing the flow chart of the method for video segment set.As shown in Figure 1, the method mainly comprises:
Step 101, sends the request for video segment set, and described video segment set comprises at least one video segment,
Step 102, receive the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment,
Step 103, reads each video segment based on described document of agreement, and
Step 104, shows read video segment based on described document of agreement.
Not video segment is spliced according to the method for this embodiment and form a new video, but the information of each video segment is provided by document of agreement, according to this document of agreement, just can read and show each video segment, that is, the present embodiment, when the video not having actual formation one new, achieves the object showing the video segment set be made up of each video segment.
According to this embodiment, avoid the process that in conventional method, decoding, splicing, transcoding etc. are complicated, because each video segment keeps original storage mode constant, new video file is not generated yet, therefore the repeated storage to identical content is avoided, save memory space, be also convenient to management simultaneously.In addition, owing to carrying out based on document of agreement the reading of video segment and display, therefore by amendment document of agreement, reading and the display mode (such as DISPLAY ORDER etc.) of video segment can just be changed, more easy compared to revising conventional method.
" video segment " as herein described can be one section of video data or the video file with any coded format, and the coded format forming each video segment of video segment set can be different, and can collect based on any principle as required.In one example, each video segment forming same video segment set can comprise the content be associated, such as, comprise same personage, similar plot etc.
In one example, request for video segment set can be sent by client.This request can be in response to user and triggers the feature (such as link, button, icon etc.) that is associated with video segment set on the client and generate.In one example, the request generated can be sent to server.
In one example, can receive by client the document of agreement be associated with this video segment set, this document of agreement can be provided in response to receiving above-mentioned request by server.Such as, can by HTTP by document of agreement from server sync to client.This document of agreement can comprise the information relevant with each video segment.In one example, information such as can comprise the memory address of each video segment, and/or the coded format etc. of each video segment.It will be understood by those skilled in the art that the information that document of agreement comprises is not limited thereto, as long as client can be impelled to read and show each video segment.
Comprise at document of agreement in the example of the memory location of each video segment, each video segment can be read according to this memory location.Comprise at document of agreement in the example of the coded format of each video segment, can decode respectively to each video segment according to the coded format in document of agreement, and decoded video segment is shown.
In one example, the schematic and nonrestrictive example of document of agreement can comprise and the one or more relevant information in the size of the memory location of video segment, video segment ID, video segment, frame per second, code check, resolution, audio format, video format, video flowing structure, key frame position, Presentation Time Stamp, decoded time stamp.The operations such as these information can read video segment set, decode, show for client, drag and drop display.Alternatively, document of agreement also can comprise the information relevant with video segment Set Global, total duration of such as video segment set, totalframes, all audio formats related to and video format etc.In one example, client is after receiving document of agreement, the information that obtains wherein can be resolved to document of agreement, and based on these information, initialization is carried out to client media module, such as initialization data stream protocol, initialization encoding and decoding storehouse, initialize queue and display frame etc., think that follow-up reading and Graphics Processing are prepared.
In one example, in response to the request for video segment set, can give tacit consent to the video segment order set by document of agreement, from first video segment, order reads and shows each video segment.
Provide another kind of example below in conjunction with Fig. 2, it can locate required display position, carries out reading and showing using any key frame as starting point.
Fig. 2 illustrates the flow chart of the method for providing video segment set of an example according to the embodiment of the present invention.The step that in Fig. 2, label is identical with Fig. 1 has identical operation, for simplicity's sake, omits the detailed description to these steps.
Document of agreement in example shown in Fig. 2 also can comprise the information relevant with key frame position in each video segment.Based on this, the example shown in Fig. 2 also can comprise the following steps on basis embodiment illustrated in fig. 1:
Step 201, receives the instruction relevant to required display position,
Step 202, in described document of agreement, determines the key frame position corresponding with required display position,
Step 203, sends the request for determined key frame position,
Step 204, using determined key frame position as starting point, performs step 103, namely reads each video segment based on described document of agreement, and perform step 104, show based on the carrying out of described document of agreement to read video segment.
The quick position of this example implementation to required display position, can as starting point, read video segment set and show by any key frame position in video segment set.
In one example, the information relevant with key frame position in each video segment comprised in document of agreement can comprise the deviation post (being generally the deviation post on time shaft) of each key frame in each video segment, alternatively, the physical location of key frame can also be comprised.
In one example, user by the dragging bar etc. on display interface, can indicate required display position.This position may correspond to the position sometime on the time shaft of video segment set.In one example, order and the duration of each video segment can be comprised in document of agreement, thus, needed for just user can being indicated, display position navigates to the some time locations in some video segments, can determine key frame position corresponding with it.
Using this key frame position as starting point, step 103 and 104 can be performed.Such as, from this key frame position, can read the video segment at this key frame position place, then order reads other video segments, and shows read video segment.Like this, display from user's desired location is just achieved rapidly.
In another example, document of agreement can comprise the Presentation Time Stamp of each video segment, and for adjacent two video segments, last Presentation Time Stamp of last video segment is adjacent with first Presentation Time Stamp of next video segment, keeps continuously to ensure to show when switching between each video segment.
In another example, if there is mistake in procedure for displaying, the operation with user can be responded, re-execute from step 101 or 201, restart display with display position needed for the acquiescence original position of video segment set or user's instruction.
embodiment 2
Fig. 3 illustrates according to another embodiment of the present invention for providing the flow chart of the method for video segment set.As shown in Figure 3, the method mainly comprises:
Step 301, receives the request for video segment set, and described video segment set comprises at least one video segment;
Step 302, send the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment; And
Step 303, provides each video segment for display based on described document of agreement.
In one example, the request for video segment set from client can be received by server (server of such as video service providing), and send the document of agreement be associated with asked video segment set.Explanation about each example of document of agreement can see embodiment 1.
In one example, document of agreement can comprise the memory location of each video segment, and server can provide each video segment to client for display according to this memory location.
In one example, document of agreement can comprise the information relevant with key frame position in each video segment, server can receive the request for key frame position from client, and wherein this key frame position can be determined according to described document of agreement, and corresponding with required display position.Server can using received key frame position as starting point, there is provided each video segment for display based on described document of agreement, thus the quick position realized required display position, can as starting point, read video segment set and show by any key frame position in video segment set.
embodiment 3
Fig. 4 illustrates according to another embodiment of the present invention for providing the structured flowchart of the device of video segment set.According to Fig. 4, this device 400 mainly comprises:
Transmit block 401, for sending the request for video segment set, described video segment set comprises at least one video segment;
Receiving-member 402, for receiving the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment;
Fetch unit 403, for reading each video segment based on described document of agreement; And
Display unit 404, for showing read video segment based on described document of agreement.
In one example, described document of agreement can comprise the memory location of each video segment, and wherein, reading each video segment based on described document of agreement can comprise: read each video segment according to described memory location.
In one example, described document of agreement can comprise the information relevant with the coded format of each video segment, wherein, carry out display based on described document of agreement to read video segment can comprise: decode respectively to each video segment according to the information relevant with the coded format of each video segment in described document of agreement, and show decoded each video segment.
In one example, described document of agreement can comprise the information relevant with key frame position in each video segment.
In one example, this device also can comprise: for receiving the parts of the instruction relevant to required display position; For according to described document of agreement, determine the parts of the key frame position corresponding with required display position; For sending the parts of the request for determined key frame position; For using determined key frame position as starting point, read the parts of each video segment based on described document of agreement; And the parts for showing based on the carrying out of described document of agreement to read video segment.
In one example, described document of agreement can comprise the Presentation Time Stamp of each video segment, and for adjacent two video segments, last Presentation Time Stamp of last video segment is adjacent with first Presentation Time Stamp of next video segment.
In one example, this device also can comprise: for resolving document of agreement, and carries out initialized parts based on the information obtained after parsing to client media module.
In one example, described document of agreement can comprise and the one or more relevant information in the size of the memory location of video segment, video segment ID, video segment, frame per second, code check, resolution, audio format, video format, video flowing structure, key frame position, Presentation Time Stamp, decoded time stamp.
embodiment 4
Fig. 5 illustrates according to another embodiment of the present invention for providing the structured flowchart of the device of video segment set.According to Fig. 5, this device 500 mainly comprises:
Receiving-member 501, for receiving the request for video segment set, described video segment set comprises at least one video segment;
Transmit block 502, for sending the document of agreement be associated with asked video segment set, wherein this document of agreement comprises the information relevant with each video segment; And
Video segment provides parts 503, for providing each video segment for display based on described document of agreement.
In one example, described document of agreement can comprise the memory location of each video segment, wherein, provides each video segment can comprise for display: to provide each video segment for display according to described memory location based on described document of agreement.
In one example, described document of agreement can comprise the information relevant with key frame position in each video segment.
In one example, this device also can comprise: for receiving the parts of the request for key frame position, wherein this key frame position is determined according to described document of agreement, and corresponding with required display position; And for using received key frame position as starting point, provide each video segment for the parts of display based on described document of agreement.
In one example, described document of agreement can comprise the Presentation Time Stamp of each video segment, and for adjacent two video segments, last Presentation Time Stamp of last video segment is adjacent with first Presentation Time Stamp of next video segment.
In one example, described document of agreement can comprise and the one or more relevant information in the size of the memory location of video segment, video segment ID, video segment, frame per second, code check, resolution, audio format, video format, video flowing structure, key frame position, Presentation Time Stamp, decoded time stamp.
embodiment 5
Fig. 6 shows a kind of for providing the structured flowchart of the equipment of video segment set of an alternative embodiment of the invention.Described for providing the equipment 1100 of video segment set can be possess the host server of computing capability, personal computer PC or portable portable computer or terminal etc.The specific embodiment of the invention does not limit the specific implementation of computing node.
Described for providing the equipment 1100 of video segment set to comprise processor (processor) 1110, communication interface (CommunicationsInterface) 1120, memory (memory) 1130 and bus 1140.Wherein, processor 1110, communication interface 1120 and memory 1130 complete mutual communication by bus 1140.
Communication interface 1120 for network device communications, wherein the network equipment comprise such as Virtual Machine Manager center, share store etc.
Processor 1110 is for executive program.Processor 1110 may be a central processor CPU, or application-specific integrated circuit ASIC (ApplicationSpecificIntegratedCircuit), or is configured to the one or more integrated circuits implementing the embodiment of the present invention.
Memory 1130 is for storing documents.Memory 1130 may comprise high-speed RAM memory, still may comprise nonvolatile memory (non-volatilememory), such as at least one magnetic disc store.Memory 1130 also can be memory array.Memory 1130 also may by piecemeal, and described piece can become virtual volume by certain principle combinations.
In a kind of possible execution mode, said procedure can be the program code comprising computer-managed instruction.This program specifically can be used for each step of the method for providing video segment set realized according to the embodiment of the present invention.
Those of ordinary skill in the art can recognize, each exemplary cell in embodiment described herein and algorithm steps, can realize with the combination of electronic hardware or computer software and electronic hardware.These functions realize with hardware or software form actually, depend on application-specific and the design constraint of technical scheme.Professional and technical personnel can realize described function for specific application choice diverse ways, but this realization should not thought and exceeds scope of the present invention.
If using the form of computer software realize described function and as independently production marketing or use time, then can think that all or part of (such as to the part that prior art contributes) of technical scheme of the present invention embodies in form of a computer software product to a certain extent.This computer software product is stored in the non-volatile memory medium of embodied on computer readable usually, comprises all or part of step of some instructions in order to make computer equipment (can be personal computer, server or the network equipment etc.) perform various embodiments of the present invention method.And aforesaid storage medium comprises USB flash disk, portable hard drive, read-only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of described claim.