CN110545492A - real-time delivery method and server of media stream - Google Patents

real-time delivery method and server of media stream Download PDF

Info

Publication number
CN110545492A
CN110545492A CN201811032231.5A CN201811032231A CN110545492A CN 110545492 A CN110545492 A CN 110545492A CN 201811032231 A CN201811032231 A CN 201811032231A CN 110545492 A CN110545492 A CN 110545492A
Authority
CN
China
Prior art keywords
media
units
segment
media stream
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811032231.5A
Other languages
Chinese (zh)
Other versions
CN110545492B (en
Inventor
姜红旗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kaiguang Information Technology Co Ltd
Original Assignee
Beijing Kaiguang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kaiguang Information Technology Co Ltd filed Critical Beijing Kaiguang Information Technology Co Ltd
Priority to CN201811032231.5A priority Critical patent/CN110545492B/en
Priority to PCT/CN2019/098871 priority patent/WO2020048268A1/en
Publication of CN110545492A publication Critical patent/CN110545492A/en
Application granted granted Critical
Publication of CN110545492B publication Critical patent/CN110545492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management 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/262Content 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
    • H04N21/26208Content 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 the scheduling operation being performed under constraints
    • H04N21/26216Content 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 the scheduling operation being performed under constraints involving the channel capacity, e.g. network bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

The invention discloses a real-time delivery method of a media stream and a server, wherein the method comprises the following steps: receiving a media segment request sent by a client, wherein the media segment request does not carry or carries at least one control parameter, and the control parameter comprises a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted; generating a media segment according to the media segment request, wherein a target media stream to be transmitted is determined according to the first type of parameters, candidate media units to be transmitted are determined according to the second type of parameters, and the candidate media units to be transmitted are packaged into the media segment; and sending the media segment to the client. The method generates the media segments in real time according to the request of the client and returns the media segments to the client so as to realize the delivery of the real-time media stream segmented according to the requirement of the client, thereby effectively reducing the transmission delay and the cost of the media stream and further improving the transmission performance of the real-time media stream.

Description

real-time delivery method and server of media stream
Technical Field
The present invention relates to the field of digital information transmission technologies, and in particular, to a real-time delivery method of a media stream and a server.
Background
With the rapid development of the internet, especially the mobile internet, the real-time transmission of multimedia data such as audio, video, and image through the internet becomes a basic requirement for many applications, and to meet this requirement, various streaming media real-time transmission technologies are proposed, and currently, the streaming media real-time transmission technologies are widely used, and mainly include three types: Real-Time Transport Protocol (RTP)/RTSP), RTMP (Real-Time Messaging Protocol), and HTTP (HyperText Transfer Protocol) Adaptive Streaming has (HTTP Adaptive Streaming). The HTTP adaptive streaming comprises a plurality of schemes: hls (HTTP Live Streaming) by apple, Smooth Streaming by microsoft, hds (HTTP Dynamic Streaming) by Adobe, DASH (Dynamic Adaptive Streaming over HTTP) by MPEG organization.
The common feature of these HTTP adaptive streaming schemes is to cut a media stream into media segments of short time (2s to 10s), generate an index file or a manifest file (e.g. m3u8 playlist in HLS and MPD file in DASH) describing the media segments at the same time, store them in each Web server, and obtain URL (Uniform Resource Locator) access addresses of the media segments by accessing the playlist or manifest file, and then download the media segments one by one and play them by using a standard HTTP protocol. The main difference between these schemes is represented by the difference between the encapsulation format and the manifest file format employed by the media segments.
Compared with RTP/RTSP and RTMP, HTTP adaptive streaming can make full use of the existing Internet Web caching facilities (such as CDN and various Web caching servers) and can support large-scale user access. Meanwhile, the client can be supported to select the fragments with proper code rates according to network conditions and terminal capability by providing the media fragments with various code rates, so that code rate self-adaption is realized. Therefore, HTTP adaptive streaming has become the mainstream way of real-time streaming media delivery on the internet at present.
However, these HTTP adaptive streaming schemes described above all have two problems:
Problem 1, the duration of a media segment cannot adapt to dynamically changing network transmissions. The current HAS schemes all adopt a pre-segmentation mode, that is, a server generates media segments and a manifest file thereof according to a preset time length and submits the media segments and the manifest file to a web server. When the network transmission bandwidth is sufficient and the delay is small, setting a large segment duration means increasing the delay of real-time transmission; when the network transmission bandwidth is insufficient and the delay is large, setting a small segment duration means frequent file requests, and increases the burden of the server and the network transmission overhead. Because the transmission bandwidth and the transmission delay on the internet are dynamically changed, optimal transmission cannot be realized by adopting a pre-segmentation mode with fixed time length.
Problem 2, manifest files increase transfer latency and overhead. The client needs to obtain the manifest file first to obtain the URL address of the media segment. However, since the manifest file needs to be transmitted to the client after a period of time, the manifest file obtained by the client cannot reflect the current generation situation of the latest media segments, and in addition, when the manifest file is blocked or transmission errors occur, the fast access of the user to the media segments is blocked, which reduces the transmission performance of the real-time streaming media.
disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a method for real-time delivery of a media stream, which can effectively reduce the transmission delay and overhead of the media stream, and further improve the transmission performance of the real-time media stream.
A second object of the present invention is to propose a real-time delivery server of media streams.
A third object of the invention is to propose a computer device.
a fourth object of the invention is to propose a non-transitory computer-readable storage medium.
A fifth object of the invention is to propose a computer program product.
In order to achieve the above object, a first embodiment of the present invention provides a method for delivering a media stream in real time, where the media stream is a sequence of media units generated in real time, and each media unit is associated with a generation time and/or a sequence number indicating a generation sequence, the method includes the following steps: receiving a media segment request sent by a client, wherein the media segment request does not carry or carries at least one control parameter, and the control parameter comprises a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted; generating a media segment according to the media segment request, wherein the target media stream to be transmitted is determined according to the first type of parameters, the candidate media units to be transmitted are determined according to the second type of parameters, and the candidate media units to be transmitted are packaged into the media segment; and sending the media segment to the client.
The method for real-time delivery of the media stream generates the media segments in real time according to the request of the client and returns the media segments to the client so as to realize the delivery of the real-time media stream segmented according to the requirement of the client, the time length of the media segments can automatically adapt to the change of network transmission bandwidth, the time length of the media segments can be controlled by the client through an active request, and because each media segment is triggered by the request of the client, a manifest file is not needed any more, and the client does not need to request and analyze the manifest file, on one hand, the client can more quickly obtain the latest media stream, the transmission delay of the real-time media stream is reduced, on the other hand, the transmission overhead and the processing overhead brought by the manifest file are also reduced, thereby effectively reducing the transmission delay and the overhead of the media stream, and further improving the transmission performance of the real.
In addition, the method for real-time delivery of a media stream according to the above embodiment of the present invention may further have the following additional technical features:
Further, in an embodiment of the present invention, the generating a media segment according to the media segment request further includes: if the media segment request does not carry the first type of parameters, the target media stream to be transmitted is a default specified media stream; if the media segment request does not carry the second type of parameters, the candidate media units include default specified media units, and the default specified media units are media units in which sequence number intervals of all and latest media units in the target media stream are smaller than a first preset value, or media units in which generation time intervals of all and latest media units in the target media stream are smaller than a second preset value.
Further, in an embodiment of the present invention, if the media segment request carries at least one parameter of the second type, where each parameter of the second type corresponds to at least one constraint condition of a candidate media unit, the candidate media unit to be transmitted includes all media units in the target media stream that simultaneously satisfy all constraint conditions corresponding to the parameter of the second type.
Further, in an embodiment of the present invention, the second type of parameter includes a start sequence number, and a constraint condition corresponding to the start sequence number is: if the start sequence number is valid, the sequence number of the candidate media unit is subsequent to the start sequence number or equal to the start sequence number.
Further, in an embodiment of the present invention, the second type of parameter includes a start time, and the constraint condition corresponding to the start time is: if the start time is valid, the generation time of the candidate unit is after the start time.
Further, in an embodiment of the present invention, the second type parameter includes a unit number, and the constraint condition corresponding to the unit number is: if the number of units is valid, the number of the candidate media units does not exceed the number of the units; further, if the range of the candidate media units is not limited by other second type parameters carried by the media segment request, the sequence number interval between the candidate media units and the latest media unit is less than the number of the units.
Further, in an embodiment of the present invention, the second type of parameter includes a segment duration, and the constraint condition corresponding to the segment duration is: if the segment duration is valid, the generation time interval of the earliest and latest generated units of the candidate media units is less than the segment duration; further, if the range of the candidate media unit is not limited by other second type parameters carried by the media segment request, the generation time interval of the candidate media unit and the latest media unit is less than the segment duration.
further, in an embodiment of the present invention, the first type parameter includes a media stream identifier to specify the target media stream to be transmitted.
Further, in an embodiment of the present invention, the encapsulating the candidate media units to be transmitted into the media segment further includes: acquiring media stream index information, and packaging the media stream index information into the media segment, wherein the media stream index information contains a plurality of media stream description information belonging to the same content, and the media stream description information includes a media stream identifier and a media stream bit rate.
To achieve the above object, a second aspect of the present invention provides a server for delivering a media stream in real time, the media stream being a sequence of media units generated in real time, wherein each media unit is associated with a generation time and/or a sequence number indicating a generation sequence, the server comprising: the client interface component is used for receiving a media segment request sent by a client and returning a corresponding media segment, wherein the media segment request does not carry or carry at least one control parameter, and the control parameter comprises a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted; and the media segment generating component generates media segments according to the media segment requests, wherein the target media stream to be transmitted is determined according to the first type of parameters, the candidate media units to be transmitted are determined according to the second type of parameters, the candidate media units to be transmitted are packaged into the media segments, and the media segments are sent to the client through the client interface component.
The real-time delivery server of the media stream generates the media segments in real time according to the request of the client and returns the media segments to the client so as to realize the delivery of the real-time media stream segmented according to the requirement of the client, the time length of the media segments can automatically adapt to the change of network transmission bandwidth, the time length of the media segments can be controlled by the client through an active request, and because each media segment is triggered by the request of the client, a manifest file is not needed any more, and the client does not need to request and analyze the manifest file, on one hand, the client can obtain the latest media stream more quickly, the transmission delay of the real-time media stream is reduced, on the other hand, the transmission overhead and the processing overhead brought by the manifest file are also reduced, so that the transmission delay and the overhead of the media stream are effectively reduced, and the transmission performance of the real.
in addition, the real-time delivery server of the media stream according to the above embodiment of the present invention may further have the following additional technical features:
Further, in an embodiment of the present invention, the media segment generating component is further configured to, when the media segment request does not carry the first type of parameter, determine that the target media stream to be transmitted is a default specified media stream, and when the media segment request does not carry the second type of parameter, determine that the candidate media units include default specified media units, where the default specified media units are media units whose sequence number intervals between all of the target media stream and the latest media unit are smaller than a first preset value, or media units whose generation time intervals between all of the target media stream and the latest media unit are smaller than a second preset value.
further, in an embodiment of the present invention, if the media segment request carries at least one parameter of the second type, where each parameter of the second type corresponds to at least one constraint condition of a candidate media unit, the candidate media unit to be transmitted includes all media units in the target media stream that simultaneously satisfy all constraint conditions corresponding to the parameter of the second type.
Further, in an embodiment of the present invention, the second type of parameter includes a start sequence number, and a constraint condition corresponding to the start sequence number is: if the start sequence number is valid, the sequence number of the candidate media unit is subsequent to the start sequence number or equal to the start sequence number.
Further, in an embodiment of the present invention, the second type of parameter includes a start time, and the constraint condition corresponding to the start time is: if the start time is valid, the generation time of the candidate unit is after the start time.
further, in an embodiment of the present invention, the second type parameter includes a unit number, and the constraint condition corresponding to the unit number is: if the number of units is valid, the number of the candidate media units does not exceed the number of the units; further, if the range of the candidate media units is not limited by other second type parameters carried by the media segment request, the sequence number interval between the candidate media units and the latest media unit is less than the number of the units.
Further, in an embodiment of the present invention, the second type of parameter includes a segment duration, and the constraint condition corresponding to the segment duration is: if the segment duration is valid, the generation time interval of the earliest and latest generated units of the candidate media units is less than the segment duration; further, if the range of the candidate media unit is not limited by other second type parameters carried by the media segment request, the generation time interval of the candidate media unit and the latest media unit is less than the segment duration.
further, in an embodiment of the present invention, the first type parameter includes a media stream identifier to specify the target media stream to be transmitted.
Further, in an embodiment of the present invention, the media segment generating component is further configured to acquire media stream index information, and encapsulate the media stream index information into the media segment, where the media stream index information includes multiple pieces of media stream description information belonging to the same content, and the media stream description information includes a media stream identifier and a media stream bit rate.
Further, in an embodiment of the present invention, the method further includes: at least one real-time media stream generation component for self-generating or receiving one or more real-time media streams from other devices.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the real-time delivery method of the media stream as described in the above embodiment.
to achieve the above object, a fourth aspect of the present invention provides a non-transitory computer readable storage medium, which when executed by a processor, implements the method for real-time delivery of a media stream as described in the above embodiments.
to achieve the above object, a fifth aspect of the present invention provides a computer program product, wherein instructions of the computer program product, when executed by a processor, perform the real-time delivery method of a media stream as described in the above embodiments.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a method for real-time delivery of a media stream according to one embodiment of the invention;
Fig. 2 is a schematic diagram of a real-time delivery process for a client to continuously submit media segment requests according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a real-time delivery server of a media stream according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a real-time delivery server of a media stream according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the internet, it is often necessary to transmit various real-time generated audio, video or data streams from one network node to another, the network nodes including both various terminals such as PCs, mobile phones, tablets and various application servers such as video servers and audio servers, and the transmitted audio, video or data streams are collectively referred to as media streams. The delivery process of a media stream can be described in a general client-server model: the media stream generated in real time is delivered by the server to the client. The server and the client refer to logical functional entities, where the server is a functional entity that transmits a media stream, and the client is a functional entity that receives a media stream. The server and client may reside on any network node.
each transmitted media stream is a sequence of media units generated in real time. Different media streams, their corresponding media units can be selected by themselves. When the media stream is a byte stream generated in real time, a byte can be selected as a media unit; when the media stream is an audio stream or a video stream obtained through real-time sampling, an original audio frame or a video frame can be selected as a media unit; when the media stream is an audio stream or a video stream which is sampled and encoded in real time, an encoded audio frame, an encoded video frame or an Access Unit (Access Unit) can be selected as a media Unit; when the media stream is an audio stream or a video stream that is sampled, encoded and encapsulated in real time, the encapsulated transport packets (e.g., RTP packets, PES/PS/TS packets, etc.) may be selected as media units; when the media stream is an audio or video stream that is sampled, encoded, encapsulated, and pre-segmented in real-time, a segmented media segment (e.g., a TS format segment used in HLS protocol, fMP4 format segment used in DASH protocol) may be selected as a media unit.
Each media unit may be associated with a generation time, which is typically a timestamp. Each media unit may also be associated with a sequence number that may be used to indicate the order in which the media units were generated. When sequence numbers are used to indicate the order in which the media units are generated, the meaning of the sequence numbers need to be defined in terms of the specific media unit. When the media unit is a byte, the serial number of the media unit is a byte serial number; when the media units are audio frames and video frames, the serial numbers of the media units are frame serial numbers; when the media unit is a transmission packet, the sequence number of the media unit is a packet sequence number; when the Media unit is a stream segment, the Sequence number of the Media unit is a segment Sequence number (e.g., Media Sequence of each TS segment in HLS).
for a media stream, a Sequence Number indicating a generation Sequence and a generation time may be associated at the same time, for example, when the real-time media stream is an RTP packet stream, the RTP header has both a Sequence Number (Sequence Number) field to indicate the Sequence of the RTP packet and a timestamp field to indicate the generation time of the media data encapsulated in the RTP. In this case, multiple consecutive RTP packets may correspond to the same generation time, but their sequence numbers are unique.
The method of the embodiments of the present invention may be implemented for any kind of real-time media stream. In the following embodiments, the RTP real-time media stream or the MPEG2-TS real-time media stream is selected to illustrate the implementation method of the embodiments of the present invention. For an RTP real-time stream, a media unit is an RTP packet, a packet Sequence Number (Sequence Number) of the RTP is selected as a Sequence Number of the media unit, the packet Sequence Number of the RTP packet is a 16-bit field, the maximum value is 65535, the Sequence Number of a continuously generated RTP packet is circularly counted, and if the Sequence Number of the current packet is Seq, the Sequence Number of the next packet is (Seq + 1)% 65536, so that the Sequence Number is limited by the bit length in implementation, the situation that the Sequence Number size cannot reflect the Sequence order of the next packet possibly occurs, at the moment, whether the Sequence Number circularly counts or not can be judged according to the generation time of the media unit, and the Sequence relation and the interval of the Sequence numbers of the two media units can be accurately judged. For MPEG2-TS real-time streams, the TS stream may be divided into TS segments of fixed duration, such as around 1 second, in a manner similar to HLS/DASH, each TS segment may include multiple media frames, and then the segments are sequenced in the generation order as media units, and the timestamp of the first media frame contained in each segment indicates the generation time of the segment.
In a conventional real-time streaming media protocol such as RTP or RTMP, a server push method is adopted: and the server actively sends the new media unit to the client once the new media unit exists. The method of the embodiment of the present invention is similar to various HTTP adaptive streams (such as HLS, smooth stream, MPEG-DASH), and adopts a client pulling method, but the difference is that in the existing various HTTP adaptive streams, the client requests or pulls segmented segments according to a manifest file, each segment may be identified by one URL, whereas in the embodiment of the present invention, a media segment is not segmented in advance, but is generated by a server in real time according to the request of the client, and the client may control the content and duration of the media segment.
The following describes a real-time delivery method of a media stream and a server according to an embodiment of the present invention with reference to the drawings, and first, a real-time delivery method of a media stream according to an embodiment of the present invention will be described with reference to the drawings.
Fig. 1 is a flow chart of a method for real-time delivery of a media stream according to an embodiment of the present invention.
as shown in fig. 1, the method for real-time delivery of a media stream is a sequence of media units generated in real time, wherein each media unit is associated with a generation time and/or a sequence number indicating a generation sequence, and the method includes the following steps:
In step S101, a media segment request sent by a client is received, where the media segment request does not carry or carries at least one control parameter, and the control parameter includes a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted.
Specifically, the media segment request may not carry any first-class parameter and second-class parameter, and new parameters may be defined according to further implementation needs, for example, the control parameters that may be the first-class parameters include: media stream identification, media stream name, etc.; control parameters that may be of the second type include: the starting sequence number, the starting time, the number of units, the segment duration and the like.
The media segment request may be submitted using any protocol, such as the common HTTP protocol, TCP protocol, UDP protocol, and the like. When the media segment request is submitted by adopting an HTTP protocol, an HTTP-GET mode or an HTTP-POST mode can also be adopted.
When the media segment request carries control parameters, the control parameters need to be packaged into a character string or a byte stream in a certain way and sent to the server. For example, when HTTP-GET is used to send media segment requests, the control parameters may be encapsulated as a string into a URL. An example of a media segment request with HTTP-GET is as follows:
media segment request without control parameters:
GET“http://www.xxx-server.com/msreq”[req1]
Media segment request carrying a control parameter:
GET“http://www.xxx-server.com/msreq?streamID=601”[req2]
GET“http://www.xxx-server.com/msreq?seqBegin=1005”[req3]
GET“http://www.xxx-server.com/msreq?timeBegin=31000”[req4]
GET“http://www.xxx-server.com/msreq?unitCount=8”[req5]
GET“http://www.xxx-server.com/msreq?segDuration=1000”[req6]
media segment request carrying two control parameters:
GET“http://www.xxx-server.com/msreq?streamID=602&seqBegin=1020” [req7]
GET“http://www.xxx-server.com/msreq?streamID=601&timeBegin=32000” [req8]
GET“http://www.xxx-server.com/msreq?seqBegin=1010&unitCount=5” [req9]
GET“http://www.xxx-server.com/msreq?timeBegin=31000&segDuration= 3000”[req10]
Media segment requests carrying three control parameters:
GET“http://www.xxx-server.com/msreq?streamID=601&seqBegin=1010& unitCount=5”[req11]
GET“http://www.xxx-server.com/msreq?streamID=601&timeBegin=33000& segDuration=3000”[req12]
in the URL of the request, the parameter names streamID, seqBegin, timeBegin, unit count, and segDuration respectively represent the media stream identifier, start sequence number, start time, unit number, and segment duration.
The server may adopt a Web server to receive the media segment request of the client, extract corresponding control parameters from the URL of the request, and classify the control parameters: if the parameter is the media stream identifier, the parameter is a first type parameter; if the parameters are the starting sequence number, the starting time, the number of units and the segment duration, the parameters are the second type of parameters.
In step S102, a media segment is generated according to the media segment request, wherein a target media stream to be transmitted is determined according to the first type of parameter, a candidate media unit to be transmitted is determined according to the second type of parameter, and the candidate media unit to be transmitted is encapsulated into the media segment.
Specifically, after receiving the media segment request, the server may obtain the control parameters carried in the media segment request, then may determine the target media stream to be transmitted according to the first type of parameters therein, determine the candidate media units to be transmitted according to the second type of parameters carried, and finally encapsulate the candidate media units to be transmitted into the media segment. Wherein, one or more media units can be encapsulated into media segments using a custom encapsulation protocol, for example, a simple encapsulation protocol is as follows: the media segment is composed of a segment header and a segment payload, the segment payload is formed by cascading a plurality of media units, and the segment header indicates the initial position and the length of each media unit.
in step S103, the media segment is sent to the client.
In particular, the server may select an appropriate manner to transmit the media segment to the client according to a protocol used by the media segment request of the client, for example, when the received media segment request adopts an HTTP GET manner, the generated media segment may be transmitted through an HTTP GET response message: the media segment is put into the entity body of the HTTP response message.
When the server receives continuous media segment requests from the client, the server continuously generates new media segments according to the requests of the client, the new media segments encapsulate a plurality of recently generated media units, the client analyzes the media segments, and then each media unit of the real-time media stream can be recovered, so that the real-time transmission of the media stream from the server to the client is realized, and the process is shown in fig. 2.
Because the mode of instantly generating the media segments is adopted, the method of the embodiment of the invention does not need the list file any more, thereby reducing the transmission delay and saving the expense. In addition, the client can adjust the frequency of sending requests by itself to control the duration of the media segments, so as to better adapt to the change of the network bandwidth.
It should be understood that the steps S101 and S104 are provided only for convenience of description, and are not intended to limit the execution order of the method.
The above is a detailed explanation of embodiment 1, and embodiment 2 will be described in detail below, and in the following embodiments, a description will be made of how a server generates a media segment according to a media segment request.
Further, in one embodiment of the present invention, generating the media segment according to the media segment request further comprises: if the media segment request does not carry the first type of parameters, the target media stream to be transmitted is a default specified media stream; if the media segment request does not carry the second type of parameters, the candidate media units include default specified media units, and the default specified media units are media units of which the sequence number intervals of all the latest media units in the target media stream are smaller than a first preset value, or media units of which the generation time intervals of all the latest media units in the target media stream are smaller than a second preset value.
Taking RTP real-time stream as an example, the media unit is an RTP packet, and each RTP packet carries a packet sequence number. Assuming that the packet sequence number of the newly generated RTP packet is 1020 and the first preset value is 20, when the server receives a media segment request without any parameters, e.g., [ req1], the server can select one from the existing real-time media streams as the target media stream, and the candidate media units to be transmitted include the most recently generated 20 RTP packets (packet sequence numbers from 1001 to 1020) in the target media stream.
Taking TS real-time stream as an example, the media unit is a TS segment, and each TS segment is associated with a generation time, which is a timestamp of a first media frame in the TS segment. Assuming that the generation time of the newly generated TS segment is 33000 (unit is microsecond), and the second preset value is 3000, when the server receives a media segment request without any parameters, e.g., [ req1], the server can select one from the existing real-time media streams as the target media stream, and the candidate media unit to be sent includes the TS segment generated in the last 3 seconds of the target media stream, i.e., the TS segment whose generation time Tp is within the range (30000< Tp < — 33000).
By adopting the embodiment, each time the media segment request sent by the user returns a plurality of media units which are generated recently. And after the server continuously receives the media segment request, the recently generated media units are continuously delivered to the client.
embodiment 3, in the following embodiment, it will be explained how the server determines the candidate media units to be transmitted according to the second type of parameters.
further, in an embodiment of the present invention, if the media segment request carries at least one second-class parameter, where each second-class parameter corresponds to at least one constraint condition of the candidate media unit, the candidate media unit to be transmitted includes all media units that simultaneously satisfy all constraint conditions corresponding to the second-class parameters in the target media stream.
Four second-class parameters and the constraint condition corresponding to each second-class parameter are further given below, and one or more of the second-class parameters may be adopted as required in specific implementation, and other second-class parameters are not limited to be defined by themselves:
1) Starting sequence number
The constraint conditions corresponding to the starting sequence number are as follows: if the start sequence number is valid, the sequence number of the candidate media unit is subsequent to the start sequence number or equal to the start sequence number.
2) starting time
The constraint conditions corresponding to the starting time are as follows: if the start time is valid, the generation time of the candidate unit is after the start time.
3) Number of units
The constraint conditions corresponding to the number of units are as follows: if the number of units is valid, the number of the candidate media units does not exceed the number of the units; further, if the range of the candidate media units is not limited by other second type parameters carried by the media segment request, the interval between the sequence numbers of the candidate media units and the latest media unit is less than the number of units.
4) Segment duration
The constraint conditions corresponding to the segmentation duration are as follows: if the segment duration is valid, the generation time interval of the earliest generated unit and the latest generated unit in the candidate media units is less than the segment duration;
the second type of validity and invalidity of the parameter refers to whether the value of the parameter is within a specified range. Taking the starting sequence number as an example, the value of the starting sequence number cannot exceed the sequence number of the current newest media unit, on the other hand, to ensure real-time performance, the value of the starting sequence number cannot be earlier than the sequence number of a certain existing media unit, and the starting sequence number in the above range is valid. If a certain second type parameter is invalid, it is equivalent to not carrying the second type parameter. When all the second type parameters are invalid, the candidate media unit to be transmitted is the default designated media unit.
Taking RTP real-time stream as an example, the media unit is an RTP packet, and each RTP packet carries a packet sequence number. Assuming that the packet sequence number of the newly generated RTP packet is 1020, the server receives the following media segment requests:
1)GET“http://www.xxx-server.com/msreq?seqBegin=1005”[req3]
The request carries only one parameter of the second type: an initial sequence number, 16 RTP packets (packet sequence numbers from 1005 to 1020) meeting the constraint condition corresponding to the initial sequence number, and the candidate media unit to be sent includes the 16 RTP packets;
2)GET“http://www.xxx-server.com/msreq?unitCount=8”[req5]
The request carries only one parameter of the second type: the number of units, since there is no other second-type parameter indicating the range of the media unit, the sequence number of the candidate media unit and the sequence number of the latest media unit should be less than 8, i.e. the candidate unit to be sent includes 8 RTP packets (packet sequence numbers from 1013 to 1020);
3)GET“http://www.xxx-server.com/msreq?seqBegin=1010&unitCount=5” [req9]
the request carries two second type parameters: the number of the candidate media units is not less than 5, and the number of the candidate media units is not more than 5. Any 5 media units meeting the first constraint condition can be selected, and in the specific implementation, a selection rule can be automatically specified, for example, 5 media units (packet serial numbers from 1010 to 1014) with serial numbers in front of the selection rule meeting the constraint condition are selected as candidate units to be sent.
taking TS real-time stream as an example, the media unit is a TS segment, and each TS segment is associated with a generation time, which is a timestamp of a first media frame in the TS segment. Assume that the newly generated TS segment has a generation time of 33000 (in microseconds) when the server receives the following media segment request:
1)GET“http://www.xxx-server.com/msreq?timeBegin=31000”[req4]
The request carries only one parameter of the second type: a start time, which corresponds to a constraint that the generation time of the TS segment should be after the start time, then the candidate media units include all TS segments whose generation time Tp is within the range (31000< Tp < — 33000);
2)GET“http://www.xxx-server.com/msreq?segDuration=1000”[req6]
The request carries only one parameter of the second type: the segment duration. Since no other second type parameter indicates the scope of a media unit, the candidate media unit satisfies the constraint of: the generation time interval of the candidate media unit from the latest media unit is less than 1000, i.e. the candidate media unit comprises all TS segments within the range of generation time Tp (32000< Tp < — 33000);
3)GET“http://www.xxx-server.com/msreq?timeBegin=31000&segDuration= 3000”[req9]
The request carries two second type parameters: start time and segment duration. Wherein, the constraint condition corresponding to the start time is that the generation time of the TS segment should be greater than 31000, and the candidate media units include all TS segments with the generation time Tp within the range (31000< Tp < — 33000); the constraint on the segment duration is that the generation time interval of the earliest and latest generated units of the candidate media units is less than 3000. Obviously, the maximum interval of the generation time of all TS segments whose generation time Tp is within the range (31000< Tp < — 33000) does not exceed 2000, and both constraints are satisfied. Finally, the candidate media units to be transmitted are all TS segments whose generation time Tp is within the range (31000< Tp < — 33000).
in this embodiment, the client may obtain the most recently generated media unit by continuously submitting the media segment request and by using the carried second type parameter, such as the start sequence number or the start time, to implement real-time transmission of the media stream, and fig. 2 shows a schematic diagram of implementing the real-time transmission process of the media stream by continuously submitting the media segment request with the start sequence number. In addition, the client can also control the content and the time length of the generated media segments through the number of units and the segmentation time length.
Embodiment 4, in the following embodiments, a description will be made of how the server determines the target media stream when generating the media segment.
further, in one embodiment of the invention, the first type of parameter includes a media stream identification to specify a target media stream to be transmitted.
It is to be understood that the first type of parameter includes a media stream identification, and determining the target media stream to be transmitted includes: when the first type of parameter carried in the media segment request only includes the media stream identification, the target media stream is specified by the media stream identification.
Specifically, when a plurality of real-time media streams exist on the server, the server may assign an identifier to each real-time media stream to distinguish different real-time media streams and designate one of the real-time media streams as a default target media stream; if only one real-time media stream exists on the server, the media stream is the default target media stream.
When the received media segment request does not carry any first-class parameters (such as the media segment requests req1, req 3-req 6, req 9-req 10 listed in embodiment 1), sending a default target media stream to the client; when the first type of parameter carried by the received media segment request includes a media stream identifier (e.g., the media segment requests req2, req 7-req 8, and req 11-req 12 listed in embodiment 1), the target media stream is a real-time media stream corresponding to the media stream identifier.
Embodiment 5, in the following embodiments, multi-rate adaptive real-time media streaming will be explained.
Further, in one embodiment of the present invention, encapsulating candidate media units to be transmitted into media segments further comprises: the method comprises the steps of obtaining media stream index information and packaging the media stream index information into a media segment, wherein the media stream index information comprises a plurality of media stream description information belonging to the same content, and the media stream description information comprises a media stream identification and a media stream bit rate.
for example, when a plurality of real-time media streams belonging to the same content exist in the server, the real-time streams can be distinguished by different media stream identifications, and media stream index information of the content is established; this media stream index information actually includes the mapping relationship between the media stream identification and the media stream bit rate. As shown in table 1, the media stream index information corresponding to the same content (e.g. a live concert live) is displayed: the content comprises three real-time media streams, wherein a media stream 1 (marked as 1000, with a code rate of 8Mbps) is a high definition stream, a media stream 2 (marked as 1001, with a code rate of 2Mbps) is a standard definition stream, and a media stream 3 (marked as 1002, with a code rate of 500Kbps) is a mobile standard definition stream.
TABLE 1
Media stream identification media stream bitrate
601 8000Kbps
602 2000Kbps
603 500Kbps
when the client requests the real-time stream with the media stream identifier 601, the server finds that the media stream 2 and the media stream 3 from the same content source exist by querying the media stream index table, and at this time, the server may use the media stream index information as a control message, and encapsulate the control message and other media units into the media segment.
The client can select the requested target from a plurality of media streams belonging to the same content according to the index information of the media streams and the network transmission condition. Generally, since the media stream index information remains unchanged for a long period of time, it is not necessary to encapsulate the media stream index information in each media segment, and the media stream index information may be encapsulated in media segments with selected intervals or in the first few media segments sent to the client.
According to the real-time delivery method of the media stream, provided by the embodiment of the invention, the media segment is generated in real time according to the request of the client and is returned to the client, so that the delivery of the segmented real-time media stream according to the requirement of the client is realized, the time length of the media segment automatically adapts to the change of network transmission bandwidth, the client can control the time length of the media segment through an active request, and when the transmission bandwidth between the client and a server is sufficient and the delay is small, the client can more quickly provide the request, so that the media segment with shorter time length is obtained, and the real-time transmission delay is reduced; when the transmission bandwidth between the client and the server is insufficient and the delay is large, the client can prolong the interval of submitting the request, so that a longer media segment is obtained, and the request times are reduced to reduce the transmission overhead; because each media segment is generated by the request trigger of the client, the manifest file is not needed any more, and the client does not need to request and analyze the manifest file, on one hand, the client can obtain the latest media stream more quickly, and the transmission delay of the real-time media stream is reduced, on the other hand, the transmission overhead and the processing overhead brought by the manifest file are also reduced, so that the transmission delay and the overhead of the media stream are effectively reduced, and the transmission performance of the real-time media stream is further improved.
Next, a real-time delivery server of a media stream proposed according to an embodiment of the present invention is described with reference to the accompanying drawings.
fig. 3 is a schematic structural diagram of a real-time delivery server of a media stream according to an embodiment of the present invention.
As shown in fig. 3, the real-time delivery server 10 of the media stream includes: a client interface component 100 and a media segment generation component 200.
The client interface component 100 is configured to receive a media segment request sent by a client and return a corresponding media segment, where the media segment request does not carry or carry at least one control parameter, and the control parameter includes a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted. The media segment generating component 200 generates a media segment according to the media segment request, wherein a target media stream to be transmitted is determined according to the first type of parameter, a candidate media unit to be transmitted is determined according to the second type of parameter, the candidate media unit to be transmitted is encapsulated into a media segment, and the media segment is transmitted to the client through the client interface component 100. The server 10 of the embodiment of the present invention generates media segments in real time according to the request of the client, and returns the media segments to the client, so as to implement the delivery of the segmented real-time media stream according to the requirement of the client, thereby effectively reducing the transmission delay and overhead of the media stream, and further improving the transmission performance of the real-time media stream.
Specifically, the client interface component 100 is configured to receive a media segment request of a client, and send a generated media segment to the client; the media segment request may carry 0, 1 or more control parameters; the control parameters include the following categories: a first type of parameter and a second type of parameter; the first type of parameter is used for indicating a target media stream to be transmitted; the second type of parameter is used to indicate candidate media units to be transmitted. The client interface component may employ any specified protocol to receive media segment requests, for example, when the HTTP protocol is employed, the client interface component may be a Web server that may receive any media segment requests employing the HTTP protocol and return the media segments via HTTP responses; when using the TCP protocol, the client interface component is a TCP server and provides a fixed service port.
The media segment generation component 200 is configured to generate the required media segments according to the media segment requests of the clients. The method comprises the steps of obtaining a media segment request and control parameters thereof from a client interface component, determining a target media stream to be transmitted according to a first type of parameters, determining candidate media units to be transmitted according to a second type of parameters, extracting the candidate media units to be transmitted from a media stream storage unit, packaging the candidate media units to be transmitted into a media segment, and then directly delivering the media segment request and the control parameters to the client interface component for transmission.
Further, as shown in fig. 4, the server 10 of the embodiment of the present invention further includes at least one real-time media stream generating component, configured to generate or receive one or more real-time media streams from other servers by itself; a media stream is a sequence of media units generated in real time; each media unit is associated with a generation time and/or a sequence number, and the sequence number is used for expressing the generation sequence of the media units;
In particular, the real-time media stream generation component may include one or more processing steps of media stream generation, for example, processing steps including, but not limited to: real-time acquisition, encoding compression, transmission encapsulation and pre-segmentation of media signals. The real-time media stream generation component may also receive real-time media streams from other devices or convert an existing media stream file into a real-time stream.
Further, in an embodiment of the present invention, the media segment generating component is further configured to, when the media segment request does not carry the first type of parameter, determine that the target media stream to be transmitted is a default specified media stream, and when the media segment request does not carry the second type of parameter, the candidate media units include default specified media units, where the default specified media units are media units in which sequence number intervals of all and latest media units in the target media stream are smaller than a first preset value, or media units in which generation time intervals of all and latest media units in the target media stream are smaller than a second preset value.
further, in an embodiment of the present invention, if the media segment request carries at least one second-class parameter, where each second-class parameter corresponds to at least one constraint condition of the candidate media unit, the candidate media units to be transmitted include all media units that simultaneously satisfy all constraint conditions corresponding to the second-class parameters in the target media stream.
Further, in an embodiment of the present invention, the second type of parameter includes a start sequence number, and a constraint condition corresponding to the start sequence number is: if the start sequence number is valid, the sequence number of the candidate media unit is subsequent to the start sequence number or equal to the start sequence number.
Further, in an embodiment of the present invention, the second type of parameter includes a start time, and the constraint condition corresponding to the start time is: if the start time is valid, the generation time of the candidate unit is after the start time.
Further, in an embodiment of the present invention, the second type parameter includes a number of units, and a constraint condition corresponding to the number of units is: if the number of units is valid, the number of the candidate media units does not exceed the number of the units; further, if the range of the candidate media units is not limited by other second type parameters carried by the media segment request, the interval between the sequence numbers of the candidate media units and the latest media unit is less than the number of units.
Further, in an embodiment of the present invention, the second type of parameter includes a segment duration, and the constraint condition corresponding to the segment duration is: if the segment duration is valid, the generation time interval of the earliest generated unit and the latest generated unit in the candidate media units is less than the segment duration; further, if the other second type parameters carried by the media segment request do not limit the range of the candidate media units, the generation time interval of the candidate media units and the latest media unit is less than the segment duration.
Further, in one embodiment of the invention, the first type of parameter includes a media stream identification to specify a target media stream to be transmitted.
Further, in an embodiment of the present invention, the media segment generating component is further configured to obtain media stream index information, and encapsulate the media stream index information into the media segment, where the media stream index information includes multiple pieces of media stream description information belonging to the same content, and the media stream description information includes a media stream identifier and a media stream bit rate.
It should be noted that the foregoing explanation on the embodiment of the real-time delivery method of a media stream is also applicable to the real-time delivery server of a media stream of this embodiment, and details are not described here.
According to the real-time delivery server of the media stream, provided by the embodiment of the invention, the media segment is generated in real time according to the request of the client and is returned to the client, so that the segmented real-time media stream delivery according to the requirement of the client is realized, the time length of the media segment automatically adapts to the change of network transmission bandwidth, the client can control the time length of the media segment through an active request, and when the transmission bandwidth between the client and the server is sufficient and the delay is small, the client can more quickly make the request, so that the media segment with shorter time length is obtained, and the real-time transmission delay is reduced; when the transmission bandwidth between the client and the server is insufficient and the delay is large, the client can prolong the interval of submitting the request, so that a longer media segment is obtained, and the request times are reduced to reduce the transmission overhead; because each media segment is generated by the request trigger of the client, the manifest file is not needed any more, and the client does not need to request and analyze the manifest file, on one hand, the client can obtain the latest media stream more quickly, and the transmission delay of the real-time media stream is reduced, on the other hand, the transmission overhead and the processing overhead brought by the manifest file are also reduced, so that the transmission delay and the overhead of the media stream are effectively reduced, and the transmission performance of the real-time media stream is further improved.
In order to implement the foregoing embodiments, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the computer device implements the real-time delivery method for a media stream as described in the foregoing embodiments.
in order to implement the foregoing embodiments, the present invention further provides a non-transitory computer readable storage medium, and the program is executed by a processor to implement the real-time delivery method of the media stream described in the foregoing embodiments.
In order to implement the foregoing embodiments, the present invention further provides a computer program product, and when instructions in the computer program product are executed by a processor, the method for real-time delivery of a media stream as described in the foregoing embodiments is performed.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (22)

