CN106686409B - Streaming media code rate self-adaption method and device, server and terminal - Google Patents

Streaming media code rate self-adaption method and device, server and terminal Download PDF

Info

Publication number
CN106686409B
CN106686409B CN201510760712.8A CN201510760712A CN106686409B CN 106686409 B CN106686409 B CN 106686409B CN 201510760712 A CN201510760712 A CN 201510760712A CN 106686409 B CN106686409 B CN 106686409B
Authority
CN
China
Prior art keywords
rate
coding
access bandwidth
server
streaming media
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510760712.8A
Other languages
Chinese (zh)
Other versions
CN106686409A (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.)
China Mobile Communications Group Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201510760712.8A priority Critical patent/CN106686409B/en
Publication of CN106686409A publication Critical patent/CN106686409A/en
Application granted granted Critical
Publication of CN106686409B publication Critical patent/CN106686409B/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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/2365Multiplexing of several video streams
    • H04N21/23655Statistical multiplexing, e.g. by controlling the encoder to alter its bitrate to optimize the bandwidth utilization
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • 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/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • 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

Abstract

The invention discloses a streaming media code rate self-adaption method and device, a server and a terminal, wherein the method comprises the following steps: acquiring an access bandwidth of a terminal; determining a coding rate according to the access bandwidth; carrying out multi-code rate coding on the streaming media at least according to the coding code rate; and slicing the streaming media subjected to multi-rate coding, and sending the sliced streaming media to a terminal through HTTP.

Description

