CN108259948B - Method and device for playing live broadcast audio and video, computer and storage medium - Google Patents

Method and device for playing live broadcast audio and video, computer and storage medium Download PDF

Info

Publication number
CN108259948B
CN108259948B CN201810289214.3A CN201810289214A CN108259948B CN 108259948 B CN108259948 B CN 108259948B CN 201810289214 A CN201810289214 A CN 201810289214A CN 108259948 B CN108259948 B CN 108259948B
Authority
CN
China
Prior art keywords
code rate
audio
client
video data
identifier
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
CN201810289214.3A
Other languages
Chinese (zh)
Other versions
CN108259948A (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.)
Aerospace Guosheng Technology Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810289214.3A priority Critical patent/CN108259948B/en
Publication of CN108259948A publication Critical patent/CN108259948A/en
Application granted granted Critical
Publication of CN108259948B publication Critical patent/CN108259948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/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/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/26291Content 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 for providing content or additional data updates, e.g. updating software modules, stored at the client

Abstract

The invention discloses a method and a device for playing live audio and video, a computer and a storage medium. The method comprises the following steps: the method comprises the steps that a business server receives at least two code rate identifications sent by a streaming media server, wherein the code rate identifications comprise a master code rate identification of master audio and video data sent by a master terminal and at least one slave code rate identification, and the slave code rate identifications correspond to slave audio and video data generated by code rate conversion of the master audio and video data by the streaming media server; the service server acquires the maximum receiving code rate of the client and determines a target code rate identifier matched with the maximum receiving code rate from the master code rate identifier and the slave code rate identifier according to a preset matching rule; and the service server sends the target code rate identifier to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client. The problem that a user cannot smoothly browse live audio and video due to the fact that the audio and video code rate is larger than the receiving code rate of the client, the client live broadcast is blocked and the audio and video jumps is solved.

Description

