[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110545492B - 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
CN110545492B
CN110545492B CN201811032231.5A CN201811032231A CN110545492B CN 110545492 B CN110545492 B CN 110545492B CN 201811032231 A CN201811032231 A CN 201811032231A CN 110545492 B CN110545492 B CN 110545492B
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.)
Active
Application number
CN201811032231.5A
Other languages
Chinese (zh)
Other versions
CN110545492A (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

Images

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

Landscapes

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

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, various Streaming media Real-Time transmission technologies are proposed to meet the basic requirements of many applications, and currently, the Streaming media Real-Time transmission technologies are widely used, which mainly include three types, namely Real-Time transport Protocol (RTP)/RTSP (Real Time Streaming Protocol)), RTMP (Real Time Messaging Protocol), and HTTP (HyperText transfer Protocol) Adaptive Streaming has (Adaptive Streaming HTTP), wherein HTTP Adaptive Streaming includes multiple schemes H L S (HTTP L), Smooth Streaming proposed by apple, hds organization proposed by Adaptive Streaming (MPEG), and MPEG-based Streaming ad hoc Streaming (MPEG).
The common feature of these HTTP adaptive streaming schemes is to cut the media stream into media segments of short time (2S-10S), and generate an index file or a manifest file (e.g. m3u8 playlist in H L S and MPD file in DASH) describing these media segments at the same time, and then save them to each Web server, and the client obtains UR L (Uniform Resource locator) access addresses of these media segments by accessing the playlist or manifest file, and then can download these media segments one by one and play them by using standard HTTP protocol.
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.
However, because the manifest file can be transmitted to the client after a period of time, the manifest file obtained by the client cannot reflect the generation condition of the current latest media segment, and in addition, when the manifest file is blocked or transmission errors occur, the quick access of the user to the media segment is blocked, so that the transmission performance of the real-time streaming media is reduced.
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.
The media stream may be selected as a media Unit, the original audio frame or video frame may be selected as a media Unit, when the media stream is an audio stream or video stream obtained by real-time sampling, the encoded audio frame, encoded video frame or Access Unit (Access Unit) may be selected as a media Unit, when the media stream is an audio stream or video stream obtained by real-time sampling and encoding, 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 stream or video stream obtained by real-time sampling, encoding, and encapsulating, and when the media stream is a real-time sampled, encoded, encapsulated, and pre-segmented, a media segment (e.g., TS-formatted segment used in the S protocol of H L S, DAS-formatted segment used in the S protocol, fMP 4) may be selected.
Each Media unit may be associated with a generation time, which is typically a timestamp, and each Media unit may also be associated with a Sequence number, which may be used to indicate the order in which the Media units are generated, the meaning of the Sequence number needs to be defined in terms of the specific Media unit, when a Media unit is a byte, the Sequence number of the Media unit is a byte Sequence number, when a Media unit is an audio frame, a video frame, the Sequence number of the Media unit is a frame Sequence number, when a Media unit is a transport packet, the Sequence number of the Media unit is a packet Sequence number, and when a Media unit is a stream segment, the Sequence number of the Media unit is a segment Sequence number (e.g., Media Sequence for each TS segment in H L S).
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.
In the following embodiments, the present invention will be described by selecting an RTP real-time media stream or an MPEG2-TS real-time media stream respectively, where for an RTP real-time stream, a media unit is an RTP packet, a sequence number (sequence number) of the RTP is selected as a sequence number of the media unit, a packet number of the RTP packet is a 16-bit field, and the maximum value is 65535, for a continuously generated RTP packet, the sequence number is a cycle count, if a current packet sequence number is Seq, a sequence number of a next packet is (Seq + 1)% 65536, and therefore, the sequence number is limited in its bit length in implementation, a situation that the sequence number size cannot reflect the sequence order may occur, at this time, whether a cycle count occurs to the sequence number may be judged by the generation time of the media unit, so as to accurately judge the precedence relationship and the interval of the sequence numbers of two media units, and for an MPEG2-TS real-time stream, a manner similar to an DASH 26/TS L may be adopted, and each TS may include a plurality of media segments, and each TS segment may include a plurality of media segments, for example, which may be generated in a time frame segment.
The method of the embodiment of the invention is similar to various HTTP adaptive streams (such as H L S, smooth stream, MPEG-DASH), and adopts a client pulling mode, but the difference is that in the existing various HTTP adaptive streams, the client requests or pulls segmented fragments according to a manifest file, each fragment can be identified by one UR L, while in the embodiment of the invention, media segments are not segmented in advance, but are generated by the server in real time according to the request of the client, and the client can control the content and duration of the media segments.
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.
For example, when the media segment request is sent by HTTP-GET, the control parameters may be encapsulated as a string into UR L.
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 UR L 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 receive the media segment request from the client by using the Web server, extract the corresponding control parameter from UR L of the request, and classify the control parameter, where the parameter is the first type of parameter if it is a media stream identifier, and the parameter is the second type of parameter if it is an initial sequence number, initial time, number of units, and segment duration.
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 HTTP GET manner, the generated media segment may be transmitted through 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 setting of step S101 and step S103 is only for convenience of description, and is 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 (21)