Streaming media code rate self-adaption method and device, server and terminal
Technical Field
The present invention relates to electronic technologies, and in particular, to a streaming media code rate adaptive method and apparatus, a server, and a terminal.
Background
First, an adaptive streaming (ABS) is introduced, which is a streaming media transmission technique for computer networks. The past streaming media transmission technologies are mostly based on Real-time Transport Protocol (RTP) or Real-time streaming Protocol (RTSP), while the present transmission technologies are mostly based on HyperText Transport Protocol (HTTP), and in addition, from the aspect of Protocol design, a large-scale distributed HTTP network (e.g., internet) is better supported.
The technique adjusts the encoding quality of a video stream by detecting the user's access bandwidth and the device's Central Processing Unit (CPU) usage in real time. To achieve this effect, an encoder that outputs a single video source as multiple code rates needs to be used. The client of the player can switch between video streams with different code rates according to the change of available resources. The technology can reduce the buffering time and the starting time in the process of playing the streaming media and provide better user experience for users with different access conditions.
In terms of the technical solutions widely adopted nowadays, the HTTP protocol-based transmission scheme is commonly adopted in the adaptive streaming technology, video content is processed with multiple bit rates, and the multiple bit rate video is sliced into small files of several seconds. The client acquires the slice index information of all code rates and starts a request from the video stream with the lowest code rate. As the playback progresses, if the download speed of the client is slower than the currently requested slicing bit rate, the client instead requests the next lower bit rate (if any). Conversely, if the download speed is higher than the currently requested slicing rate, it will try to request a higher rate slicing file.
The slice size is closely related to the specific implementation scheme, and the length is generally between 2 and 10 seconds. Each slice consists of a complete Group of Pictures (GOP) sequence with 1 or more I-frames in the GOP sequence, and the first frame of the GOP sequence must be an I-frame in order to be decoded and displayed separately for each slice.
Referring to QoE, Quality of Experience (QoE) is a quantification of the subjective Experience of a user with respect to a service (e.g., web browsing, voice telephony, tv broadcasting), wherein the factors affecting QoE are shown in table 1.
Table 1 table of major factors affecting QoE
Figure BDA0000842513100000021
Currently, the most widely used quantitative index of user experience in research is a qualitative quantitative index that scores average user satisfaction (MOS). MOS adopts five grades of user subjective evaluation scores, and 1 to 5 grades are used for representing poor, general, good and good user experience quality of different levels of service. The user subjective satisfaction and MOS correspondence are shown in table 2.
TABLE 2 user subjective satisfaction and MOS mapping Table
Figure BDA0000842513100000022
Figure BDA0000842513100000031
The ABS technology which is widely adopted at present comprises the following steps: 1) apple HLS, 2) MPEG-DASH, 3) Adobe HDS and 4) Microsoft MSS; the following description is made by taking an Apple HLS transport protocol as an example, which is proposed by Apple inc and is a streaming media network transport protocol based on HTTP. The working principle of the Apple HLS protocol is to slice the entire media stream into HTTP file-based sizes for downloading. The client can have more changes of available resources and download from a plurality of standby sources with different code rates in the process of playing the media stream. When starting a streaming media session, the client downloads an extended M3U (M3u8) playlist file containing metadata for finding available media streams. Unlike real-time transport protocol (RTP), HLS can pass through any firewall or proxy server that allows HTTP data to pass through. It is therefore easy to use a content distribution network for transporting media streams.
Although the adaptive streaming technology represented by Apple HLS can correspondingly provide differentiated video services according to the channel conditions of users, the importance of the adaptive streaming technology is particularly prominent when the channel conditions of users change significantly, and the quality of experience (QoE) of users on video services can be improved significantly. However, this solution has the disadvantage of lacking a forward feedback mechanism between the user and the encoder. For multicast video services, this drawback is significant, because for multicast video service users, the number of users accessing and the distribution of access bandwidth are time-varying. In the absence of a forward feedback mechanism, the information cannot be fed back to the encoder in a timely manner, which results in poor overall user experience and waste of computing resources. Now consider a more extreme case. For example, when the access bandwidth of all users is within 1Mbps for a long time, and the encoder is still encoding at least 1.5Mbps, the user experience must be very bad!
Disclosure of Invention
In view of this, embodiments of the present invention provide a streaming media bitrate adaptive method and apparatus, a server, and a terminal for solving at least one problem in the prior art, so as to improve the quality of experience of a user on a video service.
The technical scheme of the embodiment of the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a streaming media code rate adaptive method, where the method includes:
acquiring an access bandwidth of a terminal;
determining a coding rate according to the access bandwidth;
carrying out multi-code rate coding on the streaming media at least according to the coding code rate;
and slicing the streaming media subjected to multi-rate coding, and sending the sliced streaming media to a terminal through HTTP.
In a second aspect, an embodiment of the present invention provides a streaming media code rate adaptive method, where the method includes:
acquiring the access bandwidth of the server and sending the access bandwidth to the server;
selecting a slice file with a first code rate according to the access bandwidth;
downloading a slice file with a first code rate through a Uniform Resource Locator (URL) link in m3u 8;
and caching the slice file.
In a third aspect, an embodiment of the present invention provides a streaming media code rate adaptive method, where the method includes:
acquiring an access bandwidth of a terminal;
determining a coding rate according to the access bandwidth;
and sending the coding rate to an encoder in the server.
In a fourth aspect, an embodiment of the present invention provides a server, where the server includes a determiner, an encoder, and a slicer, where the determiner includes a first obtaining unit, a determining unit, and a second sending unit, where:
the first obtaining unit is used for obtaining the access bandwidth of the terminal;
the determining unit is used for determining the coding rate according to the access bandwidth;
the second sending unit is configured to send the coding rate to an encoder;
the encoder is used for receiving the coding rate sent by the sending unit and performing multi-rate coding on the streaming media at least according to the coding rate;
the slicer is used for slicing the streaming media after the multi-code-rate coding and sending the sliced streaming media to the terminal through HTTP.
In a fifth aspect, an embodiment of the present invention provides a terminal, where the terminal includes a second obtaining unit, a selecting unit, a downloading unit, and a caching unit, where:
the second acquisition unit is used for acquiring the access bandwidth of the second acquisition unit and sending the access bandwidth to the server;
the selection unit is used for determining a slice file with a first code rate according to the access bandwidth;
the downloading unit is used for downloading the slice file with the first code rate through a Uniform Resource Locator (URL) link in m3u 8;
the cache unit is used for caching the slice file.
In a sixth aspect, an embodiment of the present invention provides a streaming media bitrate adaptive device, where the device includes a first obtaining unit, a determining unit, and a second sending unit, where:
the first obtaining unit is used for obtaining the access bandwidth of the terminal;
the determining unit is used for determining the coding rate according to the access bandwidth;
and the second sending unit is used for sending the coding rate to an encoder in the server.
The embodiment of the invention provides a streaming media code rate self-adaption method and device, a server and a terminal, wherein the access bandwidth of the terminal is obtained; determining a coding rate according to the access bandwidth; carrying out multi-code rate coding on the streaming media at least according to the coding code rate; slicing the streaming media subjected to multi-code rate coding, and sending the sliced streaming media to a terminal through HTTP; therefore, the experience quality of the user to the video service can be improved.
Drawings
FIG. 1 is a schematic diagram of an HLS protocol in the related art;
FIG. 2-1 is a schematic diagram of an architecture of an HLS protocol according to an embodiment of the present invention;
FIG. 2-2 is a schematic diagram of an implementation flow of a streaming media code rate adaptive method according to an embodiment of the present invention;
fig. 2-3 are schematic diagrams illustrating a flow chart of an implementation of a streaming media code rate adaptive method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a HLS code rate adaptation process in the related art;
fig. 4 is a schematic diagram of a QoE-based HLS code rate adaptation process in a third embodiment of the present invention;
FIG. 5 is a diagram illustrating the contents of m3u8 file in an embodiment of the present invention;
FIG. 6 is a schematic diagram of a structure of a server according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a five-terminal according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further elaborated below with reference to the drawings and the specific embodiments.
Fig. 1 is a schematic diagram of the architecture of an HLS protocol in the related art, as shown in fig. 1, the HLS protocol includes a Server 110 and a client 120, where the Server 110 includes a Media Encoder 111(Media Encoder), a Stream slicer 112(Stream Segmenter) and a source Web Server 113(Origin Web Server), input audio and video enter the Media Encoder 111, the Media Encoder 111 encodes the input audio and video (Media Stream), then the Media Encoder 111 transmits the encoded video and audio (Media Stream) to the Stream slicer 112, the Stream slicer 112 slices the video and audio (Media Stream) based on the size of an HTTP file, then the Stream slicer 112 inputs the sliced video and audio to the source Web Server 113, and finally the source Web Server 113 transmits to the client 120 through HTTP.
Fig. 2-1 is a schematic diagram of an HLS protocol provided in an embodiment of the present invention, as shown in fig. 2-1, where the HLS protocol includes a Server 110 and a client 120, where the Server 110 includes a Media Encoder 111(Media Encoder), a Stream slicer 112(Stream Segmenter), a source Web Server 113(Origin Web Server), and a determiner 114, and the determiner 114 receives access bandwidths reported by different clients 120, performs calculation according to a certain algorithm to obtain an optimal encoding parameter, and sends the encoding parameter to the Encoder 111; the input audio and video enter the media encoder 111, the media encoder 111 performs multi-rate coding on the input audio and video (media stream) according to the coding parameters, then the media encoder 111 sends the coded video and audio (media stream) to the stream slicer 112, the stream slicer 112 slices the video and audio (media stream) based on the size of the HTTP file, then the stream slicer 112 inputs the sliced video and audio to the source Web server, and finally the source Web server sends the video and audio to the client 120 through HTTP.
Comparing fig. 1 and fig. 2-1, from the overall system structure, the technical solution provided by the embodiment of the present invention is compared with the related art HLS solution, and a Decision Device (Decision Device)114 is added. The decision device 114 is configured to receive access bandwidths reported by different users, calculate according to a certain algorithm to obtain an optimal encoding parameter, send the optimal encoding parameter to the encoder 111, and then perform multi-rate encoding on the input video and audio.
Example one
Based on the foregoing fig. 1 and fig. 2-1, an embodiment of the present invention provides a streaming media bitrate adaptive method, and fig. 2-2 is a schematic flow chart illustrating an implementation of the streaming media bitrate adaptive method according to the embodiment of the present invention, as shown in fig. 2-2, the method includes:
step S201, obtaining the access bandwidth of the terminal;
here, the terminal includes a plurality of terminals, and the acquiring an access bandwidth of the terminal includes:
step S2011, the decision device receives access bandwidth parameter values sent by more than two terminals;
step S2012, the judger counts the access bandwidth parameter value to obtain a statistical result;
and step S2013, the decision device takes the statistical result as the access bandwidth of the terminal.
Step S202, determining a coding rate according to the access bandwidth;
here, the determining unit determines the coding rate according to the access bandwidth, and includes: the decision device searches a preset corresponding relation according to the access bandwidth to obtain a coding rate, wherein the coding rate satisfies the following formula:
Figure BDA0000842513100000071
wherein, P () represents a density function,
Figure BDA0000842513100000072
represents the average MOS score of the user, max represents the maximum value, g(s)i) Denotes from siMapping relation between MOS partial estimated values, siAnd the coding rate of the ith path is shown.
Step S203, carrying out multi-code rate coding on the streaming media at least according to the coding code rate;
here, the multi-rate coding of the streaming media according to at least the coding rate includes:
the encoder performs multi-rate encoding on the streaming media according to encoding parameters, wherein the encoding parameters at least comprise an encoding rate and a frame rate.
And step S204, slicing the streaming media subjected to multi-rate coding, and sending the sliced streaming media to the terminal through HTTP.
Here, the slicer slices the multi-rate encoded streaming media, wherein both the encoder and the slicer are part of the server.
In the embodiment of the present invention, the method provided in the embodiment of the present invention may be used in a server, and the above-mentioned determiner may be a part of the server, or may be an independent device. A decision device in a server acquires the access bandwidth of a terminal; correspondingly, the decision device determines the coding rate according to the access bandwidth, and then the decision device sends the coding rate to an encoder in the server; correspondingly, the encoder receives the coding rate and performs multi-rate coding on the streaming media at least according to the coding rate.
In the embodiment of the invention, the access bandwidth of the terminal is acquired; determining a coding rate according to the access bandwidth; carrying out multi-code rate coding on the streaming media at least according to the coding code rate; slicing the streaming media subjected to multi-code rate coding, and sending the sliced streaming media to a terminal through HTTP; therefore, the experience quality of the user to the video service can be improved.
Example two
Based on the foregoing fig. 1 and fig. 2-1, an embodiment of the present invention provides a streaming media bitrate adaptive method, which is applied to a terminal, where functions implemented by the method may be implemented by a processor in the terminal calling a program code, and of course, the program code may be stored in a computer storage medium, and thus, the terminal at least includes the processor and the storage medium.
Fig. 2-3 are schematic diagrams illustrating a flow chart of an implementation of a two-stream media code rate adaptive method according to an embodiment of the present invention, as shown in fig. 2-3, the method includes:
step S231, acquiring the access bandwidth of the server and sending the access bandwidth to the server;
here, the terminal measures its own access bandwidth and then transmits the access bandwidth to the server.
Step S232, selecting a slice file with a first code rate according to the access bandwidth;
here, the selecting a code rate of a slice file according to the access bandwidth includes: and searching a preset corresponding relation according to the access bandwidth to obtain a first code rate, wherein the corresponding relation is used for representing a proportional relation between the access bandwidth and a code rate value in m3u 8.
Step S233, downloading a slice file with a first bitrate through a Uniform Resource Locator (URL) link in m3u 8;
step S234, caching the slice file.
EXAMPLE III
Based on the foregoing fig. 1 and fig. 2-1, the following changes from the perspective of signaling interaction, fig. 3 is a schematic diagram of an adaptive flow of an HLS code rate in the related art, fig. 4 is a schematic diagram of an adaptive flow of an HLS code rate based on QoE in the third embodiment of the present invention, and the following first looks at an adaptive flow of an HLS code rate in the related art, as shown in fig. 3, the flow includes:
step S301, the server performs HLS publishing to enable the user to access the live video;
here, the encoder in the server generates an m3u8 file from the input video and audio, then performs multi-rate coding on the m3u8 file, and then the slicer slices the multi-rate coded file.
Step S302, the client accesses the live video;
here, a client initiates a video request to a server, and then a user accesses the live video through the client.
Step S303, the client downloads the m3u8 file from the server;
here, the server responds to the video request in step S302, and then the server transmits the m3u8 file to the client.
Step S304, the client selects a slice file with proper code rate according to the access bandwidth;
here, the client measures the access bandwidth, compares the access bandwidth with the code rate value in m3u8, and selects a slice file with a proper code rate;
step S305, the client downloads the slice file through a Uniform Resource Locator (URL) link in m3u 8;
here, steps S304 to S305 are repeated.
In actual live broadcast or on-demand service, a plurality of users watch videos concurrently, and the video code rate provided by the server needs to meet user experience, the provided video quality has a better MoS value, and the condition that the plurality of concurrent users can have better video quality experience needs to be considered. Therefore, the embodiment of the invention considers that better video quality is provided for multiple concurrent users, namely the average MoS score of the video quality is the largest.
In the embodiment of the present invention, a determiner is newly added in the related architecture diagram, different clients report bandwidths to the determiner, the determiner establishes a QoE model reflecting Mos values and calculates optimal encoder encoding parameters, and sends the optimal encoder encoding parameters to the encoder for updating, so as to better provide an adaptive code rate, and table 3 is a comparison table of symbols and definitions thereof that need to be used in the flow of fig. 4.
TABLE 3 symbol and definition look-up table
Figure BDA0000842513100000101
Wherein M isi=g(bi,Pi) And g (x) represents a mapping relationship from the coding parameter to the MOS partial estimation value. It should be noted that, in the following description,
Figure BDA0000842513100000102
generally, the average MOS score of all users is a statistical average of the estimated MOS scores of all users.
Fig. 4 is a schematic diagram of a QoE-based HLS code rate adaptive process in a third embodiment of the present invention, where a time duration t (optional t is 10s) of a reporting bandwidth is set, and the specific steps of the process are as follows:
step S401, the server generates an m3u8 file, and performs multi-rate coding and slicing to enable a user to access the live video;
here, the encoder in the server generates an m3u8 file from the input video and audio, then multi-rate encodes the m3u8 file, and then the slicer in the server slices the multi-rate encoded file.
Here, when the encoder in the server performs multi-rate encoding, the encoder performs encoding according to a preset code rate, for example, the preset code rate is 1Mbps, 2Mbps and 3Mbps, and then the server encodes the m3u8 file according to 1Mbps, 2Mbps and 3 Mbps.
Step S402, the client accesses the live video;
here, a client initiates a video request to a server, and then a user accesses the live video through the client.
Step S403, the client downloads the m3u8 file from the server;
here, the server responds to the video request in step S402, and then the server transmits the m3u8 file to the client.
Step S404, the client measures the access bandwidth, compares the access bandwidth with the code rate value in m3u8, and selects a slice file with a proper code rate;
here, step S404 is exemplified by an m3u8 file: when the user bandwidth is more than or equal to 500kbps, selecting a slice file corresponding to mid _ video _ index.m3u8; when the user bandwidth is greater than or equal to 150kbps and less than 500kbps, the slice file corresponding to 3g _ video _ index.m3u8 is selected, and so on. FIG. 5 is a schematic diagram of the contents of m3u8 files in the embodiment of the present invention, and as shown in FIG. 5, the above process is formulated, and s is obtained under the condition of presetting k-path multi-rate codingjA code rate for coding the jth path, and
Figure BDA0000842513100000111
sj≤sj+1
considering the code rate selection method for the ith user, the following cases exist for the ith user: 1) if r isi≥skThen bi=sk(ii) a 2) If s isj≤ri<sj+1J is 1. ltoreq. k-1, then bi=sj(ii) a 3) If r isi<s1Then bi0. According to these three rules and according to riAnd s j1 < j < k establishes the slave riTo biIs marked as bi=f(ri,S),S=[s1,s2...sk]From the above mapping relationship, the larger the bandwidth is, the larger the coding rate corresponding to the user on the channel is.
Step S405, the client downloads the slice file through the URL link in m3u 8;
step S406, the client reports the result of the bandwidth measurement to the decision device at the moment t, so that the decision device can carry out bandwidth statistics;
step S407, the decision device counts the user bandwidth to obtain a statistical result;
here, a small number of users may count discrete values, and a large number of users may count the probability density function p (x) of the access bandwidth.
Step S408, the judger judges the video type and sets a 1-a 5;
here, the parameter values of the MOS evaluation model are set according to the video type, and the MOS evaluation model is determined. B is toiWith the MOS value of the i-th user, i.e. MiEstablishing a one-to-one mapping relation, and recording as Mi=g(f(ri,S),Pi) Then M isiAs follows:
Figure BDA0000842513100000121
here, FR represents a frame rate of video, and PER represents a packet error rate of video. If FR is set to 25fps and PER is set to 0, then the above equation can be written as:
Mi=g(f(ri,S))=a1+25a2+a3ln(f(ri,S)) (2);
wherein, a1~a5The video type is determined by different video types, the video types comprise slow video, translation video and fast video, and the corresponding parameters of the three videos are different, namely Au=[a1,a2,a3,a4,a5]u,u=1、2、3;
Here, in the process of implementation, the slow-speed-type video, the translation-type video, and the fast-speed-type video may be considered similarly as three videos with different speeds, for example, two thresholds may be set, that is, a first speed threshold and a second speed threshold, where the first speed threshold is smaller than the second speed threshold, and when the speed of the video is smaller than the first speed threshold, the video type of the video is classified as the slow-speed video type; when the speed of the video is greater than a first speed threshold and less than a second speed threshold, classifying the video type of the video into a translation video type; when the speed of the video is greater than a second speed threshold value, classifying the video type of the video into a fast video type; it should be noted that the speed described herein does not refer to the speed of video transmission, but refers to the moving speed of the object in the video.
Step S409, the judger solves the optimal coding rate for different types of videos.
Here, the average MOS score of the maximized users is taken as an optimization target as formula (3):
Figure BDA0000842513100000122
corresponding to three types of video typesuSearching the optimal solution S corresponding to each type of videou=[s1,s2,s3...,sk]uIn which S isuNamely the judgment result of the judger, and the judgment result is used as a code rate list to be updated. Wherein S is1=[s1,s2,s3...,sk]1As a list of code rates corresponding to slow-like videos, S2=[s1,s2,s3...,sk]2As a list of code rates corresponding to translation-like video, S3=[s1,s2,s3...,sk]3As a code rate list corresponding to the fast-class video. In this formula, the capital letters S, subscripts 1,2, and 3, respectively, represent 3 motion types of video, lower case [ S ]1,s2,…sk]1Code rate of transcoding representing slow-speed video, such as [0.5M,1M, … 3M]. For each type of motion video, solving s with the maximum M mean valueiAnd the code rate is used as the optimal coding code rate.
For computational convenience, assume that the user bandwidth is at (0, s)1),(si,si+1),(skN in the range of +∞) respectively0,ni,nkIndividual user(0 < i < k, i ═ 1, 2.. k-1). Then the above equation can be rewritten as:
Figure BDA0000842513100000131
in the formula (4), s is expressed0Is 0, sk+1Is + ∞. When the number of users is large, the probability density function of the bandwidth distribution can be counted and substituted into the formula (4) for solving. It is assumed here that the probability density function for the user access bandwidth is p (x), and the cumulative distribution function is p (x). Then n in the formula (4)iCan be correspondingly changed to Nx [ P(s)i+1)-P(si)]Substituting the formula (4) into the formula (5):
Figure BDA0000842513100000132
and then solving according to the method.
Step S410, the decision device reports the decision result to the encoder to update the encoding code rate of the encoder;
here, the coding rate reported by the decider may be the same as or different from the preset coding rate, for example, the preset coding rate is 1Mbps, 2Mbps, and 3Mbps, and then the coding rate reported by the decider may be 1.5Mbps, 2.5Mbps, and 3Mbps, and in the related art, the encoder always encodes the streaming media according to the preset coding rate, but in the embodiment of the present invention, the coding rate of the encoder may change along with the access bandwidth of the client, and therefore, the coding rate reported by the decider may not be the preset coding rate value.
Step S411, an encoder in the server updates the m3u8 file and performs multi-code-rate encoding;
here, the encoder updates the m3u8 file according to the judgment result of the judger for different types of video files, and performs multi-rate coding and slicing according to the result.
Step S412, at t +1, repeats steps S403 to S411.
Example four
Based on the foregoing method, an embodiment of the present invention provides a server, where a determiner, an encoder, and a slicer included in the server, and a first obtaining unit, a determining unit, and a second sending unit included in the determiner may all be implemented by a processor in the server; of course, the implementation can also be realized through a specific logic circuit; in the course of a particular embodiment, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 6 is a schematic diagram of a composition structure of a four-server according to an embodiment of the present invention, and as shown in fig. 6, the server 600 includes a determiner 601, an encoder 602, and a slicer 603, where the determiner 601 includes a first obtaining unit 611, a determining unit 612, and a second sending unit 613, where:
the first obtaining unit 611 is configured to obtain an access bandwidth of a terminal;
the determining unit 612 is configured to determine an encoding rate according to the access bandwidth;
the second sending unit 613 is configured to send the coding rate to an encoder;
the encoder 602 is configured to receive the coding rate sent by the sending unit, and perform multi-rate coding on the streaming media at least according to the coding rate;
the slicer 603 is configured to slice the multi-rate coded streaming media, and send the sliced streaming media to the terminal through HTTP.
In this embodiment of the present invention, the first obtaining unit includes a receiving module, a counting module, and a processing module, where:
the receiving module is used for receiving access bandwidth parameter values sent by two or more terminals;
the statistical module is used for carrying out statistics on the access bandwidth parameter values to obtain statistical results;
and the processing module is used for taking the statistical result as the access bandwidth of the terminal.
In the embodiment of the present invention, the encoder is configured to receive the coding rate sent by the sending unit, and perform multi-rate coding on the streaming media according to coding parameters, where the coding parameters at least include a coding rate and a frame rate.
In the embodiment of the present invention, the determining module is configured to search a preset corresponding relationship according to an access bandwidth to obtain a coding rate, where the coding rate satisfies the following formula:
Figure BDA0000842513100000151
wherein, P () represents a density function,
Figure BDA0000842513100000152
represents the average MOS score of the user, max represents the maximum value, g(s)i) Denotes from siMapping relation between MOS partial estimated values, siAnd the coding rate of the ith path is shown.
The determiner in the embodiment of the present invention may also be implemented as a device independent from the server, for example, a streaming media bitrate adaptive device, where the device includes a first obtaining unit, a determining unit, and a second sending unit, where:
the first obtaining unit is used for obtaining the access bandwidth of the terminal;
the determining unit is used for determining the coding rate according to the access bandwidth;
and the second sending unit is used for sending the coding rate to an encoder in the server.
EXAMPLE five
Based on the foregoing method, an embodiment of the present invention provides a terminal, where a second obtaining unit, a selecting unit, a downloading unit, and a caching unit included in the terminal may all be implemented by a processor in the terminal; of course, the implementation can also be realized through a specific logic circuit; in the course of a particular embodiment, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 7 is a schematic diagram of a composition structure of a five-terminal according to an embodiment of the present invention, as shown in fig. 7, the terminal 700 includes a second obtaining unit 701, a selecting unit 702, a downloading unit 703 and a caching unit 704, where:
the second obtaining unit 701 is configured to obtain an access bandwidth of the second obtaining unit, and send the access bandwidth to a server;
the selecting unit 702 is configured to determine a slice file with a first code rate according to the access bandwidth;
the downloading unit 703 is configured to download the slice file with the first bitrate through a uniform resource locator URL link in m3u 8;
the caching unit 704 is configured to cache the slice file.
In the embodiment of the present invention, the selecting unit is configured to search a preset corresponding relationship according to the access bandwidth to obtain a first code rate; the corresponding relation is used for representing the relationship that the access bandwidth is in direct proportion to the code rate value in m3u 8.
Compared with the prior art, the technical scheme provided by the embodiment of the invention considers that better video quality is provided for multiple concurrent users, namely the average MoS score of the video quality is the largest, and the experience quality of the users to the video service can be obviously improved. 1) When the technical scheme of the self-adaptive code rate is applied to the multicast service, a decision device is added to provide a MoS model reflecting QoE for maximizing the average MoS value of multiple concurrent users, wherein the code rate selection considers the relation with access bandwidth, the model considers the concurrent bandwidth condition of multiple user clients, the optimal coding is solved under the condition of maximizing the average MoS value, and the optimal coding is fed back to an encoder for multi-code rate coding. The user number of different bandwidth intervals is counted during calculation, and a calculation model is simplified. 2) The QoE-based MoS model in the decision device considers code rates and parameter values a under slow, translation and fast video contents1~a5The different values under different types can reflect the objective and actual conditions.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (15)

