CN109246462A - A kind of video flowing seamless handover method and device - Google Patents

A kind of video flowing seamless handover method and device Download PDF

Info

Publication number
CN109246462A
CN109246462A CN201811181905.8A CN201811181905A CN109246462A CN 109246462 A CN109246462 A CN 109246462A CN 201811181905 A CN201811181905 A CN 201811181905A CN 109246462 A CN109246462 A CN 109246462A
Authority
CN
China
Prior art keywords
video stream
switching
new video
time point
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811181905.8A
Other languages
Chinese (zh)
Other versions
CN109246462B (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.)
Suningcom Group Co Ltd
Original Assignee
Suningcom Group 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 Suningcom Group Co Ltd filed Critical Suningcom Group Co Ltd
Priority to CN201811181905.8A priority Critical patent/CN109246462B/en
Publication of CN109246462A publication Critical patent/CN109246462A/en
Application granted granted Critical
Publication of CN109246462B publication Critical patent/CN109246462B/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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/426Internal components of the client ; Characteristics thereof
    • H04N21/42607Internal components of the client ; Characteristics thereof for processing the incoming bitstream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of video flowing seamless handover method and devices, belong to Streaming Media real-time processing technique field.The described method includes: according to the switching request of new video stream, carrying out the switching preparation and opening operation of corresponding new video stream, the switching prepares to include the switching condition for determining the new video stream when carrying out the broadcasting of old video flowing;After the new video stream is opened, the broadcasting related data of the old video flowing and the new video stream is persistently obtained;Decoder is reset, the media data of the new video stream is obtained;In the corresponding switching time point of the new video stream, seamless switching is carried out.The present invention realizes more smooth seamless switching, cuts code stream scheme compared to traditional, and the broadcasting experience of the user greatly improved has broad application prospects.

Description