1. A method for real-time delivery of a media stream, said media stream being a sequence of media units generated in real-time, wherein each media unit is associated with a generation time and/or a sequence number indicating the generation order, said method comprising the steps of:
receiving a media segment request sent by a client, wherein the media segment request does not carry or carries at least one control parameter, and the control parameter comprises a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted;
generating a media segment according to the media segment request, wherein the target media stream to be transmitted is determined according to the first type of parameters, the candidate media units to be transmitted are determined according to the second type of parameters, and the candidate media units to be transmitted are packaged into the media segment; and
And sending the media segment to the client.
2. The method for real-time delivery of a media stream according to claim 1, wherein the generating a media segment according to the media segment request further comprises:
If the media segment request does not carry the first type of parameters, the target media stream to be transmitted is a default specified media stream;
If the media segment request does not carry the second type of parameters, the candidate media units include default specified media units, and the default specified media units are media units in which sequence number intervals of all and latest media units in the target media stream are smaller than a first preset value, or media units in which generation time intervals of all and latest media units in the target media stream are smaller than a second preset value.
3. The method for real-time delivery of a media stream according to claim 1, wherein the generating a media segment according to a media segment request further comprises:
If the media segment request carries at least one second type parameter, wherein each second type parameter corresponds to at least one constraint condition of a candidate media unit, the candidate media units to be transmitted include all media units in the target media stream which simultaneously satisfy all constraint conditions corresponding to the second type parameters.
4. the method according to claim 3, wherein the second type of parameter includes a start sequence number, and the constraint condition corresponding to the start sequence number is:
if the start sequence number is valid, the sequence number of the candidate media unit is subsequent to the start sequence number or equal to the start sequence number.
5. the method according to claim 3, wherein the second type of parameter includes a start time, and the constraint condition corresponding to the start time is:
If the start time is valid, the generation time of the candidate unit is after the start time.
6. The method according to claim 3, wherein the second type of parameter includes a unit number, and the constraint condition corresponding to the unit number is:
If the number of units is valid, the number of the candidate media units does not exceed the number of the units;
if the range of the candidate media unit is not limited by other second type parameters carried by the media segment request, the interval between the sequence numbers of the candidate media unit and the latest media unit is less than the number of the units.
7. The method according to claim 3, wherein the second type of parameter includes a segment duration, and the constraint condition corresponding to the segment duration is:
If the segment duration is valid, the generation time interval of the earliest and latest generated units of the candidate media units is less than the segment duration;
If the range of the candidate media unit is not limited by other second type parameters carried by the media segment request, the generation time interval of the candidate media unit and the latest media unit is less than the segment duration.
8. the method of claim 1, wherein the first type of parameter comprises a media stream identifier to specify the target media stream to be transmitted.
9. The method for real-time delivery of a media stream according to claim 8, wherein said encapsulating the candidate media units to be transmitted into the media segment further comprises:
Acquiring media stream index information, and packaging the media stream index information into the media segment, wherein the media stream index information contains a plurality of media stream description information belonging to the same content, and the media stream description information includes a media stream identifier and a media stream bit rate.
10. A server for real-time delivery of a media stream, said media stream being a sequence of media units generated in real-time, wherein each media unit is associated with a generation time and/or a sequence number indicating the order of generation, said server comprising:
The client interface component is used for receiving a media segment request sent by a client and returning a corresponding media segment, wherein the media segment request does not carry or carry at least one control parameter, and the control parameter comprises a first type parameter indicating a target media stream to be transmitted and a second type parameter indicating a candidate media unit to be transmitted;
And the media segment generating component generates media segments according to the media segment requests, wherein the target media stream to be transmitted is determined according to the first type of parameters, the candidate media units to be transmitted are determined according to the second type of parameters, the candidate media units to be transmitted are packaged into the media segments, and the media segments are sent to the client through the client interface component.
11. The server according to claim 10, wherein the media segment generation component is further configured to, when the media segment request does not carry the first type of parameter, determine the target media stream to be transmitted as a default specified media stream, and when the media segment request does not carry the second type of parameter, determine the candidate media units to include default specified media units, where the default specified media units are media units whose sequence number intervals between all and the latest media unit in the target media stream are smaller than a first preset value, or media units whose generation time intervals between all and the latest media unit in the target media stream are smaller than a second preset value.
12. The server of claim 10, wherein the media segment generation component is further configured to, when at least one of the second type parameters is carried in the media segment request, wherein each of the second type parameters corresponds to at least one constraint of a candidate media unit, and the candidate media units to be transmitted include all media units in the target media stream that satisfy all constraints corresponding to the second type parameters at the same time.
13. The server according to claim 12, wherein the second type of parameter includes a start sequence number, and the constraint condition corresponding to the start sequence number is: if the start sequence number is valid, the sequence number of the candidate media unit is subsequent to the start sequence number or equal to the start sequence number.
14. The server according to claim 12, wherein the second type of parameter comprises a start time, and the constraint condition of the start time is: if the start time is valid, the generation time of the candidate unit is after the start time.
15. The server according to claim 12, wherein the second type of parameter includes the number of units, and the constraint condition for the number of units is:
If the number of units is valid, the number of the candidate media units does not exceed the number of the units;
If the range of the candidate media unit is not limited by other second type parameters carried by the media segment request, the interval between the sequence numbers of the candidate media unit and the latest media unit is less than the number of the units.
16. The server according to claim 12, wherein the second type of parameter comprises a segment duration, and the constraint condition for the segment duration is:
If the segment duration is valid, the generation time interval of the earliest and latest generated units of the candidate media units is less than the segment duration;
If the range of the candidate media unit is not limited by other second type parameters carried by the media segment request, the generation time interval of the candidate media unit and the latest media unit is less than the segment duration.
17. the server of claim 10, wherein the first type of parameter comprises a media stream identifier to specify the target media stream to be transmitted.
18. The server of claim 17, wherein the media segment generation component is further configured to obtain media stream index information and encapsulate the media stream index information into the media segment, wherein the media stream index information includes a plurality of media stream description information belonging to a same content, and the media stream description information includes a media stream identifier and a media stream bit rate.
19. The real-time delivery server of media streams of claim 10, further comprising:
At least one real-time media stream generation component for self-generating or receiving one or more real-time media streams from other devices.
20. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of any one of claims 1-9.
21. a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method of any one of claims 1-9.
22. A computer program product in which instructions, when executed by a processor, perform the method of any one of claims 1-9.
CN201811032231.5A 2018-09-05 2018-09-05 Real-time delivery method and server of media stream Active CN110545492B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811032231.5A CN110545492B (en) 2018-09-05 2018-09-05 Real-time delivery method and server of media stream
PCT/CN2019/098871 WO2020048268A1 (en) 2018-09-05 2019-08-01 Real-time transmitting method and real-time receiving method for media stream, server, and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811032231.5A CN110545492B (en) 2018-09-05 2018-09-05 Real-time delivery method and server of media stream