1. A streaming media code rate adaptive method, characterized in that the method comprises:
acquiring an access bandwidth of a terminal;
searching a preset corresponding relation according to the access bandwidth to obtain a coding rate, wherein the coding rate satisfies the following formula:
Figure FDA0002332895480000011
Figure FDA0002332895480000012
wherein, P () represents a density function,
Figure FDA0002332895480000013
represents the average MOS score of the user, max represents the maximum value, g(s)i) Denotes from siMapping relation between MOS partial estimated values, siRepresenting the coding rate of the ith path;
carrying out multi-code rate coding on the streaming media at least according to the coding code rate;
and slicing the streaming media subjected to multi-rate coding, and sending the sliced streaming media to a terminal through HTTP.
2. The method of claim 1, wherein the obtaining the access bandwidth of the terminal comprises:
receiving access bandwidth parameter values sent by two or more terminals;
counting the access bandwidth parameter values to obtain a statistical result;
and taking the statistical result as the access bandwidth of the terminal.
3. The method of claim 1, wherein the multi-rate coding the streaming media at least according to the coding rate comprises:
and carrying out multi-rate coding on the streaming media according to coding parameters, wherein the coding parameters at least comprise a coding rate and a frame rate.
4. The method of any of claims 1 to 3, wherein the coding rate further satisfies the following equation:
Figure FDA0002332895480000014
wherein M isiIs a MOS partial estimate of user i, riIs the access bandwidth of the ith user, a1、a2、a3、a4And a5For the set coefficient related to the video type, FR represents the frame rate of the video, PER represents the packet error rate of the video, and S ═ S1,s2...sk]Wherein s isjA code rate for coding the jth path, and
Figure FDA0002332895480000021
sj≤sj+1
5. the method according to any one of claims 1 to 3, wherein the obtaining the access bandwidth of the terminal comprises:
a decision device in a server acquires the access bandwidth of a terminal; correspondingly, the decision device determines the coding rate according to the access bandwidth, and then the decision device sends the coding rate to an encoder in the server;
correspondingly, the encoder receives the coding rate and performs multi-rate coding on the streaming media at least according to the coding rate.
6. The method of claim 1, further comprising:
and sending the coding rate to an encoder in the server.
7. A streaming media code rate adaptive method, characterized in that the method comprises:
acquiring an access bandwidth of the server, and sending the access bandwidth to the server, so that the server searches a preset corresponding relation according to the access bandwidth to obtain a coding rate, wherein the coding rate satisfies the following formula:
Figure FDA0002332895480000022
Figure FDA0002332895480000023
wherein, P () represents a density function,
Figure FDA0002332895480000024
represents the average MOS score of the user, max represents the maximum value, g(s)i) Denotes from siMapping relation between MOS partial estimated values, siRepresenting the coding rate of the ith path;
selecting a slice file with a first code rate according to the access bandwidth, wherein the first code rate is any one of the coding code rates;
downloading a slice file with a first code rate through a Uniform Resource Locator (URL) link in m3u 8;
and caching the slice file.
8. The method of claim 7, wherein selecting the code rate for the slice file according to the access bandwidth comprises:
searching a preset corresponding relation according to the access bandwidth to obtain a first code rate; the corresponding relation is used for representing the relationship that the access bandwidth is in direct proportion to the code rate value in m3u 8.
9. A server, characterized in that the server comprises a decider, an encoder and a slicer, wherein the decider comprises a first obtaining unit, a determining unit and a second sending unit, wherein:
the first obtaining unit is used for obtaining the access bandwidth of the terminal;
the determining unit is configured to search a preset corresponding relationship according to the access bandwidth to obtain a coding rate, where the coding rate satisfies the following equation:
Figure FDA0002332895480000031
Figure FDA0002332895480000032
wherein, P () represents a density function,
Figure FDA0002332895480000033
represents the average MOS score of the user, max represents the maximum value, g(s)i) Denotes from siMapping relation between MOS partial estimated values, siRepresenting the coding rate of the ith path;
the second sending unit is configured to send the coding rate to an encoder;
the encoder is used for receiving the coding rate sent by the sending unit and performing multi-rate coding on the streaming media at least according to the coding rate;
the slicer is used for slicing the streaming media after the multi-code-rate coding and sending the sliced streaming media to the terminal through HTTP.
10. The server according to claim 9, wherein the first obtaining unit comprises a receiving module, a counting module and a processing module, wherein:
the receiving module is used for receiving access bandwidth parameter values sent by two or more terminals;
the statistical module is used for carrying out statistics on the access bandwidth parameter values to obtain statistical results;
and the processing module is used for taking the statistical result as the access bandwidth of the terminal.
11. The server according to claim 9, wherein the encoder is configured to receive the coding rate sent by the sending unit, and perform multi-rate coding on the streaming media according to coding parameters, where the coding parameters at least include a coding rate and a frame rate.
12. The server according to any one of claims 9 to 11, wherein the coding rate further satisfies the following equation:
Figure FDA0002332895480000041
wherein M isiIs a MOS partial estimate of user i, riIs the access bandwidth of the ith user, a1、a2、a3、a4And a5For the set coefficient related to the video type, FR represents the frame rate of the video, PER represents the packet error rate of the video, and S ═ S1,s2...sk]Wherein s isjA code rate for coding the jth path, and
Figure FDA0002332895480000042
sj≤sj+1
13. the server according to claim 9, wherein the second sending unit is further configured to send the coding rate to an encoder in the server.
14. A terminal is characterized by comprising a second acquisition unit, a selection unit, a downloading unit and a cache unit, wherein: the second obtaining unit is configured to obtain an access bandwidth of the second obtaining unit, and send the access bandwidth to a server, so that the server searches a preset corresponding relationship according to the access bandwidth to obtain a coding rate, where the coding rate satisfies the following formula:
Figure FDA0002332895480000043
Figure FDA0002332895480000044
wherein, P () represents a density function,
Figure FDA0002332895480000045
represents the average MOS score of the user, max represents the maximum value, g(s)i) Denotes from siMapping relation between MOS partial estimated values, siRepresenting the coding rate of the ith path;
the selecting unit is configured to determine, according to the access bandwidth, a slice file with a first code rate, where the first code rate is any one of the coding code rates;
the downloading unit is used for downloading the slice file with the first code rate through a Uniform Resource Locator (URL) link in m3u 8;
the cache unit is used for caching the slice file.
15. The terminal according to claim 14, wherein the selecting unit is configured to search a preset correspondence according to the access bandwidth to obtain a first code rate; the corresponding relation is used for representing the relationship that the access bandwidth is in direct proportion to the code rate value in m3u 8.
CN201510760712.8A 2015-11-09 2015-11-09 Streaming media code rate self-adaption method and device, server and terminal Active CN106686409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510760712.8A CN106686409B (en) 2015-11-09 2015-11-09 Streaming media code rate self-adaption method and device, server and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510760712.8A CN106686409B (en) 2015-11-09 2015-11-09 Streaming media code rate self-adaption method and device, server and terminal

