CN110933516B - Multimedia live broadcasting method, device and equipment - Google Patents

Multimedia live broadcasting method, device and equipment Download PDF

Info

Publication number
CN110933516B
CN110933516B CN201811096360.0A CN201811096360A CN110933516B CN 110933516 B CN110933516 B CN 110933516B CN 201811096360 A CN201811096360 A CN 201811096360A CN 110933516 B CN110933516 B CN 110933516B
Authority
CN
China
Prior art keywords
multimedia
fragment
code rate
playing
downloaded
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
CN201811096360.0A
Other languages
Chinese (zh)
Other versions
CN110933516A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201811096360.0A priority Critical patent/CN110933516B/en
Publication of CN110933516A publication Critical patent/CN110933516A/en
Application granted granted Critical
Publication of CN110933516B publication Critical patent/CN110933516B/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/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/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
    • H04N21/23805Controlling the feeding rate to the network, e.g. by controlling the video pump
    • 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/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/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)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请提供一种多媒体直播方法、装置及设备,该方法包括:确定第一直播多媒体中已下载至终端设备、且未播放的多媒体的播放时长;当播放时长小于第一预设时长时,降低第一直播多媒体的播放速率,和/或,下载第一码率对应的多媒体分片,第一码率小于正在下载的多媒体分片的码率;当播放时长大于第二预设时长时,增大第一直播多媒体的播放速率,和/或,下载第二码率对应的多媒体分片,第二码率大于正在下载的多媒体分片的码率,第二预设时长大于或等于第一预设时长。在避免直播多媒体出现卡顿的基础上,降低终端设备的多媒体播放点与直播点之间的时延。

Figure 201811096360

The present application provides a multimedia live broadcast method, device and device. The method includes: determining the playback duration of the multimedia that has been downloaded to the terminal device and has not been played in the first live broadcast multimedia; when the playback duration is less than the first preset duration, reducing the playback duration The playback rate of the first live multimedia, and/or, downloading the multimedia fragment corresponding to the first code rate, and the first code rate is less than the code rate of the multimedia fragment being downloaded; when the playback duration is greater than the second preset duration, increase Increase the playback rate of the first live multimedia, and/or download the multimedia fragment corresponding to the second code rate, the second code rate is greater than the code rate of the multimedia fragment being downloaded, and the second preset duration is greater than or equal to the first preset time. Set the duration. On the basis of avoiding the stuttering of live multimedia, the delay between the multimedia playback point of the terminal device and the live broadcast point is reduced.

Figure 201811096360

Description