Publications (2)

Publication Number Publication Date
CN110545492A true CN110545492A (en) 2019-12-06
CN110545492B CN110545492B (en) 2020-07-31

Family

ID=68701315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811032231.5A Active CN110545492B (en) 2018-09-05 2018-09-05 Real-time delivery method and server of media stream

Country Status (1)

Country Link
CN (1) CN110545492B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873343A (en) * 2020-06-30 2021-12-31 北京开广信息技术有限公司 Self-adaptive real-time delivery method of media stream and server

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651826A (en) * 2008-08-15 2010-02-17 华为技术有限公司 Method and device for sending and receiving media and system
CN102232298A (en) * 2011-04-07 2011-11-02 华为技术有限公司 Method, device and system for transmitting and processing media content
WO2013163448A1 (en) * 2012-04-26 2013-10-31 Qualcomm Incorporated Enhanced block-request streaming system for handling low-latency streaming
CN103649937A (en) * 2011-05-09 2014-03-19 韦斯技术有限公司 Method and apparatus for dynamically generating media sequences on demand for HTTP live streaming
CN104956645A (en) * 2013-01-16 2015-09-30 华为技术有限公司 URL parameter insertion and addition in adaptive streaming
CN104969560A (en) * 2013-02-04 2015-10-07 高通股份有限公司 Determining available media data for network streaming
US20160134673A1 (en) * 2014-11-10 2016-05-12 Broadcom Corporation Adaptive streaming with early client indication
WO2016172967A1 (en) * 2015-04-30 2016-11-03 华为技术有限公司 Media stream transmission method and device
CN106537924A (en) * 2014-07-16 2017-03-22 爱播股份有限公司 Operating method of client and server for streaming service
CN106604077A (en) * 2015-10-14 2017-04-26 中兴通讯股份有限公司 Self-adapting streaming media transmission method and self-adapting streaming media transmission device
CN106792271A (en) * 2016-12-30 2017-05-31 中广热点云科技有限公司 The system and method for document presentation association in adaptive stream media
CN107005729A (en) * 2014-12-05 2017-08-01 高通股份有限公司 The coffret transmitted for multimedia and file
CN107040505A (en) * 2016-02-04 2017-08-11 中兴通讯股份有限公司 Media data transmission method and device
CN107810625A (en) * 2015-06-30 2018-03-16 英国电讯有限公司 Low latency media flow transmission

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651826A (en) * 2008-08-15 2010-02-17 华为技术有限公司 Method and device for sending and receiving media and system
CN102232298A (en) * 2011-04-07 2011-11-02 华为技术有限公司 Method, device and system for transmitting and processing media content
CN103649937A (en) * 2011-05-09 2014-03-19 韦斯技术有限公司 Method and apparatus for dynamically generating media sequences on demand for HTTP live streaming
WO2013163448A1 (en) * 2012-04-26 2013-10-31 Qualcomm Incorporated Enhanced block-request streaming system for handling low-latency streaming
CN104956645A (en) * 2013-01-16 2015-09-30 华为技术有限公司 URL parameter insertion and addition in adaptive streaming
CN104969560A (en) * 2013-02-04 2015-10-07 高通股份有限公司 Determining available media data for network streaming
CN106537924A (en) * 2014-07-16 2017-03-22 爱播股份有限公司 Operating method of client and server for streaming service
US20160134673A1 (en) * 2014-11-10 2016-05-12 Broadcom Corporation Adaptive streaming with early client indication
CN107005729A (en) * 2014-12-05 2017-08-01 高通股份有限公司 The coffret transmitted for multimedia and file
WO2016172967A1 (en) * 2015-04-30 2016-11-03 华为技术有限公司 Media stream transmission method and device
CN107810625A (en) * 2015-06-30 2018-03-16 英国电讯有限公司 Low latency media flow transmission
CN106604077A (en) * 2015-10-14 2017-04-26 中兴通讯股份有限公司 Self-adapting streaming media transmission method and self-adapting streaming media transmission device
CN107040505A (en) * 2016-02-04 2017-08-11 中兴通讯股份有限公司 Media data transmission method and device
CN106792271A (en) * 2016-12-30 2017-05-31 中广热点云科技有限公司 The system and method for document presentation association in adaptive stream media

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
殷俊: "动态自适应流媒体技术的研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113873343A (en) * 2020-06-30 2021-12-31 北京开广信息技术有限公司 Self-adaptive real-time delivery method of media stream and server
WO2022002070A1 (en) * 2020-06-30 2022-01-06 北京开广信息技术有限公司 Adaptive real-time delivery method for media stream, and server
CN113873343B (en) * 2020-06-30 2023-02-24 北京开广信息技术有限公司 Self-adaptive real-time delivery method of media stream and server