Method and device for playing live broadcast audio and video, computer and storage medium
Technical Field
The embodiment of the invention relates to an audio and video processing technology, in particular to a method and a device for playing live audio and video, a computer and a storage medium.
Background
With the development of network technology, more and more people acquire required information through networks. Especially, the audio and video live broadcast integrates rich elements such as images, characters and sounds, and the like, and the audio and video live broadcast is luxuriant in sound and is gradually accepted by more and more users.
However, in the current audio and video live broadcast process, when the anchor end updates the code rate of the current audio and video, the audio and video data with the updated code rate is pushed to the streaming media server, and the streaming media server pushes the received audio and video data to the corresponding client, so that the client can only play the live broadcast audio and video with one code rate, the code stream of the currently played live broadcast audio and video cannot be switched, and the client cannot adjust the definition of the currently played live broadcast streaming media according to the network state of the client and other factors, therefore, the problems of blockage of the live broadcast video and the like caused by the network factors easily exist, and the live broadcast flexibility is low.
Disclosure of Invention
The invention provides a method, a device, a computer and a storage medium for playing live audio and video, which are used for determining pushed live audio and video data according to the dynamic receiving code rate of a client.
In a first aspect, an embodiment of the present invention provides a method for playing a live audio/video, where the method includes:
the method comprises the steps that a business server receives at least two code rate identifications sent by a streaming media server, wherein the code rate identifications comprise a master code rate identification of master audio and video data sent by a master terminal and at least one slave code rate identification, and the slave code rate identifications correspond to slave audio and video data generated by code rate conversion of the master audio and video data by the streaming media server;
the service server acquires the maximum receiving code rate of the client and determines a target code rate identifier matched with the maximum receiving code rate from a master code rate identifier and a slave code rate identifier according to a preset matching rule;
and the business server sends the target code rate identification to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client.
Optionally, the obtaining, by the service server, the maximum receiving code rate of the client, and determining, according to a preset matching rule, a target code rate identifier matching the maximum receiving code rate from the master code rate identifier and the slave code rate identifier, includes:
if the maximum receiving code rate is larger than a first code rate of the master audio video data, or the absolute value of the difference between the maximum receiving code rate and the first code rate is smaller than or equal to a first preset value, determining the master code rate identifier as the target code rate identifier;
and if the maximum receiving code rate is smaller than the first code rate of the master audio video data and the absolute value of the difference between the maximum receiving code rate and the first code rate is larger than the first preset value, screening a slave code rate identifier matched with the maximum receiving code rate, and determining the slave code rate identifier obtained by screening as the target code rate identifier.
Optionally, the sending, by the service server, the target code rate identifier to the streaming media server, so that the streaming media server pushes corresponding audio and video data to the client, where the sending includes:
and the business server sends the target code rate identification to the streaming media server so that the streaming media server determines address information corresponding to the audio and video data according to the target code rate identification, reads the audio and video data according to the address information and pushes the audio and video data to the client.
Optionally, after the audio and video data is pushed to the client, the method further includes:
if the target code rate identification is the slave code rate identification, the standard live broadcast time and the current broadcast time of the audio and video data are obtained, a recommended broadcast rate is generated according to the standard live broadcast time and the current broadcast time, and the recommended broadcast rate is sent to the client, so that the client broadcasts the audio and video data according to the recommended broadcast rate.
Optionally, after the service server sends the target code rate identifier to the streaming media server, so that the streaming media server pushes corresponding audio and video data to the client, the method further includes:
the business server receives a code rate change request sent by a client, wherein the code rate change request carries expected code rate information;
and the service server determines a change code rate identifier matched with the expected code rate information, and sends the change code rate identifier to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client.
Optionally, after the service server sends the target bitrate identifier to the streaming media server, the method further includes:
and the service server sends the target code rate identification to the client so that the client updates the code rate display identification of the client according to the target code rate identification.
Optionally, after updating the code rate identifier of the client according to the target code rate identifier, the method further includes:
the business server counts the client number proportion of the target code rate identification as a slave code rate identification and a master code rate identification;
and if the number proportion of the clients is greater than a preset proportion, generating code rate change information and sending the code rate change information to the anchor terminal so that the anchor terminal adjusts the audio and video acquisition code rate according to the code rate change information.
In a second aspect, an embodiment of the present invention further provides a device for playing a live video, where the device includes:
the code rate identification receiving module is used for receiving at least two code rate identifications sent by a streaming media server, wherein the code rate identifications comprise a main code rate identification of main audio and video data sent by a main broadcast end and at least one slave code rate identification, and the slave code rate identification corresponds to slave audio and video data generated by code rate conversion of the main audio and video data by the streaming media server;
the target code rate identification determining module is used for acquiring the maximum receiving code rate of the client and determining a target code rate identification matched with the maximum receiving code rate according to a preset matching rule;
and the first audio and video data pushing module is used for sending the target code rate identifier to the streaming media server so as to enable the streaming media server to push corresponding audio and video data to the client.
Optionally, the target code rate identifier determining module is specifically configured to:
if the maximum receiving code rate is larger than a first code rate of the master audio video data, or the absolute value of the difference between the maximum receiving code rate and the first code rate is smaller than or equal to a first preset value, determining the master code rate identifier as the target code rate identifier;
and if the maximum receiving code rate is smaller than the first code rate of the master audio video data and the absolute value of the difference between the maximum receiving code rate and the first code rate is larger than the first preset value, screening a slave code rate identifier matched with the maximum receiving code rate, and determining the slave code rate identifier obtained by screening as the target code rate identifier.
Optionally, the first audio/video data pushing module is specifically configured to:
and the business server sends the target code rate identification to the streaming media server so that the streaming media server determines address information corresponding to the audio and video data according to the target code rate identification, reads the audio and video data according to the address information and pushes the audio and video data to the client.
Optionally, the device further includes a play rate recommending module, configured to, after the audio and video data is pushed to the client, if the target code rate identifier is a slave code rate identifier, obtain a standard live broadcast time and a current play time of the audio and video data, generate a recommended play rate according to the standard live broadcast time and the current play time, and send the recommended play rate to the client, so that the client plays the audio and video data according to the recommended play rate.
Optionally, the apparatus further includes a code rate change request module, configured to send the target code rate identifier to the streaming media server by the service server, so that after the streaming media server pushes corresponding audio and video data to the client, the service server receives a code rate change request sent by the client, where the code rate change request carries information about an expected code rate;
and the second audio and video data pushing module is used for determining a change code rate identifier matched with the expected code rate information by the service server and sending the change code rate identifier to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client.
Optionally, the apparatus further includes a code rate display identifier updating module, configured to send the target code rate identifier to the client by the service server after the service server sends the target code rate identifier to the streaming media server, so that the client updates the code rate display identifier of the client according to the target code rate identifier.
Optionally, the apparatus further includes an identifier statistics module, configured to, after updating the code rate identifier of the client according to the target code rate identifier, count, by the service server, a client number ratio in which the target code rate identifier is a slave code rate identifier and a master code rate identifier;
and the acquisition code rate feedback module is used for generating code rate change information and sending the code rate change information to the anchor terminal if the number proportion of the clients is greater than a preset proportion, so that the anchor terminal adjusts the audio and video acquisition code rate according to the code rate change information.
In a third aspect, an embodiment of the present invention further provides a service server, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, where when the processor executes the program, a live audio and video playing method as provided in any embodiment of the present invention is implemented.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for playing live audio and video according to any embodiment of the present invention.
In the embodiment of the invention, the service server obtains the maximum receiving code rate of the client and determines the target code rate identification matched with the maximum receiving code rate from the main code rate identification and the slave code rate identification according to the preset matching rule, so that the sent audio and video data are matched with the receiving capability of the client, and the problem that a user cannot smoothly browse live audio and video due to the fact that the client cannot smoothly receive live broadcast blockage and audio and video jumping formed by the fact that the audio and video code rate is larger than the maximum receiving code rate of the client is avoided.
Drawings
FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present invention;
fig. 2 is a flowchart of a method for playing a live video and audio according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for playing a live video and audio according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a playing apparatus for live broadcasting audio and video according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a service server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario of the embodiment of the present invention, and includes an anchor terminal 101, a streaming media server 102, a service server 103, and a client 104, where the anchor terminal 101 refers to a terminal that acquires and generates audio and video, and may be a mobile terminal such as a smart phone or a tablet computer that is provided with an audio and video acquisition device, or may be a terminal such as a computer that is provided with an audio and video acquisition device. The client 104 refers to a client for receiving and playing the anchor audio and video data, and the client may be a terminal such as a computer, a smart phone or a tablet computer, where multiple clients may receive the audio and video data pushed by the same anchor simultaneously. The streaming media server 102 is mainly used for transmitting a video file to a client by a streaming protocol for online watching by a user, and also used for receiving a real-time video stream from video acquisition and compression software and then broadcasting the video stream to the client by the streaming protocol. The service server 103 is a newly added server and is configured to coordinate a code rate of the audio and video data pushed by the anchor terminal and a receiving code rate of the client.
The anchor terminal 101 may be connected to the streaming media server 102 and the service server 103 through a wireless network, the client terminal 104 may be connected to the streaming media server 102 and the service server 103 through a wireless network, and the streaming media server 102 and the service server 103 may be connected through a wireless network.
Example one
Fig. 2 is a flowchart of a live audio and video playing method according to an embodiment of the present invention, where this embodiment is applicable to a case where live audio and video data is determined according to a dynamic bitrate of a user end, and the method may be executed by the service server 103 provided in the embodiment of the present invention, and specifically may be implemented in a software and/or hardware manner deployed on the service server 103. The method specifically comprises the following steps:
s110, the service server receives at least two code rate identifications sent by the streaming media server, wherein the code rate identifications comprise a main code rate identification of main audio and video data sent by a main broadcast end and at least one slave code rate identification, and the slave code rate identification corresponds to slave audio and video data generated by code rate conversion of the main audio and video data by the streaming media server.
The code rate mark is a symbol for marking code rate, and can be Chinese characters, numbers, symbols or any combination of the above forms. Illustratively, the code rate identification can be in a Chinese character form such as but not limited to "high definition", "super definition", or "standard definition". Alternatively, one code rate identification may correspond to a range of code rates.
In this embodiment, after the anchor end generates the main audio and video data, the anchor end sends the main audio and video data to the streaming media data through stream pushing software, and sends a main code rate identifier of the code rate of the main audio and video data.
After receiving the master audio and video data, the streaming media server performs rate conversion on the received master audio and video data to generate slave audio and video data with different rates, and simultaneously generates a slave rate identifier corresponding to each slave audio and video data, and optionally, the rate of the slave audio and video data is smaller than that of the master audio and video data.
The stream media data sends the main code rate identification and the at least one slave code rate identification to the service server, or simultaneously sends the main code rate identification to the service server when the anchor side sends the main audio and video data, and the stream media data sends the at least one slave code rate identification to the service server after transcoding is completed.
It should be noted that the streaming media server may perform rate conversion on the master audio and video data to generate at least one two or more slave audio and video data. Each slave audio and video data corresponds to one slave code rate identifier, so that one, two or more slave code rate identifiers corresponding to the slave audio and video data can be provided.
S120, the service server obtains the maximum receiving code rate of the client, and determines a target code rate identification matched with the maximum receiving code rate from the main code rate identification and the slave code rate identification according to a preset matching rule.
The maximum receiving code rate of the client refers to a maximum code rate corresponding to a situation that data reception is smooth for a user, optionally, the maximum receiving code rate may be determined according to a real-time network speed of the client, optionally, the service server obtains the maximum receiving code rate of the client according to a preset interval time, illustratively, the preset interval time starts 1 minute, 5 minutes, 10 minutes, or the like. In this embodiment, the service server may be a client that determines to receive the audio and video data of the anchor terminal, and further obtains the maximum receiving code rate of the client.
In this embodiment, the audio and video data pushed to the client is determined according to the maximum receiving code rate of the client, optionally, a target code rate identifier of the audio and video data pushed to the client is determined according to the maximum receiving code rate of the client, and the corresponding audio and video data is determined according to the target code rate identifier.
Optionally, determining, according to a preset matching rule, a target code rate identifier matching the maximum receiving code rate from the master code rate identifier and the slave code rate identifier, includes: if the maximum receiving code rate is larger than the first code rate of the main audio video data, or the absolute value of the difference value between the maximum receiving code rate and the first code rate is smaller than or equal to a first preset value, determining the main code rate identifier as a target code rate identifier; and if the maximum receiving code rate is smaller than the first code rate of the master audio video data and the absolute value of the difference value between the maximum receiving code rate and the first code rate is larger than a first preset value, screening a slave code rate identifier matched with the maximum receiving code rate, and determining the slave code rate identifier obtained by screening as a target code rate identifier.
The first preset value refers to an allowable error range of the maximum receiving code rate and the first code rate. If the maximum receiving code rate is larger than the first code rate of the master audio video data, or the absolute value of the difference between the maximum receiving code rate and the first code rate is smaller than or equal to a first preset value, the maximum receiving code rate of the client side can support smooth receiving of the master audio video data, and the master code rate identification is determined as the target code rate identification.
If the maximum receiving code rate is smaller than the first code rate of the master audio video data and the absolute value of the difference between the maximum receiving code rate and the first code rate is larger than a first preset value, the maximum receiving code rate of the client cannot support smooth receiving of the master audio video data, and a slave code rate identifier matched with the maximum receiving code rate is screened. Each slave code rate identification corresponds to a code rate of the slave audio and video data, and if the code rate of one slave audio and video data is within a preset error range of the maximum receiving code rate, the corresponding slave code rate identification is determined as a target code rate identification; and if the code rate of any slave audio/video data is not within the preset error range of the maximum receiving code rate, determining the slave code rate identifier corresponding to the slave audio/video data with the minimum code rate as the target code rate identifier.
S130, the service server sends the target code rate identification to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client.
And after determining the target code rate identification, the service server sends the target code rate identification to the streaming media server. And the streaming media server determines corresponding audio and video data according to the target code rate identification and pushes the corresponding audio and video data to the client.
Optionally, step S130 includes: and the service server sends the target code rate identification to the streaming media server so that the streaming media server determines address information corresponding to the audio and video data according to the target code rate identification, reads the audio and video data according to the address information and pushes the audio and video data to the client.
The streaming media server is provided with mapping information of code rate identification and address information of the audio and video data, the address information of the audio and video data corresponding to the target code rate identification can be determined according to the mapping information, and the audio and video data can be obtained based on the address information of the audio and video data.
In the embodiment, the target code rate identification matched with the maximum receiving code rate of the client is determined, so that the sent audio and video data is matched with the receiving capability of the client, and the problem that a user cannot smoothly browse live audio and video due to live broadcast jamming and audio and video jumping caused by the fact that the client cannot smoothly receive the audio and video data because the audio and video code rate is larger than the maximum receiving code rate of the client is solved.
Optionally, after the audio and video data is pushed to the client, the method further includes: and if the target code rate identification is the slave code rate identification, acquiring the standard live broadcast time and the current broadcast time of the audio and video data, generating a recommended broadcast rate according to the standard live broadcast time and the current broadcast time, and sending the recommended broadcast rate to the client so that the client broadcasts the audio and video data according to the recommended broadcast rate.
In this embodiment, when the target bitrate identifier is the slave bitrate identifier, the audio and video data pushed to the client is the slave audio and video data, and the slave audio and video data can be formed only by performing bitrate conversion on the master audio and video data by the streaming media server, so that there is a time delay in pushing the slave audio and video data. When the target code rate identification is determined to be the slave code rate identification, the business server simultaneously sends the recommended play rate, so that the client can play the audio and video data according to the recommended play rate, the play rate of the slave audio and video data is improved, and the watching progress of a user of the client receiving the slave audio and video data and the watching progress of a user of the client receiving the master audio and video data are reduced.
The standard live broadcast time of the slave audio and video data refers to the play time of the master audio and video data, the current play time can be the play time of the slave audio and video data at the client, and when a difference value exists between the standard live broadcast time and the current play time, the play of the slave audio and video data is delayed. Optionally, the recommended play rate is related to a difference between the standard live broadcast time and the current play time. Illustratively, the larger the difference between the standard live broadcast time and the current broadcast time is, the larger the broadcast delay of the slave audio/video data is, the larger the recommended broadcast rate is; correspondingly, the smaller the difference between the standard live broadcast time and the current broadcast time is, the smaller the broadcast delay of the slave audio/video data is, and the smaller the recommended broadcast rate is, so as to reduce the broadcast delay of the slave audio/video data. The recommended play rate may be, but is not limited to, a play rate 1.5 times, a play rate 2 times, or a play rate 3 times of the normal play rate.
In the embodiment, after the slave audio and video data matched with the maximum receiving code rate is pushed to the client, the playing speed of the slave audio and video data is increased according to the playing delay, so that the delay of the standard live audio and video is reduced on the basis that a user smoothly plays all live audio and video data, and the watching experience of the live user is improved.
Optionally, after the service server sends the target code rate identifier to the streaming media server, so that the streaming media server pushes the corresponding audio and video data to the client, the method further includes: a business server receives a code rate change request sent by a client, wherein the code rate change request carries expected code rate information; and the service server determines a change code rate identifier matched with the expected code rate information, and sends the change code rate identifier to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client.
The code rate change request refers to a request which is sent by a client and carries expected code rate information, and the expected code rate information can be a code rate value or a code rate identifier.
After receiving a code rate change request, a business server determines an anchor terminal or live broadcast audio and video data corresponding to a client terminal, determines whether a code rate identifier matched with expected code rate information exists, and if so, determines a change code rate identifier and sends the change code rate identifier to a streaming media server so that the streaming media server pushes the corresponding audio and video data to the client terminal; and if the code rate identification matched with the expected code rate information does not exist, the service server sends prompt information to the client.
In the embodiment, the service server can determine the corresponding audio and video data according to the expected code rate information in the received code rate change request, so that the live broadcast audio and video data can be sent according to the requirements of users, the definition of the currently played live broadcast streaming media can be adjusted, and the flexibility of the live broadcast audio and video is improved.
According to the technical scheme of the embodiment, the service server obtains the maximum receiving code rate of the client and determines the target code rate identification matched with the maximum receiving code rate from the master code rate identification and the slave code rate identification according to the preset matching rule, so that the sent audio and video data are matched with the receiving capability of the client, and the problem that a user cannot smoothly browse live audio and video due to the fact that the audio and video code rate is larger than the maximum receiving code rate of the client and live broadcast blockage and audio and video jumping formed by the fact that the client cannot smoothly receive the audio and video data is avoided.
On the basis of the above technical solution, after updating the code rate identifier of the client according to the target code rate identifier, the method further includes: the business server counts the client quantity proportion of the target code rate identification as the slave code rate identification and the master code rate identification; and if the number proportion of the clients is greater than the preset proportion, generating code rate change information and sending the code rate change information to the anchor terminal so that the anchor terminal adjusts the audio and video acquisition code rate according to the code rate change information.
The method comprises the steps that a plurality of clients can simultaneously receive and play audio and video data of the same anchor, and a service server counts client data with target code rate identifications respectively being slave code rate identifications and master code rate identifications and client data proportion after determining the target code rate identification corresponding to each client. When the client data ratio of the slave code rate identifier and the master code rate identifier is greater than a preset ratio, the preset ratio may be 1:1 or 3:2, for example, which indicates that a large number of clients cannot smoothly receive master audio and video data, and the service server generates code rate change information and sends the code rate change information to the anchor terminal. The code rate change information is code rate reduction information, so that the collecting code rate of the live broadcast audio and video is reduced by the anchor terminal, audio and video data meeting the requirements of a large number of users are pushed, the client terminal can receive the main audio and video data, and the live broadcast watching experience of the users is improved.
Example two
Fig. 3 is a flowchart of a method for playing a live video and audio according to a second embodiment of the present invention, and on the basis of the second embodiment, a method for updating a client code rate display identifier is further provided. Specifically, the method comprises the following steps:
s210, the service server receives at least two code rate identifications sent by the streaming media server.
The code rate identification comprises a main code rate identification of the main audio and video data sent by the anchor terminal and at least one slave code rate identification, and the slave code rate identification corresponds to slave audio and video data generated by performing code rate conversion on the main audio and video data by the streaming media server.
S220, the service server obtains the maximum receiving code rate of the client, and determines a target code rate identification matched with the maximum receiving code rate from the main code rate identification and the slave code rate identification according to a preset matching rule.
And S230, the service server sends the target code rate identifier to the streaming media server so that the streaming media server pushes the corresponding audio and video data to the client.
S240, the service server sends the target code rate identification to the client so that the client updates the code rate display identification of the client according to the target code rate identification.
In this embodiment, when the streaming media server pushes the audio and video data to the client, the service server sends the target code rate identifier corresponding to the audio and video data to the client, so that the client updates the code rate display identifier of the client when receiving the target code rate identifier, thereby avoiding a problem that a user cannot know a change condition of the code rate when the code rate of the audio and video data pushed to the client changes, so that the code rate of the currently played audio and video data is not matched with the code rate display identifier of the playing interface.
Optionally, the updating, by the client, the code rate display identifier of the client according to the target code rate identifier includes: the client detects whether the current code rate display identification is the same as the target code rate identification; if not, updating the current code rate display identification according to the target code rate identification, and if the target code rate display identification is the same, keeping the current code rate display identification unchanged.
In the embodiment, when the audio and video data are pushed, the target code rate identification is sent to the client, and the code rate display identification of the client is updated in real time, so that the code rate display identification is matched with the played audio and video data, manual setting or refreshing of a user is not needed, and the intelligence of a live broadcast interface is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a playing apparatus for live video and audio provided by a third embodiment of the present invention, where the apparatus includes:
a code rate identifier receiving module 310, configured to receive at least two code rate identifiers sent by a streaming media server, where the code rate identifiers include a master code rate identifier of master audio and video data sent by a master terminal and at least one slave code rate identifier, and the slave code rate identifier corresponds to slave audio and video data generated by performing code rate conversion on the master audio and video data by the streaming media server;
a target code rate identifier determining module 320, configured to obtain a maximum receiving code rate of the client, and determine a target code rate identifier matching the maximum receiving code rate according to a preset matching rule;
the first audio/video data pushing module 330 is configured to send the target code rate identifier to the streaming media server, so that the streaming media server pushes corresponding audio/video data to the client.
Optionally, the target code rate identifier determining module 320 is specifically configured to:
if the maximum receiving code rate is larger than the first code rate of the main audio video data, or the absolute value of the difference value between the maximum receiving code rate and the first code rate is smaller than or equal to a first preset value, determining the main code rate identifier as a target code rate identifier;
and if the maximum receiving code rate is smaller than the first code rate of the master audio video data and the absolute value of the difference value between the maximum receiving code rate and the first code rate is larger than a first preset value, screening a slave code rate identifier matched with the maximum receiving code rate, and determining the slave code rate identifier obtained by screening as a target code rate identifier.
Optionally, the first audio and video data pushing module 330 is specifically configured to:
and the service server sends the target code rate identification to the streaming media server so that the streaming media server determines address information corresponding to the audio and video data according to the target code rate identification, reads the audio and video data according to the address information and pushes the audio and video data to the client.
Optionally, the device further includes a play rate recommending module, configured to, after the audio and video data is pushed to the client, if the target code rate identifier is the slave code rate identifier, obtain a standard live broadcast time and a current play time of the audio and video data, generate a recommended play rate according to the standard live broadcast time and the current play time, and send the recommended play rate to the client, so that the client plays the audio and video data according to the recommended play rate.
Optionally, the apparatus further includes a code rate change request module, configured to send the target code rate identifier to the streaming media server by the service server, so that after the streaming media server pushes corresponding audio and video data to the client, the service server receives a code rate change request sent by the client, where the code rate change request carries information about an expected code rate;
and the second audio and video data pushing module is used for determining a change code rate identifier matched with the expected code rate information by the service server and sending the change code rate identifier to the streaming media server so that the streaming media server pushes the corresponding audio and video data to the client.
Optionally, the apparatus further includes a code rate display identifier updating module, configured to send the target code rate identifier to the client by the service server after the service server sends the target code rate identifier to the streaming media server, so that the client updates the code rate display identifier of the client according to the target code rate identifier.
Optionally, the apparatus further includes an identifier counting module, configured to count, by the service server, a client quantity ratio in which the target code rate identifier is the slave code rate identifier and the master code rate identifier after updating the code rate identifier of the client according to the target code rate identifier;
and the acquisition code rate feedback module is used for generating code rate change information and sending the code rate change information to the anchor terminal if the number proportion of the clients is greater than a preset proportion, so that the anchor terminal adjusts the audio and video acquisition code rate according to the code rate change information.
The live audio and video playing device provided by the embodiment of the invention can execute the live audio and video playing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the live audio and video playing method.
Example four
Fig. 5 is a schematic structural diagram of a service server according to a fourth embodiment of the present invention. Referring to fig. 5, the service server includes:
one or more processors 410;
a memory 420 for storing one or more programs;
when the one or more programs are executed by the one or more processors 410, the one or more processors 410 implement the method for playing the live audio and video, which is provided by the embodiment of the present invention.
FIG. 5 illustrates an example of a processor; the processor and memory may be connected by a bus or other means, such as by a bus in FIG. 5.
The memory, which is a computer-readable storage medium, may be used to store software programs, computer-executable programs, and modules. The processor executes various functional applications and data processing of the service server by running the software program, the instructions and the modules stored in the memory, namely the method for playing the live audio and video is realized.
The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the service server, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory may further include memory remotely located from the processor, and these remote memories may be connected to the service server over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
In addition, according to different forms of the service server, in addition to the processor and the memory, the control service server may further include other modules or structures, for example, the service server may have a voice broadcasting function and may further include a speaker; for another example, the service server may be a device having a display function, and further includes a display screen for displaying map data, and also allows a user to perform touch operation on the navigation software interface.
The service server provided by the embodiment of the present invention and the method for playing live videos and audios provided by the embodiment of the present invention belong to the same inventive concept, and technical details that are not described in detail in the embodiment of the present invention may refer to the above embodiment, and the embodiment of the present invention has the same beneficial effects as the above embodiment of the present invention.
EXAMPLE five
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for playing live audio and video according to an embodiment of the present invention.
The computer-readable storage medium provided by the embodiment and the method for playing live videos and audios provided by the embodiment belong to the same inventive concept, and technical details that are not described in detail in the embodiment can be referred to the above embodiment, and the embodiment and the above embodiment have the same beneficial effects.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A method for playing live videos and audios is characterized by comprising the following steps:
the method comprises the steps that a business server receives at least two code rate identifications sent by a streaming media server, wherein the code rate identifications comprise a master code rate identification of master audio and video data sent by a master terminal and at least one slave code rate identification, and the slave code rate identifications correspond to slave audio and video data generated by code rate conversion of the master audio and video data by the streaming media server;
the service server acquires the maximum receiving code rate of the client and determines a target code rate identifier matched with the maximum receiving code rate from a master code rate identifier and a slave code rate identifier according to a preset matching rule;
the business server sends the target code rate identification to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client;
the business server sends the target code rate identification to the client so that the client updates the code rate display identification of the client according to the target code rate identification;
the business server counts the client number proportion of the target code rate identification as a slave code rate identification and a master code rate identification;
and if the number proportion of the clients is greater than a preset proportion, generating code rate change information, and sending the code rate change information to the anchor terminal so that the anchor terminal adjusts the audio and video acquisition code rate according to the code rate change information, wherein the preset proportion is not less than 1.
2. The method of claim 1, wherein the service server obtains a maximum receiving code rate of the client, and determines a target code rate identifier matching the maximum receiving code rate from the master code rate identifier and the slave code rate identifier according to a preset matching rule, including:
if the maximum receiving code rate is larger than a first code rate of the master audio video data, or the absolute value of the difference between the maximum receiving code rate and the first code rate is smaller than or equal to a first preset value, determining the master code rate identifier as the target code rate identifier;
and if the maximum receiving code rate is smaller than the first code rate of the master audio video data and the absolute value of the difference between the maximum receiving code rate and the first code rate is larger than the first preset value, screening a slave code rate identifier matched with the maximum receiving code rate, and determining the slave code rate identifier obtained by screening as the target code rate identifier.
3. The method according to claim 2, wherein the sending, by the service server, the target bitrate identifier to the streaming media server to enable the streaming media server to push corresponding audio and video data to the client includes:
and the business server sends the target code rate identification to the streaming media server so that the streaming media server determines address information corresponding to the audio and video data according to the target code rate identification, reads the audio and video data according to the address information and pushes the audio and video data to the client.
4. The method of claim 3, after pushing audio video data to the client, further comprising:
if the target code rate identification is the slave code rate identification, the standard live broadcast time and the current broadcast time of the audio and video data are obtained, a recommended broadcast rate is generated according to the standard live broadcast time and the current broadcast time, and the recommended broadcast rate is sent to the client, so that the client broadcasts the audio and video data according to the recommended broadcast rate.
5. The method according to claim 3, wherein after the service server sends the target bitrate identifier to the streaming media server, so that the streaming media server pushes corresponding audio and video data to the client, the method further comprises:
the business server receives a code rate change request sent by a client, wherein the code rate change request carries expected code rate information;
and the service server determines a change code rate identifier matched with the expected code rate information, and sends the change code rate identifier to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client.
6. The utility model provides a play device of live broadcast audio frequency and video which characterized in that sets up in the business server, includes:
the code rate identification receiving module is used for receiving at least two code rate identifications sent by a streaming media server, wherein the code rate identifications comprise a main code rate identification of main audio and video data sent by a main broadcast end and at least one slave code rate identification, and the slave code rate identification corresponds to slave audio and video data generated by code rate conversion of the main audio and video data by the streaming media server;
the target code rate identification determining module is used for acquiring the maximum receiving code rate of the client and determining a target code rate identification matched with the maximum receiving code rate according to a preset matching rule;
the audio and video data pushing module is used for sending the target code rate identification to the streaming media server so that the streaming media server pushes corresponding audio and video data to the client;
a code rate display identifier updating module, configured to send the target code rate identifier to the client, so that the client updates the code rate display identifier of the client according to the target code rate identifier;
the identification counting module is used for counting the client quantity proportion of the target code rate identification as the slave code rate identification and the master code rate identification;
and the acquisition code rate feedback module is used for generating code rate change information and sending the code rate change information to the anchor terminal if the number proportion of the clients is greater than a preset proportion, so that the anchor terminal adjusts the audio and video acquisition code rate according to the code rate change information, wherein the preset proportion is not less than 1.
7. A service server comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the program.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201810289214.3A 2018-03-30 2018-03-30 Method and device for playing live broadcast audio and video, computer and storage medium Active CN108259948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810289214.3A CN108259948B (en) 2018-03-30 2018-03-30 Method and device for playing live broadcast audio and video, computer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810289214.3A CN108259948B (en) 2018-03-30 2018-03-30 Method and device for playing live broadcast audio and video, computer and storage medium