1. A method for real-time delivery of a media stream, wherein the 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 order, and wherein the media units are generated by a server or received from another device, the 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 media units being generated by the server or received from another device, 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.
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 CN110545492A (en) 2019-12-06
CN110545492B true 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)

Families Citing this family (1)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103649937A (en) * 2011-05-09 2014-03-19 韦斯技术有限公司 Method and apparatus for dynamically generating media sequences on demand for HTTP live streaming
CN104969560A (en) * 2013-02-04 2015-10-07 高通股份有限公司 Determining available media data for network streaming
WO2016172967A1 (en) * 2015-04-30 2016-11-03 华为技术有限公司 Media stream transmission method and device
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
CN107810625A (en) * 2015-06-30 2018-03-16 英国电讯有限公司 Low latency media flow transmission

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651826B (en) * 2008-08-15 2012-08-08 华为技术有限公司 Method and device for sending and receiving media and system
CN102232298B (en) * 2011-04-07 2013-10-09 华为技术有限公司 Method, device and system for transmitting and processing media content
CA2869311C (en) * 2012-04-26 2018-02-13 Michael G. Luby Enhanced block-request streaming system for handling low-latency streaming
EP2904764B1 (en) * 2013-01-16 2016-09-21 Huawei Technologies Co., Ltd. Url parameter insertion and addition in adaptive streaming
KR101600469B1 (en) * 2014-07-16 2016-03-07 김재경 Operating method of client and server for streaming service
US10749918B2 (en) * 2014-11-10 2020-08-18 Avago Technologies International Sales Pte. Limited Adaptive streaming with early client indication
CN107040505B (en) * 2016-02-04 2021-01-26 中兴通讯股份有限公司 Media data transmission method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103649937A (en) * 2011-05-09 2014-03-19 韦斯技术有限公司 Method and apparatus for dynamically generating media sequences on demand for HTTP live streaming
CN104969560A (en) * 2013-02-04 2015-10-07 高通股份有限公司 Determining available media data for network streaming
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
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
动态自适应流媒体技术的研究与实现;殷俊;《中国优秀硕士学位论文全文数据库》;20170615(第6期);全文 *

Also Published As

Publication number Publication date
CN110545492A (en) 2019-12-06

Similar Documents

Publication Publication Date Title
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
US9596323B2 (en) Transport accelerator implementing client side transmission functionality
RU2598805C2 (en) Method for dynamic adaptation of repetition frequency of bits when receiving and appropriate receiver
US20160330500A1 (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments
KR20150067233A (en) Apparatus and method relating to the streaming of content to one or more user devices
JP2016526355A (en) Node and method for use in a HAS content distribution system
KR20160134802A (en) Method for operating a cache arranged along a transmission path between client terminals and at least one server, and corresponding cache
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
CN110881018B (en) Real-time receiving method and client of media stream
CN111193686B (en) Media stream delivery method and server
CN110545492B (en) Real-time delivery method and server of media stream
US10609111B2 (en) Client-driven, ABR flow rate shaping
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
WO2020048268A1 (en) Real-time transmitting method and real-time receiving method for media stream, server, and client
US20140244798A1 (en) TCP-Based Weighted Fair Video Delivery
WO2015104149A1 (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments
GB2572357A (en) Congestion response for timely media delivery
WO2020216035A1 (en) Real-time pushing 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
TW202123720A (en) Server-side adaptive media streaming

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