Also Published As

Publication number Publication date
CN110545492B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
US11477262B2 (en) Requesting multiple chunks from a network node on the basis of a single request message
US8717890B2 (en) Application, usage and radio link aware transport network scheduler
US20150200992A1 (en) Method for downloading, at a client terminal, an upcoming sequence of segments of a multimedia content, and corresponding terminal
US20160330500A1 (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments
TWI616097B (en) Streaming apparatus, streaming method, streaming service system using the streaming apparatus and the recording medium
EP3120519B1 (en) Method for operating a cache arranged along a transmission path between client terminals and at least one server, and corresponding cache
CN112104885B (en) System and method for accelerating M3U8 initial playing speed in live broadcasting
CN107920072B (en) Multimedia sharing method and system based on data characteristics
CN110072128B (en) Real-time pushing method of media stream and server
CN110086797B (en) Real-time receiving method of media stream, client, computer device and storage medium
CN111193684B (en) Real-time delivery method and server of media stream
CN111193686B (en) Media stream delivery method and server
CN110881018B (en) Real-time receiving method and client of media stream
US10609111B2 (en) Client-driven, ABR flow rate shaping
CN110545492B (en) Real-time delivery method and server of media stream
CN111654725B (en) Real-time receiving method and client of media stream
KR102237900B1 (en) Method for retrieving, by a client terminal, a content part of a multimedia content
US10893303B1 (en) Streaming chunked media segments
WO2015104149A1 (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments
WO2020048268A1 (en) Real-time transmitting method and real-time receiving method for media stream, server, and client
EP2894871A1 (en) Method for obtaining a network information by a client terminal configured for receiving a multimedia content divided into segments
TW201532427A (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments
CN113873343A (en) Self-adaptive real-time delivery method of media stream and server
Iacono et al. Efficient and adaptive web-native live video streaming
WO2015104147A1 (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments

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