Summary of the invention
The purpose of this invention is to provide a kind of method that in the IPTV that uses towards digital TV direct (broadcasting), program request, time shift etc., realizes picture-in-picture, save Network Transmission bandwidth and client hardware processing and memory space to reach, guarantee the view reception effect of client simultaneously.Core concept is the video flowing that undersized picture uses low code check.
For achieving the above object, the present invention takes following technical scheme: a kind of method that realizes picture-in-picture in IPTV, it is identical that its video code conversion that is multi-media signal that content supplier is provided by the IPTV head-end system converts a plurality of contents to, the different video flowing of size (code check), and duplicate and be distributed on each edge/Distributor, according to the request of client, utilize timestamp information by edge/Distributor, client-requested is carried out the simultaneous operation of Switch Video stream video flowing.
Client's handoff request during for live or broadcasting, edge/Distributor is according to the switching position that represents timestamp positioning video stream.
When representing timestamp positioning video switching position, the initial p TS that establishes the large scale streaming medium content is PTS
Il, current PTS is PTS
Cl, the initial p TS of corresponding small size streaming medium content is PTS
Is, current PTS is PTS
Cs, PTS then
Cl-PTS
Il=PTS
Cs-PTS
Is
When representing the switching position of timestamp positioning video stream, need do two agreements: first code stream switches and must handle if switching point, carry out suitable delay not in the end of image sets in the end of image sets; The timestamp that represents of second each video flowing of hypothesis is synchronous all the time.
When representing the switching position of timestamp positioning video stream, need do two agreements: first code stream switches and must handle if switching point, carry out suitable delay not in the end of image sets in the end of image sets; The timestamp that represents of second each video flowing of hypothesis is synchronous all the time.
Client's handoff request during for program request, time shift, edge/Distributor is according to the switching position of decoded time stamp positioning video stream.
During according to the switching position of decoded time stamp positioning video stream, the initial DTS that establishes the large scale streaming medium content is DTS
Il, current DTS is DTS
Cl, the initial DTS of corresponding small size streaming medium content is DTS
Is, current DTS is DTS
Cs, DTS then
Cl-DTS
Il=DTS
Cs-DTS
Is
During according to the switching position of decoded time stamp positioning video stream, need do an agreement: promptly code stream switches and must handle if switching point, carry out suitable delay not in the end of image sets in the end of image sets.
During according to the switching position of decoded time stamp positioning video stream, need do an agreement: promptly code stream switches and must handle if switching point, carry out suitable delay not in the end of image sets in the end of image sets.
When customer requirements is inserted into key frame with sprite, edge/Distributor is sent main screen signal and sprite signal into the video switch switch respectively, under the effect of switching pulse then according to client-requested, the signal of key frame is cut off in the special time position, inserts the sprite signal.
When customer requirements freezed sprite, client promptly stopped to handle the sprite signal at the atom picture position.
The customer requirements sprite that thaws, according to decoded time stamp, client is asked this sprite channel again to edge/Distributor, can make before freezing with thaw after sprite keep continuously.
In live or when broadcasting, the customer requirements sprite that thaws, and require sprite to keep continuously, then client needs corresponding storage facilities, and needn't send request to edge/Distributor again.
In live or when broadcasting, the customer requirements sprite that thaws, and do not require after thawing sprite with freeze before continuously, then according to representing timestamp, client is asked this sprite channel again to edge/Distributor.
When customer requirements shielding sprite, client is promptly cut off the sprite signal, shows the key frame content at the atom picture position.
Under program request, time shift situation, when customer requirements screen unlocking sprite, according to decoded time stamp, the sprite maintenance before edge/Distributor asks this sprite channel can make shielding again and after the screen unlocking continuously.
Under live or broadcasting situation, customer requirements screen unlocking sprite, and require sprite to keep continuously, then client needs corresponding storage facilities, and needn't send request to edge/Distributor again.
When live or broadcasting, customer requirements screen unlocking sprite, and do not require that sprite and screen unlocking after the screen unlocking are continuously preceding, then according to representing timestamp, client is asked this sprite channel again to edge/Distributor.
Described edge/Distributor receives the compression ratio of customer requirements, and selects the video flowing of corresponding size thus.
The present invention is owing to take above technical scheme, it has the following advantages: 1, the present invention is by representing the use of timestamp and decoded time stamp, not only greatly reduce requirement to Network Transmission bandwidth and client hardware processing and memory space, also provide existing picture-in-picture techniques not available interactivity, can realize numerous terminal picture-in-picture techniques processing that synchronism is had relatively high expectations in client.2, therefore the present invention has broad application prospects owing to can carry out the order program service of personalization and real-time, interactive.3, concrete enforcement of the present invention is very flexible, both can not add any hardware handles in existing IPTV system and memory device is realized, also can optimize or increase function of the present invention by adding suitable hardware handles and memory device.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in detail.
As shown in Figure 1, implement IPTV of the present invention system and comprise the content supplier 1 of the multi-media signal that forms such as MPEG-2 are provided, the IPTV head-end system 2 that connects described content supplier 1, edge/the Distributor 3 of the two-way connection IPTV of some difference head-end system 2, the client 4 (comprising computer, set-top box, television set etc.) of each edge/Distributor 3 of two-way connection respectively.Implement in the IPTV of the present invention system, each edge/Distributor 3 can provide service for a plurality of clients 4, and each client 4 also can be to a plurality of edge/Distributors 3 request services.Implement IPTV of the present invention system navigation page service 5 can be set between client 4 and IPTV head-end system 2, also can between client 4 and content supplier 1, charge system 6 be set, can also other functional module be set in client 4, to realize other various service content.
Following the present invention is applied as example (application of other standard is similar with it) with the IPTV of AVS audio and video standard, and to realize the method for picture-in-picture in IPTV, the function that reaches related each several part is described in detail:
One, the IPTV head-end system 2
1, the multi-media signal of the MPEG-2 form that content supplier 1 is provided or other form is converted to the AVS form by video code conversion;
2, according to user's geographical position be connected bandwidth, streaming medium content that select, that rate of people logging in is higher and corresponding small size content replication through the user, be distributed on the edge/Distributor 3 of the most close client 4, provide service by the edge/Distributor 3 of close requesting client for client 4.Note, when the edge/Distributor 3 of the most close client 4 can't provide required service for client 4, also can provide service for client 4 temporarily by other edge/Distributor 3 even IPTV head-end system 2; This moment the most close client 4 the content replication that as required can be simultaneously client 4 be needed of edge/Distributor 3 to book server, so that improve the efficient of service next time.
Two, edge/Distributor 3
1, uses for live (broadcasting)
(1) according to PTS (Presentation time-stamp represents timestamp), the switching position of positioning video stream.If the initial p TS of large scale streaming medium content is PTS
Il, current PTS is PTS
Cl, the initial p TS of corresponding small size streaming medium content is PTS
Is, current PTS is PTS
Cs, PTS then
Cl-PTS
Il=PTS
Cs-PTS
IsHere need to do two agreements: first code stream switches must be at GOP (Group of Pictures, image sets) end, otherwise can not be correctly decoded is not if switching point is in the end of GOP, in order to guarantee to switch the continuity of front and back content, need carry out suitable delay and handle; The PTS of second each video flowing of hypothesis is synchronous all the time.
(2) the compression ratio K of reception customer requirements, the original position according to PTS determines the transmission of corresponding size streaming medium content sends to client 4 to the streaming medium content of corresponding size.
Suppose that sprite all is compressed into the 1/K of original picture in level and vertical direction, K just is called compression ratio.If it is excessive that the K value obtains, can make sprite cause definition to descend because of sampled value is very few, therefore, certain definition is arranged in order to guarantee sprite, K just should not obtain excessive; But the K value is too small as if obtaining, and then the sprite area is excessive, has influence on the due indication range of key frame, and it is big to require client hardware to handle with the capacity change of memory space.Take all factors into consideration, the K value gets 3 or 4 usually.
2, use for program request, time shift
(1) according to DTS (Decoding time-stamp, decoded time stamp), the switching position of positioning video stream.If the initial DTS of large scale streaming medium content is DTS
Il, current DTS is DTS
Cl, the initial DTS of corresponding small size streaming medium content is DTS
Is, current DTS is DTS
Cs, DTS then
Cl-DTS
Il=DTS
Cs-DTS
IsHere need to do an agreement, promptly switch must be in the end of GOP for code stream, otherwise can not be correctly decoded, if switching point not in the end of GOP, for the continuity of content before and after guaranteeing to switch, need carry out suitable delay and handle.
(2) the compression ratio K of reception customer requirements, the original position according to DTS determines the transmission of corresponding size streaming medium content sends to client 4 to the streaming medium content of corresponding size.
Three, client 4 (comprising computer, set-top box, television set etc.):
Client 4 not only can realize the less demanding common terminal picture-in-picture techniques of synchronism is handled, and these technical finesses include but not limited to show that conversion, picture move etc.; And can be by with edge/Distributor 3 mutual, utilize timestamp information to realize that numerous terminal picture-in-picture techniques that synchronism is had relatively high expectations handle, these technical finesses include but not limited to that picture convergent-divergent, channel switch, sprite freezes, sprite shielding etc.
1, shows conversion
For sprite is inserted in the key frame, a video switch switch will be set usually, in time switch, insert key frame or sprite signal on request, send the picture tube display image.Main screen signal and sprite signal are sent into the video switch switch respectively, and the video switch switch is controlled by switching pulse, and the level of switching pulse and key frame, vertical synchronizing signal have strict relation.Under the effect of switching pulse, the signal of key frame is cut off at special time, inserts the sprite signal, is equivalent to open one and inserts window on the ad-hoc location of key frame, sprite is embedded in the window of key frame (as shown in Figure 2).The m that is located at key frame walks to the capable insertion of n sprite, is walking to n each row in the ranks except m so, and video switch is all connected main screen signal; And capable at m to n, when line scanning scanned before the pixel c point from a left side, video switch was still connected main screen signal; When scanning between c and the d, video switch cuts off main screen signal, connects the sprite signal, so that show sprite in the mncd zone, has crossed the d point and has switched back main screen signal again.
2,, only need to change the horizontal delay time T if will change the window's position that inserts sprite
HWith the vertical delay time T
VGet final product, the control signal that changes horizontal delay time and vertical delay time is produced by the picture-in-picture control circuit.
3, in the time need carrying out convergent-divergent (comprising the mutual switching of key frame and sprite) operation to picture, client 4 sends new compression ratio K to edge/Distributor 3, corresponding streaming medium content is sended over according to PTS by edge/Distributor 3, and then show that conversion gets final product.
4, the principle of image switching channel and above-mentioned picture convergent-divergent principle are similar, and client 4 substitutes original picture channel to 3 requests of edge/Distributor with new picture channel.Be applied as example with live (broadcasting), the initial p TS that establishes original picture channel content is PTS
Io, current PTS is PTS
Co, the initial p TS of new picture channel content is PTS
In, current PTS is PTS
Cn, PTS then
Co-PTS
Jo=PTS
Cn-PTS
InEdge/Distributor 3 is determined the new video stream that needs transmit according to compression ratio K, and the original position according to PTS determines the new video stream transmission sends to client 4 to new content then and shows conversion.The principle that program request, time shift are used similarly replaces PTS with DTS and gets final product.
5, in the time of need freezing sprite, only need stop to handle the sprite signal and get final product at the atom picture position.Under program request, the time shift situation according to DTS before edge/Distributor 3 asks this sprite channel to make to freeze again with thaw after sprite keep continuously.For live (broadcasting) situation, if the sprite after requiring to thaw with freeze before keep continuously, then need client 4 to have relevant hardware to handle and memory device, do not need when thawing to send request to edge/Distributor 3 again; If do not require after thawing sprite with freeze before continuously, then ask this sprite channel to get final product again to edge/Distributor 3 according to PTS.
When 6, needing the shielding sprite, only need to cut off the sprite signal, show that at the atom picture position key frame content gets final product.Continuous under program request, the time shift situation according to the sprite maintenance of DTS before edge/Distributor 3 asks this sprite channel can make shielding again and after the screen unlocking.For live (broadcasting) situation, if require the sprite after the screen unlocking to keep continuously, then need client 4 to have relevant hardware to handle and memory device with shielding is preceding, do not need during screen unlocking to send to edge/Distributor 3 again to ask; If do not require that the sprite after the screen unlocking is continuously preceding with shielding, then ask this sprite channel to get final product again to edge/Distributor 3 according to PTS.
IPTV picture-in-picture system greatly reduces the Network Transmission bandwidth and client hardware is handled requirement with memory space, sprite is stored on IPTV head-end system 2 and each edge/Distributor 3, only just transmits the sprite of corresponding size when the user files a request to the user.But when picture being carried out operation such as convergent-divergent (comprise key frame and sprite are switched), channel switch, freeze, shielding, IPTV picture-in-picture system has Duoed synchronism than traditional picture-in-picture system and required: traditional tv all passes the content of a plurality of channels, the user wants to see the little picture of which channel, just to the content of which video flowing decode, down-sampling, do not have stationary problem.And in IPTV, each channel has identical but the video flowing that size is different of a plurality of contents, and the user will see the video flowing of which size, and which edge/Distributor 3 just passes; Switch size, switching channels, thaw, during operation such as screen unlocking, edge/Distributor 3 need allow the video flowing of new size begin to put from the video flowing stopping place of old size usually, therefore needs need use timestamp information synchronously.
It should be noted that at last: above embodiment only in order to the explanation the present invention and and unrestricted picture-in-picture implementation method described in the invention; Therefore, although this specification has been described in detail the present invention with reference to the foregoing description,, those of ordinary skill in the art should be appreciated that still and can make amendment or be equal to replacement the present invention; And all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, all should be encompassed in the middle of the claim scope of the present invention.