Multimedia live broadcasting method, device and equipment
Technical Field
The application relates to the technical field of live broadcast, in particular to a multimedia live broadcast method, device and equipment.
Background
Currently, in multimedia (e.g., video, audio, etc.) live broadcasting, a HyperText Transfer Protocol (HTTP) adaptive transport stream technology may be used for live broadcasting.
In an HTTP Live Streaming (HLS) Live broadcast system, a multimedia recording device, an encoder, a server and a terminal device are generally included. The multimedia recording device is used for recording multimedia and obtaining a multimedia file, the encoder encodes the multimedia file to obtain a multimedia fragment and sends the multimedia fragment to the server, and the server sends the multimedia fragment to the terminal device, so that the terminal device plays the multimedia according to the received multimedia fragment. In the prior art, in order to reduce the jamming caused by factors such as network instability in the multimedia live broadcasting process, when a terminal device starts to broadcast directly, the terminal device usually determines a last-but-last multimedia fragment before a live point (a play point corresponding to a latest multimedia fragment in a server) as a start-of-broadcasting multimedia fragment according to an HLS protocol, and starts to broadcast multimedia from the start-of-broadcasting multimedia fragment, that is, when the terminal device starts to broadcast directly, a time delay is provided between the multimedia play point and the live point of the terminal device, and the time delay is the play duration of the three multimedia fragments.
However, when the terminal device starts live broadcasting, a certain time delay is already provided between the multimedia playing point and the live broadcasting point of the terminal device, and in the multimedia playing process, when the network is unstable and the multimedia playing card is paused, the time delay is accumulated, so that the live broadcasting time delay is too large.
Disclosure of Invention
The application provides a multimedia live broadcast method, device and equipment, which can reduce the time delay between a multimedia playing point and a live broadcast point of terminal equipment on the basis of avoiding the occurrence of pause of live broadcast multimedia.
In a process of live broadcasting a first live multimedia by a terminal device, the terminal device may determine a play time length of a multimedia which is downloaded to the terminal device and is not played in the first live multimedia. When the playing time is shorter than a first preset time, reducing the playing rate of the first direct playing multimedia and/or downloading the multimedia fragments corresponding to the first code rate, wherein the first code rate is smaller than the code rate of the multimedia fragments being downloaded; and when the playing time length is longer than a second preset time length, increasing the playing speed of the first direct playing multimedia and/or downloading the multimedia fragments corresponding to a second code rate, wherein the second code rate is larger than the code rate of the multimedia fragments being downloaded, and the second preset time length is longer than or equal to the first preset time length.
In the above process, when the playing duration is shorter than the first preset duration, which indicates that the multimedia content currently cached by the terminal device is less, the playing rate of the first live multimedia is reduced, and/or the multimedia fragments corresponding to the first code rate pair (the first code rate is smaller than the code rate of the multimedia fragments being downloaded) are downloaded, so that the blocking of live broadcasting can be avoided. When the playing time is longer than the second preset time, it indicates that the multimedia content currently cached by the terminal device is more, the playing rate of the first live multimedia is increased, and/or the multimedia fragment corresponding to the second code rate (the second code rate is larger than the code rate of the multimedia fragment being downloaded) is downloaded, so that the time delay between the multimedia playing point and the live broadcasting point of the terminal device can be reduced. Therefore, by adjusting the playing rate of the live broadcast multimedia and/or the code rate of the downloaded multimedia fragments, the time delay between the multimedia playing point and the live broadcast point of the terminal device can be reduced on the basis of avoiding the blockage of the live broadcast multimedia.
In a possible embodiment, reducing the playing rate of the first live multimedia and/or downloading the multimedia slice corresponding to the first bitrate includes: if the code rate of the multimedia fragment being downloaded is greater than the third code rate, determining the first code rate, and downloading the multimedia fragment corresponding to the first code rate, wherein the first code rate is less than the third code rate; if the code rate of the multimedia fragment being downloaded is less than the fourth code rate, the playing rate of the first direct playing multimedia is reduced, and the third code rate is greater than or equal to the fourth code rate.
In the above process, when the playing duration is shorter than the first preset duration, the code rate of the multimedia fragment is preferentially adjusted, and after the code rate of the multimedia fragment being downloaded meets the preset condition (is shorter than the fourth code rate), the playing rate of the first live multimedia is adjusted.
In another possible embodiment, increasing the playing rate of the first direct playing multimedia and/or downloading the multimedia slice corresponding to the second code rate includes: if the code rate of the multimedia fragment being downloaded is smaller than the fifth code rate, determining a second code rate, and downloading the multimedia fragment corresponding to the second code rate, wherein the second code rate is larger than the fifth code rate; and if the code rate of the currently downloaded multimedia fragment is greater than the sixth code rate, increasing the playing rate of the first direct playing multimedia, wherein the sixth code rate is greater than or equal to the fifth code rate.
In the process, when the playing duration is longer than the second preset duration, the code rate of the multimedia fragment is preferentially adjusted, and after the code rate of the multimedia fragment being downloaded meets the preset condition (is larger than the sixth code rate), the playing speed of the first live multimedia is adjusted.
In another possible embodiment, after decreasing the playing rate of the first live multimedia, or increasing the playing rate of the first live multimedia, the method further includes: and when the playing time length of the multimedia fragments which are downloaded to the terminal equipment and are not played in the first direct-playing multimedia is determined to be between the first preset time length and the second preset time length, setting the playing speed of the first direct-playing multimedia as the preset playing speed. In this way, adverse effects on the user's viewing can be reduced.
In another possible implementation manner, before determining the playing time length of the multimedia fragment that has been downloaded to the terminal device and is not played in the first direct-playing multimedia, the method further includes: determining a starting playing multimedia fragment of a first live multimedia; and downloading the playing multimedia fragment from the server according to the playing multimedia fragment.
Optionally, the time delay between the obtained start-playing multimedia fragment and the live broadcast point is determined to be less than or equal to the playing time duration corresponding to the three multimedia fragments, so that when the time delay between the obtained start-playing multimedia fragment and the live broadcast point is determined to be less than the playing time duration corresponding to the three multimedia fragments, the time delay between the multimedia playing point of the terminal device and the live broadcast point when the terminal device starts live broadcast can also be reduced.
In another possible embodiment, determining an initiating multimedia slice of a first ongoing multimedia comprises: if a user-defined start-playing multimedia fragment identifier configured in advance by a user exists in the terminal equipment, determining a start-playing multimedia fragment according to the user-defined start-playing multimedia fragment identifier; if the user-defined starting multimedia fragment identification does not exist in the terminal equipment, the starting multimedia fragment is determined according to the parameter information of the terminal equipment, wherein the parameter information comprises the historical bandwidth and the initial code rate of the terminal equipment.
In the process, if the user configures the self-defined start-playing multimedia fragment identifier in the terminal device, the start-playing multimedia fragment is determined according to the self-defined start-playing multimedia fragment identifier configured by the user, and if the user does not configure the self-defined start-playing multimedia fragment identifier in the terminal device, the start-playing multimedia fragment is determined according to the parameter information of the terminal device. The determined start-playing multimedia fragment is related to the playing requirement of the user or the actual situation of the terminal equipment, so that the flexibility of determining the start-playing multimedia fragment is improved, and the flexibility of live broadcast control is further improved.
In another possible embodiment, determining the start-playing multimedia fragment according to the customized start-playing multimedia fragment identifier includes: if the user-defined start-playing multimedia fragment identifier indicates the generated multimedia fragment, determining the start-playing multimedia fragment as the multimedia fragment indicated by the user-defined start-playing multimedia fragment identifier; if the user-defined starting multimedia fragment identifier indicates the multimedia fragment being generated, whether the multimedia fragment being generated can be downloaded is judged, if yes, the starting multimedia fragment is determined to be the multimedia fragment being generated, and if not, the starting multimedia fragment is determined to be the latest generated multimedia fragment.
In another possible implementation, determining the start-playing multimedia segment according to the parameter information includes: determining a ratio range in which the ratio of the historical bandwidth to the initial code rate is; acquiring the identifier of the multimedia fragment corresponding to the ratio range; and determining the starting playing of the multimedia fragment according to the identifier of the multimedia fragment corresponding to the ratio range.
Optionally, if the identifier of the multimedia fragment corresponding to the ratio range indicates a generated multimedia fragment, determining that the multimedia fragment played is the multimedia fragment indicated by the identifier of the multimedia fragment corresponding to the ratio range; if the identifier of the multimedia fragment corresponding to the ratio range indicates the multimedia fragment being generated, judging whether the multimedia fragment being generated can be downloaded, if so, determining that the multimedia fragment being played is the multimedia fragment being generated, and if not, determining that the multimedia fragment being played is the latest generated multimedia fragment.
When the start-playing multimedia fragment is determined according to the parameter information of the terminal equipment, the obtained start-playing multimedia fragment is determined to be related to the network condition of the terminal equipment, so that the time delay between the multimedia playing point and the live playing point of the terminal equipment when the terminal equipment starts to directly play the multimedia can be reduced as much as possible on the premise of avoiding the multimedia jamming in the live playing process.
In another possible implementation, whether the multimedia fragment being generated is downloadable may be determined by the following possible implementation manners: acquiring a difference value between the current moment and the initial generation moment of the multimedia fragment being generated; judging whether the difference value is respectively greater than a third time length and a first time difference, wherein the third time length is the minimum time length required by preparing the multimedia fragment being generated, and the first time difference is the time difference between the playing time length of the multimedia fragment being generated and the preset downloading time length in advance; if yes, determining that the generated multimedia fragment can be downloaded; if not, determining that the generated multimedia fragment is not downloadable.
In another possible implementation manner, if the start-playing multimedia segment is the latest generated multimedia segment, after downloading the start-playing multimedia segment from the server according to the start-playing multimedia segment, the method further includes: judging whether the start-playing multimedia fragment comprises a key frame; if yes, starting playing the multimedia fragment from the key frame; if not, starting playing the multimedia fragment from the preset middle position of the starting playing multimedia fragment.
The time delay between the multimedia playing point and the live broadcasting point of the terminal equipment can be reduced by starting playing the multimedia fragment from the key frame or the preset middle position of the multimedia fragment.
In a second aspect, the present application provides a multimedia live broadcasting device, including a first determining module and a processing module, wherein,
the first determining module is used for determining the playing time length of multimedia which is downloaded to the terminal equipment and is not played in the first direct-playing multimedia;
the processing module is used for reducing the playing rate of the first direct playing multimedia and/or downloading the multimedia fragments corresponding to a first code rate when the playing time is shorter than a first preset time, wherein the first code rate is smaller than the code rate of the multimedia fragments being downloaded;
the processing module is further configured to increase a playing rate of the first direct-playing multimedia and/or download a multimedia fragment corresponding to a second bitrate when the playing duration is longer than a second preset duration, where the second bitrate is greater than a bitrate of the multimedia fragment being downloaded, and the second preset duration is longer than or equal to the first preset duration.
In a possible implementation, the processing module is specifically configured to:
If the code rate of the multimedia fragment being downloaded is greater than a third code rate, determining the first code rate, and downloading the multimedia fragment corresponding to the first code rate, wherein the first code rate is less than the third code rate;
and if the code rate of the multimedia fragment being downloaded is less than a fourth code rate, reducing the playing rate of the first direct-playing multimedia, wherein the third code rate is greater than or equal to the fourth code rate.
In another possible implementation manner, the processing module is specifically configured to:
if the code rate of the multimedia fragment being downloaded is smaller than a fifth code rate, determining the second code rate, and downloading the multimedia fragment corresponding to the second code rate, wherein the second code rate is larger than the fifth code rate;
and if the code rate of the currently downloaded multimedia fragment is greater than a sixth code rate, increasing the playing rate of the first direct playing multimedia, wherein the sixth code rate is greater than or equal to the fifth code rate.
In another possible implementation, the processing module is further configured to:
after the processing module reduces the playing rate of the first direct-playing multimedia or increases the playing rate of the first direct-playing multimedia, when it is determined that the playing time of the multimedia fragments which are downloaded to the terminal equipment and are not played in the first direct-playing multimedia is between the first preset time and the second preset time, the playing rate of the first direct-playing multimedia is set to be a preset playing rate.
In another possible embodiment, the apparatus further comprises a second determining module and a downloading module, wherein,
the second determining module is configured to determine a start-playing multimedia fragment of the first live multimedia before the first determining module determines a playing time length of a multimedia fragment which is downloaded to the terminal device and is not played in the first live multimedia;
and the downloading module is used for downloading the play-starting multimedia fragment from the server according to the play-starting multimedia fragment.
In another possible implementation manner, the second determining module is specifically configured to:
if a user-defined start-playing multimedia fragment identifier configured by a user in advance exists in the terminal equipment, determining a start-playing multimedia fragment according to the user-defined start-playing multimedia fragment identifier;
if the user-defined start-playing multimedia fragment identification does not exist in the terminal equipment, determining the start-playing multimedia fragment according to parameter information of the terminal equipment, wherein the parameter information comprises historical bandwidth and initial code rate of the terminal equipment.
In another possible implementation manner, the second determining module is specifically configured to:
if the user-defined start-playing multimedia fragment identifier indicates a generated multimedia fragment, determining the start-playing multimedia fragment as the multimedia fragment indicated by the user-defined start-playing multimedia fragment identifier;
If the user-defined starting multimedia fragment identification indicates the multimedia fragment being generated, judging whether the multimedia fragment being generated can be downloaded, if so, determining that the starting multimedia fragment is the multimedia fragment being generated, and if not, determining that the starting multimedia fragment is the latest generated multimedia fragment.
In another possible implementation manner, the second determining module is specifically configured to:
determining a ratio range in which the ratio of the historical bandwidth to the initial code rate is located;
acquiring the identifier of the multimedia fragment corresponding to the ratio range;
and determining the starting playing multimedia fragment according to the identifier of the multimedia fragment corresponding to the ratio range.
In another possible implementation manner, the second determining module is specifically configured to:
if the identifier of the multimedia fragment corresponding to the ratio range indicates the generated multimedia fragment, determining that the playing start multimedia fragment is the multimedia fragment indicated by the identifier of the multimedia fragment corresponding to the ratio range;
if the identifier of the multimedia fragment corresponding to the ratio range indicates the multimedia fragment being generated, judging whether the multimedia fragment being generated can be downloaded, if so, determining that the playing multimedia fragment is the multimedia fragment being generated, and if not, determining that the playing multimedia fragment is the latest generated multimedia fragment.
In another possible implementation manner, the second determining module is specifically configured to:
acquiring a difference value between the current moment and the initial generation moment of the multimedia fragment being generated;
judging whether the difference value is respectively greater than a third time length and a first time difference, wherein the third time length is the minimum time length required for preparing the multimedia fragment being generated, and the first time difference is the time difference between the playing time length of the multimedia fragment being generated and the preset time length of downloading in advance;
if yes, determining that the multimedia fragment being generated can be downloaded;
if not, determining that the generated multimedia fragment cannot be downloaded.
In another possible embodiment, the apparatus further comprises a determining module and a playing module, wherein,
the judging module is used for judging whether the start-playing multimedia fragment comprises a key frame or not after the downloading module downloads the start-playing multimedia fragment from the server;
the playing module is used for starting to play the play multimedia fragment from the key frame when the judging module judges that the play multimedia fragment comprises the key frame;
the playing module is further configured to start playing the start multimedia segment from a preset middle position of the start multimedia segment when the judging module judges that the start multimedia segment does not include the key frame.
In a third aspect, the present application provides a multimedia live broadcasting device, which includes a memory and a processor, where the processor executes program instructions in the memory to implement the multimedia live broadcasting method described in any one of the above first aspects.
In a third aspect, the present application provides a storage medium for storing a computer program, where the computer program is used to implement the multimedia live broadcast method of any one of the above first aspects.
According to the multimedia live broadcasting method, device and equipment, in the process that the terminal equipment broadcasts the first live broadcasting multimedia live, when the playing time is shorter than the first preset time, the fact that the multimedia content cached at the current terminal equipment is less is indicated, the playing speed of the first live broadcasting multimedia is reduced, and/or the multimedia fragments corresponding to the first code rate (the first code rate is smaller than the code rate of the multimedia fragments being downloaded) are downloaded, and therefore the situation that the live broadcasting is blocked can be avoided. When the playing time is longer than the second preset time, it indicates that the multimedia content currently cached by the terminal device is more, the playing rate of the first live multimedia is increased, and/or the multimedia fragment corresponding to the second code rate (the second code rate is larger than the code rate of the multimedia fragment being downloaded) is downloaded, so that the time delay between the multimedia playing point and the live broadcasting point of the terminal device can be reduced. Therefore, by adjusting the playing rate of the live broadcast multimedia and/or the code rate of the downloaded multimedia fragment, the time delay between the multimedia playing point and the live broadcast point of the terminal equipment can be reduced on the basis of avoiding the blockage of the live broadcast multimedia.
Drawings
Fig. 1 is an architecture diagram of an HLS live broadcast system provided in the present application;
fig. 2 is a schematic flowchart of a multimedia live broadcasting method provided in the present application;
fig. 3 is a schematic flowchart of a method for determining an initiating multimedia fragment according to the present application;
fig. 4 is a schematic flowchart of another multimedia live broadcasting method provided in the present application;
fig. 5 is a schematic diagram of a multimedia slice stored in a server provided in the present application;
fig. 6 is a schematic structural diagram of a multimedia live broadcasting device provided in the present application;
fig. 7 is a schematic structural diagram of another multimedia live broadcasting device provided in the present application;
fig. 8 is a schematic hardware structure diagram of a multimedia live broadcasting device provided in the present application.
Detailed Description
Fig. 1 is an architecture diagram of an HLS live broadcast system provided in the present application. Referring to fig. 1, the multimedia recording apparatus 101, the encoder 102, the server 103, and the terminal apparatus 104 are included.
Alternatively, the multimedia recording apparatus 101 may be a video camera, a video recorder, a voice recorder, or the like. The multimedia recording device 101 is configured to record live multimedia, and send a recorded live multimedia file to the encoder 102. Optionally, when the multimedia recording device is used for recording a video, the recorded live video file may be in a Moving Picture Experts Group (MPEG) 4 format, and the like. When the multimedia recording device is used for recording audio, the recorded live audio file may be in MPEG3 format.
Optionally, the encoder 102 is used to encode a live multimedia file. Optionally, the encoder 102 may encode the multimedia file according to a plurality of different code rates to obtain a plurality of multimedia fragments with different code rates, where a multimedia fragment is a multimedia file with a preset playing time duration, and the multimedia fragment may be in a Transport Stream (TS) format, for example. For example, assuming that the code rates include 8000kbps and 3000kbps, multimedia slices corresponding to 8000kbps and multimedia slices corresponding to 3000kbps can be obtained. The encoder 102 sends the multimedia slices with various code rates to the server 103.
The server 103 is used for storing the multimedia slices transmitted by the encoder 102. The server 103 further includes an index file, where the index file includes multimedia fragment information of N multimedia fragments that are received by the server most recently, and N is an integer greater than or equal to 1. Optionally, the multimedia fragment information may include a playing time length of the multimedia fragment, a storage address of the multimedia fragment in the server 103, and the like. The server may periodically update the index file according to the received multimedia fragments.
Optionally, the terminal device 104 has a multimedia playing function, for example, the terminal device 104 may be a mobile phone, a computer, or the like. When the terminal device 104 needs to perform live broadcasting, the terminal device 104 accesses the server 103, downloads the multimedia fragment according to the index file in the server 103, and performs live broadcasting according to the downloaded multimedia fragment.
It should be noted that the HLS live broadcast system is illustrated in an exemplary form, and is not limited to the HLS live broadcast system, and in an actual application process, the HLS live broadcast system may be set according to actual needs. For example, the multimedia recording apparatus 101 may also be other apparatuses that can generate live multimedia, and the encoder 102 may also be an apparatus provided in the multimedia recording apparatus 101, and the like. The HLS live broadcast system is not specifically limited in this application.
In the application, before the terminal device performs the multimedia live broadcast, the terminal device may select to play the multimedia fragment according to the setting of the user or the parameter of the terminal device. Furthermore, in the process of performing the multimedia live broadcast by the terminal device, the terminal device may adjust the play rate of the live broadcast multimedia and/or the code rate of the downloaded multimedia fragment according to the play duration of the downloaded and unplayed multimedia fragment, so as to reduce the time delay between the multimedia play point and the live broadcast point of the terminal device on the basis of avoiding the pause of the live broadcast multimedia.
The technical means shown in the present application will be described in detail below with reference to specific examples. It should be noted that the following embodiments may be combined with each other, and the description of the same or similar contents in different embodiments is not repeated.
Fig. 2 is a schematic flowchart of a multimedia live broadcasting method provided in the present application. Referring to fig. 2, the method may include:
s201, determining the starting playing multimedia fragment of the first direct playing multimedia.
Optionally, the execution subject in the embodiment of the present invention may be a terminal device, and may also be a multimedia live device disposed in the terminal device. Alternatively, the multimedia live broadcasting device may be implemented by software, or may be implemented by a combination of software and hardware.
Optionally, the terminal device may execute the embodiment shown in fig. 2 before the first live multimedia is live.
For example, the terminal device may execute the embodiment shown in fig. 2 after receiving a play instruction corresponding to the first live multimedia input by the user.
Optionally, the first live multimedia may be live video, live audio, or the like.
Of course, the first live multimedia may be other, and this application is not limited to this specifically.
Optionally, the starting playing of the multimedia fragment refers to a first multimedia fragment downloaded from a server when the terminal device broadcasts the first live multimedia. That is, the starting playing of the multimedia fragment refers to the first played multimedia fragment when the terminal device broadcasts the first live multimedia.
Optionally, the multimedia fragment refers to a multimedia file with a preset playing duration. For example, the playing duration of a multimedia slice may be 3 seconds, etc.
Optionally, the start-playing multimedia segment may be a generated multimedia segment, where the server stores all contents in the generated multimedia segment. For example, the start-playing multimedia segment may be the third last multimedia segment before the live point, or the start-playing multimedia segment may be the second last multimedia segment before the live point, or the start-playing multimedia segment may be the first last multimedia segment before the live point.
Optionally, the start-playing multimedia segment may also be a generated multimedia segment, where a server stores a part of content of the generated multimedia segment, and another part of content server is not obtained from the encoder.
Optionally, the start playing multimedia segment of the first live multimedia may be determined by the following feasible implementation manners:
judging whether a user-defined starting multimedia fragment identifier configured in advance by a user exists in the terminal equipment, if so, determining the starting multimedia fragment according to the user-defined starting multimedia fragment identifier, and if not, determining the starting multimedia fragment according to the parameter information of the terminal equipment, wherein the parameter information comprises the historical bandwidth and the initial code rate of the terminal equipment.
Optionally, if the terminal device used by the user supports the configuration of the start-playing multimedia fragment, the user may configure the user-defined start-playing multimedia fragment identifier in the terminal device according to the performance of the terminal device.
Optionally, the historical bandwidth may be an average bandwidth in a preset time period before the current time. For example, the preset period may be one day, two days, etc. before the current time. The preset time period can be set according to actual needs.
Optionally, the initial code rate may be a preset value.
Optionally, the initial code rate may also be determined according to a code rate of a multimedia fragment downloaded by the terminal device during the historical multimedia live broadcast.
Optionally, the time delay between the obtained start-playing multimedia fragment and the live broadcast point is determined to be less than or equal to the playing time duration corresponding to the three multimedia fragments.
It should be noted that, in the embodiment shown in fig. 3, a process of determining a start multimedia segment of a first live multimedia is described in detail, and details are not repeated here.
S202, downloading the playing multimedia fragment from the server according to the playing multimedia fragment.
Optionally, the terminal device may send the fragment downloading request message to the server, and the server may send the index file to the terminal device according to the fragment downloading request message.
Alternatively, the index file may be in the M3U8 format.
Optionally, the index file may include information such as the identifiers and storage locations of the latest N multimedia slices. N is an integer greater than or equal to 1, and the size of N may be set according to actual needs in an actual application process.
Of course, the index file may also include other contents, for example, the playing time length of the multimedia segment, the generation time of the multimedia segment, and the like. In an actual application process, the content included in the index file may be set according to actual needs, which is not specifically limited in the present application.
Optionally, the identifier of the multimedia fragment in the index file may indicate an order of generating the multimedia fragment, for example, the larger the identifier of the multimedia fragment is, the later the multimedia fragment is generated, that is, the newer the multimedia fragment is.
Optionally, the storage location of the multimedia fragment may be a Uniform Resource Locator (URL).
In the process of multimedia live broadcasting, the encoder generates and sends new multimedia fragments to the server in real time, so that the latest N multimedia fragments in the server are updated in real time, and correspondingly, the server needs to update the index file in real time or periodically. For example, the server may update the index file once every time it receives a complete multimedia fragment sent by the encoder.
For example, the index file may be as shown in table 1:
TABLE 1
Identification of multimedia fragments Storage location
S8 URL1
S9 URL2
S10 URL3
S11 URL4
As can be seen from table 1, the generation sequence of the multimedia fragments is as follows: s8, S9, S10 and S11. S11 may be the multimedia segment being generated, S8-S10 are the generated multimedia segments, S8 is the third last multimedia segment before the live point, S9 is the second last multimedia segment before the live point, and S10 is the first last multimedia segment before the live point.
It should be noted that table 1 illustrates the index file in an exemplary form, and does not limit the index file, and in an actual application process, the index file may be set according to actual needs, which is not specifically limited in this application.
It should be noted that the index file may not include the storage location of the multimedia slice being generated. Correspondingly, when the terminal device needs to acquire the multimedia fragment being generated, the terminal device may calculate the storage location of the multimedia fragment being generated according to the storage location of the last multimedia fragment before the live broadcast point, and acquire the multimedia fragment being generated according to the calculated storage location of the multimedia fragment being generated.
For example, the terminal device may calculate the storage location of the multimedia fragment being generated according to the time length of the multimedia fragment and the storage location of the last-to-last multimedia fragment before the live broadcast point.
After the terminal device obtains the index file, the corresponding multimedia fragment can be determined in the index file according to the start-playing multimedia fragment, and the start-playing multimedia fragment is downloaded in the server according to the storage position of the corresponding multimedia fragment in the index file.
For example, assuming that the index file is shown in table 1, and it is determined that the start playing multimedia clip is the second last multimedia clip before the live point, the terminal device determines that the start playing multimedia clip is S9, and downloads S9 according to URL 2.
It should be noted that the terminal device further downloads a plurality of multimedia fragments after the multimedia fragment is played.
For example, after the terminal device has downloaded S9 shown in table 1, the terminal device also downloads S10 and S11. After the server updates the index file, the terminal device can also continue to download the multimedia fragment according to the updated index file.
Optionally, after the terminal device downloads the start-playing multimedia fragment, the terminal device may determine whether the start-playing multimedia fragment includes a key frame; if yes, starting playing the multimedia fragment from the key frame; if not, starting playing the multimedia fragment from the preset middle position of the starting playing multimedia fragment.
Optionally, the preset middle position may be one half of the playing length of the multimedia fragment played, two thirds of the playing length of the multimedia fragment played, and the like.
For example, assuming that the playing duration of the multimedia segment is 3 seconds, the preset middle position may be 2 seconds, etc.
It should be noted that, in the actual application process, the preset intermediate position may be set according to actual needs, and this application is not specifically limited to this.
The time delay between the multimedia playing point and the live broadcasting point of the terminal equipment can be reduced by starting playing the multimedia fragment from the key frame or the preset middle position of the multimedia fragment.
In the embodiment shown in fig. 2, the terminal device may determine the start-playing multimedia fragment according to the setting of the user or the parameter information of the terminal device, so that the determined start-playing multimedia fragment is related to the playing requirement of the user or the actual situation of the terminal device, thereby improving the flexibility of determining the start-playing multimedia fragment and further improving the flexibility of live broadcast control. Due to the fact that the time delay between the obtained start playing multimedia fragment and the live broadcasting point is determined to be smaller than or equal to the playing time length corresponding to the three multimedia fragments, when the time delay between the obtained start playing multimedia fragment and the live broadcasting point is determined to be smaller than the playing time length corresponding to the three multimedia fragments, the time delay between the multimedia playing point and the live broadcasting point of the terminal equipment when the terminal equipment starts live broadcasting can be reduced.
On the basis of the embodiment shown in fig. 2, optionally, the start multimedia segment of the first live multimedia can be determined through the following feasible implementation manner (S201 in the embodiment of fig. 2), specifically, please refer to the embodiment shown in fig. 3.
Fig. 3 is a schematic flow chart of a method for determining an initiating multimedia fragment according to the present application. Referring to fig. 3, the method may include:
s301, judging whether a user-defined start-playing multimedia fragment identifier configured in advance by a user exists in the terminal equipment.
If yes, S302-S306 are executed.
If not, S307-S310 are executed.
S302, judging whether the user-defined playing starting multimedia fragment identification indicates the multimedia fragment being generated.
If not, go to S303.
If so, S304-S306 are performed.
Optionally, a corresponding relationship between the user-defined start-playing multimedia fragment identifier and the multimedia fragment indicated by the user-defined start-playing multimedia fragment identifier may be preset.
For example, the corresponding relationship between the self-defined start-playing multimedia fragment identifier and the multimedia fragment indicated by the self-defined start-playing multimedia fragment identifier may be as shown in table 2:
TABLE 2
Figure BDA0001805639070000091
Referring to table 2, when the identifier of the customized start playing multimedia segment is-3, the multimedia segment indicated by-3 is the third last multimedia segment before the live broadcast point. When the identifier of the customized play-starting multimedia fragment is-2, the multimedia fragment indicated by-2 is the last-but-one multimedia fragment before the live broadcast point. When the mark of the customized play-start multimedia segment is-1, the multimedia segment indicated by-1 is the last multimedia segment before the live broadcast point. When the identifier of the custom start-playing multimedia fragment is 0, the multimedia fragment indicated by 0 is the multimedia fragment being generated.
Optionally, when the corresponding relationship is shown in table 2, it may be determined whether the self-defined start-playing multimedia fragment identifier is less than 0, if yes, it is determined that the self-defined start-playing multimedia fragment identifier indicates a generated multimedia fragment, and if not, it is determined that the self-defined start-playing multimedia fragment identifier indicates a multimedia fragment being generated.
It should be noted that, the foregoing is only an example form showing the corresponding relationship between the user-defined start-playing multimedia fragment identifier and the multimedia fragment indicated by the user-defined start-playing multimedia fragment identifier, and the corresponding relationship is not limited to this.
And S303, determining the start playing multimedia fragment as the multimedia fragment indicated by the self-defined start playing multimedia fragment identifier.
For example, referring to table 2, assuming that the customized play-start multimedia segment identifier is-2, the multimedia segment indicated by the customized play-start multimedia segment identifier is the penultimate multimedia segment before the live broadcast point, and accordingly, the penultimate multimedia segment before the live broadcast point may be determined as the play-start multimedia segment.
S304, judging whether the generated multimedia fragment can be downloaded.
If yes, S305 is performed.
If not, go to S306.
Optionally, it may be determined whether the generated multimedia fragment is downloadable through the following feasible implementation manners:
acquiring a difference value between the current time and the initial generation time of the multimedia fragment being generated, and judging whether the difference value is greater than a third time length and a first time difference respectively; if yes, determining that the multimedia fragment being generated can be downloaded; if not, determining that the generated multimedia fragment is not downloadable.
Optionally, the starting time of the multimedia fragment being generated refers to a time when the multimedia fragment being generated starts to be generated.
Wherein the third time duration is a minimum time duration required for preparing the multimedia slice being generated.
After a third time period has elapsed since the initial generation of the multimedia segment being generated, the encoder and/or the server can only prepare the multimedia segment being generated, so that the terminal device downloads the prepared multimedia segment being generated.
Optionally, the third duration is less than the playing duration of the multimedia fragment being generated.
For example, assuming that the playing time duration of the multimedia slice being generated is 5 seconds, the third time duration may be 2 seconds, etc.
In an actual application process, the third time period may be set according to actual needs, which is not specifically limited in the present application.
The first time difference is the time difference between the playing time of the multimedia fragment being generated and the preset downloading time in advance.
Optionally, the first time difference may be: the playing time length of the multimedia fragment being generated is subtracted by the preset advanced downloading time length, and then the error time length is added.
Optionally, the preset download duration in advance is less than the play duration of the multimedia fragment being generated.
For example, assuming that the playing time duration of the multimedia slice being generated is 5 seconds, the third time duration may be 3 seconds, and so on.
In the actual application process, the preset advanced downloading duration can be set according to actual needs, which is not specifically limited in the present application.
Optionally, the error duration may be a duration reserved when the playing duration of the multimedia segment is not fixed.
For example, the error duration may be-1 second, etc.
Of course, in the actual application process, the error duration may be set according to actual needs, which is not specifically limited in the present application.
S305, determining the multimedia fragment played at the beginning as the generated multimedia fragment.
S306, determining the multimedia fragment played to be the latest generated multimedia fragment.
Optionally, the generated latest multimedia segment is a multimedia segment that is closest to the live broadcast point. That is, the latest generated multimedia segment is the last multimedia segment before the generated live broadcast point.
S307, determining a ratio range in which the ratio of the historical bandwidth to the initial code rate is located.
Alternatively, the range of ratios may be a preset setting.
Alternatively, at least two ratio ranges may be preset.
S308, acquiring the identifier of the multimedia fragment corresponding to the ratio range.
Optionally, each ratio range corresponds to an identifier of one multimedia slice.
For example, the correspondence between the ratio range and the identifier of the multimedia fragment may be as shown in table 3:
TABLE 3
Range of ratio Identification of multimedia fragments
Greater than 20 0 (multimedia slice being generated)
15-20 -1 (last multimedia slicing before live broadcast point)
10-15 -2 (penultimate multimedia slicing before live broadcast point)
Less than 10 -3 (third last multimedia slicing before live broadcast point)
It should be noted that table 3 only shows the corresponding relationship between the ratio range and the identifier of the multimedia fragment in an exemplary form, and in an actual application process, the corresponding relationship between the ratio range and the identifier of the multimedia fragment may be preset according to actual needs, which is not specifically limited in this application.
S309, judging whether the identification of the multimedia fragment corresponding to the ratio range indicates the multimedia fragment being generated.
If not, go to S310.
If so, S304-S306 are performed.
It should be noted that the execution process of S309 may refer to the execution process of S302, and a repeated description is not repeated herein.
S310, determining the multimedia fragment played at the beginning to be the multimedia fragment indicated by the multimedia fragment identifier corresponding to the ratio range.
For example, referring to table 3, assuming that the ratio range is 20-25, the multimedia segment indicated by the identifier of the multimedia segment corresponding to the ratio range is the last-but-one multimedia segment before the live point, and accordingly, the last-but-one multimedia segment before the live point may be determined as the play-start multimedia segment.
In the embodiment shown in fig. 3, if the user configures the self-defined start-playing multimedia fragment identifier in the terminal device, the start-playing multimedia fragment is determined according to the self-defined start-playing multimedia fragment identifier configured by the user, and if the user does not configure the self-defined start-playing multimedia fragment identifier in the terminal device, the start-playing multimedia fragment is determined according to the parameter information of the terminal device. Therefore, the determined start-up multimedia fragment is related to the playing requirement of the user or the actual situation of the terminal device, so that the flexibility of determining the start-up multimedia fragment is improved, and the flexibility of live broadcast control is further improved. When the start-playing multimedia fragment is determined according to the parameter information of the terminal equipment, the obtained start-playing multimedia fragment is determined to be related to the network condition of the terminal equipment, so that the time delay between the multimedia playing point and the live playing point of the terminal equipment when the terminal equipment starts to directly play the multimedia can be reduced as much as possible on the premise of avoiding the multimedia jamming in the live playing process.
In the present application, in the process of live multimedia broadcast, the playing rate of live multimedia and/or the code rate of downloaded multimedia fragments may be adjusted according to the playing duration of downloaded and unplayed multimedia fragments by a terminal device, specifically, please refer to the embodiment shown in fig. 4.
Fig. 4 is a schematic flowchart of another multimedia live broadcasting method provided in the present application. Referring to fig. 4, the method may include:
s401, determining the playing time length of multimedia which is downloaded to the terminal equipment and is not played in the first direct-playing multimedia.
Optionally, the execution subject in the embodiment of the present invention may be a terminal device, and may also be a multimedia live device disposed in the terminal device. Alternatively, the multimedia live broadcasting device may be implemented by software, or may be implemented by a combination of software and hardware.
In the practical application process, aiming at the same live broadcast multimedia, the server comprises multimedia fragments with various code rates of the live broadcast multimedia. The higher the code rate of the multimedia fragment is, the higher the quality of the multimedia fragment is, and the larger the size of the multimedia fragment with the same playing time length is.
For example, the multimedia fragments stored in the server may be as shown in fig. 5.
Fig. 5 is a schematic diagram of a multimedia fragment stored in a server provided in the present application. Referring to fig. 5, the server includes a multimedia fragment with a bitrate of 8000kbps, a multimedia fragment with a bitrate of 3000kbps, a multimedia fragment with a bitrate of 2000kbps, a multimedia fragment with a bitrate of 1000kbps, and a multimedia fragment with a bitrate of 500 kbps.
When the playing time lengths of the multimedia fragments with different code rates are the same, the size of one multimedia fragment with the code rate of 8000kbps is larger than that of one multimedia fragment with the code rate of 3000 kbps. The size of a multimedia fragment with a code rate of 3000kbps is larger than that of a multimedia fragment with a code rate of 2000 kbps.
Of course, in the actual application process, the multiple different code rates may be set according to actual needs, which is not specifically limited in the present application.
In the process of the terminal device in the multimedia live broadcast, the terminal device can request the server to acquire the multimedia fragments with a certain code rate according to the actual situation. Correspondingly, the multimedia fragments with a certain code rate are cached in the terminal equipment.
Optionally, the playing duration of each multimedia segment is generally the same. Correspondingly, the terminal device may determine the playing time length of the multimedia which is downloaded to the terminal device and is not played according to the number of the multimedia fragments which are downloaded to the terminal device and are not played and the non-played time length of the multimedia fragments which are currently played.
For example, assuming that the duration of one multimedia fragment is 5 seconds, 3 multimedia fragments which are not played are stored in the terminal device, and the multimedia fragment which is currently played by the terminal device has been played for 3 seconds, the playing duration of the multimedia which has been downloaded to the terminal device and has not been played is: 5 x 3+ (5-3) ═ 17 seconds.
S402, when the playing time is shorter than a first preset time, reducing the playing speed of the first direct playing multimedia and/or downloading the multimedia fragments corresponding to the first code rate, wherein the first code rate is smaller than the code rate of the multimedia fragments being downloaded.
For example, the first preset time period may be 2 seconds, 3 seconds, and the like.
Of course, in the actual application process, the first preset time period may be set according to actual needs.
Optionally, the reason for the playing time being less than the first preset time may be: the code rate of the downloaded multimedia fragment is higher, or the playing rate of the first direct-playing multimedia is faster, or the network bandwidth of the terminal device is smaller.
Optionally, when the playing duration is shorter than a first preset duration, it indicates that the multimedia cached in the terminal device is less, at this time, in the multimedia live broadcasting process, a pause may occur, and in order to avoid the pause, the following feasible implementation manner may be used to process:
If the code rate of the multimedia fragment being downloaded is greater than the third code rate, determining the first code rate, and downloading the multimedia fragment corresponding to the first code rate; and if the code rate of the multimedia fragment being downloaded is less than the fourth code rate, reducing the playing rate of the first direct playing multimedia.
Optionally, the third code rate is greater than or equal to the fourth code rate.
Optionally, when the code rate of the multimedia segment being downloaded is greater than the third code rate, it indicates that the code rate of the multimedia segment being downloaded is higher, that is, the quality of the currently played multimedia is higher. Therefore, the bitrate of the downloaded multimedia slice can be reduced. For example, the third code rate may be subtracted by a code rate with a preset size to obtain a first code rate, and the multimedia slice corresponding to the first code rate is downloaded. After the code rate of the downloaded multimedia fragments is reduced, the playing time of the multimedia fragments with the same size downloaded in the same time length is prolonged, and the multimedia cached by the terminal equipment can be further increased step by step.
Optionally, when it is determined that the code rate of the multimedia fragment being downloaded is greater than the third code rate, the code rate of the multimedia fragment being downloaded may be further gradually reduced until the code rate is reduced by the third code rate, or the playing duration of the multimedia which is cached by the terminal device and is not played is greater than or equal to the first preset duration.
Optionally, when the code rate of the multimedia fragment being downloaded is less than or equal to the third code rate, it indicates that the code rate of the multimedia fragment being downloaded is not high, that is, the quality of the currently played multimedia is not high. Therefore, the play rate of the first live multimedia can be reduced.
Optionally, the playing rate of the first live multimedia can be reduced to a first preset playing rate. For example, the first preset playback rate may be 0.9 times the playback rate, 0.8 times the playback rate, or the like.
Of course, in the actual application process, the first preset playing rate may be set according to actual needs, which is not specifically limited in the present application.
Optionally, the playing rate of the first direct-playing multimedia may be gradually reduced until the playing rate of the first direct-playing multimedia is less than the preset minimum playing rate, or the playing duration of the multimedia that is not played and is cached by the terminal device is greater than or equal to the first preset duration.
Optionally, the preset minimum playing rate may be 0.8 times playing rate, 0.85 times playing rate, or the like.
Of course, in the actual application process, the preset minimum playing rate may be set according to actual needs, which is not specifically limited in the present application.
For example, the playing speed of the first always-played multimedia may be reduced by a preset size, after the preset duration, if the playing duration of the multimedia that is not played and is cached by the terminal device is still less than the first preset duration, and the reduced playing speed is still greater than the preset minimum playing speed, the playing speed of the first always-played multimedia may be reduced by the preset size again, and the above process may be repeated until the playing speed of the first always-played multimedia is less than the preset minimum playing speed, or the playing duration of the multimedia that is not played and is cached by the terminal device is greater than or equal to the first preset duration.
Optionally, the playing rate of the first always-played multimedia may also be reduced through other feasible implementation manners, and/or the multimedia fragment corresponding to the first code rate is downloaded, for example, the playing rate of the first always-played multimedia may be reduced at the same time, and the code rate of the downloaded multimedia fragment may be reduced, and the reduction of the playing rate of the first always-played multimedia may be suspended until the playing rate of the first always-played multimedia is smaller than the preset minimum rate, and the reduction of the code rate of the downloaded multimedia fragment may be suspended when the code rate of the downloaded multimedia fragment is smaller than the preset minimum code rate.
Optionally, the playing rate of the first live multimedia may also be reduced through other feasible implementation manners, and/or the multimedia fragment corresponding to the first code rate is downloaded, for example, if the playing rate of the first live multimedia is greater than the first playing rate, the playing rate of the first live multimedia is reduced; if the playing speed of the first direct playing multimedia is less than the second playing speed, the code rate of the downloaded multimedia fragments is reduced, and the first playing speed is greater than or equal to the second playing speed.
And S403, when the playing duration is longer than a second preset duration, increasing the playing rate of the first direct playing multimedia and/or downloading the multimedia fragments corresponding to a second code rate, wherein the second code rate is larger than the code rate of the multimedia fragments being downloaded.
Optionally, the second preset time period may be greater than or equal to the first preset time period.
For example, the second preset time period may be 8 seconds, 10 seconds, etc.
Of course, in the actual application process, the second preset time period may be set according to actual needs.
Optionally, the reason for the playing time length being greater than the second preset time length may be: the code rate of the downloaded multimedia fragments is low, or the playing speed of the first direct playing multimedia is slow.
Optionally, when the playing duration is longer than the second preset duration, it indicates that there are more multimedia cached in the terminal device, so that the time delay between the multimedia playing point and the live broadcasting point of the terminal device is relatively large, and the processing may be implemented in the following feasible implementation manner:
optionally, if the code rate of the multimedia fragment being downloaded is smaller than the fifth code rate, determining a second code rate, and downloading the multimedia fragment corresponding to the second code rate; and if the code rate of the currently downloaded multimedia fragment is greater than the sixth code rate, increasing the playing rate of the first direct playing multimedia.
Optionally, the sixth code rate is greater than or equal to the fifth code rate.
Optionally, when the code rate of the multimedia fragment being downloaded is smaller than the fifth code rate, it indicates that the code rate of the multimedia fragment being downloaded is lower, that is, the quality of the currently played multimedia is lower. Therefore, the code rate of the downloaded multimedia slices can be improved. For example, the fifth code rate may be added to a code rate with a preset size to obtain a second code rate, and the multimedia slice corresponding to the second code rate is downloaded. After the code rate of the downloaded multimedia fragments is improved, the playing time of the multimedia fragments with the same size downloaded in the same time length is shortened, and the multimedia cached by the terminal equipment can be further reduced step by step.
Optionally, when it is determined that the code rate of the multimedia fragment being downloaded is smaller than the fifth code rate, the code rate of the multimedia fragment being downloaded may be further increased step by step until the code rate is increased to the fifth code rate, or the playing duration of the multimedia which is not played and is cached by the terminal device is smaller than or equal to a second preset duration.
Optionally, when the code rate of the multimedia fragment being downloaded is greater than the sixth code rate, it indicates that the code rate of the multimedia fragment being downloaded is higher, that is, the quality of the currently played multimedia is higher. Therefore, the play rate of the first through multimedia can be increased.
Optionally, the playing rate of the first live multimedia can be increased to a second preset playing rate. For example, the second preset playback rate may be 1.1 times the playback rate, 1.2 times the playback rate, or the like.
Of course, in the actual application process, the second preset playing rate may be set according to actual needs, which is not specifically limited in the present application.
Optionally, the playing speed of the first direct-playing multimedia may be gradually increased until the playing speed of the first direct-playing multimedia is greater than the preset maximum playing speed, or the playing time of the multimedia that is not played and is cached by the terminal device is less than or equal to the second preset time.
Optionally, the preset maximum play rate may be 1.2 times of the play rate, 1.3 times of the play rate, or the like.
Of course, in the actual application process, the preset maximum playing speed may be set according to actual needs, which is not specifically limited in the present application.
For example, the playing speed of the first direct-playing multimedia may be increased by a preset size, after the preset duration, if the playing duration of the unplayed multimedia cached by the terminal device is still greater than the second preset duration, and the increased playing speed is still less than the preset maximum playing speed, the playing speed of the first direct-playing multimedia may be increased by the preset size again, and the above process may be repeated until the playing speed of the first direct-playing multimedia is greater than the preset maximum playing speed, or the playing duration of the unplayed multimedia cached by the terminal device is less than or equal to the second preset duration.
Optionally, the playing rate of the first live multimedia can be increased and/or the multimedia fragment corresponding to the second code rate can be downloaded through other feasible implementation manners, for example, the playing rate of the first live multimedia can be increased and the code rate of the downloaded multimedia fragment can be increased at the same time, until the playing rate of the first live multimedia is greater than the preset maximum rate, the playing rate of the first live multimedia is paused to be increased, and when the code rate of the downloaded multimedia fragment is greater than the preset maximum code rate, the code rate of the downloaded multimedia fragment is paused to be increased.
Optionally, the playing rate of the first live multimedia may also be increased by other feasible implementation manners, and/or the multimedia fragment corresponding to the second code rate is downloaded, for example, if the playing rate of the first live multimedia is smaller than the third playing rate, the playing rate of the first live multimedia is increased; and if the playing speed of the first direct playing multimedia is greater than the fourth playing speed, the code rate of the downloaded multimedia fragment is increased.
It should be noted that, if it is determined that the playing time of the multimedia fragment that has been downloaded to the terminal device and is not played in the first live multimedia is between the first preset time and the second preset time, the playing rate of the first live multimedia may not be adjusted, and the code rate of the downloaded multimedia fragment may not be adjusted.
Optionally, after the play rate of the first direct-play multimedia is reduced or increased, when it is determined that the play duration of the multimedia fragment that has been downloaded to the terminal device and is not played in the first direct-play multimedia is between the first preset duration and the second preset duration, the play rate of the first direct-play multimedia may be set to the preset play rate.
Optionally, the preset playing rate is 1 time of the playing rate, that is, the preset playing rate is a normal playing rate.
In the embodiment shown in fig. 4, in the process of performing the multimedia live broadcast by the terminal device, when the playing duration is shorter than the first preset duration, which indicates that the multimedia content currently cached by the terminal device is less, the playing rate of the first live broadcast multimedia is reduced, and/or the multimedia fragment corresponding to the first code rate (the first code rate is smaller than the code rate of the multimedia fragment being downloaded) is downloaded, so that the live broadcast can be prevented from being blocked. When the playing time is longer than the second preset time, it indicates that the multimedia content currently cached by the terminal device is more, the playing rate of the first live multimedia is increased, and/or the multimedia fragment corresponding to the second code rate (the second code rate is larger than the code rate of the multimedia fragment being downloaded) is downloaded, so that the time delay between the multimedia playing point and the live broadcasting point of the terminal device can be reduced. Therefore, by adjusting the playing rate of the live broadcast multimedia and/or the code rate of the downloaded multimedia fragment, the time delay between the multimedia playing point and the live broadcast point of the terminal equipment can be reduced on the basis of avoiding the blockage of the live broadcast multimedia.
Fig. 6 is a schematic structural diagram of a multimedia live broadcasting device provided in the present application. Referring to fig. 6, the multimedia live device 10 may include a first determining module 11 and a processing module 12, wherein,
the first determining module 11 is configured to determine a playing time length of multimedia which is downloaded to the terminal device and is not played in the first direct-playing multimedia;
the processing module 12 is configured to, when the playing duration is less than a first preset duration, reduce the playing rate of the first direct-playing multimedia and/or download a multimedia fragment corresponding to a first code rate, where the first code rate is less than a code rate of a multimedia fragment being downloaded;
the processing module 12 is further configured to, when the playing duration is longer than a second preset duration, increase the playing rate of the first direct playing multimedia and/or download a multimedia fragment corresponding to a second bitrate, where the second bitrate is greater than a bitrate of a multimedia fragment being downloaded, and the second preset duration is longer than or equal to the first preset duration.
Alternatively, the first determining module may perform S401 in the embodiment of fig. 4.
Optionally, the processing module 12 may perform S402-S403 in the embodiment of fig. 4.
It should be noted that the multimedia live broadcasting device described in the present application may execute the technical solution shown in the foregoing method embodiment, and the implementation principle and the beneficial effect thereof are similar, and are not described herein again.
In a possible implementation, the processing module 12 is specifically configured to:
if the code rate of the multimedia fragment being downloaded is greater than a third code rate, determining the first code rate, and downloading the multimedia fragment corresponding to the first code rate, wherein the first code rate is less than the third code rate;
if the code rate of the multimedia fragment being downloaded is smaller than a fourth code rate, the playing rate of the first direct-playing multimedia is reduced, and the third code rate is larger than or equal to the fourth code rate.
In another possible implementation, the processing module 12 is specifically configured to:
if the code rate of the multimedia fragment being downloaded is smaller than a fifth code rate, determining the second code rate, and downloading the multimedia fragment corresponding to the second code rate, wherein the second code rate is larger than the fifth code rate;
and if the code rate of the currently downloaded multimedia fragment is greater than a sixth code rate, increasing the playing rate of the first direct playing multimedia, wherein the sixth code rate is greater than or equal to the fifth code rate.
In another possible embodiment, the processing module 12 is further configured to:
after the processing module reduces the playing rate of the first direct-playing multimedia or increases the playing rate of the first direct-playing multimedia, when it is determined that the playing time of the multimedia fragments which are downloaded to the terminal equipment and are not played in the first direct-playing multimedia is between the first preset time and the second preset time, the playing rate of the first direct-playing multimedia is set to be a preset playing rate.
Fig. 7 is a schematic structural diagram of another multimedia live broadcasting device provided in the present application. On the basis of the embodiment shown in fig. 6, please refer to fig. 7, the apparatus further comprises a second determining module 13 and a downloading module 14, wherein,
the second determining module 13 is configured to determine a starting multimedia segment of the first direct playing multimedia before the first determining module determines the playing time of a multimedia segment that has been downloaded to the terminal device and has not been played in the first direct playing multimedia;
the downloading module 14 is configured to download the start playing multimedia fragment from the server according to the start playing multimedia fragment.
Optionally, the second determining module 13 may execute S201 in the embodiment of fig. 2 and S301 to S306 in the embodiment of fig. 3.
Optionally, the downloading module 14 may execute S202 in the embodiment of fig. 2.
In another possible implementation manner, the second determining module 13 is specifically configured to:
if a user-defined start-playing multimedia fragment identifier configured in advance by a user exists in the terminal equipment, determining a start-playing multimedia fragment according to the user-defined start-playing multimedia fragment identifier;
if the user-defined start-playing multimedia fragment identification does not exist in the terminal equipment, determining the start-playing multimedia fragment according to parameter information of the terminal equipment, wherein the parameter information comprises historical bandwidth and initial code rate of the terminal equipment.
In another possible implementation manner, the second determining module 13 is specifically configured to:
if the user-defined start-playing multimedia fragment identifier indicates a generated multimedia fragment, determining the start-playing multimedia fragment as the multimedia fragment indicated by the user-defined start-playing multimedia fragment identifier;
if the user-defined start playing multimedia fragment mark indicates the multimedia fragment being generated, judging whether the multimedia fragment being generated can be downloaded, if so, determining that the start playing multimedia fragment is the multimedia fragment being generated, and if not, determining that the start playing multimedia fragment is the latest generated multimedia fragment.
In another possible implementation manner, the second determining module 13 is specifically configured to:
determining a ratio range in which the ratio of the historical bandwidth to the initial code rate is located;
acquiring the identifier of the multimedia fragment corresponding to the ratio range;
and determining the starting multimedia fragment according to the identifier of the multimedia fragment corresponding to the ratio range.
In another possible implementation manner, the second determining module 13 is specifically configured to:
if the identifier of the multimedia fragment corresponding to the ratio range indicates the generated multimedia fragment, determining that the playing start multimedia fragment is the multimedia fragment indicated by the identifier of the multimedia fragment corresponding to the ratio range;
if the identifier of the multimedia fragment corresponding to the ratio range indicates the multimedia fragment being generated, judging whether the multimedia fragment being generated can be downloaded, if so, determining that the playing multimedia fragment is the multimedia fragment being generated, and if not, determining that the playing multimedia fragment is the latest generated multimedia fragment.
In another possible implementation manner, the second determining module 13 is specifically configured to:
acquiring a difference value between the current moment and the initial generation moment of the multimedia fragment being generated;
Judging whether the difference value is respectively greater than a third time length and a first time difference, wherein the third time length is the minimum time length required for preparing the generated multimedia fragment, and the first time difference is the time difference between the playing time length of the generated multimedia fragment and the preset downloading time length in advance;
if yes, determining that the generated multimedia fragment can be downloaded;
if not, determining that the generated multimedia fragment is not downloadable.
In another possible embodiment, the apparatus further comprises a determining module 15 and a playing module 16, wherein,
the judging module 15 is configured to, after the downloading module 14 downloads the start-playing multimedia fragment from the server, judge whether a key frame is included in the start-playing multimedia fragment;
the playing module 16 is configured to, when the determining module 15 determines that the start-playing multimedia segment includes a key frame, start playing the start-playing multimedia segment from the key frame;
the playing module 16 is further configured to start playing the start multimedia segment from a preset middle position of the start multimedia segment when the determining module 15 determines that the start multimedia segment does not include the key frame.
It should be noted that the multimedia live broadcasting device described in the present application may execute the technical solution shown in the foregoing method embodiment, and the implementation principle and the beneficial effect thereof are similar, and are not described herein again.
Fig. 8 is a schematic hardware structure diagram of a multimedia live broadcasting device provided in the present application. Referring to fig. 8, the multimedia live device 20 includes: a memory 21 and a processor 22, wherein the memory 21 and the processor 22 are in communication; illustratively, the memory 21 and the processor 22 communicate via a communication bus 23, the memory 21 being configured to store a computer program, the processor 22 executing the computer program to implement the method shown in the above embodiments.
Optionally, the multimedia live device 20 may further include a transmitter and/or a receiver.
Optionally, the Processor may be a Central Processing Unit (CPU), or may be another general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor, or in a combination of the hardware and software modules in the processor.
The present application provides a computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform a multimedia live method provided by any of the above method embodiments.
The present application provides a chip, where the chip is used to support a multimedia live broadcast device to implement functions shown in this application embodiment (for example, functions shown in steps in fig. 2 to fig. 4), and the chip is specifically used in a chip system, where the chip system may be formed by a chip, or may include a chip and other discrete devices. When the chip in the multimedia live broadcasting device for implementing the method includes a processing unit, the chip may further include a communication unit, and the processing unit may be, for example, a processor, and when the chip includes a communication unit, the communication unit may be, for example, an input/output interface, a pin, a circuit, or the like. The processing unit performs all or part of the actions performed by the various processing modules in the embodiments of the present application (e.g., the various modules included in fig. 6-7), and the communication unit may perform the corresponding receiving or sending actions (e.g., downloading a playing multimedia slice from a server, etc.).
All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (flexible disk), optical disk (optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.
In the present application, the terms "include" and variations thereof may refer to non-limiting inclusions; the term "or" and variations thereof may mean "and/or". The terms "first," "second," and the like in this application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. In the present application, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.

Claims (26)

1.一种多媒体直播方法,其特征在于,包括:1. a multimedia live broadcast method, is characterized in that, comprises: 确定第一直播多媒体中已下载至终端设备、且未播放的多媒体的播放时长;determining the playback duration of the multimedia that has been downloaded to the terminal device and has not been played in the first live multimedia; 当所述播放时长小于第一预设时长时,下载第一码率对应的多媒体分片,所述第一码率小于正在下载的多媒体分片的码率;When the playback duration is less than the first preset duration, download the multimedia fragment corresponding to the first code rate, and the first code rate is less than the code rate of the multimedia fragment being downloaded; 当所述播放时长大于第二预设时长时,下载第二码率对应的多媒体分片,所述第二码率大于正在下载的多媒体分片的码率,所述第二预设时长大于或等于所述第一预设时长。When the playback duration is greater than the second preset duration, download the multimedia segment corresponding to the second bit rate, the second bit rate is greater than the bit rate of the multimedia segment being downloaded, and the second preset duration is greater than or is equal to the first preset duration. 2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, wherein the method further comprises: 当所述播放时长小于第一预设时长时,降低所述第一直播多媒体的播放速率;When the playback duration is less than the first preset duration, reducing the playback rate of the first live multimedia; 当所述播放时长大于第二预设时长时,增大所述第一直播多媒体的播放速率。When the playback duration is greater than the second preset duration, the playback rate of the first live multimedia is increased. 3.根据权利要求1所述的方法,其特征在于,所述下载第一码率对应的多媒体分片,包括:3. The method according to claim 1, wherein the downloading of the multimedia fragment corresponding to the first code rate comprises: 若所述正在下载的多媒体分片的码率大于第三码率,则确定所述第一码率,并下载所述第一码率对应的多媒体分片,所述第一码率小于所述第三码率;If the code rate of the multimedia fragment being downloaded is greater than the third code rate, the first code rate is determined, and the multimedia fragment corresponding to the first code rate is downloaded, and the first code rate is smaller than the third bit rate; 若所述正在下载的多媒体分片的码率小于第四码率,则降低所述第一直播多媒体的播放速率,所述第三码率大于或等于所述第四码率。If the bit rate of the multimedia segment being downloaded is lower than a fourth bit rate, the playback rate of the first live multimedia is reduced, and the third bit rate is greater than or equal to the fourth bit rate. 4.根据权利要求1所述的方法,其特征在于,所述下载第二码率对应的多媒体分片,包括:4. The method according to claim 1, wherein the downloading of the multimedia fragment corresponding to the second code rate comprises: 若所述正在下载的多媒体分片的码率小于第五码率,则确定所述第二码率,并下载所述第二码率对应的多媒体分片,所述第二码率大于所述第五码率;If the code rate of the multimedia fragment being downloaded is smaller than the fifth code rate, the second code rate is determined, and the multimedia fragment corresponding to the second code rate is downloaded, and the second code rate is greater than the fifth bit rate; 若所述正在下载的多媒体分片的码率大于第六码率,则增大所述第一直播多媒体的播放速率,所述第六码率大于或等于所述第五码率。If the code rate of the multimedia fragment being downloaded is greater than a sixth code rate, the playback rate of the first live multimedia is increased, and the sixth code rate is greater than or equal to the fifth code rate. 5.根据权利要求2所述的方法,其特征在于,在降低所述第一直播多媒体的播放速率,或者增大所述第一直播多媒体的播放速率之后,还包括:5. The method according to claim 2, characterized in that, after reducing the playback rate of the first live multimedia, or increasing the playback rate of the first live multimedia, the method further comprises: 在确定所述第一直播多媒体中已下载至终端设备、且未播放的多媒体分片的播放时长在所述第一预设时长和所述第二预设时长之间时,将所述第一直播多媒体的播放速率设置为预设播放速率。When it is determined that the playback duration of the multimedia segment that has been downloaded to the terminal device and is not played in the first live multimedia is between the first preset duration and the second preset duration, the first The playback rate of live multimedia is set to the preset playback rate. 6.根据权利要求1-4任一项所述的方法,其特征在于,所述确定第一直播多媒体中已下载至终端设备、且未播放的多媒体分片的播放时长之前,还包括:6. The method according to any one of claims 1-4, characterized in that, before said determining the playback duration of the multimedia segment that has been downloaded to the terminal device and has not been played in the first live multimedia, the method further comprises: 确定所述第一直播多媒体的起播多媒体分片;determining the starting multimedia segment of the first live multimedia; 根据所述起播多媒体分片,从服务器下载所述起播多媒体分片。According to the initiating multimedia fragment, the initiating multimedia fragment is downloaded from the server. 7.根据权利要求6所述的方法,其特征在于,所述确定所述第一直播多媒体的起播多媒体分片,包括:7. The method according to claim 6, wherein the determining of the first broadcast multimedia fragment of the first live multimedia comprises: 若所述终端设备中存在用户预先配置的自定义起播多媒体分片标识,则根据所述自定义起播多媒体分片标识确定起播多媒体分片;If there is a user-preconfigured user-preconfigured user-defined multimedia segment identifier for broadcasting, determining the starting multimedia segment according to the user-defined multimedia segment identifier for broadcasting; 若所述终端设备中不存在所述自定义起播多媒体分片标识,则根据所述终端设备的参数信息确定所述起播多媒体分片,所述参数信息包括所述终端设备的历史带宽和初始码率。If the user-defined broadcast multimedia fragment identifier does not exist in the terminal device, determine the broadcast multimedia fragment according to parameter information of the terminal device, where the parameter information includes the historical bandwidth of the terminal device and the initial bit rate. 8.根据权利要求7所述的方法,其特征在于,所述根据所述自定义起播多媒体分片标识确定起播多媒体分片,包括:8. The method according to claim 7, characterized in that, determining to start broadcasting a multimedia segment according to the self-defined broadcasting multimedia segment identifier, comprising: 若所述自定义起播多媒体分片标识指示已生成的多媒体分片,则确定所述起播多媒体分片为所述自定义起播多媒体分片标识所指示的多媒体分片;If the self-defined broadcast multimedia fragment identifier indicates a generated multimedia fragment, then determine that the broadcast multimedia fragment is the multimedia fragment indicated by the self-defined broadcast multimedia fragment identifier; 若所述自定义起播多媒体分片标识指示正在生成的多媒体分片,则判断所述正在生成的多媒体分片是否可下载,若是,则确定所述起播多媒体分片为所述正在生成的多媒体分片,若否,则确定所述起播多媒体分片为已生成的最新的多媒体分片。If the identifier of the user-defined start-up multimedia segment indicates a multimedia segment being generated, then determine whether the multimedia segment being generated can be downloaded, and if so, determine that the start-up multimedia segment is the one being generated. Multimedia fragment, if not, determine that the multimedia fragment to be broadcast is the latest generated multimedia fragment. 9.根据权利要求7所述的方法,其特征在于,所述根据所述参数信息确定所述起播多媒体分片,包括:9 . The method according to claim 7 , wherein the determining the starting multimedia segment according to the parameter information comprises: 10 . 确定所述历史带宽和所述初始码率的比值所在的比值范围;Determine the ratio range in which the ratio of the historical bandwidth and the initial code rate is located; 获取所述比值范围对应的多媒体分片的标识;obtaining the identifier of the multimedia fragment corresponding to the ratio range; 根据所述比值范围对应的多媒体分片的标识,确定所述起播多媒体分片。According to the identifier of the multimedia fragment corresponding to the ratio range, the multimedia fragment to be played is determined. 10.根据权利要求9所述的方法,其特征在于,所述根据所述比值范围对应的多媒体分片的标识,确定所述起播多媒体分片,包括:10 . The method according to claim 9 , wherein, determining the starting multimedia fragment according to the identifier of the multimedia fragment corresponding to the ratio range, comprising: 10 . 若所述比值范围对应的多媒体分片的标识指示已生成的多媒体分片,则确定所述起播多媒体分片为所述比值范围对应的多媒体分片的标识所指示的多媒体分片;If the identifier of the multimedia fragment corresponding to the ratio range indicates the generated multimedia fragment, then determine that the starting multimedia fragment is the multimedia fragment indicated by the identifier of the multimedia fragment corresponding to the ratio range; 若所示比值范围对应的多媒体分片的标识指示正在生成的多媒体分片,则判断所述正在生成的多媒体分片是否可下载,若是,则确定所述起播多媒体分片为正在生成的多媒体分片,若否,则确定所述起播多媒体分片为已生成的最新的多媒体分片。If the identifier of the multimedia fragment corresponding to the shown ratio range indicates the multimedia fragment being generated, then it is determined whether the multimedia fragment being generated can be downloaded, and if so, it is determined that the multimedia fragment being broadcast is the multimedia fragment being generated. fragment, if not, determine that the multimedia fragment to be broadcast is the latest generated multimedia fragment. 11.根据权利要求8或10所述的方法,其特征在于,所述判断所述正在生成的多媒体分片是否可下载,包括:11. The method according to claim 8 or 10, wherein the judging whether the multimedia segment being generated can be downloaded comprises: 获取当前时刻与所述正在生成的多媒体分片的起始生成时刻的差值;Obtain the difference between the current moment and the initial generation moment of the multimedia fragment being generated; 判断所述差值是否分别大于第三时长和第一时间差,所述第三时长为准备所述正在生成的多媒体分片所需的最小时长,所述第一时间差为所述正在生成的多媒体分片的播放时长与预设的提前下载时长的时间差;Judging whether the difference is greater than a third duration and a first time difference, the third duration is the minimum duration required to prepare the multimedia segment being generated, and the first time difference is the multimedia segment being generated. The time difference between the playback duration of the movie and the preset advance download duration; 若是,则确定所述正在生成的多媒体分片可下载;If yes, then determine that the multimedia segment being generated can be downloaded; 若否,则确定所述正在生成的多媒体分片不可下载。If not, it is determined that the multimedia segment being generated is not downloadable. 12.根据权利要求7-10任一项所述的方法,其特征在于,若所述起播多媒体分片为已生成的最新的多媒体分片,所述根据所述起播多媒体分片,从所述服务器下载所述起播多媒体分片之后,还包括:12. The method according to any one of claims 7-10, wherein, if the starting multimedia fragment is the latest multimedia fragment that has been generated, the multimedia fragment starting from the After the server downloads the starting multimedia segment, the method further includes: 判断所述起播多媒体分片中是否包括关键帧;judging whether a key frame is included in the initiating multimedia fragment; 若是,则从所述关键帧处开始播放所述起播多媒体分片;If so, start playing the initiating multimedia fragment from the key frame; 若否,则从所述起播多媒体分片的预设中间位置开始播放所述起播多媒体分片。If not, start playing the initiating multimedia fragment from the preset middle position of the initiating multimedia fragment. 13.一种多媒体直播装置,其特征在于,包括第一确定模块和处理模块,其中,13. A multimedia live broadcast device, comprising a first determination module and a processing module, wherein, 所述第一确定模块用于,确定第一直播多媒体中已下载至终端设备、且未播放的多媒体的播放时长;The first determining module is used to determine the playback duration of the multimedia that has been downloaded to the terminal device but has not been played in the first live multimedia; 所述处理模块用于,当所述播放时长小于第一预设时长时,下载第一码率对应的多媒体分片,所述第一码率小于正在下载的多媒体分片的码率;The processing module is configured to, when the playback duration is less than the first preset duration, download the multimedia fragment corresponding to the first code rate, where the first code rate is less than the code rate of the multimedia fragment being downloaded; 所述处理模块还用于,当所述播放时长大于第二预设时长时,下载第二码率对应的多媒体分片,所述第二码率大于正在下载的多媒体分片的码率,所述第二预设时长大于或等于所述第一预设时长。The processing module is further configured to, when the playback duration is greater than the second preset duration, download the multimedia fragment corresponding to the second code rate, and the second code rate is greater than the code rate of the multimedia fragment being downloaded, so The second preset duration is greater than or equal to the first preset duration. 14.根据权利要求13所述的装置,其特征在于,所述处理模块还用于:14. The apparatus according to claim 13, wherein the processing module is further configured to: 当所述播放时长小于第一预设时长时,降低所述第一直播多媒体的播放速率;When the playback duration is less than the first preset duration, reducing the playback rate of the first live multimedia; 当所述播放时长大于第二预设时长时,增大所述第一直播多媒体的播放速率。When the playback duration is greater than the second preset duration, the playback rate of the first live multimedia is increased. 15.根据权利要求13所述的装置,其特征在于,所述处理模块具体用于:15. The apparatus according to claim 13, wherein the processing module is specifically configured to: 若所述正在下载的多媒体分片的码率大于第三码率,则确定所述第一码率,并下载所述第一码率对应的多媒体分片,所述第一码率小于所述第三码率;If the code rate of the multimedia fragment being downloaded is greater than the third code rate, the first code rate is determined, and the multimedia fragment corresponding to the first code rate is downloaded, and the first code rate is smaller than the third bit rate; 若所述正在下载的多媒体分片的码率小于第四码率,则降低所述第一直播多媒体的播放速率,所述第三码率大于或等于所述第四码率。If the bit rate of the multimedia segment being downloaded is lower than a fourth bit rate, the playback rate of the first live multimedia is reduced, and the third bit rate is greater than or equal to the fourth bit rate. 16.根据权利要求13所述的装置,其特征在于,所述处理模块具体用于:16. The apparatus according to claim 13, wherein the processing module is specifically configured to: 若所述正在下载的多媒体分片的码率小于第五码率,则确定所述第二码率,并下载所述第二码率对应的多媒体分片,所述第二码率大于所述第五码率;If the code rate of the multimedia fragment being downloaded is less than the fifth code rate, the second code rate is determined, and the multimedia fragment corresponding to the second code rate is downloaded, and the second code rate is greater than the fifth bit rate; 若所述正在下载的多媒体分片的码率大于第六码率,则增大所述第一直播多媒体的播放速率,所述第六码率大于或等于所述第五码率。If the code rate of the multimedia fragment being downloaded is greater than a sixth code rate, the playback rate of the first live multimedia is increased, and the sixth code rate is greater than or equal to the fifth code rate. 17.根据权利要求14所述的装置,其特征在于,所述处理模块还用于:17. The apparatus according to claim 14, wherein the processing module is further configured to: 在所述处理模块降低所述第一直播多媒体的播放速率,或者增大所述第一直播多媒体的播放速率之后,在确定所述第一直播多媒体中已下载至终端设备、且未播放的多媒体分片的播放时长在所述第一预设时长和所述第二预设时长之间时,将所述第一直播多媒体的播放速率设置为预设播放速率。After the processing module reduces the playback rate of the first live multimedia, or increases the playback rate of the first live multimedia, the processing module determines the multimedia that has been downloaded to the terminal device and is not played in the first live multimedia. When the playback duration of the segment is between the first preset duration and the second preset duration, the playback rate of the first live multimedia is set to the preset playback rate. 18.根据权利要求13-16任一项所述的装置,其特征在于,所述装置还包括第二确定模块和下载模块,其中,18. The apparatus according to any one of claims 13-16, wherein the apparatus further comprises a second determining module and a downloading module, wherein, 所述第二确定模块用于,在所述第一确定模块确定第一直播多媒体中已下载至终端设备、且未播放的多媒体分片的播放时长之前,确定所述第一直播多媒体的起播多媒体分片;The second determining module is configured to, before the first determining module determines the playback duration of the multimedia segments that have been downloaded to the terminal device and have not been played in the first live multimedia, determine the start of broadcasting of the first live multimedia. Multimedia fragmentation; 所述下载模块用于,根据所述起播多媒体分片,从服务器下载所述起播多媒体分片。The downloading module is configured to download the initiating multimedia fragment from the server according to the initiating multimedia fragment. 19.根据权利要求18所述的装置,其特征在于,所述第二确定模块具体用于:19. The apparatus according to claim 18, wherein the second determining module is specifically configured to: 若所述终端设备中存在用户预先配置的自定义起播多媒体分片标识,则根据所述自定义起播多媒体分片标识确定起播多媒体分片;If there is a user-preconfigured user-preconfigured user-defined multimedia segment identifier for broadcasting, determining the starting multimedia segment according to the user-defined multimedia segment identifier for broadcasting; 若所述终端设备中不存在所述自定义起播多媒体分片标识,则根据所述终端设备的参数信息确定所述起播多媒体分片,所述参数信息包括所述终端设备的历史带宽和初始码率。If the user-defined broadcast multimedia fragment identifier does not exist in the terminal device, determine the broadcast multimedia fragment according to parameter information of the terminal device, where the parameter information includes the historical bandwidth of the terminal device and the initial bit rate. 20.根据权利要求19所述的装置,其特征在于,所述第二确定模块具体用于:20. The apparatus according to claim 19, wherein the second determining module is specifically configured to: 若所述自定义起播多媒体分片标识指示已生成的多媒体分片,则确定所述起播多媒体分片为所述自定义起播多媒体分片标识所指示的多媒体分片;If the self-defined broadcast multimedia fragment identifier indicates a generated multimedia fragment, then determine that the broadcast multimedia fragment is the multimedia fragment indicated by the self-defined broadcast multimedia fragment identifier; 若所述自定义起播多媒体分片标识指示正在生成的多媒体分片,则判断所述正在生成的多媒体分片是否可下载,若是,则确定所述起播多媒体分片为所述正在生成的多媒体分片,若否,则确定所述起播多媒体分片为已生成的最新的多媒体分片。If the identifier of the user-defined start-up multimedia segment indicates a multimedia segment being generated, then determine whether the multimedia segment being generated can be downloaded, and if so, determine that the start-up multimedia segment is the one being generated. Multimedia fragment, if not, determine that the multimedia fragment to be broadcast is the latest generated multimedia fragment. 21.根据权利要求19所述的装置,其特征在于,所述第二确定模块具体用于:21. The apparatus according to claim 19, wherein the second determining module is specifically configured to: 确定所述历史带宽和所述初始码率的比值所在的比值范围;Determine the ratio range in which the ratio of the historical bandwidth and the initial code rate is located; 获取所述比值范围对应的多媒体分片的标识;obtaining the identifier of the multimedia fragment corresponding to the ratio range; 根据所述比值范围对应的多媒体分片的标识,确定所述起播多媒体分片。According to the identifier of the multimedia fragment corresponding to the ratio range, the multimedia fragment to be played is determined. 22.根据权利要求21所述的装置,其特征在于,所述第二确定模块具体用于:22. The apparatus according to claim 21, wherein the second determining module is specifically configured to: 若所述比值范围对应的多媒体分片的标识指示已生成的多媒体分片,则确定所述起播多媒体分片为所述比值范围对应的多媒体分片的标识所指示的多媒体分片;If the identifier of the multimedia fragment corresponding to the ratio range indicates the generated multimedia fragment, then determine that the starting multimedia fragment is the multimedia fragment indicated by the identifier of the multimedia fragment corresponding to the ratio range; 若所示比值范围对应的多媒体分片的标识指示正在生成的多媒体分片,则判断所述正在生成的多媒体分片是否可下载,若是,则确定所述起播多媒体分片为正在生成的多媒体分片,若否,则确定所述起播多媒体分片为已生成的最新的多媒体分片。If the identifier of the multimedia fragment corresponding to the shown ratio range indicates the multimedia fragment being generated, then determine whether the multimedia fragment being generated can be downloaded, and if so, determine that the multimedia fragment being broadcast is the multimedia fragment being generated fragment, if not, determine that the multimedia fragment to be broadcast is the latest generated multimedia fragment. 23.根据权利要求20或22所述的装置,其特征在于,所述第二确定模块具体用于:23. The apparatus according to claim 20 or 22, wherein the second determining module is specifically configured to: 获取当前时刻与所述正在生成的多媒体分片的起始生成时刻的差值;Obtain the difference between the current moment and the initial generation moment of the multimedia fragment being generated; 判断所述差值是否分别大于第三时长和第一时间差,所述第三时长为准备所述正在生成的多媒体分片所需的最小时长,所述第一时间差为所述正在生成的多媒体分片的播放时长与预设的提前下载时长的时间差;Judging whether the difference is greater than a third duration and a first time difference, the third duration is the minimum duration required to prepare the multimedia segment being generated, and the first time difference is the multimedia segment being generated. The time difference between the playback duration of the movie and the preset advance download duration; 若是,则确定所述正在生成的多媒体分片可下载;If yes, then determine that the multimedia segment being generated can be downloaded; 若否,则确定所述正在生成的多媒体分片不可下载。If not, it is determined that the multimedia segment being generated is not downloadable. 24.根据权利要求19-22任一项所述的装置,其特征在于,所述装置还包括判断模块和播放模块,其中,24. The device according to any one of claims 19-22, wherein the device further comprises a judgment module and a playback module, wherein, 所述判断模块用于,在所述下载模块从所述服务器下载所述起播多媒体分片之后,判断所述起播多媒体分片中是否包括关键帧;The judging module is configured to, after the downloading module downloads the initiating multimedia fragment from the server, determine whether the initiating multimedia fragment includes a key frame; 所述播放模块用于,在所述判断模块判断所述起播多媒体分片中包括关键帧时,从所述关键帧处开始播放所述起播多媒体分片;The playing module is configured to, when the judgment module judges that the broadcast-starting multimedia fragment includes a key frame, start playing the broadcast-starting multimedia fragment from the key frame; 所述播放模块还用于,在所述判断模块判断所述起播多媒体分片中不包括关键帧时,从所述起播多媒体分片的预设中间位置开始播放所述起播多媒体分片。The playing module is further configured to, when the judgment module judges that the starting multimedia fragment does not include a key frame, start playing the starting multimedia fragment from a preset middle position of the starting multimedia fragment. . 25.一种多媒体直播装置,其特征在于,包括存储器和处理器,所述处理器执行所述存储器中的程序指令,用于实现权利要求1-12任一项所述的多媒体直播方法。25. A multimedia live broadcast device, comprising a memory and a processor, wherein the processor executes program instructions in the memory to implement the multimedia live broadcast method according to any one of claims 1-12. 26.一种存储介质,其特征在于,所述存储介质用于存储计算机程序,所述计算机程序用于实现权利要求1-12任一项所述的多媒体直播方法。26. A storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to implement the multimedia live broadcast method according to any one of claims 1-12.
CN201811096360.0A 2018-09-19 2018-09-19 Multimedia live broadcasting method, device and equipment Active CN110933516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811096360.0A CN110933516B (en) 2018-09-19 2018-09-19 Multimedia live broadcasting method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811096360.0A CN110933516B (en) 2018-09-19 2018-09-19 Multimedia live broadcasting method, device and equipment

Publications (2)

Publication Number Publication Date
CN110933516A CN110933516A (en) 2020-03-27
CN110933516B true CN110933516B (en) 2022-06-10

Family

ID=69855253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811096360.0A Active CN110933516B (en) 2018-09-19 2018-09-19 Multimedia live broadcasting method, device and equipment

Country Status (1)

Country Link
CN (1) CN110933516B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114222194A (en) * 2021-12-17 2022-03-22 浙江大华技术股份有限公司 Video code stream adjusting method, device and system
CN117412102A (en) * 2023-03-01 2024-01-16 深圳Tcl新技术有限公司 Multimedia data transmission methods, devices, media and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731720A (en) * 2013-11-25 2014-04-16 乐视致新电子科技(天津)有限公司 Method and device for caching multimedia data of smart television
CN104320424A (en) * 2014-11-20 2015-01-28 三星电子(中国)研发中心 Streaming media fragmentation downloading method and device
CN105872721A (en) * 2015-12-14 2016-08-17 乐视云计算有限公司 Processing method and device of play-starting speed
CN107205160A (en) * 2017-06-27 2017-09-26 青岛海信电器股份有限公司 A kind of player method and device of the video issued for server
CN107396171A (en) * 2017-07-24 2017-11-24 广州酷狗计算机科技有限公司 Live network broadcast method, device and storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6452612B1 (en) * 1998-12-18 2002-09-17 Parkervision, Inc. Real time video production system and method
JP2007296107A (en) * 2006-04-28 2007-11-15 Square Enix Co Ltd Video game processing apparatus, video game processing method, and video game processing program
CN101102312B (en) * 2007-06-11 2010-06-02 华为技术有限公司 A network communication data processing method, network communication system and client
CN102801690B (en) * 2011-05-25 2015-09-30 华为技术有限公司 The processing method of Streaming Media, Distributor, client and system
CN103024446A (en) * 2012-12-31 2013-04-03 传聚互动(北京)科技有限公司 Loading and buffering method and system for online video
CN104244033B (en) * 2014-09-03 2017-12-08 乐视致新电子科技(天津)有限公司 Video broadcasting method and device, intelligent terminal
CN104735485A (en) * 2015-03-05 2015-06-24 上海小蚁科技有限公司 Method and device for playing video
CN106658226B (en) * 2015-10-28 2020-12-11 中兴通讯股份有限公司 Playing method and device
CN105430509B (en) * 2015-11-27 2018-10-30 北京奇艺世纪科技有限公司 A kind of method for broadcasting multimedia file and device
CN107438202A (en) * 2016-05-26 2017-12-05 中兴通讯股份有限公司 A kind of method and device for realizing code check switching
CN107454458A (en) * 2017-08-30 2017-12-08 努比亚技术有限公司 A kind of video data caching method, equipment and storage medium
CN107566889B (en) * 2017-09-15 2020-06-16 深圳国微技术有限公司 Audio stream flow velocity error processing method and device, computer device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731720A (en) * 2013-11-25 2014-04-16 乐视致新电子科技(天津)有限公司 Method and device for caching multimedia data of smart television
CN104320424A (en) * 2014-11-20 2015-01-28 三星电子(中国)研发中心 Streaming media fragmentation downloading method and device
CN105872721A (en) * 2015-12-14 2016-08-17 乐视云计算有限公司 Processing method and device of play-starting speed
CN107205160A (en) * 2017-06-27 2017-09-26 青岛海信电器股份有限公司 A kind of player method and device of the video issued for server
CN107396171A (en) * 2017-07-24 2017-11-24 广州酷狗计算机科技有限公司 Live network broadcast method, device and storage medium

Also Published As

Publication number Publication date
CN110933516A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN111586480B (en) Low-delay streaming media
EP3520420B1 (en) Viewer importance adaptive bit rate delivery
US10320868B2 (en) Processing of multimedia data
CN109565620B (en) Computing device, method for generating and receiving low-latency video streams
CN110430457B (en) Method and device for playing different-end audio and video and audio playing system
CN107071529B (en) A kind of HLS video broadcasting methods, terminal and server
EP3520421B1 (en) Viewer importance adaptive bit rate delivery
CN106686438B (en) method, device and system for synchronously playing audio images across equipment
EP3120520B1 (en) Media streaming
US20150271231A1 (en) Transport accelerator implementing enhanced signaling
CN107810625B (en) Method and apparatus for streaming a media sequence from a server by a client
US20220385989A1 (en) Video playing control method and system
EP3001692A1 (en) Streaming media processing method, apparatus and system
CN108881931B (en) A data buffering method and network device
JP6338709B2 (en) Streaming apparatus and method thereof, streaming service system using the same, and computer-readable recording medium (streaming apparatus and method thereof, streaming service system using the streaming medium and computer readable)
CN111447455A (en) Live video stream playback processing method, device and computing device
CN102550038A (en) Method, terminal, server and system for playing media files
CN113852824A (en) Video transcoding method and device, electronic equipment and storage medium
EP2993910A1 (en) Method and client terminal for receiving a multimedia content split into at least two successive segments, and corresponding computer program product and computer-readable medium.
CN110933516B (en) Multimedia live broadcasting method, device and equipment
CN107690093A (en) A kind of video broadcasting method and device
CN111510790B (en) Video request method, system, computer device, and computer-readable storage medium
CN103516731B (en) Cache server service method, cache server, and system
CN106105145A (en) For operation along the method for the buffer of the transmission paths arrangement between client terminal and at least one server and corresponding buffer
WO2015131934A1 (en) System and method for live video 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