A kind of video flowing seamless handover method and device
Technical field
The present invention relates to Streaming Media real-time processing technique field, in particular to a kind of video flowing seamless handover method and dress It sets.
Background technique
In major video app application at present, realize that seamless switching mostly uses greatly bi-casting to put device to realize.That is current player The code stream of original clarity is played, after user clicks switching, additionally one player example of starting is new clear to load on the backstage app The code stream of degree, in playing process, according to switchover policy (for example switching by frame number, the key frame switching of current point in time), selection Suitable switching point carries out the splicings of two players, to achieve the effect that seamless switching.
In the live streaming application of Online Video point, streaming media server can push corresponding specification according to the request of app user Media Stream, such as user request blue light code stream, and the code stream of back-end system push blue light image quality is given to the end app, and user's request is super clear Code stream, back-end system push super clear code stream and are given to the end app.However as the change of app user's operating conditions, such as user Own net is switched to wifi network, the load variation of app terminal system etc. from cellular mobile network, and user may be in the mistake of viewing Cheng Zhong up or down switches the code stream of different clarity at any time.The common of this scene is handled in major video app before Way is that the broadcasting of source code flow, is then opening the code stream for broadcasting new spec again before first closing.This traditional way exists Defect be that during closing source code flow and loading new code stream, inevitably will cause of short duration black in broadcast page face Screen, whole flow process serially execute again, and the load of new code stream is likely to result in Caton, and the probability that user again waits for increases, To which the perception experience for being presented to app user is poor.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of video flowing seamless handover method and dresses It sets, more smooth seamless switching, cuts code stream scheme compared to traditional, the broadcasting experience of the user greatly improved.The skill Art scheme is as follows:
In a first aspect, providing a kind of video flowing seamless handover method, which comprises
When carrying out the broadcasting of old video flowing, according to the switching request of new video stream, the switching for carrying out corresponding new video stream is quasi- Standby and opening operation, the switching prepare to include the switching condition for determining the new video stream;After the new video stream is opened, hold The continuous broadcasting related data for obtaining the old video flowing and the new video stream;Decoder is reset, the new video stream is obtained Media data;In the corresponding switching time point of the new video stream, seamless switching is carried out.
With reference to first aspect, in the first possible implementation, new and old video flowing is obtained by P2P downloading mode Media data;According to the switching request for the new video stream transmitted by transport layer;To the media data of the new and old video flowing into Row decapsulation, and fluidisation encapsulation is carried out according to playing request;The media data is demultiplexed, and is decoded display.
The possible implementation of with reference to first aspect the first, in the second possible implementation, the new view The switching of frequency stream prepares to include the switching condition for determining the new video stream, specifically includes: asking according to new video stream switching is met It asks, calculates the switching time point of the new video stream, the switching time point of the new video stream is the media of the old video flowing Next key frame of data;And/or the opening operation of the new video stream, comprising: corresponding clarity parameter based on the received, Open the new video stream;If new video stream opens failure, result feedback is carried out, and continue to play old video flowing.
The possible implementation of second with reference to first aspect, in the third possible implementation, the switching Request includes clarity unanimously and/or the session id of switching transmission is effective.
With reference to first aspect and the first to three kind of possible implementation of first aspect it is any, can at the four to seven kind In the implementation of energy, in the corresponding switching time point of the new video stream, seamless switching is carried out, comprising: set old video flowing Current play time is t0, player cache-time is d, passes through t0First after current video stream searches for the time point of+d Key frame obtains time t1, while asynchronous opening new video stream, just setting switching time point is set to t first1, and in new video stream Search for t0First key frame after+d obtains time t2, then include following two courses of action: the first, being read in old video flowing Get t1New video stream is opened before, if abs (t1-t2)≤1000ms, at this time timestamp variation are no more than 1s, are cut It changes;If t1<t2, amendment switching time point is t2, and in t2Time point switch over;If t1>t2If the time read Point is less than t2, amendment switching time point is t2, and in t2Time point switch over;If the time point read is less than t2, switching Time point is set as t1, and in t1Time point switch over;The second, the time point t read in old video flowing1It opens later New video stream, after new video stream is opened successfully, from t0First key frame t after+d2Start the broadcasting number of transmission new video stream According to, it is to be obtained to next key frame when, switch over.
Second aspect provides a kind of video flowing seamless switching device, comprising: handover preparation module, the handover preparation Module further comprises switching preparation module and opening operation module, and the switching preparation module and the opening operation module are used In the switching request according to the switching condition for meeting new video stream, the switching preparation and opening operation of corresponding new video stream are carried out, The switching prepares to include the switching condition for determining the new video stream;Module is obtained, after being opened for the new video stream, is held The continuous broadcasting related data for obtaining the old video flowing and the new video stream;Decoder module obtains institute for resetting decoder State the media data of new video stream;Switching module is carried out for the corresponding switching time point in the new video stream without seaming and cutting It changes.
In conjunction with second aspect, in the first possible implementation, the playing flow framework of described device is downloaded by P2P Layer, transport layer, broadcast layer and decoding display layer are constituted, under the P2P carrier layer be used for by being locally-downloaded, local agent and/ Or local server is called and provides streaming source, the transport layer is used to obtain media data from carrier layer under the P2P, and Media data is decapsulated, corresponding fluidisation encapsulation is then carried out according to the request of data of broadcast layer, the broadcast layer is used for It is demultiplexed after obtaining media data, is decoded display finally by decoding display layer.
In conjunction with the first possible implementation of second aspect, in the second possible implementation, the switching Preparation module further comprises computational submodule, and the computational submodule is used to determine the switching condition of the new video stream, institute It states computational submodule to be specifically used for: according to new video stream switching request is met, calculating the switching time point of the new video stream, institute The switching time point of new video stream is stated as next key frame of the media data of the old video flowing;And/or the opening operation Module further comprises that new video stream opens submodule and result feedback submodule, and the new video stream is opened submodule and is used for: Corresponding clarity parameter based on the received, opens the new video stream;The result feedback submodule is used for: if new video stream Failure is opened, then carries out result feedback, and continue to play old video flowing.
In conjunction with second of possible implementation of second aspect, in the third possible implementation, the switching is asked It asks including clarity is consistent and/or the session id of switching transmission is effective.
In conjunction with second aspect and second aspect the first to three kind of possible implementation it is any, can at the four to seven kind In the implementation of energy, the switching module is used for: setting the current play time of old video flowing as t0, player cache-time is D passes through t0The first key frame of+d after current video stream searches for the time point obtains time t1, while the new view of asynchronous opening Frequency flows, and just setting switching time point is set to t first1, and t is searched in new video stream0First key frame after+d obtains the time t2, then include following two courses of action: the first, reading t in old video flowing1New video stream is opened before, if abs (t1-t2)≤1000ms, at this time timestamp variation are no more than 1s, switch over;If t1<t2, amendment switching time point is t2, And in t2Time point switch over;If t1>t2If the time point read is less than t2, amendment switching time point is t2, and t2Time point switch over;If the time point read is less than t2, switching time point is set as t1, and in t1Time click through Row switching;
The second, the time point t read in old video flowing1New video stream is opened later, after new video stream is opened successfully, from t0First key frame t after+d2Start to send the played data of new video stream, it is to be obtained to next key frame when, cut It changes.
Technical solution provided in an embodiment of the present invention has the benefit that
1, by the broadcasting of the old video of Streaming Media, while the switching time point for obtaining new video stream is calculated, backstage is beaten New video stream is opened, and continues to obtain the real-time broadcasting related data of old video flowing and new video stream, thus for new and old video flowing Adequate preparation is carried out in switching in advance, finally in the corresponding switching time point of new video stream, carries out the switching of new and old video flowing, due to Different clarity film source key frames are unevenly distributed, and the program has fully considered the timeliness and smooth rate of switching, by interior survey with And fed back on each end line, switch the occurrence probability of overlapping less than 1 percent, switching timeliness is less than 8s, and transition effect has obtained To customer acceptance;
2, seamless switching is realized based on transport layer, avoids the scheme using more players, and can be according to terminal reality (most of only to need to can be realized using unicast communication in the case where actual motion, small part situation may for the operating status on border The concurrent two-way transmission downloading of meeting), the flexible strategy for using unicast communication or two-way transmission, compared to the side of existing more players Case effectively reduces system load loss;
3, more smooth seamless switching is generally realized, cuts code stream scheme compared to traditional, the use greatly improved The broadcasting at family is experienced, and is had broad application prospects.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the video flowing seamless handover method flow chart that the embodiment of the present invention one provides;
Fig. 2 is the video flowing seamless handover method flow chart for the preferred embodiment that the embodiment of the present invention one provides;
Fig. 3 is the playing flow framework provided in an embodiment of the present invention based on P2P mechanism;
Fig. 4 is video flowing seamless switching device structural schematic diagram provided by Embodiment 2 of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only this Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist Every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
Video flowing seamless handover method and device provided in an embodiment of the present invention, pass through the broadcasting in the old video of Streaming Media When, while the switching time point for obtaining new video stream is calculated, new video stream is opened on backstage, and continues to obtain old video flowing and new view Then the real-time broadcasting related data of frequency stream resets decoder so that adequate preparation is carried out in the switching for new and old video flowing in advance, The media data for obtaining new video stream carries out the switching of new and old video flowing finally in the corresponding switching time point of new video stream, by It is unevenly distributed in different clarity film source key frames, the program has fully considered the timeliness and smooth rate of switching, by interior survey And fed back on each end line, switch the occurrence probability of overlapping less than 1 percent, switching timeliness is less than 8s, and transition effect is Customer acceptance is obtained, more smooth seamless switching is realized, cuts code stream scheme compared to traditional, the user's greatly improved Experience is played, is had broad application prospects.
Combined with specific embodiments below and its attached drawing, to video flowing seamless handover method provided in an embodiment of the present invention and dress It sets and elaborates.
Embodiment one
Fig. 1 is the video flowing seamless handover method flow chart that the embodiment of the present invention one provides.Fig. 2 is the embodiment of the present invention one The video flowing seamless handover method flow chart of the preferred embodiment provided.
As depicted in figs. 1 and 2, video flowing seamless handover method provided in an embodiment of the present invention, comprising the following steps:
101, when carrying out the broadcasting of old video flowing, according to the switching request of new video stream, cutting for corresponding new video stream is carried out Preparation and opening operation are changed, the switching prepares to include the switching condition for determining the new video stream.
Specifically, judging whether the switching request of user's triggering meets whether consistent including clarity and/or switch transmission The whether also effective switching condition of session id, if it is, according to the switching request for the switching condition for meeting new video stream, into The switching preparation and opening operation of the corresponding new video stream of row during this, continue if it is not, then the reason of readjustment handover failure Play old video flowing.Wherein, whether the clarity in switching condition consistent, refer to be switched new video stream clarity whether with Whether the clarity of old video flowing is consistent, and whether the session id for switching transmission is also effective, and it is exactly a meeting that each, which plays example, Words, each session can indicate similar identity card ID, whether session is effective, refers to whether this session does not have with an ID It is closed.It should be noted that switching condition here is not departing from present subject matter structure in addition to two conditions mentioned above In the case where think of, it may include any possible handoff environment condition in the prior art, it can be carried out according to actual needs Difference setting, the embodiment of the present invention do not limit it especially.
The switching of new video stream prepares, comprising: according to the switching request for the switching condition for meeting new video stream, calculates new view Next key frame of the media data of old video flowing, is determined as the switching time point of new video stream by the switching time point of frequency stream.
The opening operation of new video stream, comprising: new video stream is opened on corresponding clarity parameter based on the received, backstage;Newly If video flowing opens failure, result feedback is carried out, and continue to play old video flowing.
It is worth noting that, the process of step 101, other than the mode described in the above-mentioned steps, other can also be passed through Mode realizes that the process, the embodiment of the present invention are not limited specific mode.
102, after new video stream is opened, the broadcasting related data of old video flowing and new video stream is persistently obtained.
Specifically, seek operates the time point to switching after new stream is opened successfully, it gets out data.It plays at the same time Layer is also obtaining always the broadcasting related data of old video flowing and new video stream, and broadcast layer is waited to get next key frame When, what the data newly flowed can be seamless is transferred to broadcast layer.
103, decoder is reset, the media data of new video stream is obtained.
Specifically, broadcast layer when getting the data newly flowed, needs to reset decoder, the media letter newly flowed is obtained Breath.Specific implementation details is, if API mode, the first frame data newly flowed can be accused by tagging position come problem Tell that broadcast layer media formats change;If it is HLS protocol, because each TS packet can carry media information, natural support This problem is not present in the mixed transport of multiple format.
104, in the corresponding switching time point of new video stream, seamless switching is carried out.
Specifically, setting the current play time of old video flowing as t0, player cache-time is d, passes through t0+ d is working as forward sight First key frame after frequency stream search time point obtains time t1, while asynchronous opening new video stream, switching is just set first Time point is set to t1, and t is searched in new video stream0First key frame after+d obtains time t2, then include following two Courses of action:
The first, t is read in old video flowing1New video stream is opened before,
If abs (t1-t2)≤1000ms, at this time timestamp variation are no more than 1s, switch over;
If t1<t2, amendment switching time point is t2, and in t2Time point switch over;
If t1>t2If the time point point read is less than t2, then amendment switching time point is t2, and in t2Time Point switches over, and such situation timestamp is also continuous;If instead the time point read is greater than t2, it would be possible that will cause t2-t1Overlapped data, switching time point is set as t1, and in t1Time point switch over;
The second, the time point t read in old video flowing1New video stream is opened later, after new video stream is opened successfully, from t0+First key frame t after d2Start to send the played data of new video stream, it is to be obtained to next key frame when, cut It changes.
It should be noted that preferably in the realization process of video flowing seamless handover method provided in an embodiment of the present invention In, the media data of new and old video flowing is obtained by P2P downloading mode;According to the switching for the new video stream transmitted by transport layer Request;The media data of the new and old video flowing is decapsulated, and fluidisation encapsulation is carried out according to playing request;To the matchmaker Volume data is demultiplexed, and is decoded display.
Fig. 3 is the playing flow framework provided in an embodiment of the present invention based on P2P mechanism.As shown in figure 3, the present invention is implemented The video flowing seamless handover method that example provides, can be realized, the broadcasting by a kind of playing flow framework based on P2P mechanism Process structure is made of carrier layer, transport layer, broadcast layer and decoding display layer under P2P, and carrier layer is used to pass through this underground under P2P It carries, local agent and/or local server calling offer streaming source, transport layer are used to obtain from carrier layer under the P2P Media data, and media data is decapsulated, corresponding fluidisation encapsulation is then carried out according to the request of data of broadcast layer, is played Layer is decoded display for being demultiplexed after obtaining media data, finally by decoding display layer.
In the playing flow framework, broadcast layer streaming source in transport layer, be different from it is atypical play in framework from Player directly arrives the framework that server draws stream.Such framework is advantageous in that carrier layer is mainly that transport layer provides basis under P2P Media data download service, can app terminal carry out P2P transmission, so as to effectively save rear end deployment of broadband clothes The resources such as business device.Broadcast layer can be directly connected to the HLS service of transport layer, RTSP service acquisition audio/video flow, can also be by broadcasting It puts layer and integrates the api interface of transport layer to obtain audio/video flow.The effect of transport layer mainly from P2P layers of acquisition media data, Data are decapsulated, and fluidisation is packaged according to the request of broadcast layer, for example, HLS protocol TS format slice file Also the RTP package format or based on RSTP agreement is transmitted and frame data of API mode etc..
In addition, new stream may be opened slow or overtime during the realization of above-mentioned video flowing seamless handover method, Processing strategie can be handled flexibly at this time, for example when switching point arrives, new stream is also not switched on, and can continue to transmit old stream Data, adjust back upper layer handover failure, broadcast layer can also be allowed to wait until until new stream is opened or malfunctioned.And some It, can be in switching according to the buffering of transport layer to avoid opening two-way code stream simultaneously in the case that user's running environment is severe Whether the time includes next key frame, if having covered next key frame in cache-time, can suspend source code flow Transmission, transmitted in this way in a playback terminal with regard to only having code stream all the way, reduce terminal system resource consumption.
In conclusion video flowing seamless handover method provided in an embodiment of the present invention has following compared with the existing technology The utility model has the advantages that
1, by the broadcasting of the old video of Streaming Media, while the switching time point for obtaining new video stream is calculated, backstage is beaten New video stream is opened, and continues to obtain the real-time broadcasting related data of old video flowing and new video stream, thus for new and old video flowing Adequate preparation is carried out in switching in advance, finally in the corresponding switching time point of new video stream, carries out the switching of new and old video flowing, due to Different clarity film source key frames are unevenly distributed, and the program has fully considered the timeliness and smooth rate of switching, by interior survey with And fed back on each end line, switch the occurrence probability of overlapping less than 1 percent, switching timeliness is less than 8s, and transition effect has obtained To customer acceptance;
2, seamless switching is realized based on transport layer, avoids the scheme using more players, and can be according to terminal reality (most of only to need to can be realized using unicast communication in the case where actual motion, small part situation may for the operating status on border The concurrent two-way transmission downloading of meeting), the flexible strategy for using unicast communication or two-way transmission, compared to the side of existing more players Case effectively reduces system load loss;
3, more smooth seamless switching is generally realized, cuts code stream scheme compared to traditional, the use greatly improved The broadcasting at family is experienced, and is had broad application prospects.
Embodiment two
Fig. 4 is video flowing seamless switching device provided by Embodiment 2 of the present invention, as shown in figure 4, the embodiment of the present invention mentions The video flowing seamless switching device of confession, including handover preparation module 1, acquisition module 2, decoder module 3 and switching module 4.
Specifically, handover preparation module 1 is used for: judge user triggering switching request whether meet including clarity whether Consistent and/or switching transmission the whether also effective switching condition of session id, if it is, according to the switching for meeting new video stream The switching request of condition carries out the switching preparation and opening operation of corresponding new video stream, if it is not, then the original of readjustment handover failure Cause.
Handover preparation module 1 further comprises switching preparation module 11 and opening operation module 12, switches preparation module 11 It is used for the switching request according to the switching condition for meeting new video stream with opening operation module 12, carries out cutting for corresponding new video stream Preparation and opening operation are changed, switching prepares to include the switching condition for determining new video stream.Preferably, handover preparation module 1 is also wrapped It includes switching judging module 13 and judges whether switching request meets when switching judging module 13 is used to carry out the broadcasting of old video flowing The switching condition of new video stream.
Switching preparation module 11 further comprises computational submodule 111, and computational submodule 111 is used for:
According to the switching request for the switching condition for meeting new video stream, the switching time point of new video stream, new video are calculated The switching time point of stream is next key frame of the media data of old video flowing;And/or
Opening operation module 12 further comprises that new video stream opens submodule 121 and result feedback submodule 122, new to regard Frequency stream is opened submodule 21 and is used for: new video stream is opened on corresponding clarity parameter based on the received, backstage;As a result submodule is fed back 122 are used for: if new video stream opens failure, carrying out result feedback, and continue to play old video flowing.
Module 2 is obtained, after opening for new video stream, persistently obtains the broadcasting dependency number of old video flowing and new video stream According to;
Decoder module 3 obtains the media data of new video stream for resetting decoder;
Switching module 4 carries out seamless switching for the corresponding switching time point in new video stream.Specifically, switching module 4 for proceeding as follows:
If the current play time of old video flowing is t0, player cache-time is d, passes through t0+ d is searched in current video stream First key frame after the rope time point obtains time t1, while asynchronous opening new video stream, switching time point is just set first It is set to t1, and t is searched in new video stream0First key frame after+d obtains time t2, then include that following two operates road Diameter:
The first, t is read in old video flowing1New video stream is opened before,
If abs (t1-t2)≤1000ms, at this time timestamp variation are no more than 1s, switch over;
If t1<t2, amendment switching time point is t2, and in t2Time point switch over;
If t1>t2If the time point point read is less than t2, then amendment switching time point is t2, and in t2Time Point switches over, and such situation timestamp is also continuous;If instead the time point read is greater than t2, it would be possible that will cause t2-t1Overlapped data, switching time point is set as t1, and in t1Time point switch over;
The second, the time point t read in old video flowing1New video stream is opened later, after new video stream is opened successfully, from t0+First key frame t after d2Start to send the played data of new video stream, it is to be obtained to next key frame when, cut It changes.
Fig. 3 is returned, video flowing seamless switching device provided in an embodiment of the present invention preferably passes through a kind of based on P2P machine The playing flow framework of system realizes that the playing flow framework is shown by carrier layer, transport layer, broadcast layer and decoding under P2P Layer is constituted, and carrier layer is used for by being locally-downloaded under P2P, local agent and/or local server are called and provide streaming source, Transport layer is used to obtain media data from carrier layer under the P2P, and decapsulates to media data, then according to broadcast layer Request of data carries out corresponding fluidisation encapsulation, and broadcast layer is shown for being demultiplexed after obtaining media data finally by decoding Layer is decoded display.
It should be understood that video flowing seamless switching device provided by the above embodiment is in triggering video flowing seamless switching industry When business, only the example of the division of the above functional modules, in practical application, it can according to need and by above-mentioned function Distribution is completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, to complete above retouch The all or part of function of stating.In addition, video flowing seamless switching device provided by the above embodiment and video flowing seamless switching Embodiment of the method belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
All the above alternatives can form alternative embodiment of the invention using any combination, herein no longer It repeats one by one.
In conclusion video flowing seamless handover method provided in an embodiment of the present invention has following compared with the existing technology The utility model has the advantages that
1, by the broadcasting of the old video of Streaming Media, while the switching time point for obtaining new video stream is calculated, backstage is beaten New video stream is opened, and continues to obtain the real-time broadcasting related data of old video flowing and new video stream, thus for new and old video flowing Adequate preparation is carried out in switching in advance, finally in the corresponding switching time point of new video stream, carries out the switching of new and old video flowing, due to Different clarity film source key frames are unevenly distributed, and the program has fully considered the timeliness and smooth rate of switching, by interior survey with And fed back on each end line, switch the occurrence probability of overlapping less than 1 percent, switching timeliness is less than 8s, and transition effect has obtained To customer acceptance;
2, seamless switching is realized based on transport layer, avoids the scheme using more players, and can be according to terminal reality (most of only to need to can be realized using unicast communication in the case where actual motion, small part situation may for the operating status on border The concurrent two-way transmission downloading of meeting), the flexible strategy for using unicast communication or two-way transmission, compared to the side of existing more players Case effectively reduces system load loss;
3, more smooth seamless switching is generally realized, cuts code stream scheme compared to traditional, the use greatly improved The broadcasting at family is experienced, and is had broad application prospects.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
It is referring to according to the method for embodiment, equipment (system) and calculating in the embodiment of the present application in the embodiment of the present application The flowchart and/or the block diagram of machine program product describes.It should be understood that can be realized by computer program instructions flow chart and/or The combination of the process and/or box in each flow and/or block and flowchart and/or the block diagram in block diagram.It can mention For the processing of these computer program instructions to general purpose computer, special purpose computer, Embedded Processor or other programmable datas The processor of equipment is to generate a machine, so that being executed by computer or the processor of other programmable data processing devices Instruction generation refer to for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of fixed function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment in the embodiment of the present application has been described, once a person skilled in the art knows Basic creative concept, then additional changes and modifications may be made to these embodiments.So appended claims are intended to explain Being includes preferred embodiment and all change and modification for falling into range in the embodiment of the present application.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of video flowing seamless handover method, which is characterized in that the described method includes:
When carrying out the broadcasting of old video flowing, according to the switching request of new video stream, the switching for carrying out corresponding new video stream prepare and Opening operation, the switching prepare to include the switching condition for determining the new video stream;
After the new video stream is opened, the broadcasting related data of the old video flowing and the new video stream is persistently obtained;
Decoder is reset, the media data of the new video stream is obtained;
In the corresponding switching time point of the new video stream, seamless switching is carried out.
2. the method according to claim 1, wherein obtaining the media of new and old video flowing by P2P downloading mode Data;According to the switching request for the new video stream transmitted by transport layer;The media data of the new and old video flowing is solved Encapsulation, and fluidisation encapsulation is carried out according to playing request;The media data is demultiplexed, and is decoded display.
3. according to the method described in claim 2, it is characterized in that,
The switching of the new video stream prepares to include the switching condition for determining the new video stream, specifically includes:
According to new video stream switching request is met, the switching time point of the new video stream, the switching of the new video stream are calculated Time point is next key frame of the media data of the old video flowing;And/or
The opening operation of the new video stream, comprising:
Corresponding clarity parameter based on the received, opens the new video stream;
If new video stream opens failure, result feedback is carried out, and continue to play old video flowing.
4. according to the method described in claim 3, it is characterized in that,
The switching request includes clarity unanimously and/or the session id of switching transmission is effective.
5. method according to any one of claims 1 to 4, which is characterized in that in the corresponding switching of the new video stream Between point, carry out seamless switching, comprising:
If the current play time of old video flowing is t0, player cache-time is d, passes through t0+ d should in the search of current video stream First key frame after time point obtains time t1, while asynchronous opening new video stream, it just sets switching time point first and is set to t1, and t is searched in new video stream0First key frame after+d obtains time t2, then include following two courses of action:
The first, t is read in old video flowing1New video stream is opened before,
If abs (t1-t2)≤1000ms, at this time timestamp variation are no more than 1s, switch over;
If t1<t2, amendment switching time point is t2,And in t2Time point switch over;
If t1>t2If the time point read is less than t2, amendment switching time point is t2, and in t2Time point switch over; If the time point read is less than t2, switching time point is set as t1, and in t1Time point switch over;
The second, the time point t read in old video flowing1New video stream is opened later, after new video stream is opened successfully, from t0+d First key frame t afterwards2Start to send the played data of new video stream, it is to be obtained to next key frame when, switch over.
6. a kind of video flowing seamless switching device characterized by comprising
Handover preparation module, the handover preparation module further comprises switching preparation module and opening operation module, described to cut Preparation module and the opening operation module are changed for the switching request according to the switching condition for meeting new video stream, is carried out corresponding The switching preparation of new video stream and opening operation, the switching prepare to include the switching condition for determining the new video stream;
Module is obtained, after opening for the new video stream, persistently obtains the broadcasting of the old video flowing and the new video stream Related data;
Decoder module obtains the media data of the new video stream for resetting decoder;
Switching module carries out seamless switching for the corresponding switching time point in the new video stream.
7. device according to claim 6, which is characterized in that the playing flow framework of described device is by carrier layer, biography under P2P Defeated layer, broadcast layer and decoding display layer are constituted, under the P2P carrier layer be used for by being locally-downloaded, local agent and/or itself Server calls provide streaming source, and the transport layer is used to obtain media data from carrier layer under the P2P, and to media Data are decapsulated, and then carry out corresponding fluidisation encapsulation according to the request of data of broadcast layer, the broadcast layer is for obtaining matchmaker It is demultiplexed after volume data, is decoded display finally by decoding display layer.
8. device according to claim 7, which is characterized in that
The switching preparation module further comprises computational submodule, and the computational submodule is for determining the new video stream Switching condition, the computational submodule are specifically used for:
According to new video stream switching request is met, the switching time point of the new video stream, the switching of the new video stream are calculated Time point is next key frame of the media data of the old video flowing;And/or
The opening operation module further comprises that new video stream opens submodule and result feedback submodule,
The new video stream is opened submodule and is used for:
Corresponding clarity parameter based on the received, opens the new video stream;
The result feedback submodule is used for:
If new video stream opens failure, result feedback is carried out, and continue to play old video flowing.
9. device according to claim 8, which is characterized in that the switching request includes clarity unanimously and/or switches The session id of transmission is effective.
10. according to the described in any item devices of claim 6 to 9, which is characterized in that the switching module is used for:
If the current play time of old video flowing is t0, player cache-time is d, passes through t0+ d should in the search of current video stream First key frame after time point obtains time t1, while asynchronous opening new video stream, it just sets switching time point first and is set to t1, and t is searched in new video stream0First key frame after+d obtains time t2, then include following two courses of action:
The first, t is read in old video flowing1New video stream is opened before,
If abs (t1-t2)≤1000ms, at this time timestamp variation are no more than 1s, switch over;
If t1<t2, amendment switching time point is t2, and in t2Time point switch over;
If t1>t2If the time point read is less than t2, amendment switching time point is t2, and in t2Time point switch over; If the time point read is less than t2, switching time point is set as t1, and in t1Time point switch over;
The second, the time point t read in old video flowing1New video stream is opened later, after new video stream is opened successfully, from t0+d First key frame t afterwards2Start to send the played data of new video stream, it is to be obtained to next key frame when, switch over.
CN201811181905.8A 2018-10-11 2018-10-11 Seamless switching method and device for video stream Active CN109246462B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811181905.8A CN109246462B (en) 2018-10-11 2018-10-11 Seamless switching method and device for video stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811181905.8A CN109246462B (en) 2018-10-11 2018-10-11 Seamless switching method and device for video stream