Publications (2)

Publication Number Publication Date
CN108259948A CN108259948A (en) 2018-07-06
CN108259948B true CN108259948B (en) 2020-12-15

Family

ID=62748018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810289214.3A Active CN108259948B (en) 2018-03-30 2018-03-30 Method and device for playing live broadcast audio and video, computer and storage medium

Country Status (1)

Country Link
CN (1) CN108259948B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108038722A (en) * 2017-12-07 2018-05-15 深圳慧逛信息服务有限公司 A kind of interactive marketing system
WO2020034082A1 (en) * 2018-08-14 2020-02-20 海能达通信股份有限公司 Slicing-based rtp stream transmission method, device, terminal and server
CN111385590A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Live broadcast data processing method and device and terminal
CN112511884B (en) * 2019-09-16 2023-11-03 江苏怀业信息技术股份有限公司 Mixed flow control method, system and storage medium for audio and video flow
CN110996117B (en) * 2019-12-20 2021-10-22 北京达佳互联信息技术有限公司 Video transcoding method and device, electronic equipment and storage medium
CN111654713A (en) * 2020-04-20 2020-09-11 视联动力信息技术股份有限公司 Live broadcast interaction method and device
WO2021217318A1 (en) * 2020-04-26 2021-11-04 华为技术有限公司 Method and apparatus for adjusting streaming media parameter dynamic adaptive network
CN111416989A (en) * 2020-04-28 2020-07-14 北京金山云网络技术有限公司 Video live broadcast method and system and electronic equipment
CN111541884A (en) * 2020-05-07 2020-08-14 深圳市亿联智能有限公司 High-compatibility network streaming media distribution system
CN113556569B (en) * 2021-07-14 2023-10-24 青岛聚看云科技有限公司 Server and live channel playing method
CN114222194A (en) * 2021-12-17 2022-03-22 浙江大华技术股份有限公司 Video code stream adjusting method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986914A (en) * 2014-05-27 2014-08-13 东南大学 Code rate self-adaption method based on number of client sides in wireless video monitoring system
CN106162214A (en) * 2016-09-05 2016-11-23 腾讯科技(深圳)有限公司 Method for video coding and net cast client
CN106507024A (en) * 2016-11-17 2017-03-15 北京数码视讯技术有限公司 A kind of self-adaption code rate method of adjustment and device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101835029A (en) * 2010-04-21 2010-09-15 深圳市紫云鑫软件技术有限公司 Control method, system and client for playing streaming media
CN102883216B (en) * 2011-07-14 2017-10-10 上海聚力传媒技术有限公司 A kind of net cast method and apparatus
US9843845B2 (en) * 2012-11-28 2017-12-12 Sinclair Broadcast Group, Inc. Terrestrial broadcast market exchange network platform and broadcast augmentation channels for hybrid broadcasting in the internet age
CN103873888A (en) * 2012-12-12 2014-06-18 深圳市快播科技有限公司 Live broadcast method of media files and live broadcast source server
US9374604B2 (en) * 2014-03-31 2016-06-21 Arris Enterprises, Inc. Adaptive streaming transcoder synchronization
CN104602044B (en) * 2015-02-05 2019-02-15 秦永红 A kind of RTMP Streaming Media public network live broadcast system and its design method
CN105357591B (en) * 2015-11-16 2018-10-12 北京理工大学 A kind of QoE monitoring of self-adaption code rate net cast and optimization method
CN105871808A (en) * 2015-12-14 2016-08-17 乐视云计算有限公司 Method and device for transcoding live video
CN105898408A (en) * 2016-04-28 2016-08-24 乐视控股(北京)有限公司 Video play method and device
CN106303608B (en) * 2016-09-27 2020-03-03 北京小米移动软件有限公司 Live broadcast processing method and device, live broadcast server and live broadcast system
CN106488265A (en) * 2016-10-12 2017-03-08 广州酷狗计算机科技有限公司 A kind of method and apparatus sending Media Stream
CN106604055B (en) * 2017-01-06 2019-08-09 广州四三九九信息科技有限公司 Video smoothing based on complicated weak mobile network environment sends live streaming uplink method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986914A (en) * 2014-05-27 2014-08-13 东南大学 Code rate self-adaption method based on number of client sides in wireless video monitoring system
CN106162214A (en) * 2016-09-05 2016-11-23 腾讯科技(深圳)有限公司 Method for video coding and net cast client
CN106507024A (en) * 2016-11-17 2017-03-15 北京数码视讯技术有限公司 A kind of self-adaption code rate method of adjustment and device