Publications (2)

Publication Number Publication Date
CN106686409A CN106686409A (en) 2017-05-17
CN106686409B true CN106686409B (en) 2020-06-09

Family

ID=58863787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510760712.8A Active CN106686409B (en) 2015-11-09 2015-11-09 Streaming media code rate self-adaption method and device, server and terminal

Country Status (1)

Country Link
CN (1) CN106686409B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109788324A (en) * 2017-11-14 2019-05-21 华为技术有限公司 Video broadcasting method and equipment
CN109040801B (en) * 2018-07-19 2019-07-09 北京达佳互联信息技术有限公司 Media code rate by utilizing adaptive approach, device, computer equipment and storage medium
CN109040855B (en) * 2018-09-03 2021-01-29 重庆邮电大学 Wireless DASH streaming media code rate smooth self-adaptive transmission method
CN109302623B (en) * 2018-11-01 2020-06-09 南京大学 QoE model-based dynamic adaptive video transmission method
CN109788372B (en) * 2019-01-24 2021-06-08 维沃移动通信有限公司 Streaming media playing method and related device
CN111617466B (en) * 2020-05-12 2023-04-28 咪咕文化科技有限公司 Method and device for determining coding format and method for realizing cloud game
WO2022151381A1 (en) * 2021-01-15 2022-07-21 华为技术有限公司 Communication method and apparatus
CN115379221B (en) * 2022-10-25 2022-12-20 中诚华隆计算机技术有限公司 Streaming media data transmission method and system
CN117278538B (en) * 2023-11-22 2024-04-16 荣耀终端有限公司 Method for adjusting parameters of encoder and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333089A (en) * 2011-09-26 2012-01-25 南京邮电大学 Adaptive control method of multi-rate media stream based on hypertext transfer protocol (HTTP) streaming

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040022267A1 (en) * 2002-07-31 2004-02-05 Koninklijke Philips Electronics N.V. Adaptive bandwidth efficient intelligent multimedia networks toward future generation wireless gigabit LANS
CN101222296B (en) * 2008-01-31 2010-06-09 上海交通大学 Self-adapting transmission method and system in ascending honeycomb video communication
CN101252689B (en) * 2008-02-29 2010-08-25 杭州爱威芯科技有限公司 Self-adapting code rate control method
US9160503B2 (en) * 2011-03-04 2015-10-13 Qualcomm Incorporated Method and apparatus supporting improved wide bandwidth transmissions
CN102325274B (en) * 2011-10-13 2013-08-21 浙江万里学院 Network bandwidth-adaptive video stream transmission control method
CN103428105B (en) * 2012-05-14 2017-03-08 中国科学院声学研究所 A kind of adaptive H TTP fluidisation bitstreams switching method and system based on bandwidth estimation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333089A (en) * 2011-09-26 2012-01-25 南京邮电大学 Adaptive control method of multi-rate media stream based on hypertext transfer protocol (HTTP) streaming

