CN106657143A - Streaming media transmission method and device, server and terminal - Google Patents
Streaming media transmission method and device, server and terminal Download PDFInfo
- Publication number
- CN106657143A CN106657143A CN201710047921.7A CN201710047921A CN106657143A CN 106657143 A CN106657143 A CN 106657143A CN 201710047921 A CN201710047921 A CN 201710047921A CN 106657143 A CN106657143 A CN 106657143A
- Authority
- CN
- China
- Prior art keywords
- data
- client
- stream medium
- parameter
- code check
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/70—Media network packetisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
- H04L65/762—Media network packet handling at the source
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
Abstract
The invention discloses a streaming media transmission method, a streaming media transmission device, a terminal and a server. The method comprises the steps of receiving a streaming media play request sent by a client; sending streaming media data with a first code rate to the client in response to the streaming media play request; using a first parameter and a second parameter of the client during a process of playing the streaming media data with the first code rate, and when code rate switching is determined to be performed, using a first data unit of streaming media data with the first code rate to determine a second data unit corresponding to the streaming media data with a second code rate, wherein the first parameter represents current network bandwidth of the client, the second parameter represents current decoding capacity of the client, the first data unit is the currently playing data unit of the client, and the streaming media data with the different code rates is composed of the data of at least two data units; and after transmission of the first data unit ends, sending the streaming media data with the second code rate to the client from the second data unit.
Description
Technical field
The present invention relates to multimedia technology, more particularly to a kind of flow-medium transmission method, device, server and terminal.
Background technology
With the development of the communication technology, the application of multimedia technology is more and more wider.Multi-medium data it is live during,
Typically it is downloaded by the way of segment programs.Segment programs are referred to and are segmented program in program making, generate many
Individual segment programs and playlist.For segment programs, client adopts HTTP live streaming media during broadcasting
(HLS, HTTP Live Streaming) agreement obtains first playlist, i.e., main M3U8, then parses main M3U8 and obtains son
The URL (URL, Uniform Resource Locator) of M3U8, subsequently obtains son according to the URL of sub- M3U8
M3U8, finally parses the URL that sub- M3U8 obtains segment programs, obtains segment programs successively according to the URL of segment programs and plays, this
The mode of kind being capable of compatible existing content distributing network (CDN, Content Delivery NetWorks) system.
For segment programs, when starting broadcasting, client downloads the segmental file compared with low bit- rate from server first, then
Start and play, after segmental file compared with low bit- rate is downloaded, if it is higher to detect the network bandwidth, it is possible to start to download compared with
The segmental file of high code check.During some segmental file is downloaded, if the network bandwidth changes, client only has
After the completion of waiting this segmental file to download, the suitable segmental file of code check is asked and downloaded further according to the network bandwidth.It is this straight
The method for broadcasting code check switching lags behind the change of client network bandwidth, so as to increased time delay end to end.
The content of the invention
To solve existing technical problem, the embodiment of the present invention provides a kind of flow-medium transmission method, device, service
Device and terminal.
What the technical scheme of the embodiment of the present invention was realized in:
A kind of flow-medium transmission method is embodiments provided, including:
Receive the streaming media playing request that client sends;
The streaming media playing request is responded, to client the stream medium data of the first code check is sent;
During the stream medium data for playing the first code check, using first parameter and the second parameter of the client,
It is determined that when carrying out code check switching, using the first data cell of the stream medium data of first code check stream of the second code check is determined
Corresponding second data cell of media data;The current network bandwidth of client described in first parameter characterization;Described second
The current decoding capability of client described in parameter characterization;First data cell is the data sheet that the client is currently played
Unit;The stream medium data of different code checks is made up of the data of at least two data cells;
After first data cell is sent completely, from the beginning of second data cell, to the client the is sent
The stream medium data of two code checks.
In such scheme, respond streaming media playing request, to client send the first code check stream medium data it
Before, methods described also includes:
For the stream medium data of every kind of code check, the 3rd parameter is added in stream medium data;3rd parameter characterization
Media data decoded information;
Correspondingly, from the beginning of second data cell, to the client send the second code check stream medium data it
Before, methods described also includes:
Corresponding 3rd parameter is obtained from the stream medium data of the second code check;
The 3rd parameter is sent to the client;The 3rd parameter for sending is used to indicate that the client carries out decoder
Adjustment.
It is described to add the 3rd parameter in stream medium data in such scheme, including:
Add the 3rd parameter in each data cell;
Correspondingly, corresponding 3rd parameter is obtained from second data cell.
It is described to add the 3rd parameter in each data cell in such scheme, including:
Add the 3rd parameter in the original position of each data cell;
Correspondingly, corresponding 3rd parameter is obtained from the original position of second data cell.
In such scheme, methods described also includes:
First parameter and the second parameter of the client are obtained during the stream medium data for playing the first code check.
In such scheme, using first parameter and the second parameter of the client, it is determined that when carrying out code check switching, it is described
Method also includes:
Using first parameter and the second parameter of the client, and with reference to the 4th parameter of server, it is determined that carrying out code
Rate switches;The current Streaming Media disposal ability of server described in 4th parameter characterization.
In such scheme, respond streaming media playing request, to client send the first code check stream medium data it
Before, methods described also includes:
It is when generating the stream medium data of different code checks, the data cell of the stream medium data of every kind of code check is right in time
Together;
Correspondingly, the first data cell of the stream medium data using first code check determines the stream of the second code check
Corresponding second data cell of media data, including:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
In such scheme, the stream medium data of the second code check is sent to the client, including:
Sent by the way of HTTP (HTTP) block transmission (Chunk) and encapsulated using one below mode
The second code check stream medium data:
Encapsulated based on MPEGTS;
Again based on RTP (RTP) encapsulation after being encapsulated based on MPEGTS;
Encapsulated based on MP4;
Label (Flag) encapsulation based on FLV.
The embodiment of the present invention additionally provides a kind of flow-medium transmission method, including:
Streaming media playing request is sent to server, and receives the Streaming Media number of the first code check that the server sends
According to;
During the stream medium data for playing the first code check, the Streaming Media of the second code stream that the server sends is received
Data;The stream medium data of the second code check for receiving is started from the second data cell of the second code stream;
The stream medium data of the second code stream is decoded using the decoder for resetting, and is played out.
The embodiment of the present invention provides a kind of streaming media device again, including:
First receiving unit, for receiving the streaming media playing request of client transmission;
First transmitting element, for responding the streaming media playing request, to client the Streaming Media of the first code check is sent
Data;
Switch unit, for during the stream medium data for playing the first code check, joining using the first of the client
Number and the second parameter, it is determined that when carrying out code check switching, the first data cell using the stream medium data of first code check is true
Corresponding second data cell of stream medium data of fixed second code check;The current network of client described in first parameter characterization
Bandwidth;The current decoding capability of client described in second parameter characterization;First data cell is that the client is current just
In the data cell played;The stream medium data of different code checks is made up of the data of at least two data cells;
First transmitting element, is additionally operable to after first data cell is sent completely, from second data cell
Start, to the client stream medium data of the second code check is sent.
In such scheme, described device also includes:
Signal generating unit, for for the stream medium data of every kind of code check, the 3rd parameter being added in stream medium data;It is described
3rd parameter characterization media data decoded information;
Switch unit, is additionally operable to from the stream medium data of the second code check obtain corresponding 3rd parameter;
First transmitting element, is additionally operable to from the beginning of second data cell, and to the client second code is sent
Before the stream medium data of rate, to the client the 3rd parameter is sent;The 3rd parameter for sending is used to indicate the client
Decoder is adjusted.
In such scheme, described device also includes:
Acquiring unit, for obtaining the first parameter of the client during the stream medium data for playing the first code check
And second parameter.
In such scheme, the switch unit for using first parameter and the second parameter of the client, and is combined
4th parameter of server, it is determined that carrying out code check switching;The current Streaming Media of server described in 4th parameter characterization is processed
Ability.
In such scheme, described device also includes:
Signal generating unit, during for the stream medium data for generating different code checks, by the data of the stream medium data of every kind of code check
Unit aligns in time;
The switch unit, specifically for:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
The embodiment of the present invention additionally provides a kind of streaming media device, including:
Second transmitting element, for sending streaming media playing request to server;
Second receiving unit, for receiving the stream medium data of the first code check that the server sends;And playing
During the stream medium data of the first code check, the stream medium data of the second code stream that the server sends is received;The for receiving
The stream medium data of two code checks is started from the second data cell of the second code stream;
Broadcast unit, for decoding the stream medium data of the second code stream using the decoder for resetting, and plays out.
The embodiment of the present invention provides a kind of server again, including:
First communication interface, for receiving the streaming media playing request of client transmission;Responding the streaming media playing please
Ask, to client the stream medium data of the first code check is sent;And after first data cell is sent completely, from described second
Data cell starts, and to the client stream medium data of the second code check is sent;
First processor, for during the stream medium data for playing the first code check, using the first of the client
Parameter and the second parameter, it is determined that when carrying out code check and carrying out, using the first data cell of the stream medium data of first code check
Determine corresponding second data cell of stream medium data of the second code check;The current net of client described in first parameter characterization
Network bandwidth;The current decoding capability of client described in second parameter characterization;First data cell is that the client is current
The data cell played;The stream medium data of different code checks is made up of the data of at least two data cells.
In such scheme, the first processor is additionally operable to respond the streaming media playing request, and to client the is sent
For the stream medium data of every kind of code check before the stream medium data of one code check, the 3rd parameter is added in stream medium data;Institute
State the 3rd parameter characterization media data decoded information;And obtain corresponding 3rd ginseng from the stream medium data of the second code check
Number;
Correspondingly, first communication interface, is additionally operable to from the beginning of second data cell, sends to the client
Before the stream medium data of the second code check, to the client the 3rd parameter is sent;The 3rd parameter for sending is described for indicating
Client is adjusted to decoder.
In such scheme, the first processor is additionally operable to respond the streaming media playing request, and to client the is sent
Before the stream medium data of one code check, when generating the stream medium data of different code checks, by the number of the stream medium data of every kind of code check
Align in time according to unit;
The first processor, specifically for:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
The embodiment of the present invention additionally provides a kind of terminal, including:
Second communication interface, for sending streaming media playing request to server, and receive that the server sends the
The stream medium data of one code check;And during the stream medium data for playing the first code check, receive what the server sent
The stream medium data of the second code stream;The stream medium data of the second code check for receiving is from the beginning of the second data cell of the second code stream
's;
Second processing device, for decoding the stream medium data of the second code stream using the decoder for resetting, and plays out.
Flow-medium transmission method provided in an embodiment of the present invention, device, server and terminal, receive the stream that client sends
Media play request;The streaming media playing request is responded, to client the stream medium data of the first code check is sent;Playing the
During the stream medium data of one code check, using first parameter and the second parameter of the client, it is determined that carrying out code check switching
When, determine the stream medium data of the second code check corresponding using the first data cell of the stream medium data of first code check
Two data cells;The current network bandwidth of client described in first parameter characterization;Client described in second parameter characterization
The current decoding capability in end;First data cell is the data cell that the client is currently played;The stream of different code checks
Media data is made up of the data of at least two data cells;After first data cell is sent completely, from the described second number
Start according to unit, to the client stream medium data of the second code check is sent, by server end according to the of the client
One parameter and the second parameter carry out code check switching to determine, so, it is possible according to the network bandwidth and decoding capability of client and
When carry out the switching of code check, reduce time delay end to end.And, stream medium data has only been divided into different data sheets
Unit, thus, not needing server side de to prepare index and segmental file, reduces stream medium data in the caching of server end
Between, further reduce time delay end to end.
Description of the drawings
In accompanying drawing (it is not necessarily drawn to scale), similar reference phase described in different views
As part.Similar reference numerals with different letter suffix can represent the different examples of similar component.Accompanying drawing is with example
Unrestriced mode generally shows each embodiment discussed herein.
Fig. 1 is the method flow schematic diagram of the streaming media of the embodiment of the present invention one;
Fig. 2 is a kind of stream media transmission system structural representation of the embodiment of the present invention two;
Fig. 3 is another kind of stream media transmission system structural representation of the embodiment of the present invention two;
Fig. 4 is the schematic flow sheet that the server end of the embodiment of the present invention two and client are interacted;
Fig. 5 is the code flow structure schematic diagram of more than three kinds of code stream of the embodiment of the present invention;
Fig. 6 is the code flow structure schematic diagram of more than four kinds of code stream of the embodiment of the present invention;
Fig. 7 is the code flow structure schematic diagram of more than five kinds of code stream of the embodiment of the present invention;
Fig. 8 is the code flow structure schematic diagram of more than six kinds of code stream of the embodiment of the present invention;
Fig. 9 is embodiment of the present invention July 1st kind streaming media apparatus structure schematic diagram;
Figure 10 is another kind of streaming media apparatus structure schematic diagram of the embodiment of the present invention seven;
Figure 11 is embodiment of the present invention server architecture schematic diagram;
Figure 12 is embodiment of the present invention terminal structure schematic diagram.
Specific embodiment
Below in conjunction with the accompanying drawings and embodiment to the present invention be described in further detail again.
The method of code check switching during current live, when detecting the network bandwidth and changing, client only exists
Current segmental file could ask and download code check to be suitably segmented text according to the network bandwidth after the completion of downloading to server end
Part, this switching mode is to lag behind the change of client network bandwidth, the poor real of code check switching;On the other hand, by
It is downloaded in units of segmentation in file, so server end needs at least to need caching one according to the request of client
Individual segmental file can just be sent to client, and this is also required to the certain duration of server end consumption and goes to obtain this segmental file,
Both sides reason causes the live when prolongation of client, poor user experience.Find in actual HLS latency measurements test,
Even if being 1 second segmental file in playing duration, transmitted under such a experiment condition using clear stream, measurement obtains end-to-end
Time delay have also exceeded 5 seconds, leverage Consumer's Experience.
Based on this, in various embodiments of the present invention:Receive the streaming media playing request that client sends;Response is described
Streaming media playing is asked, and to client the stream medium data of the first code check is sent;In the stream medium data mistake for playing the first code check
Cheng Zhong, using first parameter and the second parameter of the client, it is determined that when carrying out code check switching, using first code check
First data cell of stream medium data determines corresponding second data cell of the stream medium data of the second code check;First ginseng
Number characterizes the current network bandwidth of the client;The current decoding capability of client described in second parameter characterization;First
Data cell is the data cell that the client is currently played;The stream medium data of different code checks is by least two data
The data composition of unit;After first data cell is sent completely, from the beginning of second data cell, to the client
Send the stream medium data of the second code check.
Embodiment one
Embodiment of the present invention flow-medium transmission method, is applied to server, specifically media server, such as Fig. 1 institutes
Show, the method is comprised the following steps:
Step 101:Receive the streaming media playing request that client sends;
Step 102:The streaming media playing request is responded, to client the stream medium data of the first code check is sent;
Step 103:During the stream medium data for playing the first code check, using first parameter and the of the client
Two parameters, it is determined that when carrying out code check switching, using the first data cell of the stream medium data of first code check second is determined
Corresponding second data cell of stream medium data of code check;
Here, the current network bandwidth of client described in first parameter characterization;Visitor described in second parameter characterization
The current decoding capability in family end.
Wherein, during practical application, second parameter can be the system resource of the client, comprising:CPU, internal memory
Service condition etc..The embodiment of the present invention is not defined to second parameter, as long as the decoding of client can be reflected
The information of ability.
Here, during practical application, server obtains the client during the stream medium data for playing the first code check
The first parameter and the second parameter, so as to be made whether the decision-making that carry out code check switching in time, when reducing end to end
Prolong.
Wherein, server can get the first parameter and the second parameter one of in the following manner:
The client reports the first parameter and the second parameter of itself to network equipment, and network equipment is to server
Report first parameter and the second parameter of the client;
The network state that server passes through emulation client, obtains the first parameter, and the shape single by emulating the client
State is obtaining the second parameter.
First data cell is the data cell that the client is currently played;The stream medium data of different code checks by
The data composition of at least two data cells.
In other words, the stream medium data of different code checks is made up of the data of multiple data cells, during practical application,
Can determine that stream medium data is made up of a how many data cell according to the specific requirement of time delay.
In this step, using first parameter and the second parameter of the client, it is determined that when carrying out code check switching, service
Device can also utilize first parameter and the second parameter of the client, and with reference to the 4th parameter of server, it is determined that carrying out code
Rate switches;The current Streaming Media disposal ability of server described in 4th parameter characterization.During code check handover decisions, both
The network bandwidth and decoding capability of client are considered, it is contemplated that the disposal ability of server side, so, it is possible further drop
Low time delay end to end.
Here, the 4th parameter can be service condition of CPU, internal memory etc..The embodiment of the present invention is not limited this
It is fixed, as long as the information of the Streaming Media disposal ability of server can be reflected.
During practical application, first parameter and the second parameter of client described in server by utilizing are determined carrying out code check switching
Plan, or using first parameter and the second parameter of the client, and the 4th parameter with reference to server carries out code check switching
During decision-making, there can be a variety of decision modes, the embodiment of the present invention is not defined to this, for giving an example, works as service
Device utilizes first parameter and the second parameter of the client, and the 4th parameter with reference to server carries out code check handover decisions
When, can first consider the cpu usage of server, when the CPU free time is more than 30%, then compare the first parameter and the second ginseng
Number, when the client the network bandwidth be 10M, CPU free time more than 90%, and EMS memory occupation be less than 50% when, determine to carry out
Code check switch, will code check switch to high code check, such as high definition etc..
Step 104:After first data cell is sent completely, from the beginning of second data cell, to the client
End sends the stream medium data of the second code check.
During practical application, before execution step 102, the server can be with according to the stream medium data generation for obtaining
The stream medium data of different code checks, and for the stream medium data of every kind of code check, the 3rd parameter is added in stream medium data;Institute
State the 3rd parameter characterization media data decoded information;
Correspondingly, before execution step 104, the method can also include:
Corresponding 3rd parameter is obtained from the stream medium data of the second code check;
The 3rd parameter is sent to the client;The 3rd parameter for sending is used to indicate that the client carries out decoder
Adjustment.
Wherein, the 3rd parameter is added in stream medium data, when server determines that carrying out code check switches, server can
Quickly know the decoded information of the stream medium data of correspondence code check, and notify to the client, and then can allow the client
End resets as early as possible decoder, so as to reduce Playout delay.
Here, it is described to add the 3rd parameter in stream medium data, specifically include:
Add the 3rd parameter in each data cell;
Correspondingly, corresponding 3rd parameter is obtained from second data cell.
Wherein, due to being added with the 3rd parameter in each data cell, as long as so server determines the second data sheet
After unit, you can from the parameter of direct access the 3rd in the second data cell, without the need for going to go other positions to obtain the 3rd parameter again again,
So, it is possible corresponding 3rd parameter of stream medium data for rapidly obtaining the second code check.
In one embodiment, the 3rd parameter can be added in the original position of each data cell;Correspondingly, the service
Device obtains corresponding 3rd parameter from the original position of second data cell.
Here, the original position in data cell adds the 3rd parameter, thus, the second code check further can be obtained rapidly
Corresponding 3rd parameter of stream medium data.
In one embodiment, the server generates the stream medium data of different code checks according to the stream medium data for obtaining
When, the data cell of the stream medium data of every kind of code check can in time be alignd;
Correspondingly, the first data cell of the stream medium data using first code check determines the stream of the second code check
Corresponding second data cell of media data, specifically includes:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
The data cell of the stream medium data of every kind of code check is alignd in time, and such server can be according to the first data
Unit quickly obtains the second data cell.
During practical application, when the stream medium data of the second code check is sent to the client, server can be adopted
The mode of HTTP Chunk sends the stream medium data of the second code check encapsulated based on MPEGTS, can also adopt HTTP Chunk
Mode send first based on MPEGTS encapsulation after again based on RTP encapsulation the second code check stream medium data, it would however also be possible to employ
The mode of HTTP Chunk sends the stream medium data of the second code check encapsulated based on MP4, can also adopt HTTP Chunk's
Mode sends the stream medium data of the second code check that the Flag based on FLV is encapsulated, to meet transmission demand.
From the above description, it will be seen that scheme provided in an embodiment of the present invention, being please based on a streaming media playing
The scheme to client transmissions stream medium data is sought, is a kind of transmission plan of the stream medium data based on HTTP.
Correspondingly, the embodiment of the present invention additionally provides a kind of flow-medium transmission method, is applied to client, specifically
Positioned at the client of terminal, comprise the following steps:
Streaming media playing request is sent to server, and receives the Streaming Media number of the first code check that the server sends
According to;
During the stream medium data for playing the first code check, the Streaming Media of the second code stream that the server sends is received
Data;The stream medium data of the second code check for receiving is started from the second data cell of the second code stream;
The stream medium data of the second code stream is decoded using the decoder for resetting, and is played out.
Wherein, the decoder of the replacement is referred to:The decoder of the stream medium data of the first code check of decoding is reset,
To decode the stream medium data of the second code stream using the decoder for resetting.
Scheme provided in an embodiment of the present invention, is particularly well-suited to live scene, and now the data flow of server end is real-time
Injection, that is to say, that the stream medium data sent to client be server end real-time reception to stream medium data.When
So, during practical application, scheme provided in an embodiment of the present invention can also be useful under program request scene.
Flow-medium transmission method provided in an embodiment of the present invention, receives the streaming media playing request that client sends;Response
The streaming media playing request, to client the stream medium data of the first code check is sent;In the Streaming Media number for playing the first code check
According to during, using first parameter and the second parameter of the client, it is determined that when carrying out code check switching, using described first yard
First data cell of the stream medium data of rate determines corresponding second data cell of the stream medium data of the second code check;Described
The current network bandwidth of client described in one parameter characterization;The current decoding capability of client described in second parameter characterization;
First data cell is the data cell that the client is currently played;The stream medium data of different code checks is by least two
The data composition of data cell;After first data cell is sent completely, from the beginning of second data cell, to the visitor
Family end sends the stream medium data of the second code check, comes true according to first parameter and the second parameter of the client by server end
Surely code check switching is carried out, the switching for carrying out code check in time according to the network bandwidth and decoding capability of client is so, it is possible, is subtracted
Time delay is end to end lacked.And, stream medium data has only been divided into different data cells, thus, not needing server end
Go to prepare index and segmental file, reduce cache-time of the stream medium data in server end, further reduce end-to-end
Time delay.
Embodiment two
On the basis of embodiment one, the present embodiment describes the process of code check switching in detail.
In the present embodiment, as shown in figures 2 and 3, media server can generate high definition (high code check), SD (middle code check)
And smooth three road code stream (low bit- rate), when live, the terminal that client is located to media server sends HTTP GET requests;
And media server is received after request, can select to close in the road code streams of Zhe tri- according to the network bandwidth of terminal and system resource
The stream medium data of suitable code check, by HTTPGET responses terminal is sent to.In this process, as shown in Fig. 2 terminal is to net
The network bandwidth of network server real-time report itself, and to the state server real-time report system resource of itself, network service
The network bandwidth of terminal is sent to media server by device in real time, and the system resource of terminal is sent to matchmaker by state server in real time
Body server, so that media server can in real time get the network bandwidth and system resource of terminal.Certainly, as shown in figure 3,
Media server can also by the network state of emulation terminal and the SOT state of termination, come get in real time terminal the network bandwidth and
System resource.
The present embodiment server end and the flow process of client interaction, as shown in figure 4, comprising the following steps:
Step 401:Media server generates respectively high definition, SD and smooth three road code using the media stream data for obtaining
Stream;
Here, three road code streams are constituted by multiple data cells.
Step 402:Increase media data decoded information in the original position of each data cell of every road code stream;
So at each data cell of every road code stream, media data decoded information can be both known, such that it is able to fast
Speed carries out code check switching.
Step 403:When starting broadcasting, client obtains the HTTP URL of code stream;
Here, the operation of the client receive user, the operation for responding user obtains the HTTP of code stream from webpage
URL。
Step 404:According to the HTTP URL of code stream, HTTP GET requests are sent to media server, with from media services
Device obtains stream medium data;
Here, after receiving HTTP GET requests, media server can in real time get the network of client place terminal
Bandwidth and system resource, can be obtaining the network bandwidth and system of client place terminal by the way of described by Fig. 2 or Fig. 3
Resource.
Step 405:Media server is received after HTTP GET requests, first smooth code stream is sent to client, so as to client
End can normally start:
Step 406:Client is received after smooth code stream, and using corresponding decoder smooth code stream is decoded, and is played out;
Step 407:In playing process, the Netowrk tape of the terminal that media server is located according to the real-time client for obtaining
Wide and system resource, the Streaming Media disposal ability of itself, come whether decision-making carries out code check switching, when it is determined that to carry out code check switching
When, send media data decoded information to client;
Here, media server determines the corresponding data cell of other one grade of code check according to the data cell for sending
Position, then obtains media data decoded information from the corresponding data cell of other one grade of code check, and is sent to client.
Assume media server according to the network bandwidth and system resource of the terminal at the client place for obtaining in real time, itself
Streaming Media disposal ability, determine code check can be switched to SD code check, now, media server is according to the smoothness for sending
The data cell of code stream determines the corresponding data cell of the code stream of SD code check, and from the corresponding data sheet of code stream of SD code check
Unit obtains data decoded information, and is sent to client.
Step 408:Client resets decoder based on the media data decoded information for receiving;
Step 409:Media server sends the code stream of correspondence code check after code check switching to client;
Step 410:Client decodes corresponding code stream using the decoder for resetting, and plays out.
For above-mentioned example, in a step 408, client is reset based on the corresponding media data decoded information of SD code check
Decoder;In step 409, media server sends SD code stream to client;In step 410, client is using replacement
Decoder decoding SD code stream, and play out.
From the above description, it will be seen that scheme provided in an embodiment of the present invention, media server and client are adopted
HTTP is transmitted as a stream, by media server code check switching is carried out, it is to avoid using index file and slicing files, so as to subtract
Code stream transmission delay is end to end lacked.
Embodiment three
On the basis of embodiment one, two, the present embodiment describes the mistake that media server and client are interacted in detail
Journey.The process is comprised the following steps:
Step A1:Media server generates the code stream of various code rate;
Specifically, media decoded information is increased at the data cell of the code stream of every kind of code check, and it is as shown in figure 5, every kind of
The data cell of the code stream of code check is alignd in time.The audio frequency and video of each code check are packaged using MPEGTS.It is false
If three kinds of basic, normal, high code checks.
Step B1:Start during playing, client obtains first the HTTP URL of Media Stream, then sending HTTP please
Ask, to obtain code stream from media server;
Specifically, the HTTP URL of acquisition include the title of channel, and then sending HTTP GET according to HTTP URL please
Seek media server.
Step C1:Media server is received after request, the code stream of low bit- rate is first sent, to allow client normally to start;
Here, media server sends first http response head, and low code is then sent by the way of HTTP Chunk
PAT, PMT, IDR and TS packet of rate.
Step D1:Media server obtains in real time the network bandwidth and system resource of client end;
Step E1:Media server according to the network bandwidth and system resource of client end finds that high code rate can be sent
Code stream, media server calculates the position of the corresponding data cell of high code rate at data cell, and obtains corresponding
Media decoded information, and client is sent to, to enter the replacement of row decoder;
Step F1:Subsequently media server carries out immediately code check switching, sends the code stream of high code rate;
Specifically, media server is from the beginning of the position of the corresponding data cell of the high code rate for calculating, to client
Send PAT, PMT, IDR and TS packet of new Media Stream.
Step H1:Client receives media decoded information during code stream is received, it is found that code check there occurs switching,
Decoder is reset using the media decoded information for receiving, the code stream for then receiving high code rate is played out.
Example IV
On the basis of embodiment one, two, the present embodiment describes the mistake that media server and client are interacted in detail
Journey.The process is comprised the following steps:
Step A2:Media server generates the code stream of various code rate;
Specifically, media decoded information is increased at the data cell of the code stream of every kind of code check, and it is as shown in fig. 6, every kind of
The data cell of the code stream of code check is alignd in time.The audio frequency and video of each code check are packaged using MPEGTS, so
It is being packaged using RTP bags afterwards.Assume three kinds of basic, normal, high code checks.
Step B2:Start during playing, client obtains first the HTTP URL of Media Stream, then sending HTTP please
Ask, to obtain code stream from media server;
Specifically, the HTTP URL of acquisition include the title of channel, and then sending HTTP GET according to HTTP URL please
Seek media server.
Step C2:Media server is received after request, the code stream of low bit- rate is first sent, to allow client normally to start;
Here, media server sends first http response head, and low code is then sent by the way of HTTP Chunk
The RTP packets of rate.
Step D2:Media server obtains in real time the network bandwidth and system resource of client end;
Step E2:Media server according to the network bandwidth and system resource of client end finds that high code rate can be sent
Code stream, media server calculates the position of the corresponding data cell of high code rate at data cell, and obtains corresponding
Media decoded information, and client is sent to, to enter the replacement of row decoder;
Step F2:Subsequently media server carries out immediately code check switching, sends the code stream of high code rate;
Specifically, media server is from the beginning of the position of the corresponding data cell of the high code rate for calculating, to client
Send the RTP packets of new Media Stream.
Step H2:Client receives media decoded information during code stream is received, it is found that code check there occurs switching,
Decoder is reset using the media decoded information for receiving, the code stream for then receiving high code rate is played out.
Embodiment five
On the basis of embodiment one, two, the present embodiment describes the mistake that media server and client are interacted in detail
Journey.The process is comprised the following steps:
Step A3:Media server generates the code stream of various code rate;
Specifically, media decoded information is increased at the data cell of the code stream of every kind of code check, and it is as shown in fig. 7, every kind of
The data cell of the code stream of code check is alignd in time.The audio frequency and video of each code check are packaged using MP4.Assume three
Plant basic, normal, high code check.
Step B3:Start during playing, client obtains first the HTTP URL of Media Stream, then sending HTTP please
Ask, to obtain code stream from media server;
Specifically, the HTTP URL of acquisition include the title of channel, and then sending HTTP GET according to HTTP URL please
Seek media server.
Step C3:Media server is received after request, the code stream of low bit- rate is first sent, to allow client normally to start;
Here, media server sends first http response head, and low code is then sent by the way of HTTP Chunk
The MP4 packets of rate.
Step D3:Media server obtains in real time the network bandwidth and system resource of client end;
Step E3:Media server according to the network bandwidth and system resource of client end finds that high code rate can be sent
Code stream, media server calculates the position of the corresponding data cell of high code rate at data cell, and obtains corresponding
Media decoded information, and client is sent to, to enter the replacement of row decoder;
Step F3:Subsequently media server carries out immediately code check switching, sends the code stream of high code rate;
Specifically, media server is from the beginning of the position of the corresponding data cell of the high code rate for calculating, to client
Send the MP4 packets of new Media Stream.
Step H3:Client receives media decoded information during code stream is received, it is found that code check there occurs switching,
Decoder is reset using the media decoded information for receiving, the code stream for then receiving high code rate is played out.
Embodiment six
On the basis of embodiment one, two, the present embodiment describes the mistake that media server and client are interacted in detail
Journey.The process is comprised the following steps:
Step A4:Media server generates the code stream of various code rate;
Specifically, media decoded information is increased at the data cell of the code stream of every kind of code check, and it is as shown in figure 8, every kind of
The data cell of the code stream of code check is alignd in time.The audio frequency and video of each code check are packaged using the Flag of FLV.
Assume three kinds of basic, normal, high code checks.
Step B4:Start during playing, client obtains first the HTTP URL of Media Stream, then sending HTTP please
Ask, to obtain code stream from media server;
Specifically, the HTTP URL of acquisition include the title of channel, and then sending HTTP GET according to HTTP URL please
Seek media server.
Step C4:Media server is received after request, the code stream of low bit- rate is first sent, to allow client normally to start;
Here, media server sends first http response head, and low code is then sent by the way of HTTP Chunk
The FLVHeader (head) of rate, PreviousTagSize0 and Tag packets.
Step D4:Media server obtains in real time the network bandwidth and system resource of client end;
Step E4:Media server according to the network bandwidth and system resource of client end finds that high code rate can be sent
Code stream, media server calculates the position of the corresponding data cell of high code rate at data cell, and obtains corresponding
Media decoded information, and client is sent to, to enter the replacement of row decoder;
Step F4:Subsequently media server carries out immediately code check switching, sends the code stream of high code rate;
Specifically, media server is from the beginning of the position of the corresponding data cell of the high code rate for calculating, to client
Send the Tag packet data bags of new Media Stream.
Step H4:Client receives media decoded information during code stream is received, it is found that code check there occurs switching,
Decoder is reset using the media decoded information for receiving, the code stream for then receiving high code rate is played out.
It should be noted that:In embodiment two to six, during practical application, high, medium and low code check can code check as needed
Size is distinguishing.For giving an example, generally, code check can be referred to as the code stream of high code check for the code stream of 8M, can be by code check
Code check for 4M is referred to as the code stream of middle code check, and code check can be referred to as the code stream of low bit- rate for the code stream of 2M.
Embodiment seven
Method to realize the embodiment of the present invention, the present embodiment provides a kind of streaming media device, is arranged on server,
Specifically media server, as shown in figure 9, the device includes:
First receiving unit 91, for receiving the streaming media playing request of client transmission;
First transmitting element 92, for responding the streaming media playing request, to client the stream matchmaker of the first code check is sent
Volume data;
Switch unit 93, for during the stream medium data for playing the first code check, using the first of the client
Parameter and the second parameter, it is determined that when carrying out code check switching, using the first data cell of the stream medium data of first code check
Determine corresponding second data cell of stream medium data of the second code check;The current net of client described in first parameter characterization
Network bandwidth;The current decoding capability of client described in second parameter characterization;First data cell is that the client is current
The data cell played;The stream medium data of different code checks is made up of the data of at least two data cells;
First transmitting element 92, is additionally operable to after first data cell is sent completely, from second data sheet
Unit starts, and to the client stream medium data of the second code check is sent.
Wherein, during practical application, second parameter can be the system resource of the client, comprising:CPU, internal memory
Service condition etc..The embodiment of the present invention is not defined to second parameter, as long as the decoding of client can be reflected
The information of ability.
In one embodiment, the device can also include:
Acquiring unit, for obtaining the first parameter of the client during the stream medium data for playing the first code check
And second parameter, so as to be made whether the decision-making that carry out code check switching in time, reduce time delay end to end.
Wherein, the acquiring unit can get the first parameter and the second parameter one of in the following manner:
The client reports the first parameter and the second parameter of itself to network equipment, and network equipment is single to obtaining
Unit reports first parameter and the second parameter of the client;
The network state that acquiring unit passes through emulation client, obtains the first parameter, and by emulating client's list
State is obtaining the second parameter.
The stream medium data of different code checks is made up of the data of at least two data cells.In other words, different code checks
Stream medium data is made up of the data of multiple data cells, during practical application, can come true according to the specific requirement of time delay
Streaming media data are made up of a how many data cell.
In one embodiment, the switch unit 93 can also utilize first parameter and the second parameter of the client,
And with reference to the 4th parameter of server, it is determined that carrying out code check switching;The current stream matchmaker of server described in 4th parameter characterization
Body disposal ability.During code check handover decisions, the network bandwidth and decoding capability of client were both considered, it is contemplated that clothes
The disposal ability of business device side, so, it is possible further to reduce time delay end to end.
Here, the 4th parameter can be service condition of CPU, internal memory etc..The embodiment of the present invention is not limited this
It is fixed, as long as the information of the Streaming Media disposal ability of server can be reflected.
During practical application, the switch unit 93 carries out code using first parameter and the second parameter of the client
Rate handover decisions, or carried out using first parameter and the second parameter of the client, and the 4th parameter with reference to server
During code check handover decisions, there can be a variety of decision modes, the embodiment of the present invention is not defined to this, give an example and
Say, when the switch unit 93 is using first parameter and the second parameter of the client, and with reference to the 4th parameter of server
When carrying out code check handover decisions, the cpu usage of server can be first considered, when the CPU free time is more than 30%, then compare the
One parameter and the second parameter, when the network bandwidth of the client is 10M, the CPU free time is more than 90%, and EMS memory occupation is less than
When 50%, decision carry out code check switching, will code check switch to high code check, such as high definition etc..
During practical application, the device can also include:
Signal generating unit, for generating the stream medium data of different code checks according to the stream medium data for obtaining, and for every kind of
The stream medium data of code check, adds the 3rd parameter in stream medium data;The 3rd parameter characterization media data decoded information;
Correspondingly, the switch unit 93, is additionally operable to from the stream medium data of the second code check obtain corresponding 3rd ginseng
Number;
First transmitting element 92, is additionally operable to from the beginning of second data cell, and to the client second is sent
Before the stream medium data of code check, to the client the 3rd parameter is sent;The 3rd parameter for sending is used to indicate the client
End is adjusted to decoder.
Wherein, the 3rd parameter is added in stream medium data, when server determines that carrying out code check switches, server can
Quickly know the decoded information of the stream medium data of correspondence code check, and notify to the client, and then can allow the client
End resets as early as possible decoder, so as to reduce Playout delay.
Here, it is described to add the 3rd parameter in stream medium data, specifically include:
The signal generating unit adds the 3rd parameter in each data cell;
Correspondingly, the switch unit 93 obtains corresponding 3rd parameter from second data cell.
Wherein, due to being added with the 3rd parameter in each data cell, as long as so switch unit 83 determines that second counts
After according to unit, you can from the parameter of direct access the 3rd in the second data cell, without the need for going to go other positions to obtain the 3rd again again
Parameter, so, it is possible corresponding 3rd parameter of stream medium data for rapidly obtaining the second code check.
In one embodiment, the signal generating unit can add the 3rd parameter in the original position of each data cell;Phase
Ying Di, the switch unit 93 obtains corresponding 3rd parameter from the original position of second data cell.
Here, the original position in data cell adds the 3rd parameter, thus, the second code check further can be obtained rapidly
Corresponding 3rd parameter of stream medium data.
During practical application, the signal generating unit generates the stream medium data of different code checks according to the stream medium data for obtaining
When, the data cell of the stream medium data of every kind of code check can in time be alignd;
Correspondingly, the switch unit 93, specifically for:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
The data cell of the stream medium data of every kind of code check is alignd in time, and such server can be according to the first data
Unit quickly obtains the second data cell.
During practical application, when the stream medium data of the second code check is sent to the client, first transmitting element
92 can with sent by the way of HTTP Chunk based on MPEGTS encapsulate the second code check stream medium data, can also adopt
The mode of HTTP Chunk sends stream medium data first based on the second code check for being based on RTP encapsulation after MPEGTS encapsulation again,
Can with sent by the way of HTTP Chunk based on MP4 encapsulate the second code check stream medium data, HTTP can also be adopted
The mode of Chunk sends the stream medium data of the second code check that the Flag based on FLV is encapsulated, to meet transmission demand.
During practical application, the first receiving unit 91, the first transmitting element 92 can be by the communication cores in streaming media device
Piece is realized;Switch unit 93 and signal generating unit can be realized that acquiring unit can be by stream matchmaker by the processor in streaming media device
Processor in body transmitting device is realized with reference to communication chip.
From the above description, it will be seen that scheme provided in an embodiment of the present invention, being please based on a streaming media playing
The scheme to client transmissions stream medium data is sought, is a kind of transmission plan of the stream medium data based on HTTP.
Correspondingly, it is the method for realizing the embodiment of the present invention, the present embodiment additionally provides a kind of streaming media device, if
Put in terminal, as shown in Figure 10, the device includes:
Second transmitting element 101, for sending streaming media playing request to server;
Second receiving unit 102, for receiving the stream medium data of the first code check that the server sends;And broadcasting
During putting the stream medium data of the first code check, the stream medium data of the second code stream that the server sends is received;Receive
The stream medium data of the second code check is started from the second data cell of the second code stream;
Broadcast unit 103, for decoding the stream medium data of the second code stream using the decoder for resetting, and plays out.
During practical application, the second transmitting element 101 and the second receiving unit 102 can be by the communications in streaming media device
Chip is realized;Broadcast unit 103 can be realized by the processor in streaming media device.
Scheme provided in an embodiment of the present invention, is particularly well-suited to live scene, and now the data flow of server end is real-time
Injection, that is to say, that the stream medium data sent to client be server end real-time reception to stream medium data.When
So, during practical application, scheme provided in an embodiment of the present invention can also be useful under program request scene.
Streaming media device provided in an embodiment of the present invention, the first receiving unit 91 receives the Streaming Media that client sends
Playing request;First transmitting element 92 responds the streaming media playing request, and to client the Streaming Media number of the first code check is sent
According to;During the stream medium data for playing the first code check, switch unit 93 utilizes first parameter and second of the client
Parameter, it is determined that when carrying out code check switching, using the first data cell of the stream medium data of first code check second code is determined
Corresponding second data cell of stream medium data of rate;The current network bandwidth of client described in first parameter characterization;Institute
State the current decoding capability of client described in the second parameter characterization;The first data cell client is currently played
Data cell;The stream medium data of different code checks is made up of the data of at least two data cells;First data cell is sent out
After the completion of sending, the first transmitting element 92 sends the stream matchmaker of the second code check from the beginning of second data cell to the client
Volume data, carries out code check switching, thus, energy according to first parameter and the second parameter of the client by server end to determine
Enough switchings for carrying out code check in time according to the network bandwidth and decoding capability of client, reduce time delay end to end.And,
Stream medium data has only been divided into different data cells, thus, not needing server side de to prepare index and segmental file, subtracts
Lack cache-time of the stream medium data in server end, further reduce time delay end to end.
Based on said apparatus, the embodiment of the present invention additionally provides a kind of server, and as shown in figure 11, the server includes:
First communication interface 111, for receiving the streaming media playing request of client transmission;Respond the streaming media playing
Request, to client the stream medium data of the first code check is sent;And after first data cell is sent completely, from described
Two data cells start, and to the client stream medium data of the second code check is sent;
First processor 112, for during the stream medium data for playing the first code check, using the of the client
One parameter and the second parameter, it is determined that when carrying out code check switching, using the first data sheet of the stream medium data of first code check
Unit determines corresponding second data cell of stream medium data of the second code check;Client described in first parameter characterization is current
The network bandwidth;The current decoding capability of client described in second parameter characterization;First data cell is worked as the client
The front data cell played;The stream medium data of different code checks is made up of the data of at least two data cells.
In one embodiment, the first processor 112, is additionally operable to during the stream medium data for playing the first code check
First parameter and the second parameter of the client are obtained by first communication interface 111.
In one embodiment, the first processor 112 can also utilize first parameter and the second ginseng of the client
Number, and with reference to the 4th parameter of server, it is determined that carrying out code check switching;The current stream of server described in 4th parameter characterization
Media processing capacity.
In one embodiment, the first processor 112, is additionally operable to respond the streaming media playing request, to client
Send for the stream medium data of every kind of code check before the stream medium data of the first code check, the addition the 3rd in stream medium data is joined
Number;The 3rd parameter characterization media data decoded information;And obtain corresponding from the stream medium data of the second code check
Three parameters;
Correspondingly, first communication interface 111, is additionally operable to from the beginning of second data cell, to the client
Before sending the stream medium data of the second code check, to the client the 3rd parameter is sent;The 3rd parameter for sending is used to indicate
The client is adjusted to decoder.
The first processor 112, is additionally operable to respond the streaming media playing request, and to client the first code check is sent
Before stream medium data, when generating the stream medium data of different code checks, the data cell of the stream medium data of every kind of code check is existed
Align on time;
The first processor 112, specifically for:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
Wherein, the first communication interface 111 and first processor 112 realize that function can refer to the phase of preceding method and device
Close description and understand, repeat no more here.
Based on said apparatus, the embodiment of the present invention additionally provides a kind of terminal, and as shown in figure 12, the terminal includes:
Second communication interface 121, for sending streaming media playing request to server, and receives what the server sent
The stream medium data of the first code check;And during the stream medium data for playing the first code check, receive the server and send
The second code stream stream medium data;The stream medium data of the second code check for receiving is opened from the second data cell of the second code stream
Begin;
Second processing device 122, for decoding the stream medium data of the second code stream using the decoder for resetting, and is broadcast
Put.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can adopt hardware embodiment, software implementation or the shape with reference to the embodiment in terms of software and hardware
Formula.And, the present invention can be adopted can be with storage in one or more computers for wherein including computer usable program code
The form of the computer program implemented on medium (including but not limited to magnetic disc store and optical memory etc.).
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program
Figure and/or block diagram are describing.It should be understood that can be by computer program instructions flowchart and/or each stream in block diagram
The combination of journey and/or square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices
The device of the function of specifying in present one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy
In determining the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to
Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or
The function of specifying in multiple square frames.
These computer program instructions also can be loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow process of flow chart or multiple flow processs and/or block diagram one
The step of function of specifying in individual square frame or multiple square frames.
The above, only presently preferred embodiments of the present invention is not intended to limit protection scope of the present invention.
Claims (19)
1. a kind of flow-medium transmission method, it is characterised in that methods described includes:
Receive the streaming media playing request that client sends;
The streaming media playing request is responded, to client the stream medium data of the first code check is sent;
During the stream medium data for playing the first code check, using first parameter and the second parameter of the client, it is determined that
When carrying out code check switching, using the first data cell of the stream medium data of first code check Streaming Media of the second code check is determined
Corresponding second data cell of data;The current network bandwidth of client described in first parameter characterization;Second parameter
Characterize the current decoding capability of the client;First data cell is the data cell that the client is currently played;
The stream medium data of different code checks is made up of the data of at least two data cells;
After first data cell is sent completely, from the beginning of second data cell, to the client second code is sent
The stream medium data of rate.
2. method according to claim 1, it is characterised in that the response streaming media playing request, sends to client
Before the stream medium data of the first code check, methods described also includes:
For the stream medium data of every kind of code check, the 3rd parameter is added in stream medium data;The 3rd parameter characterization media
Data decoded information;
Correspondingly, from the beginning of second data cell, send before the stream medium data of the second code check to the client, institute
Stating method also includes:
Corresponding 3rd parameter is obtained from the stream medium data of the second code check;
The 3rd parameter is sent to the client;The 3rd parameter for sending is used to indicate that the client adjusts decoder
It is whole.
3. method according to claim 2, it is characterised in that described to add the 3rd parameter in stream medium data, including:
Add the 3rd parameter in each data cell;
Correspondingly, corresponding 3rd parameter is obtained from second data cell.
4. method according to claim 3, it is characterised in that described to add the 3rd parameter, bag in each data cell
Include:
Add the 3rd parameter in the original position of each data cell;
Correspondingly, corresponding 3rd parameter is obtained from the original position of second data cell.
5. method according to claim 1, it is characterised in that methods described also includes:
First parameter and the second parameter of the client are obtained during the stream medium data for playing the first code check.
6. method according to claim 1, it is characterised in that using first parameter and the second parameter of the client,
It is determined that when carrying out code check switching, methods described also includes:
Using first parameter and the second parameter of the client, and with reference to the 4th parameter of server, it is determined that carry out code check cutting
Change;The current Streaming Media disposal ability of server described in 4th parameter characterization.
7. method according to claim 1, it is characterised in that the response streaming media playing request, sends to client
Before the stream medium data of the first code check, methods described also includes:
When generating the stream medium data of different code checks, the data cell of the stream medium data of every kind of code check is alignd in time;
Correspondingly, the first data cell of the stream medium data using first code check determines the Streaming Media of the second code check
Corresponding second data cell of data, including:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
8. the method according to any one of claim 1 to 7, it is characterised in that send the second code check to the client
Stream medium data, including:
The second code encapsulated using one below mode is sent by the way of HTTP HTTP block transmission Chunk
The stream medium data of rate:
Encapsulated based on MPEGTS;
Again based on realtime transmission protocol RTP encapsulation after being encapsulated based on MPEGTS;
Encapsulated based on MP4;
Label F lag based on FLV is encapsulated.
9. a kind of flow-medium transmission method, it is characterised in that methods described includes:
Streaming media playing request is sent to server, and receives the stream medium data of the first code check that the server sends;
During the stream medium data for playing the first code check, the Streaming Media number of the second code stream that the server sends is received
According to;The stream medium data of the second code check for receiving is started from the second data cell of the second code stream;
The stream medium data of the second code stream is decoded using the decoder for resetting, and is played out.
10. a kind of streaming media device, it is characterised in that described device includes:
First receiving unit, for receiving the streaming media playing request of client transmission;
First transmitting element, for responding the streaming media playing request, to client the stream medium data of the first code check is sent;
Switch unit, for play the first code check stream medium data during, using the client the first parameter and
Second parameter, it is determined that when carrying out code check and switching, using the first data cell of the stream medium data of first code check the is determined
Corresponding second data cell of stream medium data of two code checks;The current Netowrk tape of client described in first parameter characterization
It is wide;The current decoding capability of client described in second parameter characterization;First data cell is that the client is current
The data cell of broadcasting;The stream medium data of different code checks is made up of the data of at least two data cells;
First transmitting element, is additionally operable to after first data cell is sent completely, from the beginning of second data cell,
The stream medium data of the second code check is sent to the client.
11. devices according to claim 10, it is characterised in that described device also includes:
Signal generating unit, for for the stream medium data of every kind of code check, the 3rd parameter being added in stream medium data;Described 3rd
Parameter characterization media data decoded information;
Switch unit, is additionally operable to from the stream medium data of the second code check obtain corresponding 3rd parameter;
First transmitting element, is additionally operable to from the beginning of second data cell, and to the client the second code check is sent
Before stream medium data, to the client the 3rd parameter is sent;The 3rd parameter for sending is used to indicate the client to solution
Code device is adjusted.
12. devices according to claim 10, it is characterised in that described device also includes:
Acquiring unit, for obtaining first parameter and the of the client during the stream medium data for playing the first code check
Two parameters.
13. devices according to claim 10, it is characterised in that the switch unit, for using the client
First parameter and the second parameter, and with reference to the 4th parameter of server, it is determined that carrying out code check switching;The 4th parameter characterization institute
State the current Streaming Media disposal ability of server.
14. devices according to claim 10, it is characterised in that described device also includes:
Signal generating unit, during for the stream medium data for generating different code checks, by the data cell of the stream medium data of every kind of code check
Align in time;
The switch unit, specifically for:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
15. a kind of streaming media devices, it is characterised in that described device includes:
Second transmitting element, for sending streaming media playing request to server;
Second receiving unit, for receiving the stream medium data of the first code check that the server sends;And playing first
During the stream medium data of code check, the stream medium data of the second code stream that the server sends is received;The second code of reception
The stream medium data of rate is started from the second data cell of the second code stream;
Broadcast unit, for decoding the stream medium data of the second code stream using the decoder for resetting, and plays out.
16. a kind of servers, it is characterised in that the server includes:
First communication interface, for receiving the streaming media playing request of client transmission;The streaming media playing request is responded, to
Client sends the stream medium data of the first code check;And after first data cell is sent completely, from second data
Unit starts, and to the client stream medium data of the second code check is sent;
First processor, for during the stream medium data for playing the first code check, using the first parameter of the client
And second parameter, it is determined that when carrying out code check and carrying out, being determined using the first data cell of the stream medium data of first code check
Corresponding second data cell of stream medium data of the second code check;The current Netowrk tape of client described in first parameter characterization
It is wide;The current decoding capability of client described in second parameter characterization;First data cell is that the client is current
The data cell of broadcasting;The stream medium data of different code checks is made up of the data of at least two data cells.
17. servers according to claim 16, it is characterised in that the first processor, are additionally operable to respond the stream
Media play request, is directed to the stream medium data of every kind of code check before the stream medium data that the first code check is sent to client,
Add the 3rd parameter in stream medium data;The 3rd parameter characterization media data decoded information;And from the stream of the second code check
Corresponding 3rd parameter is obtained in media data;
Correspondingly, first communication interface, is additionally operable to from the beginning of second data cell, and to the client second is sent
Before the stream medium data of code check, to the client the 3rd parameter is sent;The 3rd parameter for sending is used to indicate the client
End is adjusted to decoder.
18. servers according to claim 16, it is characterised in that the first processor, are additionally operable to respond the stream
Media play request, sends before the stream medium data of the first code check to client, when generating the stream medium data of different code checks,
The data cell of the stream medium data of every kind of code check is alignd in time;
The first processor, specifically for:
The first data cell corresponding time is determined from the stream medium data of the first code check;
Second data cell is obtained from the stream medium data of the second code check using the time for determining.
19. a kind of terminals, it is characterised in that the terminal includes:
Second communication interface, for sending streaming media playing request to server, and receives first yard that the server sends
The stream medium data of rate;And during the stream medium data for playing the first code check, receive the server sends second
The stream medium data of code stream;The stream medium data of the second code check for receiving is started from the second data cell of the second code stream;
Second processing device, for decoding the stream medium data of the second code stream using the decoder for resetting, and plays out.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710047921.7A CN106657143A (en) | 2017-01-20 | 2017-01-20 | Streaming media transmission method and device, server and terminal |
PCT/CN2017/116604 WO2018133601A1 (en) | 2017-01-20 | 2017-12-15 | Streaming media transmission method and apparatus, server, and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710047921.7A CN106657143A (en) | 2017-01-20 | 2017-01-20 | Streaming media transmission method and device, server and terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106657143A true CN106657143A (en) | 2017-05-10 |
Family
ID=58842216
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710047921.7A Pending CN106657143A (en) | 2017-01-20 | 2017-01-20 | Streaming media transmission method and device, server and terminal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106657143A (en) |
WO (1) | WO2018133601A1 (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108235075A (en) * | 2018-01-30 | 2018-06-29 | 广州市百果园信息技术有限公司 | Video quality grade matching process, computer readable storage medium and terminal |
WO2018133601A1 (en) * | 2017-01-20 | 2018-07-26 | 中兴通讯股份有限公司 | Streaming media transmission method and apparatus, server, and terminal |
CN111182352A (en) * | 2018-11-09 | 2020-05-19 | 浙江宇视科技有限公司 | Adaptive code stream control device and method for video playing |
CN111193684A (en) * | 2018-11-14 | 2020-05-22 | 北京开广信息技术有限公司 | Real-time delivery method and server of media stream |
CN111741335A (en) * | 2019-05-21 | 2020-10-02 | 北京京东尚科信息技术有限公司 | Data processing method and device, mobile terminal and computer readable storage medium |
CN112383791A (en) * | 2020-11-12 | 2021-02-19 | 咪咕视讯科技有限公司 | Media data processing method and device, electronic equipment and storage medium |
CN113259729A (en) * | 2020-02-10 | 2021-08-13 | 北京字节跳动网络技术有限公司 | Data switching method, server, system and storage medium |
CN115550690A (en) * | 2022-12-02 | 2022-12-30 | 腾讯科技(深圳)有限公司 | Frame rate adjusting method, device, equipment and storage medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113141524B (en) * | 2020-01-17 | 2023-09-29 | 北京达佳互联信息技术有限公司 | Resource transmission method, device, terminal and storage medium |
CN113573062B (en) * | 2020-04-29 | 2023-12-29 | 华为技术有限公司 | Traffic shaping method and device and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101562737A (en) * | 2009-05-19 | 2009-10-21 | 华中科技大学 | Multi-code rate dispatching method in peer-to-peer live broadcast system |
CN102487454A (en) * | 2010-12-03 | 2012-06-06 | 中兴通讯股份有限公司 | Method and system for rapidly starting segment programs |
CN102957672A (en) * | 2011-08-25 | 2013-03-06 | 中国电信股份有限公司 | Method, client side and system for self-adaptive playing of FLV (flash video) media streams |
CN103561283A (en) * | 2013-10-30 | 2014-02-05 | 乐视致新电子科技(天津)有限公司 | Method and device for code rate switch of smart television |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120010089A (en) * | 2010-07-20 | 2012-02-02 | 삼성전자주식회사 | Method and apparatus for improving quality of multimedia streaming service based on hypertext transfer protocol |
EP2685742A4 (en) * | 2011-04-07 | 2014-03-05 | Huawei Tech Co Ltd | Method, device and system for transmitting and processing media content |
CN103812821B (en) * | 2012-11-06 | 2017-09-12 | 中国移动通信集团公司 | Transmit method, HTTP server, client terminal device and the system of Streaming Media |
CN104581340B (en) * | 2015-01-16 | 2018-02-16 | 京东方科技集团股份有限公司 | Client, stream medium data method of reseptance and stream medium data transmission system |
CN106657143A (en) * | 2017-01-20 | 2017-05-10 | 中兴通讯股份有限公司 | Streaming media transmission method and device, server and terminal |
-
2017
- 2017-01-20 CN CN201710047921.7A patent/CN106657143A/en active Pending
- 2017-12-15 WO PCT/CN2017/116604 patent/WO2018133601A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101562737A (en) * | 2009-05-19 | 2009-10-21 | 华中科技大学 | Multi-code rate dispatching method in peer-to-peer live broadcast system |
CN102487454A (en) * | 2010-12-03 | 2012-06-06 | 中兴通讯股份有限公司 | Method and system for rapidly starting segment programs |
CN102957672A (en) * | 2011-08-25 | 2013-03-06 | 中国电信股份有限公司 | Method, client side and system for self-adaptive playing of FLV (flash video) media streams |
CN103561283A (en) * | 2013-10-30 | 2014-02-05 | 乐视致新电子科技(天津)有限公司 | Method and device for code rate switch of smart television |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018133601A1 (en) * | 2017-01-20 | 2018-07-26 | 中兴通讯股份有限公司 | Streaming media transmission method and apparatus, server, and terminal |
CN108235075A (en) * | 2018-01-30 | 2018-06-29 | 广州市百果园信息技术有限公司 | Video quality grade matching process, computer readable storage medium and terminal |
CN108235075B (en) * | 2018-01-30 | 2020-11-24 | 广州市百果园信息技术有限公司 | Video quality grade matching method, computer readable storage medium and terminal |
CN111182352A (en) * | 2018-11-09 | 2020-05-19 | 浙江宇视科技有限公司 | Adaptive code stream control device and method for video playing |
CN111182352B (en) * | 2018-11-09 | 2022-06-14 | 浙江宇视科技有限公司 | Adaptive code stream control device and method for video playing |
CN111193684A (en) * | 2018-11-14 | 2020-05-22 | 北京开广信息技术有限公司 | Real-time delivery method and server of media stream |
CN111193684B (en) * | 2018-11-14 | 2021-12-21 | 北京开广信息技术有限公司 | Real-time delivery method and server of media stream |
CN111741335A (en) * | 2019-05-21 | 2020-10-02 | 北京京东尚科信息技术有限公司 | Data processing method and device, mobile terminal and computer readable storage medium |
CN111741335B (en) * | 2019-05-21 | 2022-12-27 | 北京京东尚科信息技术有限公司 | Data processing method and device, mobile terminal and computer readable storage medium |
CN113259729A (en) * | 2020-02-10 | 2021-08-13 | 北京字节跳动网络技术有限公司 | Data switching method, server, system and storage medium |
CN112383791A (en) * | 2020-11-12 | 2021-02-19 | 咪咕视讯科技有限公司 | Media data processing method and device, electronic equipment and storage medium |
CN115550690A (en) * | 2022-12-02 | 2022-12-30 | 腾讯科技(深圳)有限公司 | Frame rate adjusting method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2018133601A1 (en) | 2018-07-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106657143A (en) | Streaming media transmission method and device, server and terminal | |
CN107071529B (en) | A kind of HLS video broadcasting methods, terminal and server | |
US10263875B2 (en) | Real-time processing capability based quality adaptation | |
EP2880548B1 (en) | Methods for quality-aware adaptive streaming over hypertext transfer protocol | |
KR102120525B1 (en) | Communication apparatus, communication data generation method, and communication data processing method | |
US11284135B2 (en) | Communication apparatus, communication data generation method, and communication data processing method | |
CN109587514B (en) | Video playing method, medium and related device | |
CN111343511A (en) | HLS live broadcast system and method realized through multicast | |
EP3413573A1 (en) | Client, server, reception method and transmission method | |
CN106961625A (en) | A kind of channel switching method and its device | |
CN106789976A (en) | The player method of media file, service end, client and system | |
CN104581228A (en) | Bandwidth self-adaptation streaming media system serving various terminals | |
CN103716681A (en) | Code stream switching method and electronic equipment | |
CN108494792A (en) | A kind of flash player plays the converting system and its working method of hls video flowings | |
KR20190018142A (en) | Method configuring and transmitting mmt transport packet | |
CN102136948B (en) | Method, terminal equipment and system for counting user experiences | |
Begen et al. | Road to salvation: streaming clients and content delivery networks working together | |
US10298975B2 (en) | Communication apparatus, communication data generation method, and communication data processing method | |
CN106688240B (en) | For recording method, reception device, server unit and the system of video program | |
CN113824925A (en) | WEB plug-in-free video monitoring system and method | |
CN106878828A (en) | The method and device of automatic switchover multimedia code check | |
CN106303754A (en) | A kind of audio data play method and device | |
KR20190048186A (en) | Multipath-based split transmission system and streaming method for adaptive streaming service | |
CN113079386A (en) | Video online playing method and device, electronic equipment and storage medium | |
Varisetty et al. | Client-side bandwidth estimation technique for adaptive streaming of a browser based free-viewpoint application |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170510 |
|
RJ01 | Rejection of invention patent application after publication |