Publications (2)

Publication Number Publication Date
CN109246462A true CN109246462A (en) 2019-01-18
CN109246462B CN109246462B (en) 2021-08-06

Family

ID=65052071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811181905.8A Active CN109246462B (en) 2018-10-11 2018-10-11 Seamless switching method and device for video stream

Country Status (1)

Country Link
CN (1) CN109246462B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110139148A (en) * 2019-05-22 2019-08-16 武汉瓯越网视有限公司 A kind of method and relevant apparatus of video switching clarity
CN110213659A (en) * 2019-07-01 2019-09-06 杭州当虹科技股份有限公司 A kind of implementation method that player can be switched fast between different video stream
CN110636338A (en) * 2019-09-17 2019-12-31 北京百度网讯科技有限公司 Video definition switching method and device, electronic equipment and storage medium
CN110933506A (en) * 2019-11-14 2020-03-27 武汉兴图新科电子股份有限公司 Method and system for seamless switching of encoding and decoding
WO2020151399A1 (en) * 2019-01-23 2020-07-30 上海哔哩哔哩科技有限公司 Method and device for pseudo-seamless switching between different video sources played by web and medium
CN111866433A (en) * 2020-07-31 2020-10-30 腾讯科技(深圳)有限公司 Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium
CN111954068A (en) * 2019-05-14 2020-11-17 阿里巴巴集团控股有限公司 Method and device for video definition switching and electronic device
CN112087646A (en) * 2020-08-26 2020-12-15 腾讯科技(深圳)有限公司 Video playing method and device, computer equipment and storage medium
CN112291611A (en) * 2020-10-27 2021-01-29 重庆虚拟实境科技有限公司 Video playing method, computer device and readable storage medium
CN112995649A (en) * 2019-12-13 2021-06-18 青岛海信宽带多媒体技术有限公司 Network terminal and network terminal evaluation method
CN113225585A (en) * 2020-01-21 2021-08-06 腾讯科技(深圳)有限公司 Video definition switching method and device, electronic equipment and storage medium
CN113973233A (en) * 2021-10-22 2022-01-25 深圳小湃科技有限公司 Method, device and equipment for optimizing switching playing of multi-platform film and storage medium
CN115225955A (en) * 2021-04-16 2022-10-21 海信视像科技股份有限公司 Display device, video switching method, video switching device and storage medium
CN117156223A (en) * 2023-10-31 2023-12-01 中央广播电视总台 Real-time stream switching method, device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098470A (en) * 2006-06-28 2008-01-02 腾讯科技(深圳)有限公司 P2P technique based stream media program broadcasting/receiving method and apparatus
CN102905188A (en) * 2012-11-01 2013-01-30 北京奇艺世纪科技有限公司 Video code stream switching method and device
US20130308927A1 (en) * 2001-08-20 2013-11-21 Broadcom Corporation Apparatus and method of seamless switching between a live dtv decoding and a pvr playback
CN103997680A (en) * 2014-06-06 2014-08-20 北京奇艺世纪科技有限公司 Switching method and device of video bitstream
US20140368736A1 (en) * 2013-06-17 2014-12-18 Sporify AB System and method for selecting media to be preloaded for adjacent channels
CN104822084A (en) * 2015-04-30 2015-08-05 华南理工大学 Concurrent-stream-based rapid channel switching method of P2P real-time playing system
CN106210863A (en) * 2015-05-28 2016-12-07 因佛卡斯公司 The system and method for smooth conversion between compression video flowing
CN108174280A (en) * 2018-01-18 2018-06-15 湖南快乐阳光互动娱乐传媒有限公司 A kind of online playback method of audio and video and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130308927A1 (en) * 2001-08-20 2013-11-21 Broadcom Corporation Apparatus and method of seamless switching between a live dtv decoding and a pvr playback
CN101098470A (en) * 2006-06-28 2008-01-02 腾讯科技(深圳)有限公司 P2P technique based stream media program broadcasting/receiving method and apparatus
CN102905188A (en) * 2012-11-01 2013-01-30 北京奇艺世纪科技有限公司 Video code stream switching method and device
US20140368736A1 (en) * 2013-06-17 2014-12-18 Sporify AB System and method for selecting media to be preloaded for adjacent channels
CN103997680A (en) * 2014-06-06 2014-08-20 北京奇艺世纪科技有限公司 Switching method and device of video bitstream
CN104822084A (en) * 2015-04-30 2015-08-05 华南理工大学 Concurrent-stream-based rapid channel switching method of P2P real-time playing system
CN106210863A (en) * 2015-05-28 2016-12-07 因佛卡斯公司 The system and method for smooth conversion between compression video flowing
CN108174280A (en) * 2018-01-18 2018-06-15 湖南快乐阳光互动娱乐传媒有限公司 A kind of online playback method of audio and video and system

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11589119B2 (en) 2019-01-23 2023-02-21 Shanghai Bilibili Technology Co., Ltd. Pseudo seamless switching method, device and media for web playing different video sources
WO2020151399A1 (en) * 2019-01-23 2020-07-30 上海哔哩哔哩科技有限公司 Method and device for pseudo-seamless switching between different video sources played by web and medium
CN111479171A (en) * 2019-01-23 2020-07-31 上海哔哩哔哩科技有限公司 Pseudo seamless switching method, device and medium among different video sources played by Web
CN111479171B (en) * 2019-01-23 2022-05-20 上海哔哩哔哩科技有限公司 Pseudo seamless switching method, device and medium among different video sources played by Web
CN111954068A (en) * 2019-05-14 2020-11-17 阿里巴巴集团控股有限公司 Method and device for video definition switching and electronic device
CN110139148A (en) * 2019-05-22 2019-08-16 武汉瓯越网视有限公司 A kind of method and relevant apparatus of video switching clarity
CN110139148B (en) * 2019-05-22 2021-05-28 武汉瓯越网视有限公司 Video switching definition method and related device
CN110213659A (en) * 2019-07-01 2019-09-06 杭州当虹科技股份有限公司 A kind of implementation method that player can be switched fast between different video stream
CN110636338B (en) * 2019-09-17 2024-05-14 北京百度网讯科技有限公司 Video definition switching method and device, electronic equipment and storage medium
CN110636338A (en) * 2019-09-17 2019-12-31 北京百度网讯科技有限公司 Video definition switching method and device, electronic equipment and storage medium
CN110933506A (en) * 2019-11-14 2020-03-27 武汉兴图新科电子股份有限公司 Method and system for seamless switching of encoding and decoding
CN110933506B (en) * 2019-11-14 2021-10-22 武汉兴图新科电子股份有限公司 Method and system for seamless switching of encoding and decoding
CN112995649B (en) * 2019-12-13 2024-04-16 青岛海信宽带多媒体技术有限公司 Network terminal and network terminal evaluating method
CN112995649A (en) * 2019-12-13 2021-06-18 青岛海信宽带多媒体技术有限公司 Network terminal and network terminal evaluation method
CN113225585A (en) * 2020-01-21 2021-08-06 腾讯科技(深圳)有限公司 Video definition switching method and device, electronic equipment and storage medium
CN111866433B (en) * 2020-07-31 2021-06-29 腾讯科技(深圳)有限公司 Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium
WO2022022193A1 (en) * 2020-07-31 2022-02-03 腾讯科技(深圳)有限公司 Video source switching method and apparatus, playback method and apparatus, device, and storage medium
CN111866433A (en) * 2020-07-31 2020-10-30 腾讯科技(深圳)有限公司 Video source switching method, video source playing method, video source switching device, video source playing device, video source equipment and storage medium
CN112087646A (en) * 2020-08-26 2020-12-15 腾讯科技(深圳)有限公司 Video playing method and device, computer equipment and storage medium
CN112291611A (en) * 2020-10-27 2021-01-29 重庆虚拟实境科技有限公司 Video playing method, computer device and readable storage medium
CN115225955A (en) * 2021-04-16 2022-10-21 海信视像科技股份有限公司 Display device, video switching method, video switching device and storage medium
CN113973233A (en) * 2021-10-22 2022-01-25 深圳小湃科技有限公司 Method, device and equipment for optimizing switching playing of multi-platform film and storage medium
CN117156223A (en) * 2023-10-31 2023-12-01 中央广播电视总台 Real-time stream switching method, device, electronic equipment and storage medium
CN117156223B (en) * 2023-10-31 2024-03-15 中央广播电视总台 Real-time stream switching method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109246462B (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN109246462A (en) A kind of video flowing seamless handover method and device
CN107197371B (en) video definition switching method and device
CN109495761A (en) Video switching method and device
EP2774345B1 (en) Method and apparatus for selecting an access method for delivery of media
CN102884829B (en) The method and apparatus managed for providing measurement report after cell change
CN107547940A (en) Video playback processing method, equipment and computer-readable recording medium
US11102087B2 (en) Service deployment for geo-distributed edge clouds
CN110324671A (en) Video web page playback method and device, electronic equipment and storage medium
CN107596687A (en) Game picture display system and method, storage medium, electronic equipment
US20220224601A1 (en) Network reconfiguration with customer premises-based application hosting
US11303526B2 (en) Network slice deployment method and apparatus
CN103597876A (en) Continuous cache service in cellular networks
CN108965997B (en) Stream media live broadcasting method and device based on mobile vulnerable network environment
CN114189696B (en) Video playing method and device
EP3549326B1 (en) Configuration control for network
CN106921865A (en) Method for processing video frequency and device
CN108449634A (en) A kind of decoded playback method of multi-process, computer equipment and storage medium
CN109845280A (en) Audio and video playing method and device based on Streaming Media
US20130298175A1 (en) Constructing a customized message in a video-on-demand service
CN107547517A (en) Audio/video program method for recording and the network equipment and computer installation
US11089103B1 (en) Content management in a distributed cache of a wireless mesh network
CN103731457B (en) A kind of method for processing business and terminal
CN109963312A (en) A kind of method for switching network, system, link switch equipment and storage medium
CN111835697B (en) Media stream sending method, device, equipment and system
CN114007087A (en) Media stream switching method and device

Legal Events

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