CN110392285A - Media stream processing method and device - Google Patents
Media stream processing method and device Download PDFInfo
- Publication number
- CN110392285A CN110392285A CN201810366138.1A CN201810366138A CN110392285A CN 110392285 A CN110392285 A CN 110392285A CN 201810366138 A CN201810366138 A CN 201810366138A CN 110392285 A CN110392285 A CN 110392285A
- Authority
- CN
- China
- Prior art keywords
- flow
- media stream
- mentioned
- combined
- media
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/236—Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
- H04N21/2365—Multiplexing of several video streams
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/262—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a kind of media stream processing method and devices.Wherein, this method comprises: receiving at least two Media Streams, wherein above-mentioned at least two Media Stream is transmitted by different transmission links, and the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow, wherein above-mentioned combined-flow is distributed after Streaming Media processing module is handled.The present invention solve in the prior art can not quick nondestructive switching multichannel duplicating medium flow the technical issues of.
Description
Technical field
The present invention relates to Streaming Media process fields, in particular to a kind of media stream processing method and device.
Background technique
In related fields, in order to solve the problems, such as unstable networks between source station and cloud, for example, being directed to some backup stream
How service is switched to other backup streams when occurring abnormal, common solution is beyond the clouds to multiple in the prior art
Backup stream does identical Streaming Media processing (such as transcoding, switching), i.e., when some backup throat floater, at other backup streams
Serving data after reason.
But the program will cause certain waste to the Service Source in cloud;For example, according to abnormality detection and switching
Position is different, and handover scheme can have following selection: player switching and proxy server Proxy switching.Wherein, player is cut
The shortcomings that changing: many kinds of of player is difficult that all players is allowed all to support switching at runtime, promotes at high cost;Proxy server
The shortcomings that Proxy switches: it to the influence of user experience when in order to reduce switching, is done when needing beyond the clouds to multiple backup stream process
Synchronous working, higher cost, different types of service processing require to do synchronization.
It follows that above-mentioned existing solution will cause certain waste to the Service Source in cloud, higher cost,
And realize that the effect is unsatisfactory.It is above-mentioned in the prior art can not quick nondestructive switching multichannel duplicating medium flow aiming at the problem that,
Currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of media stream processing method and device, at least solve in the prior art can not be fast
The technical issues of speed lossless switching multichannel duplicating medium flow.
According to an aspect of an embodiment of the present invention, a kind of media stream processing method is provided, comprising: receive at least two
Media Stream, wherein above-mentioned at least two Media Stream is transmitted by different transmission links, the transmission quality of different transmission links
Difference, above-mentioned at least two Media Stream are mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow, wherein above-mentioned multiple
Distribute after Streaming Media processing module is handled at interflow.
According to an aspect of an embodiment of the present invention, a kind of media stream processing method is provided, comprising: receive compound
Stream, wherein above-mentioned combined-flow obtains for compound at least two Media Stream, and above-mentioned at least two Media Stream passes through different transmission
Link transmission obtains, and the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;Distribution receives
The above-mentioned combined-flow arrived.
According to an aspect of an embodiment of the present invention, a kind of media stream processing method is provided, comprising: receive compound
Stream, wherein above-mentioned combined-flow obtains for compound at least two Media Stream, and above-mentioned at least two Media Stream passes through different transmission
Link transmission obtains, and the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;It plays and receives
The above-mentioned combined-flow arrived.
According to an aspect of an embodiment of the present invention, a kind of media current processing device is provided, comprising: first receives mould
Block, for receiving at least two Media Streams, wherein above-mentioned at least two Media Stream is transmitted by different transmission links, different
Transmission link transmission quality it is different, above-mentioned at least two Media Stream is mutually backups;Composite module, for it is compound it is above-mentioned at least
Two Media Streams generate combined-flow, wherein above-mentioned combined-flow is distributed after Streaming Media processing module is handled.
According to an aspect of an embodiment of the present invention, a kind of recombiner is provided, including above-mentioned media current processing device.
According to an aspect of an embodiment of the present invention, a kind of media current processing device is provided, comprising: second receives mould
Block, for receiving combined-flow, wherein above-mentioned combined-flow obtains, above-mentioned at least two matchmaker for compound at least two Media Stream
Body stream transmits to obtain by different transmission links, and the transmission quality of different transmission links is different, above-mentioned at least two media
Stream is mutually backups;Distribution module, for distributing the above-mentioned combined-flow received.
According to an aspect of an embodiment of the present invention, a kind of distributor is provided, including above-mentioned media current processing device.
According to an aspect of an embodiment of the present invention, a kind of media current processing device is provided, comprising: third receives mould
Block, for receiving combined-flow, wherein above-mentioned combined-flow obtains, above-mentioned at least two matchmaker for compound at least two Media Stream
Body stream transmits to obtain by different transmission links, and the transmission quality of different transmission links is different, above-mentioned at least two media
Stream is mutually backups;Playing module, for playing the above-mentioned combined-flow received.
According to an aspect of an embodiment of the present invention, a kind of player is provided, including above-mentioned media current processing device.
According to an aspect of an embodiment of the present invention, a kind of storage medium is provided, above-mentioned storage medium includes storage
Program, wherein equipment where controlling above-mentioned storage medium in above procedure operation executes following functions: receiving at least two matchmakers
Body stream, wherein above-mentioned at least two Media Stream is transmitted by different transmission links, and the transmission quality of different transmission links is not
Together, above-mentioned at least two Media Stream is mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow, wherein above-mentioned compound
Stream is distributed after Streaming Media processing module is handled.
According to an aspect of an embodiment of the present invention, a kind of processor is provided, above-mentioned processor is used to run program,
In, above procedure executes following functions when running: receiving at least two Media Streams, wherein above-mentioned at least two Media Stream passes through
Different transmission link transmission, the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;It is multiple
It closes and states at least two Media Streams, generate combined-flow, wherein above-mentioned combined-flow divides after Streaming Media processing module is handled
Hair.
In embodiments of the present invention, by the way of compound multipath media stream, by receiving at least two Media Streams,
In, above-mentioned at least two Media Stream is transmitted by different transmission links, and the transmission quality of different transmission links is different, above-mentioned
At least two Media Streams are mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow, wherein above-mentioned combined-flow is flowing
Medium process module is distributed after being handled, and has been reached when some duplicating medium flow occurs abnormal, will quickly have been serviced lossless cut
The purpose of other duplicating medium flows is changed to, is influenced, is improved by source station fluctuation to realize and video cloud service is effectively reduced
The technical effect of system availability, so solve in the prior art can not quick nondestructive switching multichannel duplicating medium flow skill
Art problem.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of hardware configuration frame of terminal (or mobile device) for realizing media stream processing method
Figure;
Fig. 2 is a kind of flow chart of media stream processing method according to an embodiment of the present invention;
Fig. 3 is a kind of realization schematic diagram of a scenario of optional media stream processing method according to an embodiment of the present invention;
Fig. 4 is a kind of flow chart of optional media stream processing method according to an embodiment of the present invention;
Fig. 5 is a kind of flow chart of optional media stream processing method according to an embodiment of the present invention;
Fig. 6 is the flow chart of another media stream processing method according to an embodiment of the present invention;
Fig. 7 is the flow chart of another media stream processing method according to an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of media current processing device according to an embodiment of the present invention;
Fig. 9 is the structural schematic diagram of another media current processing device according to an embodiment of the present invention;And
Figure 10 is the structural schematic diagram of another media current processing device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
Firstly, the part noun or term that occur during the embodiment of the present application is described are suitable for following solution
It releases:
Video cloud service: video cloud be it is a kind of provide the cloud computing platform of one-stop video solution for user, including
But it is not limited to the functions such as recording, transcoding, live streaming distribution.User only needs original video uploading to cloud, that is, view can be used
The service of frequency cloud.
A kind of instant message transport protocol (Real Time Messaging Protocol, RTMP) stream: real-time Transmission sound
The format that audio, video data after coding is packaged into RTMP is passed to video cloud service and mentioned by the network protocol of video data, source station
For quotient, cloud service provider carries out subsequent processing and distribution.
Source station: the producer of audio, video data can be the RTMP server of a passive service, or a master
The server-side or client of dynamic plug-flow.Source station can notify cloud service provider to source station pulling data, can also be by data master
It is dynamic to be pushed to cloud service provider.
Content distributing network CDN (Content Delivery Network): refer to that a kind of user and cloud transmit data
Network media, source station upload the data to video cloud cloud by CDN, and video cloud cloud will treated that audio, video data leads to
It crosses CDN and is distributed to user.
Backup stream (duplicating medium flow): referring to Media Stream made of encapsulating by audio-video source, and source station is by a sound
The RTMP stream that video source is packaged into multiple and different names is used for cloud service provider, when some backup stream is unavailable, cloud clothes
Other backup streams can be used to guarantee that service is not interrupted in business provider.
Combined-flow (composite media stream): referring to the RTMP stream of a stability and better quality including multiple backup streams,
User is consistent with the effect of backup stream when using combined-flow.And when some backup throat floater, combined-flow can be from other
Backup stream reads integral data, does not influence the data of combined-flow.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of media stream processing method is provided, it should be noted that in attached drawing
Process the step of illustrating can execute in a computer system such as a set of computer executable instructions, although also,
Logical order is shown in flow charts, but in some cases, can be executed with the sequence for being different from herein it is shown or
The step of description.
Before the further details of description present embodiments, it will be described with reference to Figure 1 and can be used for realizing this Shen
Please principle a suitable terminal.
Embodiment of the method provided by the embodiment of the present application 1 can be in mobile terminal, terminal or similar fortune
It calculates and is executed in device.Fig. 1 is a kind of hardware knot of terminal (or mobile device) for realizing media stream processing method
Structure block diagram, as shown in Figure 1, terminal 10 (or mobile device 10) may include it is one or more (in figure using 102a,
102b ... ..., 102n are shown) (processor 102 can include but is not limited to Micro-processor MCV or programmable patrols processor 102
The processing unit of volume device FPGA etc.), memory 104 for storing data and the transmission module for communication function
106.It in addition to this, can also include: display, input/output interface (I/O interface), the port universal serial bus (USB)
(a port that can be used as in the port of I/O interface is included), network interface, power supply and/or camera.The common skill in this field
Art personnel are appreciated that structure shown in FIG. 1 is only to illustrate, and do not cause to limit to the structure of above-mentioned electronic device.For example,
Terminal 10 may also include the more perhaps less component than shown in Fig. 1 or match with different from shown in Fig. 1
It sets.
It is to be noted that said one or multiple processors 102 and/or other data processing circuits lead to herein
Can often " data processing circuit " be referred to as.The data processing circuit all or part of can be presented as software, hardware, firmware
Or any other combination.In addition, data processing circuit for single independent processing module or all or part of can be integrated to meter
In any one in other elements in calculation machine terminal 10 (or mobile device).As involved in the embodiment of the present application,
The data processing circuit controls (such as the selection for the variable resistance end path connecting with interface) as a kind of processor.
Memory 104 can be used for storing the software program and module of application software, such as the media in the embodiment of the present invention
Corresponding program instruction/the data storage device of method for stream processing, processor 102 are stored in soft in memory 104 by operation
Part program and module realize above-mentioned media stream processing method thereby executing various function application and data processing.Storage
Device 104 may include high speed random access memory, may also include nonvolatile memory, as one or more magnetic storage device,
Flash memory or other non-volatile solid state memories.In some instances, memory 104 can further comprise relative to processing
The remotely located memory of device 102, these remote memories can pass through network connection to terminal 10.Above-mentioned network
Example includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Transmitting device 106 is used to that data to be received or sent via a network.Above-mentioned network specific example may include
The wireless network that the communication providers of terminal 10 provide.In an example, transmitting device 106 includes that a network is suitable
Orchestration (Network Interface Controller, NIC), can be connected by base station with other network equipments so as to
Internet is communicated.In an example, transmitting device 106 can be radio frequency (Radio Frequency, RF) module,
For wirelessly being communicated with internet.
Display can such as touch-screen type liquid crystal display (LCD), the liquid crystal display aloow user with
The user interface of terminal 10 (or mobile device) interacts.
It in the related art, a use of basic mode of video cloud service is that original video data is packaged into RTMP
Stream, by real-time audio, video data push (or notice video cloud service provider to pull) to cloud, cloud service provider
Subsequent processing and distribution work are done based on the video stream data got.
Wherein, source station and cloud service provider usually pass through public transmitted data on network, be easy in transmission process by
The influence of network jitter causes to stop, and in order to ensure the stability and availability of service, source station can be to the audio-video of same content
Data encoding exports multiple backup streams, and when some backup stream occurs abnormal, cloud service provider needs a mechanism to locate
How service is switched to other backup streams by reason, is guaranteed that the Video service of user is unaffected, is provided availability higher clothes
Business guarantees.
Under above-mentioned running environment, to solve the above-mentioned technical problems in the prior art, the embodiment of the present application is provided
Media stream processing method as shown in Figure 2.Fig. 2 is a kind of process of media stream processing method according to an embodiment of the present invention
Figure, as shown in Fig. 2, media stream processing method provided by the embodiment of the present application step can be realized by the following method:
Step S102 receives at least two Media Streams.
Specifically, the executing subject of above-mentioned steps S102 can be video recombiner, for example, RTMP recombiner.Can be
HD video recombiner in the videos Cloud Servers such as Tencent's cloud, Kingsoft cloud, Baidu's cloud, net place cloud or client.In one kind
In optional embodiment, above-mentioned Media Stream is instant message protocol RTMP stream, can be obtained by coded treatment audio, video data.
In order to ensure the stability and availability of service, it is multiple that source station can encode output to the audio, video data of same content
What Media Stream namely source station were transmitted originally is identical Media Stream, but due to the difference of transmission link, leads to the matchmaker received
The difference of body stream.
As a kind of optional embodiment, above-mentioned video recombiner and source station (audio-video source station, the i.e. life of audio, video data
Production side) between can pass through content distributing network CDN transmitting media flow data.Video cloud service provider can receive source station push
The notice of at least two Media Streams or video cloud service provider based on source station, at least two Media Streams pulled from source station.
It should be noted that RTMP server or an active plug-flow of the above-mentioned source station as passive service
Server-side or client, source station can notify cloud service provider to source station pull media flow data, can also be by media stream number
According to active push to cloud service provider.
In an alternative embodiment, above-mentioned at least two (at least two-way) Media Stream can be identical Media Stream,
Identical at least two Media Stream can be transmitted to obtain by same source stream by different transmission links, can also be by different source streams
It transmits to obtain by different transmission links;Wherein, the transmission quality of different transmission links is different, above-mentioned at least two media
Stream can be mutually backups.
In the embodiment of the present application, source station generates and output media stream can be in the case where above-mentioned Media Stream is two
For Media Stream a and Media Stream b, Media Stream a and Media Stream b are mutually backups, and when Media Stream a occurs abnormal, are mentioned by Media Stream b
Service is provided by Media Stream a, guarantees the view that cloud service provider provides a user when Media Stream b occurs abnormal for service
Being taken in small doses at short intervals, it is unaffected to be engaged in, and provides availability higher service guarantees.
Fig. 3 is a kind of realization schematic diagram of a scenario of optional media stream processing method according to an embodiment of the present invention, such as Fig. 3
Shown, above-mentioned Media Stream a and Media Stream b (being not shown in Fig. 3) can be pushed to the content distribution of cloud service provider by source station
(source station can also notify CDN to pull above-mentioned Media Stream a and Media Stream b) to network C DN, wherein above-mentioned Media Stream a and Media Stream b
Content distributing network CDN is transmitted to by different transmission links by same source stream, CDN passes through different transmission links again will be upper
It states Media Stream a and Media Stream b is transmitted to video recombiner.
Still as shown in figure 3, above-mentioned Media Stream a is transmitted to content distributing network CDN by transmission link 1 by source station;Source station
Above-mentioned Media Stream b is transmitted to content distributing network CDN by transmission link 2, CDN passes through transmission link 3 for above-mentioned Media Stream a
It is transmitted to video recombiner;Above-mentioned Media Stream b is transmitted to video recombiner by transmission link 4 by CDN.Also, above-mentioned transmission
Link 1 is different with the transmission quality of transmission link 2, and the transmission quality of transmission link 3 and transmission link 4 is also different.
It should be noted that comparing in the prior art is placed on hand-off process the distribution link of combined-flow, the application is real
Data processing scheme provided by example is applied, a kind of embodiment of obvious technical effects is provided, by Streaming Media processing links
Processing is switched over to the exception of Media Stream before, user can be realized to subsequent Streaming Media after switching over processing
Processing and distribution link unaware, also, player does not need to do hand-off process, reduce need to be compatible with different players at
This.Also, it when Streaming Media processing module is handled, is synchronized regardless of to multiple backup streams, Streaming Media handles mould
Only needs handle combined-flow all the way to block, also reduce the resource consumption of system.
Still need to it is noted that by building proxy server Proxy, the duplicating medium flow in the embodiment of the present application it is different
Normal hand-off process work can also be realized in the distribution link of combined-flow, can be realized with consumption terminal (player), implementation
In addition to needing to build Proxy, can be, but not limited to it is identical as above-mentioned media stream processing method provided by the embodiments of the present application or
It is similar, this is no longer excessively repeated.
Step S104, compound above-mentioned at least two Media Stream generate combined-flow, wherein above-mentioned combined-flow is at Streaming Media
Reason module is distributed after being handled.
In above-mentioned steps S104, the embodiment of the present application can be (multiple/more by RTMP recombiner compound at least two
Road) Media Stream, generate a combined-flow.
Optionally, above-mentioned combined-flow (composite media stream) can be include multiple Media Streams (it is compound by multiple Media Streams and
At) a stability and better quality RTMP stream.It should be noted that user is when using combined-flow and the effect of Media Stream
Fruit is consistent.And when some media throat floater, combined-flow can read integral data from other Media Streams, not influence combined-flow
Data.
As shown in figure 3, in an alternative embodiment, the combined-flow of generation can be pushed to by above-mentioned RTMP recombiner
Subsequent Streaming Media processing module (above-mentioned combined-flow can also be pulled with notification streams medium process module), and then Streaming Media handles mould
Block will treated data distribution to user side video player, video player plays the above-mentioned combined-flow received.
As a kind of optional embodiment, above-mentioned Streaming Media processing module can be handled combined-flow, for example, to multiple
Interflow is sliced, the processing such as transcoding, and then by content distributing network CDN by Streaming Media processing module treated combined-flow
Data distribution is to user.
In an alternative embodiment, when multipath media stream it is second-rate (such as: Caton rate is high, frame losing etc. occurs
Situation) when, RTMP recombiner can by integrating the data of multipath media stream, to improve the quality of the combined-flow of final output,
The inaccessiable technical effect of other schemes institute in the prior art is reached.Also, RTMP recombiner may be implemented Media Stream without
Lossless switching is stitched, the service recovery time is shorter, substantially on user without influence.
Scheme defined by based on the above embodiment can be known, by receiving at least two Media Streams, wherein it is above-mentioned extremely
Few two Media Streams are transmitted by different transmission links, and the transmission quality of different transmission links is different, and above-mentioned at least two
Media Stream is mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow, wherein above-mentioned combined-flow is in Streaming Media processing
Module is distributed after being handled.
By scheme provided by the above embodiments of the present application, reach when some duplicating medium flow occurs abnormal, fastly
Speed will service purpose of the lossless switching to other duplicating medium flows, and video cloud service is effectively reduced by source station wave to realize
Dynamic influence, improves the technical effect of system availability, so solve in the prior art can not quick nondestructive switching multichannel
The technical issues of duplicating medium flow.
In an alternative embodiment, Fig. 4 is a kind of optional media stream processing method according to an embodiment of the present invention
Flow chart, as shown in figure 4, above-mentioned steps S104, compound above-mentioned at least two Media Stream generates combined-flow, can be by such as
Lower method and step is realized:
Step S202 detects the frame per second of above-mentioned at least two Media Stream.
In above-mentioned steps S202, above-mentioned frame per second refers to the measurement of the display frame number of at least two Media Streams of measurement, measurement
Unit can be but be not limited to display frame number or hertz per second.
Step S204, according to the frame per second of above-mentioned at least two Media Stream detected, compound above-mentioned at least two Media Stream.
In this application, as a kind of optional embodiment, above-mentioned steps S204, according to above-mentioned at least two detected
The frame per second of Media Stream, compound above-mentioned at least two Media Stream step can be realized by the following method:
Step S2041 includes the frame per second for meeting frame per second condition in the frame per second of above-mentioned at least two Media Stream detected
In the case where, using the corresponding Media Stream of above-mentioned frame per second as above-mentioned combined-flow.
In above-mentioned steps S2041, above-mentioned frame per second condition is that frame per second reaches predetermined frame rate and persistently reaches scheduled duration.
As a kind of optional embodiment, above-mentioned predetermined frame rate can be, but not limited to be 16, can also be the frame higher than 16
Rate;The unit of scheduled duration can be, but not limited to as the second, and above-mentioned scheduled duration can be 3-5 seconds etc., and however, it is not limited to this, with
It may be implemented subject to the embodiment of the present application.
It should be noted that due to the special physiological structure of mankind's glasses, when the frame per second of watched picture is higher than 16, meeting
Think that watched picture is coherent, for example, the frame per second of film is 23.976fps, the frame per second of TV (PAL) is 25fps, but
It is that the frame per second of game (for example, shooting game) compares the height for focusing on frame per second, is generally not less than 30fps.
As a kind of optional embodiment, above-mentioned steps S2041, in the frame per second of above-mentioned at least two Media Stream detected
In include in the case where meeting the frame per second of frame per second condition, using the corresponding Media Stream of above-mentioned frame per second as above-mentioned combined-flow, Ke Yitong
Following method and step is crossed to realize:
Step S20410 detects that the frame per second of the first Media Stream in above-mentioned at least two Media Stream meets above-mentioned frame per second item
Part, using above-mentioned first Media Stream as above-mentioned combined-flow.
Step S20412 detects that above-mentioned first Media Stream is unsatisfactory for above-mentioned frame per second condition, and detects above-mentioned at least two
The frame per second of the second Media Stream in a Media Stream meets above-mentioned frame per second condition, using above-mentioned first Media Stream as above-mentioned combined-flow tune
Whole is using above-mentioned second Media Stream as above-mentioned combined-flow.
Wherein, above-mentioned first Media Stream and above-mentioned second Media Stream are mutually backups stream.
It whether include meeting frame per second item in the frame per second by detecting at least two Media Streams in above-mentioned optional embodiment
The frame per second of part, in the case where detecting that exception occurs in the first Media Stream at least two Media Streams, for example, on detecting
It states the first Media Stream and is unsatisfactory for frame per second condition, and detect that the frame per second of the second Media Stream in above-mentioned at least two Media Stream meets
In the case where above-mentioned frame per second condition, it can be adjusted to above-mentioned first Media Stream as above-mentioned combined-flow by above-mentioned second Media Stream
As above-mentioned combined-flow.
Based on the alternative embodiment that above-mentioned steps S20410 is provided to step S20412, it is possible to prevente effectively from the matter of combined-flow
Amount is influenced by abnormal Media Stream, so that abnormal unaware of the subsequent delivery of services consumptive link to source station, effectively
Improve the stability of streaming media service.
In an alternative embodiment, Fig. 5 is a kind of optional media stream processing method according to an embodiment of the present invention
Flow chart, as shown in figure 5, after above-mentioned steps S104, namely in compound above-mentioned at least two Media Stream, generate combined-flow
Later, above-mentioned media stream processing method further includes following method and step:
Step S106 sends out above-mentioned combined-flow in the case where above-mentioned combined-flow meets scheduled media flow quality condition
Give above-mentioned Streaming Media processing module.
In step s 106, above-mentioned scheduled media flow quality condition is by above-mentioned combined-flow reproduction to the source of predetermined extent
The condition of stream, above-mentioned source stream are the Media Stream issued from source station.
It should be noted that above-mentioned predetermined extent can be but be not limited to: Caton rate is lower, the more low media of frame loss rate
The higher degree of current mass.
By above-mentioned optional embodiment, when multipath media stream it is second-rate (such as: Caton rate is high, frame losing etc. occurs
Situation) when, RTMP recombiner can by integrating the data of multipath media stream, to improve the quality of the combined-flow of final output,
The inaccessiable technical effect of other schemes institute in the prior art is reached.
As a kind of optional embodiment, above-mentioned combined-flow is sent to above-mentioned Streaming Media and handles mould by above-mentioned steps S106
Block includes:
Above-mentioned combined-flow is pushed to above-mentioned Streaming Media processing module by step S1061.
As an alternative embodiment, above-mentioned combined-flow, which is sent to above-mentioned Streaming Media processing module, includes:
Step S1063, Xiang Shangshu Streaming Media processing module sends a notification message, wherein above-mentioned notification message is for notifying
Above-mentioned streaming media module pulls above-mentioned combined-flow.
It, can be by interior between recombiner (video recombiner) and Streaming Media processing module as a kind of optional embodiment
Content distributing network CDN transmits combined-flow.Streaming Media processing module can receive combined-flow or the Streaming Media processing of recombiner push
Notification message of the module based on recombiner, the above-mentioned combined-flow pulled from recombiner.
It should be noted that above-mentioned recombiner can be the RTMP recombiner of a passive service, or a master
The recombiner of dynamic plug-flow, recombiner can send a notification message, and notification streams medium process module pulls compound fluxion from recombiner
According to can also be by compound flow data active push to Streaming Media processing module, in order to which Streaming Media processing module is to above-mentioned compound
Flow data is handled, and the resource consumption of system is thereby reduced.
In an alternative embodiment, after above-mentioned steps S104, above-mentioned at least two Media Stream is compound
After a combined-flow, further includes:
Step S108 issues prompt in the case where above-mentioned combined-flow is unsatisfactory for above-mentioned scheduled media flow quality condition
Information, wherein above-mentioned prompt information is for prompting above-mentioned combined-flow that cannot reappear above-mentioned predetermined extent.
In above-mentioned steps S108, as an alternative embodiment, if above-mentioned combined-flow be unsatisfactory for it is above-mentioned scheduled
Media flow quality condition, then above-mentioned recombiner can send prompt information to source station by content distributing network, and source station is prompted to work as
The media flow quality condition of preceding transmitted Media Stream is lower, the compound obtained combined-flow of the Media Stream currently transmitted according to its
It is unable to satisfy scheduled media flow quality condition, above-mentioned combined-flow can not be reappeared to the source stream to predetermined extent.
In the above-described embodiments, above-mentioned source station can retransmit at least two media after receiving above-mentioned prompt information
Flow to recombiner, so recombiner can further multiple Media Streams be carried out it is compound, to improve the combined-flow of final output
Quality.
By above-mentioned optional embodiment, when multipath media stream it is second-rate (such as: Caton rate is high, frame losing etc. occurs
Situation) when, RTMP recombiner can export the prompt information for prompting source station, to improve the matter of the combined-flow of final output
Amount has reached the inaccessiable technical effect of other schemes institute in the prior art.
Multiple independent Media Streams (or can be standby by above-mentioned media stream processing method provided by the embodiments of the present application
Part RTMP stream) be combined into the more stable combined-flow of better quality, then based on combined-flow carry out subsequent Streaming Media processing and
Distribution provides service using other normal Media Streams, can still guarantee combined-flow when some backup stream occurs abnormal
Quality is unaffected, so that abnormal unaware of the subsequent delivery of services consumptive link to source station, effectively increases stream matchmaker
The stability of body service.
It should be noted that any one optional or preferred media stream processing method in the embodiment of the present application,
It can execute or realize in media current processing device provided by the present embodiment.
Embodiment 2
According to embodiments of the present invention, the embodiment of the method for another media stream processing method is additionally provided, needs to illustrate
It is that step shown in the flowchart of the accompanying drawings can execute in a computer system such as a set of computer executable instructions,
Also, although logical order is shown in flow charts, and it in some cases, can be to be different from sequence execution herein
Shown or described step.
It should be noted that embodiment of the method provided by the embodiment of the present application 2 can be whole in computer as shown in Figure 1
It is executed in 10 (or mobile devices 10) of end or similar arithmetic unit.Fig. 6 is another media according to an embodiment of the present invention
The flow chart of method for stream processing, as shown in fig. 6, media stream processing method provided by the embodiment of the present application can pass through such as lower section
Method step is realized:
Step S602, receives combined-flow, wherein above-mentioned combined-flow obtains for compound at least two Media Stream, above-mentioned
At least two Media Streams transmit to obtain by different transmission links, and the transmission quality of different transmission links is different, it is above-mentioned extremely
Few two Media Streams are mutually backups.
Wherein, the executing subject of above-mentioned steps S602 can be Streaming Media processing module, can for Tencent's cloud, Kingsoft cloud,
Streaming Media processing module in the videos Cloud Servers such as Baidu's cloud, net place cloud or client, wherein the Streaming Media processing module
It can be processor.Above-mentioned video recombiner can be RTMP recombiner.Above-mentioned source station is audio-video source station, i.e. audio, video data
Producer.
In an alternative embodiment, above-mentioned Media Stream is instant message protocol RTMP stream, can pass through coded treatment
Audio, video data obtains.
In order to ensure the stability and availability of service, it is multiple that source station can encode output to the audio, video data of same content
What Media Stream namely source station were transmitted originally is identical Media Stream, but due to the difference of transmission link, leads to the matchmaker received
The difference of body stream.
Optionally, above-mentioned combined-flow can be include one of multiple backup streams (or being combined by multiple backup streams) steady
Qualitative and better quality RTMP flows.It should be noted that user is consistent with the effect of backup stream when using combined-flow.And
When some backup throat floater, combined-flow can read integral data from other backup streams, not influence the data of combined-flow.
In an alternative embodiment, above-mentioned at least two (at least two-way) Media Stream can be identical Media Stream,
Identical at least two Media Stream can be transmitted to obtain by same source stream by different transmission links, can also be by different source streams
It transmits to obtain by different transmission links;Wherein, the transmission quality of different transmission links is different, above-mentioned at least two media
Stream can be mutually backups.
As a kind of optional embodiment, content distributing network CDN can be passed through between above-mentioned video recombiner and source station
Transmitting media flow data.Video cloud service provider can receive at least two Media Streams or video cloud service provider base of source station push
At least two Media Streams that notice in source station is pulled from source station.
It, can be by interior between recombiner (RTMP recombiner) and Streaming Media processing module as a kind of optional embodiment
Content distributing network CDN transmits combined-flow.Streaming Media processing module can receive combined-flow or the Streaming Media processing of recombiner push
Notification message of the module based on recombiner, the above-mentioned combined-flow pulled from recombiner.
In the above-described embodiments, the embodiment of the present application can pass through recombiner compound at least two (multiple/multichannel) media
Stream, generates a combined-flow.
In an alternative embodiment, the combined-flow of generation can be pushed in the embodiment of the present application by above-mentioned recombiner
Streaming Media processing module (above-mentioned combined-flow can also be pulled with notification streams medium process module), and then Streaming Media processing module will
Video player of the data distribution that treated to user side, the above-mentioned combined-flow that video player broadcasting receives.
In the application, as a kind of optional embodiment, meet scheduled media flow quality condition in above-mentioned combined-flow
In the case of, above-mentioned combined-flow is sent to above-mentioned Streaming Media processing module.Wherein, above-mentioned scheduled media flow quality condition is to incite somebody to action
The condition of source stream of the above-mentioned combined-flow reproduction to predetermined extent, above-mentioned source stream is the Media Stream issued from source station.
Hand-off process is realized in the distribution link of combined-flow in the prior art it should be noted that comparing, this Shen
Please data processing scheme provided by embodiment, a kind of embodiment of obvious technical effects is provided, by handling in Streaming Media
Processing is switched over to the exception of Media Stream before link, user can be realized to subsequent stream after switching over processing
Media handling and distribution link unaware, also, player does not need to do hand-off process, and different players need to be compatible with by reducing
Cost.
In addition, being synchronized regardless of to multiple backup streams, at Streaming Media when Streaming Media processing module is handled
Managing module, only needs handle combined-flow all the way, also reduce the resource consumption of system.
Still need to it is noted that by building proxy server Proxy, the duplicating medium flow in the embodiment of the present application it is different
Normal hand-off process work can also be realized in the distribution link of combined-flow, can be realized with consumption terminal (player), implementation
In addition to needing to build Proxy, can be, but not limited to it is identical as above-mentioned media stream processing method provided by the embodiments of the present application or
It is similar, this is no longer excessively repeated.
Step S604 distributes the above-mentioned combined-flow received.
As a kind of optional embodiment, above-mentioned Streaming Media processing module can be handled combined-flow, for example, to multiple
Interflow is sliced, the processing such as transcoding, and then Streaming Media processing module is by content distributing network CDN, will that treated is compound
Flow data is distributed to user side equipment, for example, the video player of user side can be distributed to.
In an alternative embodiment, when multipath media stream it is second-rate (such as: Caton rate is high, frame losing etc. occurs
Situation) when, the data of multipath media stream can be integrated by RTMP recombiner, to improve the quality of the combined-flow of final output,
The inaccessiable technical effect of other schemes institute in the prior art is reached.And then the seamless lossless switching of Media Stream may be implemented,
The service recovery time is shorter, substantially on user without influence.
Scheme defined by based on the above embodiment can be known, combined-flow is received, wherein above-mentioned combined-flow is compound
At least two Media Streams and obtain, above-mentioned at least two Media Stream transmits to obtain by different transmission links, different transmission
The transmission quality of link is different, and above-mentioned at least two Media Stream is mutually backups;Distribute the above-mentioned combined-flow received.
By scheme provided by the above embodiments of the present application, the number that multipath media stream is integrated by recombiner is reached
According to being fluctuated by source station to realize and video cloud service is effectively reduced to improve the purpose of the quality of the combined-flow of final output
Influence, improve the technical effect of system availability, so solve in the prior art can not quick nondestructive switching multichannel it is standby
The technical issues of part Media Stream.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1, herein not
It repeats again.
Embodiment 3
According to embodiments of the present invention, the embodiment of the method for another media stream processing method is additionally provided, needs to illustrate
It is that step shown in the flowchart of the accompanying drawings can execute in a computer system such as a set of computer executable instructions,
Also, although logical order is shown in flow charts, and it in some cases, can be to be different from sequence execution herein
Shown or described step.
It should be noted that embodiment of the method provided by the embodiment of the present application 3 can be whole in computer as shown in Figure 1
It is executed in 10 (or mobile devices 10) of end or similar arithmetic unit.Fig. 7 is another media according to an embodiment of the present invention
The flow chart of method for stream processing, as shown in fig. 7, media stream processing method provided by the embodiment of the present application can pass through such as lower section
Method step is realized:
Step S702, receives combined-flow, wherein above-mentioned combined-flow obtains for compound at least two Media Stream, above-mentioned
At least two Media Streams transmit to obtain by different transmission links, and the transmission quality of different transmission links is different, it is above-mentioned extremely
Few two Media Streams are mutually backups;
Step S704 plays the above-mentioned combined-flow received.
The executing subject of above-mentioned steps S702 can be user side equipment, for example, video player, display are (for example, aobvious
Show that large-size screen monitors, mobile terminal, terminal etc. can player, displays in display terminal) etc., however, it is not limited to this;On
Stating recombiner is video recombiner, for example, RTMP recombiner;Above-mentioned source station is audio-video source station, the i.e. production of audio, video data
Side.
Optionally, above-mentioned combined-flow (composite media stream) can be include that multiple backup streams are (or compound by multiple backup streams
Into) a stability and better quality RTMP stream.It should be noted that user is when using combined-flow and backup stream
Effect is consistent.And when some backup throat floater, combined-flow can read integral data from other backup streams, not influence compound
The data of stream.
As a kind of optional embodiment, content distributing network CDN can be passed through between above-mentioned video recombiner and source station
Transmitting media flow data.Video cloud service provider can receive at least two Media Streams or video cloud service provider base of source station push
At least two Media Streams that notice in source station is pulled from source station.
In an alternative embodiment, above-mentioned at least two (at least two-way) Media Stream can be identical Media Stream,
Identical at least two Media Stream can be transmitted to obtain by same source stream by different transmission links, can also be by different source streams
It transmits to obtain by different transmission links;Wherein, the transmission quality of different transmission links is different, above-mentioned at least two media
Stream can be mutually backups.
In an alternative embodiment, above-mentioned Media Stream is instant message protocol RTMP stream, can pass through coded treatment
Audio, video data obtains.
In order to ensure the stability and availability of service, it is multiple that source station can encode output to the audio, video data of same content
What Media Stream namely source station were transmitted originally is identical Media Stream, but due to the difference of transmission link, leads to the matchmaker received
The difference of body stream.
As a kind of optional embodiment, content distributing network can be passed through between recombiner and Streaming Media processing module
CDN transmits combined-flow.Streaming Media processing module can receive the combined-flow of recombiner push or Streaming Media processing module is based on again
The notification message of clutch, the above-mentioned combined-flow pulled from recombiner.
In the above-described embodiments, the embodiment of the present application can pass through recombiner compound at least two (multiple/multichannel) media
Stream, generates a combined-flow, also, the combined-flow of generation can be pushed to the stream matchmaker in the embodiment of the present application by above-mentioned recombiner
Body processing module (furthermore it is also possible to notification streams medium process module pulls above-mentioned combined-flow), and then Streaming Media processing module will
Data distribution that treated is to user side equipment.
As a kind of optional embodiment, above-mentioned Streaming Media processing module can be handled combined-flow, for example, to multiple
Interflow is sliced, the processing such as transcoding, and then Streaming Media processing module is by content distributing network CDN, will that treated is compound
Flow data is distributed to user side equipment, for example, the video player of user side can be distributed to, and then video player broadcasting connects
The above-mentioned compound flow data received, also, video player does not need to switch over processing, and different players need to be compatible with by reducing
Cost.
In an alternative embodiment, when multipath media stream it is second-rate (such as: Caton rate is high, frame losing etc. occurs
Situation) when, the data of multipath media stream can be integrated by RTMP recombiner, to improve the quality of the combined-flow of final output,
The inaccessiable technical effect of other schemes institute in the prior art is reached.And then the seamless lossless switching of Media Stream may be implemented,
The service recovery time is shorter, substantially on user without influence.
Hand-off process is realized in the distribution link of combined-flow in the prior art it should be noted that comparing, this Shen
Please data processing scheme provided by embodiment, a kind of embodiment of obvious technical effects is provided, by handling in Streaming Media
Processing is switched over to the exception of Media Stream before link, user can be realized to subsequent stream after switching over processing
Media handling and distribution link unaware, also, when Streaming Media processing module is handled, regardless of to multiple backup streams
It synchronizes, it is only necessary to handle combined-flow all the way, also reduce the resource consumption of system.
Still need to it is noted that by building proxy server Proxy, the duplicating medium flow in the embodiment of the present application it is different
Normal hand-off process work can also be realized in the distribution link of combined-flow, can be realized with consumption terminal (player), implementation
In addition to needing to build Proxy, can be, but not limited to it is identical as above-mentioned media stream processing method provided by the embodiments of the present application or
It is similar, this is no longer excessively repeated.
Scheme defined by based on the above embodiment can be known, by receiving combined-flow, wherein above-mentioned combined-flow is
Compound at least two Media Stream and obtain, above-mentioned at least two Media Stream transmits to obtain by different transmission links, different
The transmission quality of transmission link is different, and above-mentioned at least two Media Stream is mutually backups;Play the above-mentioned combined-flow received.
By scheme provided by the above embodiments of the present application, video player does not need to carry out when playing combined-flow
Hand-off process reduces the cost that need to be compatible with different players, is fluctuated to realize and video cloud service is effectively reduced by source station
Influence, improve the technical effect of system availability, so solve in the prior art can not quick nondestructive switching multichannel it is standby
The technical issues of part Media Stream.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1, herein not
It repeats again.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute the above-mentioned method of each embodiment of the present invention.
Embodiment 4
According to embodiments of the present invention, it additionally provides a kind of for implementing the media stream processing method in above-described embodiment 1
Media current processing device, Fig. 8 is a kind of structural schematic diagram of media current processing device according to an embodiment of the present invention, such as Fig. 8 institute
Show, which includes: receiving module 80 and composite module 82.
Receiving module 80, for receiving at least two Media Streams, wherein above-mentioned at least two Media Stream passes through different biographies
The transmission quality of transmission link transmission, different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;Composite module
82, it is used for compound above-mentioned at least two Media Stream, generates combined-flow, wherein above-mentioned combined-flow is carried out in Streaming Media processing module
Distribute after processing.
Herein it should be noted that above-mentioned receiving module 80 and composite module 82 correspond to the step S102 in embodiment 1
To step S104, two modules are identical as example and application scenarios that corresponding step is realized, but are not limited to the above embodiments 1
Disclosure of that.It should be noted that above-mentioned module may operate in the calculating of the offer of embodiment 1 as a part of device
In machine terminal 10.
According to an aspect of an embodiment of the present invention, a kind of recombiner is additionally provided, is filled including above-mentioned media stream process
It sets, wherein the device includes: receiving module 80 and composite module 82.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1,2 and 3,
Details are not described herein again.
Embodiment 5
According to embodiments of the present invention, it additionally provides a kind of for implementing the media stream processing method in above-described embodiment 2
Media current processing device, Fig. 9 are the structural schematic diagram of another media current processing device according to an embodiment of the present invention, such as Fig. 9
Shown, which includes: the second receiving module 90 and distribution module 92.
Second receiving module 90, for receiving combined-flow, wherein above-mentioned combined-flow be compound at least two Media Stream and
It obtains, above-mentioned at least two Media Stream transmits to obtain by different transmission links, and the transmission quality of different transmission links is not
Together, above-mentioned at least two Media Stream is mutually backups;Distribution module 92, for distributing the above-mentioned combined-flow received.
Herein it should be noted that above-mentioned second receiving module 90 and distribution module 92 correspond to the step in embodiment 2
S602 to step S604, two modules are identical as example and application scenarios that corresponding step is realized, but are not limited to above-mentioned reality
Apply 2 disclosure of that of example.It is provided it should be noted that above-mentioned module may operate in embodiment 1 as a part of device
Terminal 10 in.
According to an aspect of an embodiment of the present invention, a kind of distributor is additionally provided, is filled including above-mentioned media stream process
It sets, wherein the device includes: the second receiving module 90 and distribution module 92.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1,2 and 3,
Details are not described herein again.
Embodiment 6
According to embodiments of the present invention, it additionally provides a kind of for implementing the media stream processing method in above-described embodiment 3
Media current processing device, Figure 10 are the structural schematic diagrams of another media current processing device according to an embodiment of the present invention, are such as schemed
Shown in 10, which includes: third receiving module 100 and playing module 120.
Third receiving module 100, for receiving combined-flow, wherein above-mentioned combined-flow is compound at least two Media Stream
And obtain, above-mentioned at least two Media Stream transmits to obtain by different transmission links, the transmission quality of different transmission links
Difference, above-mentioned at least two Media Stream are mutually backups;Playing module 120, for playing the above-mentioned combined-flow received.
Herein it should be noted that above-mentioned third receiving module 100 and playing module 120 correspond to the step in embodiment 23
Rapid S702 to step S704, two modules are identical as example and application scenarios that corresponding step is realized, but are not limited to above-mentioned
3 disclosure of that of embodiment.It is mentioned it should be noted that above-mentioned module may operate in embodiment 1 as a part of device
In the terminal 10 of confession.
According to an aspect of an embodiment of the present invention, a kind of player is additionally provided, is filled including above-mentioned media stream process
It sets, wherein the device includes: third receiving module 100 and playing module 120.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1,2 and 3,
Details are not described herein again.
Embodiment 7
The embodiment of the present invention can provide a kind of terminal, which can be in terminal group
Any one computer terminal.Optionally, in the present embodiment, above-mentioned terminal also could alternatively be mobile whole
The terminal devices such as end.
Optionally, in the present embodiment, above-mentioned terminal can be located in multiple network equipments of computer network
At least one network equipment.
In the present embodiment, above-mentioned terminal can be with following steps in the media stream processing method of executing application
Program code: receive at least two Media Streams, wherein above-mentioned at least two Media Stream is transmitted by different transmission link,
The transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;Compound above-mentioned at least two media
Stream generates combined-flow, wherein above-mentioned combined-flow is distributed after Streaming Media processing module is handled.
Optionally, still as shown in Figure 1, the terminal 10 may include: one or more processors, memory, with
And display device etc..
Processor can call the information and application program of memory storage by transmitting device, to execute following step:
Receive at least two Media Streams, wherein above-mentioned at least two Media Stream is transmitted by different transmission links, different chains
The transmission quality on road is different, and above-mentioned at least two Media Stream is mutually backups;Compound above-mentioned at least two Media Stream generates compound
Stream, wherein above-mentioned combined-flow is distributed after Streaming Media processing module is handled.
Optionally, the program code of following steps can also be performed in above-mentioned processor: above-mentioned at least two Media Stream of detection
Frame per second;According to the frame per second of above-mentioned at least two Media Stream detected, compound above-mentioned at least two Media Stream.
Optionally, the program code of following steps can also be performed in above-mentioned processor: in above-mentioned at least two detected
In the case where in the frame per second of Media Stream including the frame per second for meeting frame per second condition, using the corresponding Media Stream of above-mentioned frame per second as above-mentioned multiple
Interflow, wherein above-mentioned frame per second condition is that frame per second reaches predetermined frame rate and persistently reaches scheduled duration.
Optionally, the program code of following steps can also be performed in above-mentioned processor: detecting above-mentioned at least two media
The frame per second of the first Media Stream in stream meets above-mentioned frame per second condition, using above-mentioned first Media Stream as above-mentioned combined-flow;It detects
Above-mentioned first Media Stream is unsatisfactory for above-mentioned frame per second condition, and detects the frame of the second Media Stream in above-mentioned at least two Media Stream
Rate meets above-mentioned frame per second condition, is adjusted to above-mentioned first Media Stream as above-mentioned combined-flow using above-mentioned second Media Stream as upper
State combined-flow.
Optionally, the program code of following steps can also be performed in above-mentioned processor: meeting in above-mentioned combined-flow scheduled
In the case where media flow quality condition, above-mentioned combined-flow is sent to above-mentioned Streaming Media processing module, wherein above-mentioned scheduled matchmaker
Body current mass condition is by the condition of the source stream of above-mentioned combined-flow reproduction to predetermined extent, and above-mentioned source stream is the matchmaker issued from source station
Body stream.
Optionally, the program code of following steps can also be performed in above-mentioned processor: above-mentioned combined-flow being pushed to above-mentioned
Streaming Media processing module.
Optionally, the program code of following steps: Xiang Shangshu Streaming Media processing module hair can also be performed in above-mentioned processor
Send notification message, wherein above-mentioned notification message is for notifying above-mentioned streaming media module to pull above-mentioned combined-flow.
Optionally, the program code of following steps can also be performed in above-mentioned processor: being unsatisfactory in above-mentioned combined-flow above-mentioned
In the case where scheduled media flow quality condition, prompt information is issued, wherein above-mentioned prompt information is for prompting above-mentioned combined-flow
Above-mentioned predetermined extent cannot be reappeared.
Optionally, the program code of following steps can also be performed in above-mentioned processor: receiving combined-flow, wherein above-mentioned
Combined-flow obtains for compound at least two Media Stream, and above-mentioned at least two Media Stream is transmitted by different transmission links
It arrives, the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;Distribution receives above-mentioned multiple
Interflow.
Optionally, the program code of following steps can also be performed in above-mentioned processor: receiving combined-flow, wherein above-mentioned
Combined-flow obtains for compound at least two Media Stream, and above-mentioned at least two Media Stream is transmitted by different transmission links
It arrives, the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;Broadcasting receives above-mentioned multiple
Interflow.
Using the embodiment of the present invention, a kind of scheme of data processing is provided.By receiving at least two Media Streams,
In, above-mentioned at least two Media Stream is transmitted by different transmission links, and the transmission quality of different transmission links is different, above-mentioned
At least two Media Streams are mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow, wherein above-mentioned combined-flow is flowing
Medium process module is distributed after being handled, to reach when some duplicating medium flow occurs abnormal, will quickly service nothing
Damage is switched to the purpose of other duplicating medium flows, is influenced to realize and video cloud service is effectively reduced by source station fluctuation,
Improve system availability technical effect, and then solve in the prior art can not quick nondestructive switching multichannel duplicating medium flow
The technical issues of.
It will appreciated by the skilled person that structure shown in FIG. 1 is only to illustrate, terminal is also possible to intelligence
It can mobile phone (such as Android phone, iOS mobile phone), tablet computer, applause computer and mobile internet device (Mobile
Internet Devices, MID), the terminal devices such as PAD.Fig. 1 it does not cause to limit to the structure of above-mentioned electronic device.Example
Such as, terminal 10 may also include the more or less component (such as network interface, display device) than shown in Fig. 1,
Or with the configuration different from shown in Fig. 1.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing the relevant hardware of terminal device by program, which can store in a computer readable storage medium
In, storage medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random
Access Memory, RAM), disk or CD etc..
Embodiment 8
The embodiments of the present invention also provide a kind of storage mediums.Optionally, in the present embodiment, above-mentioned storage medium can
For saving program code performed by media stream processing method provided by above-described embodiment 1,2 and 3.
Optionally, in the present embodiment, above-mentioned storage medium can be located in computer network in computer terminal group
In any one terminal, or in any one mobile terminal in mobile terminal group.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: connecing
Receive at least two Media Streams, wherein above-mentioned at least two Media Stream is transmitted by different transmission links, different transmission links
Transmission quality it is different, above-mentioned at least two Media Stream is mutually backups;Compound above-mentioned at least two Media Stream generates combined-flow,
Wherein, above-mentioned combined-flow is distributed after Streaming Media processing module is handled.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: inspection
Survey the frame per second of above-mentioned at least two Media Stream;According to the frame per second of above-mentioned at least two Media Stream detected, it is compound it is above-mentioned at least
Two Media Streams.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: In
In the case where in the frame per second of above-mentioned at least two Media Stream detected including the frame per second for meeting frame per second condition, by above-mentioned frame per second pair
The Media Stream answered is as above-mentioned combined-flow, wherein when above-mentioned frame per second condition is that frame per second reaches predetermined frame rate and persistently reaches predetermined
It is long.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: inspection
The frame per second for measuring the first Media Stream in above-mentioned at least two Media Stream meets above-mentioned frame per second condition, and above-mentioned first Media Stream is made
For above-mentioned combined-flow;It detects that above-mentioned first Media Stream is unsatisfactory for above-mentioned frame per second condition, and detects above-mentioned at least two media
The frame per second of the second Media Stream in stream meets above-mentioned frame per second condition, using above-mentioned first Media Stream as above-mentioned combined-flow be adjusted to by
Above-mentioned second Media Stream is as above-mentioned combined-flow.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: will
Above-mentioned combined-flow is pushed to above-mentioned Streaming Media processing module.
Optionally, the program code of following steps: Xiang Shangshu Streaming Media processing module hair can also be performed in above-mentioned processor
Send notification message, wherein above-mentioned notification message is for notifying above-mentioned streaming media module to pull above-mentioned combined-flow.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: In
In the case that above-mentioned combined-flow is unsatisfactory for above-mentioned scheduled media flow quality condition, prompt information is issued, wherein above-mentioned prompt letter
Breath is for prompting above-mentioned combined-flow that cannot reappear above-mentioned predetermined extent.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: connecing
Receive combined-flow, wherein above-mentioned combined-flow obtains for compound at least two Media Stream, and above-mentioned at least two Media Stream is not by
Same transmission link transmits to obtain, and the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;
Distribute the above-mentioned combined-flow received.
Optionally, in the present embodiment, storage medium is arranged to store the program code for executing following steps: connecing
Receive combined-flow, wherein above-mentioned combined-flow obtains for compound at least two Media Stream, and above-mentioned at least two Media Stream is not by
Same transmission link transmits to obtain, and the transmission quality of different transmission links is different, and above-mentioned at least two Media Stream is mutually backups;
Play the above-mentioned combined-flow received.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, only
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (10)
1. a kind of media stream processing method characterized by comprising
Receive at least two Media Streams, wherein at least two Media Stream is transmitted by different transmission links, different biographies
The transmission quality of transmission link is different, and at least two Media Stream is mutually backups;
Compound at least two Media Stream generates combined-flow, wherein the combined-flow is handled in Streaming Media processing module
After distribute.
2. the method according to claim 1, wherein compound at least two Media Stream, generates combined-flow packet
It includes:
Detect the frame per second of at least two Media Stream;
According to the frame per second of at least two Media Stream detected, compound at least two Media Stream.
3. according to the method described in claim 2, it is characterized in that, according to the frame of at least two Media Stream detected
Rate, compound at least two Media Stream include:
In the frame per second of at least two Media Stream detected include in the case where meeting the frame per second of frame per second condition, it will be described
The corresponding Media Stream of frame per second is as the combined-flow, wherein the frame per second condition is that frame per second reaches predetermined frame rate and persistently reaches
Scheduled duration.
4. according to the method described in claim 3, it is characterized in that, in the frame per second of at least two Media Stream detected
In the case where frame per second including meeting frame per second condition, include: using the corresponding Media Stream of the frame per second as the combined-flow
Detect that the frame per second of the first Media Stream at least two Media Stream meets the frame per second condition, by first matchmaker
Body stream is as the combined-flow;
Detect that first Media Stream is unsatisfactory for the frame per second condition, and detect at least two Media Stream second
The frame per second of Media Stream meets the frame per second condition, is adjusted to first Media Stream as the combined-flow by second matchmaker
Body stream is as the combined-flow.
5. the method according to claim 1, wherein generating combined-flow in compound at least two Media Stream
Later, further includes:
In the case where the combined-flow meets scheduled media flow quality condition, the combined-flow is sent to the Streaming Media
Processing module, wherein the scheduled media flow quality condition is by the item of the source stream of combined-flow reproduction to predetermined extent
Part, the source stream are the Media Stream issued from source station.
6. according to the method described in claim 5, it is characterized in that, the combined-flow is sent to the Streaming Media processing module
Include:
The combined-flow is pushed to the Streaming Media processing module.
7. according to the method described in claim 5, it is characterized in that, the combined-flow is sent to the Streaming Media processing module
Include:
It sends a notification message to the Streaming Media processing module, wherein the notification message is for notifying the streaming media module
To pull the combined-flow.
8. according to the method described in claim 5, it is characterized in that, by least two Media Stream be combined into one it is compound
After stream, further includes:
In the case where the combined-flow is unsatisfactory for the scheduled media flow quality condition, prompt information is issued, wherein described
Prompt information is for prompting the combined-flow that cannot reappear the predetermined extent.
9. method according to any one of claim 1 to 8, which is characterized in that the Media Stream is instant message protocol
RTMP stream.
10. a kind of media current processing device characterized by comprising
Receiving module, for receiving at least two Media Streams, wherein at least two Media Stream passes through different transmission links
The transmission quality of transmission, different transmission links is different, and at least two Media Stream is mutually backups;
Composite module is used for compound at least two Media Stream, generates combined-flow, wherein the combined-flow is at Streaming Media
Reason module is distributed after being handled.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810366138.1A CN110392285B (en) | 2018-04-23 | 2018-04-23 | Media stream processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810366138.1A CN110392285B (en) | 2018-04-23 | 2018-04-23 | Media stream processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110392285A true CN110392285A (en) | 2019-10-29 |
CN110392285B CN110392285B (en) | 2022-04-19 |
Family
ID=68284358
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810366138.1A Active CN110392285B (en) | 2018-04-23 | 2018-04-23 | Media stream processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110392285B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404882A (en) * | 2020-03-02 | 2020-07-10 | 广州华多网络科技有限公司 | Media stream processing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100302446A1 (en) * | 2009-05-26 | 2010-12-02 | Cisco Technology, Inc. | Video Superposition for Continuous Presence |
CN106341622A (en) * | 2015-07-06 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Multi-channel video stream coding method and device |
CN107209948A (en) * | 2015-01-21 | 2017-09-26 | 谷歌公司 | Create the technology of combination picture |
-
2018
- 2018-04-23 CN CN201810366138.1A patent/CN110392285B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100302446A1 (en) * | 2009-05-26 | 2010-12-02 | Cisco Technology, Inc. | Video Superposition for Continuous Presence |
CN107209948A (en) * | 2015-01-21 | 2017-09-26 | 谷歌公司 | Create the technology of combination picture |
CN106341622A (en) * | 2015-07-06 | 2017-01-18 | 阿里巴巴集团控股有限公司 | Multi-channel video stream coding method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404882A (en) * | 2020-03-02 | 2020-07-10 | 广州华多网络科技有限公司 | Media stream processing method and device |
CN111404882B (en) * | 2020-03-02 | 2022-03-25 | 广州华多网络科技有限公司 | Media stream processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN110392285B (en) | 2022-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104412253B (en) | The method of self adaptation stream transmission is known for the quality in hypertext transfer protocol | |
CN105100954B (en) | A kind of alternate acknowledge system and method based on internet communication and live streaming media | |
CN104918133B (en) | A kind of playing method and device for regarding video flowing in networking | |
US9143564B2 (en) | Concert server incorporating front-end and back-end functions to cooperate with an app to provide synchronized messaging to multiple clients | |
CN107409135A (en) | The system and method that optimization for live adaptive bitrate (ABR) media is transmitted | |
CN106803974A (en) | The real-time retransmission method of live video stream | |
CN106464680A (en) | Bandwidth management in a content distribution network | |
CN106303674B (en) | Data transmission method, device and intelligent television system | |
US11089076B1 (en) | Automated detection of capacity for video streaming origin server | |
US10887363B1 (en) | Streaming decision in the cloud | |
CN107409235A (en) | For broadcasting the system and method that VOD content is provided in switched digital video network using unicast ABR streams | |
CN109561320B (en) | Server switching method, device, equipment and medium | |
US20160212189A1 (en) | Streaming media data transmission method, client and server | |
US10477286B2 (en) | Streaming media file processing method and live streaming system | |
CN109218759A (en) | Push method, apparatus, server and the storage medium of Media Stream | |
CN104581366A (en) | Internet television broadcasting method and server | |
CN114546308B (en) | Method, device, equipment and storage medium for screen projection of application interface | |
CN108769805A (en) | Data transmission method, device, computer equipment and storage medium | |
CN113301096A (en) | Method, system and node equipment for data transmission between nodes in content distribution network | |
CN107612912A (en) | A kind of method and apparatus that play parameter is set | |
WO2017016568A1 (en) | Method and telecommunications network for streaming and for reproducing applications | |
CN101350741A (en) | Method, apparatus and system for notifying real time stream protocol event | |
CN101540886A (en) | Realization method and system of video-on-demand business and home streaming server | |
CN108513159A (en) | Multiple terminals synchronous broadcast controlling method, main equipment, apparatus and system | |
CN102131109A (en) | Method, system and device for monitoring stream media broadcast |
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 |