Also Published As

Publication number Publication date
CN106686409A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
CN106686409B (en) Streaming media code rate self-adaption method and device, server and terminal
US10298985B2 (en) Systems and methods for performing quality based streaming
TWI526062B (en) Quality-aware rate adaptation techniques for dash streaming
Sieber et al. Implementation and user-centric comparison of a novel adaptation logic for DASH with SVC
US9294531B2 (en) Signaling and processing content with variable bitrates for adaptive streaming
US20150200992A1 (en) Method for downloading, at a client terminal, an upcoming sequence of segments of a multimedia content, and corresponding terminal
KR101982290B1 (en) Streaming system and method based on contents characteristic for improving perceived quality of adaptive streaming service
US11758203B2 (en) Adaptive bitrate video cache
Qiu et al. Optimizing HTTP-based Adaptive Video Streaming for wireless access networks
US20160330500A1 (en) Method for obtaining network information by a client terminal configured for receiving a multimedia content divided into segments
Shen et al. An information-aware QoE-centric mobile video cache
KR102652518B1 (en) Session based adaptive playback profile decision for video streaming
CN108124192B (en) HLS streaming media playing method and system
Sadat et al. QoE-aware multi-source video streaming in content centric networks
Rahman et al. A client side buffer management algorithm to improve QoE
van der Hooft et al. An HTTP/2 push-based approach for SVC adaptive streaming
CN106453270B (en) Adaptive Transmission algorithm based on PI control Streaming Media
Rahman et al. SABA: Segment and buffer aware rate adaptation algorithm for streaming over HTTP
Baik et al. VSync: Cloud based video streaming service for mobile devices
KR102304476B1 (en) Multipath-based block transmission system and streaming method for adaptive streaming service
CN112672227B (en) Service processing method, device, node and storage medium based on edge node
Kesavan et al. Rate adaptation performance and quality analysis of adaptive HTTP streaming methods
Ogasawara et al. Buffer based adaptation using scalable video coding for 360-degree video streaming over NDN
Shen et al. QoE-optimal rate adaptation for HTTP adaptive streaming
Zhang et al. Exploiting the layer correlation to improve DASH scheduling with scalable video coding

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