Also Published As

Publication number Publication date
CN108259948A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN108259948B (en) Method and device for playing live broadcast audio and video, computer and storage medium
CN110741651B (en) Methods, systems, and media for presenting notifications indicating recommended content
US8982179B2 (en) Apparatus and method for modification of telecommunication video content
US10099123B2 (en) Method and apparatus for managing a gaming application
US9615119B2 (en) Method and apparatus for providing timeshift service in digital broadcasting system and system thereof
CN108881972B (en) Code rate allocation method, device, equipment and storage medium
WO2017202243A1 (en) Multimedia playback method and related device
US10645451B2 (en) Resource management for video streaming with inattentive user
US9357215B2 (en) Audio output distribution
US10237629B2 (en) Channel classification methods and devices
CN111107390B (en) Live broadcast service system and live broadcast connection establishment method
US11089073B2 (en) Method and device for sharing multimedia content
CN103024491B (en) The video broadcasting method of mobile terminal and system
CN105681845A (en) Method and system for synchronously watching television program through mobile terminal
US10404606B2 (en) Method and apparatus for acquiring video bitstream
CN105898602A (en) Interaction method and system
CN106209824A (en) The cloud edit methods of data, system and the client of cloud editor
WO2017076009A1 (en) Program watch-back method, player and terminal
CN113259759A (en) Network connection state evaluation method and device, terminal equipment and storage medium
CN112201264A (en) Audio processing method and device, electronic equipment, server and storage medium
US20180255116A1 (en) System and method for switching between adaptive bit rate and fixed rate streams
CN108989426B (en) HLS protocol-based stream pulling method, system, client and storage medium
CN106604085A (en) Video sharing method and video sharing device
CN105721953A (en) Stream media video start playing abnormity analyzing method and system
CN113923510B (en) Method, device, equipment and readable storage medium for forwarding digital television content

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240321

Address after: Room 601, 6th Floor, Building 5, Lianhuayuan, Haidian District, Beijing, 100080

Patentee after: Aerospace Guosheng Technology Co.,Ltd.

Country or region after: Zhong Guo

Address before: 11 / F, building B1, phase 4.1, software industry, No.1, Software Park East Road, Wuhan East Lake Development Zone, Wuhan City, Hubei Province, 430070

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: Zhong Guo