WO2022242461A1 - Method and apparatus for processing livestream audio/video, client, and server - Google Patents

Method and apparatus for processing livestream audio/video, client, and server Download PDF

Info

Publication number
WO2022242461A1
WO2022242461A1 PCT/CN2022/090942 CN2022090942W WO2022242461A1 WO 2022242461 A1 WO2022242461 A1 WO 2022242461A1 CN 2022090942 W CN2022090942 W CN 2022090942W WO 2022242461 A1 WO2022242461 A1 WO 2022242461A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
video
target
client
live
Prior art date
Application number
PCT/CN2022/090942
Other languages
French (fr)
Chinese (zh)
Inventor
陈迪川
Original Assignee
北京字节跳动网络技术有限公司
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 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2022242461A1 publication Critical patent/WO2022242461A1/en

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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Definitions

  • the present disclosure relates to the field of live broadcast technology, and in particular to a live audio and video processing method, device, client and server.
  • Webcasting has become a popular trend in providing interactive channels to users.
  • the anchor can live broadcast content such as commodity shopping, game experience, music playback and other content in the virtual live broadcast room, so that the audience can watch the live broadcast content in time in the virtual live broadcast room, enriching the entertainment life of users.
  • anchors or viewers have a need to download live content.
  • the host can attract more viewers through the live broadcast highlights (that is, the highlights of the live broadcast) in the live broadcast content, which is beneficial to increase the attention of the host.
  • viewers can help the anchor attract more viewers by live broadcasting highlight clips, so that viewers can complete sharing tasks.
  • the present disclosure provides a live audio and video processing method, device, client and server.
  • the present disclosure provides a method for processing live audio and video, including:
  • the client sends a first request to the server, and the first request is used to request the live audio and video of the target period;
  • the client receives the first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, the download address of the target audio and video slice is obtained by the server from the audio and video file, and the audio and video file stores The download address of each audio and video slice;
  • the client downloads the target audio and video slice based on the download address of the target audio and video slice;
  • the client splices the target audio and video slices sequentially according to the live broadcast sequence of the target audio and video slices to obtain the live audio and video of the target period.
  • the client splices the target audio and video slices sequentially according to the live broadcast sequence of the target audio and video slices to obtain the live audio and video of the target period, including:
  • the client splices the target audio and video slices sequentially according to the order of the live broadcast time of the target audio and video slices from small to large, and obtains the live audio and video of the target time period;
  • the target audio and video slices are sequentially spliced according to the order in which the target audio and video slices are downloaded first to last, to obtain Live audio and video of the target time period.
  • the method further includes: the client deletes the target audio and video slice.
  • the live broadcast duration of the target period is the initial time when the first request is sent, and a preset duration before the initial time.
  • the client sends the first request to the server, including: the client receives the first operation performed by the user on the first control of the client; the client sends the first request to the server in response to the first operation .
  • the present disclosure provides a method for processing live audio and video, including:
  • the server receives a first request from the client, and the first request is used to request the live audio and video of the target period;
  • the server obtains the download address of the target audio and video slice in the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
  • the server sends a first message to the client.
  • the first message is used to indicate the download address of the target audio and video slice, so that the client can download the target audio and video slice based on the download address of the target audio and video slice, and follow the live broadcast of the target audio and video slice.
  • the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
  • the server obtains the download address of the target audio and video slice in the target period from the audio and video file, including: the server obtains the audio and video file from the server corresponding to the content distribution network; the server parses the audio and video file , to obtain the download address of the target audio and video slice.
  • the present disclosure provides a live audio and video processing device, including:
  • the first sending module is used to send a first request to the server, and the first request is used to request the live audio and video of the target time period;
  • the first receiving module is configured to receive a first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, the download address of the target audio and video slice is obtained by the server from the audio and video file, and the audio and video The download address of each audio and video slice is stored in the video file;
  • the download module is used to download the target audio and video slice based on the download address of the target audio and video slice;
  • the splicing module is configured to sequentially splice the target audio and video slices according to the live broadcast sequence of the target audio and video slices, so as to obtain the live audio and video of the target period.
  • the splicing module is specifically configured to splice the target audio and video slices sequentially according to the order of the live broadcast time of the target audio and video slices from small to large, to obtain the live audio and video of the target time period.
  • the splicing module is specifically used to download the target audio and video slices according to the sequence of downloading the target audio and video slices from small to large In order, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
  • the device also includes:
  • the deletion module is used to delete the target audio and video slice after the splicing module obtains the live audio and video of the target period.
  • the live broadcast duration of the target period is the initial time when the first request is sent, and a preset duration before the initial time.
  • the first sending module is specifically configured to receive a first operation performed by the user on the first control of the client; and send the first request to the server in response to the first operation.
  • the device also includes:
  • the playing module is configured to receive a second operation performed by the user on the second control of the client; in response to the second operation, play the live audio and video of the target period in the client.
  • the present disclosure provides a live audio and video processing device, including:
  • the second receiving module is used to receive the first request from the client, and the first request is used to request the live audio and video of the target period;
  • the obtaining module is used to obtain the download address of the target audio and video slice in the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
  • the second sending module is configured to send a first message to the client, the first message is used to indicate the download address of the target audio and video slice, so that the client downloads the target audio and video slice based on the download address of the target audio and video slice, and according to The live broadcast sequence of the target audio and video slices, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
  • the obtaining module is specifically configured to obtain audio and video files from a server corresponding to the content distribution network; analyze the audio and video files to obtain a download address of a target audio and video slice.
  • the live broadcast duration of the target period is the initial time when the first request is sent, and a preset duration before the initial time.
  • the present disclosure provides a client, including: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory so that the client executes any one of the first aspect and the first aspect. Live audio and video processing methods in possible designs.
  • the present disclosure provides a server, including: a memory and a processor; the memory is used to store program instructions; and the processor is used to call the program instructions in the memory so that the server executes any one of the second aspect and the second aspect.
  • the live audio and video processing method in the design including: a processor; the memory is used to store program instructions; and the processor is used to call the program instructions in the memory so that the server executes any one of the second aspect and the second aspect.
  • the present disclosure provides a computer storage medium, including computer instructions.
  • the computer instructions When the computer instructions are run on the electronic device, the electronic device executes the live audio and video in any possible design of the first aspect and the first aspect.
  • the present disclosure provides a computer program product that, when the computer program product is run on a computer, causes the computer to execute the live audio and video processing method in any possible design of the first aspect and the first aspect, or, Make the computer execute the second aspect and the method for processing live audio and video in any possible design of the second aspect.
  • the present disclosure provides a chip system, which includes: a processor; when the processor executes the computer instructions stored in the memory, the electronic device executes any of the possible designs of the first aspect and the first aspect A live audio and video processing method, or the electronic device executes the live audio and video processing method in the second aspect and any possible design of the second aspect.
  • FIG. 1 is a schematic diagram of a communication system provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart of a live audio and video processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure.
  • live broadcast highlight clips cannot be predicted in advance, and are often generated through data such as the number of online viewers in the virtual live broadcast room, the number of gifts given to the anchor by the viewers, and the number of comments made by the viewers. Therefore, the server needs to perform audio and video recording on the live highlight segment, and generate a recorded audio and video file (such as an MP4 file), so that the client can download the recorded audio and video file from the server to obtain the live highlight segment.
  • a recorded audio and video file such as an MP4 file
  • the present disclosure provides a live audio and video processing method, device, client and server.
  • FIG. 1 is a schematic diagram of a communication system provided by an embodiment of the present disclosure.
  • the communication system provided by the present disclosure may include: a server and a client, and the server and the client may communicate with each other.
  • the client may be a client corresponding to the host, or may be a client corresponding to the viewer.
  • the host mentioned in this disclosure can be understood as a user who opens a virtual live broadcast room, and the audience mentioned in this disclosure can be understood as a user who watches live content in a virtual live broadcast room.
  • the client can implement the live audio and video processing method of the present disclosure through an application program (application, APP), official account, web page, etc. in the terminal device.
  • Terminal devices can be mobile phones (such as folding screen mobile phones, smart phones, etc.), personal digital assistants (personal digital assistant, PDA), tablet computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computer, UMPC), netbooks and other devices , the present disclosure does not impose any limitation on the specific type of the terminal device.
  • the present disclosure does not limit the type of the operating system of the terminal device.
  • Android system Linux system
  • Windows system or iOS system etc.
  • the present disclosure will take the client and server in FIG. 1 as an example in an embodiment, and describe the live audio and video processing method provided by the present disclosure in detail in combination with the accompanying drawings and application scenarios.
  • FIG. 2 is a schematic flowchart of a method for processing live audio and video provided by an embodiment of the present disclosure.
  • the live audio and video processing method provided by the present disclosure may include:
  • the client sends a first request to the server, where the first request is used to request live audio and video in a target time period.
  • the client corresponding to the anchor may send a first request to the server.
  • the client corresponding to the viewer may send the first request to the server.
  • the present disclosure does not limit the specific implementation manner of the first request.
  • the first request may represent the live audio and video of the target time period in the form of an identifier, a binary, or a field.
  • the live audio and video of the target time period is a piece of audio and video in the live content that has been live broadcast in the virtual live broadcast room.
  • the present disclosure does not limit the specific time period of the target time period.
  • the live broadcast duration of the target period is the initial moment when the first request is sent, and a preset duration before the initial moment.
  • the server obtains the download address of the target audio and video slice within the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file.
  • the server After receiving the first request, the server can learn that the client needs to download the live audio and video of the target period. Because the download address of each audio and video slice that has been broadcast live is stored in the audio and video file. Therefore, the server can obtain the download address of the target audio and video slice within the target time period from the audio and video file.
  • the present disclosure sets the live content and live time of a piece of audio and video in the live content that has been live broadcast in the virtual live room as an audio and video slice.
  • the live broadcast duration of each audio and video slice may be the same or different, which is not limited in this disclosure.
  • the audio and video slices may be expressed in a way such as transport stream (transport stream, TS) slices.
  • the target audio and video slices within the target time period can be understood as all audio and video slices whose live broadcast time is within the target time period.
  • the live broadcast time of the audio and video slice refers to the playback time corresponding to the live audio and video corresponding to the audio and video slice, such as the initial time, the middle time, or the end time.
  • the target audio and video slice can be one audio and video slice or multiple audio and video slices played sequentially, which is specifically determined based on the live broadcast duration of the target period and the live broadcast duration of the audio and video slices.
  • the download address of the target audio and video slice is the download address of the audio and video slice.
  • the download address of the target audio and video slice is the download address of each audio and video slice.
  • audio and video files may be represented by m3u8 files.
  • m3u8 refers to the m3u file in UTF-8 encoding format.
  • the m3u file records an index plain text file.
  • the playback software When opening the m3u file, the playback software does not play the m3u file, but finds the corresponding audio and video according to the index of the m3u file.
  • the present disclosure does not limit the specific implementation manner of the download address of the audio and video slices.
  • the download address may be represented by a uniform resource locator (uniform resource locator, URL) or a file transfer protocol (file transfer protocol, FTP) address.
  • URL uniform resource locator
  • FTP file transfer protocol
  • the server sends a first message to the client, where the first message is used to indicate the download address of the target audio and video slice.
  • the server may send a first message for indicating the download address of the target audio and video slice to the client.
  • the present disclosure does not limit the specific implementation manner of the first message.
  • the first message may represent the download address of the target audio and video slice by means of identification, binary, or fields.
  • the server may pack the download address of each audio and video slice in the target audio and video slice into a value, and transmit it to the client in the form of a message.
  • the client downloads the target audio and video slice based on the download address of the target audio and video slice.
  • the client can download the target audio and video slice based on the download address of the target audio and video slice.
  • the present disclosure does not limit the manner in which the client downloads the target audio and video slice.
  • the client may traverse the download addresses of the target audio and video slices, and download the target audio and video serially.
  • the client can download the audio and video slice based on the download address of the audio and video slice.
  • the client can download each audio and video slice separately based on the download address of each audio and video slice.
  • the client sequentially stitches the target audio and video slices according to the live broadcast sequence of the target audio and video slices, to obtain the live audio and video of the target period.
  • the client After downloading the target audio and video slices, the client splices the target audio and video slices sequentially according to the live broadcast sequence of the target audio and video slices to obtain the live audio and video of the target period.
  • the live broadcast sequence of an audio and video slice can be understood as the playing sequence of the live audio and video corresponding to the audio and video slice during the live broadcast.
  • the live audio and video 1 corresponding to the audio and video slice 1 is played before the live audio and video 2 corresponding to the audio and video slice 2 .
  • the live broadcast sequence of the audio and video slice 1 is prior to the live broadcast sequence of the audio and video slice 2.
  • the client requests the server to obtain the live audio and video of the target time period through the first request.
  • the server obtains the download address of the target audio and video slice in the target period from the audio and video file.
  • the server sends the download address of the target audio and video slice to the client through the first message, so that the client downloads the target audio and video based on the download address of the target audio and video slice.
  • the client splices the target audio and video slices sequentially according to the playing sequence of the target audio and video slices, and obtains the live audio and video of the target period. Therefore, the client initiates a request for the live highlight segment to the server and downloads the live highlight segment with the help of the download address sent by the server.
  • the server does not need to store the live highlight segment in the live content in advance.
  • the download address of the live highlight segment is sent to the client, so that the client downloads the live highlight segment based on the download address, which meets the needs of the anchor and the audience to download the live highlight segment, reduces the additional resource consumption of the server, and reduces the Server input costs.
  • the client can use various methods to represent the live sequence of the target audio and video slices.
  • the client may determine the live broadcast sequence of the audio and video slices based on the live broadcast time of the target audio and video slices.
  • the client can sequentially stitch the target audio and video slices according to the order of the live broadcast time of the target audio and video slices from small to large, and obtain the live audio and video of the target time period.
  • the target audio and video slice includes: audio and video slice 1 and audio and video slice 2, and assume that the start time of audio and video slice 1 is earlier than the start time of audio and video slice 2. Then, the client splices audio and video slice 1 before audio and video slice 2.
  • the client may download the target audio and video according to the live broadcast time of the audio and video slices.
  • the client can determine the live broadcast sequence of the audio and video slices based on the download sequence of the target audio and video slices.
  • the client when the client downloads the target audio and video slices according to the order of the live broadcast time of the target audio and video slices from small to large, it can download the target audio and video slices in the order of first to last. Sequential splicing to obtain the live audio and video of the target time period.
  • the target audio and video slice includes: audio and video slice 1 and audio and video slice 2, and assume that the start time of audio and video slice 1 is earlier than the start time of audio and video slice 2. Then, the client can first download the audio and video slice 1, and then download the audio and video slice 2. And the client splices audio and video slice 1 before audio and video slice 2.
  • the client after obtaining the live audio and video of the target period, the client can delete the target audio and video slice.
  • the resource waste of the client is reduced.
  • a first control can be set in the client, and the first control is used to request live audio and video in a target time period. Therefore, after receiving the first operation performed by the user on the first control, the client can send the first request to the server. In this way, it is convenient for the anchor or the audience to obtain the live broadcast highlights.
  • the present disclosure does not limit parameters such as shape, size, color, and position of the first control.
  • the first operation is an operation such as click, double-click, long-press, slide, etc. that acts on the first control.
  • a second control can be set in the client, and the second control is used to provide an entry for audio and video playback. Therefore, after receiving the second operation performed by the user on the second control, the client can publish the live audio and video of the target period on the client, so that the client can play the live audio and video of the target period on the client.
  • providing users with a channel for sharing audio and video is beneficial to attracting more users' attention in the client terminal and increasing the user viscosity of the client terminal.
  • the second operation is an operation such as click, double-click, long-press, slide, etc. that acts on the second control.
  • the second operation performed on the second control may include: an operation of the user inputting a target time period and determining the target time period, or an operation of the user selecting a target time period and determining the target time period.
  • the client can store the audio and video files in the server corresponding to the content delivery network (CDN) by using, for example, real time messaging protocol (RTMP).
  • RTMP real time messaging protocol
  • the server corresponding to the CDN is different from the server involved in the foregoing embodiments.
  • the server can obtain audio and video files from the server corresponding to the CDN.
  • the server can analyze the audio and video file to obtain the download address of the target audio and video slice.
  • the phenomenon of occupying excessive resources of the server is reduced.
  • the present disclosure provides a device for processing live audio and video.
  • FIG. 3 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure.
  • the apparatus for processing live audio and video of the present disclosure can be set in a terminal device, and can realize the operation corresponding to the operation of the client in the method for processing live audio and video in the embodiments of FIGS. 1-2 above.
  • the live audio and video processing device 100 may include: a first sending module 101 , a first receiving module 102 , a downloading module 103 and a splicing module 104 .
  • the first sending module 101 is used to send a first request to the server, and the first request is used to request the live audio and video of the target time period;
  • the first receiving module 102 is configured to receive a first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, the download address of the target audio and video slice is obtained by the server from the audio and video file, The download address of each audio and video slice is stored in the audio and video file;
  • Download module 103 for downloading the target audio and video slice based on the download address of the target audio and video slice;
  • the splicing module 104 is configured to sequentially splice the target audio and video slices according to the live broadcast sequence of the target audio and video slices, so as to obtain the live audio and video of the target time period.
  • the splicing module 104 is specifically configured to sequentially splice the target audio and video slices according to the order of the live broadcast time of the target audio and video slices from small to large, to obtain the live audio and video of the target time period.
  • the splicing module 104 is specifically configured to download the target audio and video slices according to the sequence of downloading the target audio and video slices from small to large , sequentially splicing the target audio and video slices to obtain the live audio and video of the target time period.
  • FIG. 4 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure. As shown in FIG. 4 , on the basis of the device structure shown in FIG. 3 , the live audio and video processing device 100 provided by the present disclosure may further include: a deletion module 105 .
  • the deletion module 105 is configured to delete the target audio and video slice after the splicing module 104 obtains the live audio and video of the target period.
  • the live broadcast duration of the target period is the initial moment when the first request is sent, and a preset duration before the initial moment.
  • the first sending module 101 is specifically configured to receive a first operation performed by the user on the first control of the client; and send a first request to the server in response to the first operation.
  • FIG. 5 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure. As shown in FIG. 5 , on the basis of the device structure shown in FIG. 3 or FIG. 4 (taking FIG. 3 as an example), the live audio and video processing device 100 provided by the present disclosure may further include: a playback module 106 .
  • the playing module 106 is configured to receive a second operation performed by the user on the second control of the client; in response to the second operation, play the live audio and video of the target period in the client.
  • the live audio and video processing device provided in the present disclosure can execute the above-mentioned method embodiments.
  • the present disclosure provides a device for processing live audio and video.
  • FIG. 6 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure.
  • the device for processing live audio and video of the present disclosure can be set in a server, and can realize the operation of the server corresponding to the method for processing live audio and video in the embodiments of FIGS. 1-2 above.
  • the live audio and video processing apparatus 200 may include: a second receiving module 201 , an acquiring module 202 and a second sending module 203 .
  • the second receiving module 201 is configured to receive a first request from a client, and the first request is used to request live audio and video of a target time period;
  • Obtaining module 202 for obtaining the download address of the target audio-video slice in the target period from the audio-video file, the download address of each audio-video slice is stored in the audio-video file;
  • the second sending module 203 is configured to send a first message to the client, the first message is used to indicate the download address of the target audio and video slice, so that the client downloads the target audio and video slice based on the download address of the target audio and video slice, and According to the live broadcast sequence of the target audio and video slices, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target period.
  • the obtaining module 203 is specifically configured to obtain audio and video files from a server corresponding to the content distribution network; analyze the audio and video files to obtain the download address of the target audio and video slice.
  • the live broadcast duration of the target period is the initial moment when the first request is sent, and a preset duration before the initial moment.
  • the live audio and video processing device provided in the present disclosure can execute the above-mentioned method embodiments.
  • the present disclosure provides a client, comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; one or more processors When one or more computer programs are executed, the client is enabled to implement the live audio and video processing method of the foregoing embodiments.
  • the present disclosure provides a server, comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; When one or more computer programs are executed, the server is made to implement the method for processing live audio and video in the foregoing embodiments.
  • the present disclosure provides a chip system, which is applied to an electronic device including a memory and a sensor; the chip system includes: a processor; when the processor executes the live audio and video processing method of the foregoing embodiments.
  • the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor so that an electronic device implements the method for processing live audio and video in the foregoing embodiments.
  • the present disclosure provides a computer program product, which, when running on a computer, causes the computer to execute the method for processing live audio and video in the foregoing embodiments.
  • all or part of the functions may be implemented by software, hardware, or a combination of software and hardware.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present disclosure are produced in whole or in part.
  • a computer can be a general purpose computer, special purpose computer, a computer network, or other programmable apparatus.
  • Computer instructions may be stored on a computer readable storage medium.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) and the like.
  • a magnetic medium for example, a floppy disk, a hard disk, or a magnetic tape
  • an optical medium for example, DVD
  • a semiconductor medium for example, a solid state disk (solid state disk, SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present disclosure relates to a method and apparatus for processing livestream audio/video, a client, and a server. The method comprises: a client sends, to a server, a first request for requesting livestream audio/video from a target time period (S101); the client receives, from the server, a first message for indicating the download addresses of target audio/video slices within the target time period (S103), the download addresses of the target audio/video slices being obtained by the server from an audio/video file, and the audio/video file storing the download address of each audio/video slice (S102); the client downloads the target audio/video slices on the basis of the download addresses of the target audio/video slices (S104); and the client, according to the livestream sequence of the target audio/video slices, performs sequential splicing on the target audio/video slices, and obtains the livestream audio/video from the target time period (S105).

Description

直播音视频处理方法、装置、客户端和服务器Live audio and video processing method, device, client and server
本申请是以中国申请号为202110556761.5,申请日为2021年5月21日的申请为基础,并主张其优先权,该中国申请的公开内容在此作为整体引入本申请中。This application is based on the application with the Chinese application number 202110556761.5 and the filing date is May 21, 2021, and claims its priority. The disclosure content of the Chinese application is hereby incorporated into this application as a whole.
技术领域technical field
本公开涉及直播技术领域,尤其涉及一种直播音视频处理方法、装置、客户端和服务器。The present disclosure relates to the field of live broadcast technology, and in particular to a live audio and video processing method, device, client and server.
背景技术Background technique
网络直播已成为向用户提供互动渠道的流行趋势。主播可在虚拟直播间中直播如商品购物、游戏体验、音乐播放等内容,使得观众在虚拟直播间中及时观看到直播内容,丰富了用户的娱乐生活。Webcasting has become a popular trend in providing interactive channels to users. The anchor can live broadcast content such as commodity shopping, game experience, music playback and other content in the virtual live broadcast room, so that the audience can watch the live broadcast content in time in the virtual live broadcast room, enriching the entertainment life of users.
目前,主播或观众存在下载直播内容的需求。例如,主播可通过直播内容中的直播高光片段(即直播精彩画面)来吸引更多观众,有利于提高主播的关注量。又如,观众可通过直播高光片段来帮助主播吸引更多观众,使得观众能够完成分享任务。Currently, anchors or viewers have a need to download live content. For example, the host can attract more viewers through the live broadcast highlights (that is, the highlights of the live broadcast) in the live broadcast content, which is beneficial to increase the attention of the host. For another example, viewers can help the anchor attract more viewers by live broadcasting highlight clips, so that viewers can complete sharing tasks.
发明内容Contents of the invention
本公开提供了一种直播音视频处理方法、装置、客户端和服务器。The present disclosure provides a live audio and video processing method, device, client and server.
第一方面,本公开提供了一种直播音视频处理方法,包括:In a first aspect, the present disclosure provides a method for processing live audio and video, including:
客户端向服务器发送第一请求,第一请求用于请求目标时段的直播音视频;The client sends a first request to the server, and the first request is used to request the live audio and video of the target period;
客户端从服务器接收第一消息,第一消息用于指示目标时段内的目标音视频切片的下载地址,目标音视频切片的下载地址为服务器从音视频文件中获取的,音视频文件中存储有每个音视频切片的下载地址;The client receives the first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, the download address of the target audio and video slice is obtained by the server from the audio and video file, and the audio and video file stores The download address of each audio and video slice;
客户端基于目标音视频切片的下载地址,下载目标音视频切片;The client downloads the target audio and video slice based on the download address of the target audio and video slice;
客户端按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。The client splices the target audio and video slices sequentially according to the live broadcast sequence of the target audio and video slices to obtain the live audio and video of the target period.
在一种可能的设计中,客户端按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频,包括:In a possible design, the client splices the target audio and video slices sequentially according to the live broadcast sequence of the target audio and video slices to obtain the live audio and video of the target period, including:
客户端按照目标音视频切片的直播时刻由小到大的顺序,对目标音视频切片进行顺序 拼接,得到目标时段的直播音视频;The client splices the target audio and video slices sequentially according to the order of the live broadcast time of the target audio and video slices from small to large, and obtains the live audio and video of the target time period;
或者,or,
客户端在按照目标音视频切片的直播时刻由小到大的顺序对目标音视频切片进行下载时,按照目标音视频切片的下载由先到后的顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。When the client downloads the target audio and video slices in ascending order of the live streaming time of the target audio and video slices, the target audio and video slices are sequentially spliced according to the order in which the target audio and video slices are downloaded first to last, to obtain Live audio and video of the target time period.
在一种可能的设计中,该方法还包括:客户端删除目标音视频切片。In a possible design, the method further includes: the client deletes the target audio and video slice.
在一种可能的设计中,目标时段的直播时长为以第一请求的发送时刻为初始时刻,以及在初始时刻之前的预设时长。In a possible design, the live broadcast duration of the target period is the initial time when the first request is sent, and a preset duration before the initial time.
在一种可能的设计中,客户端向服务器发送第一请求,包括:客户端接收用户在客户端的第一控件上执行的第一操作;客户端响应于第一操作,向服务器发送第一请求。In a possible design, the client sends the first request to the server, including: the client receives the first operation performed by the user on the first control of the client; the client sends the first request to the server in response to the first operation .
第二方面,本公开提供了一种直播音视频处理方法,包括:In a second aspect, the present disclosure provides a method for processing live audio and video, including:
服务器从客户端接收第一请求,第一请求用于请求目标时段的直播音视频;The server receives a first request from the client, and the first request is used to request the live audio and video of the target period;
服务器从音视频文件中获取目标时段内的目标音视频切片的下载地址,音视频文件中存储有每个音视频切片的下载地址;The server obtains the download address of the target audio and video slice in the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
服务器向客户端发送第一消息,第一消息用于指示目标音视频切片的下载地址,以使客户端基于目标音视频切片的下载地址,下载目标音视频切片,并按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。The server sends a first message to the client. The first message is used to indicate the download address of the target audio and video slice, so that the client can download the target audio and video slice based on the download address of the target audio and video slice, and follow the live broadcast of the target audio and video slice. In order, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
在一种可能的设计中,服务器从音视频文件中获取目标时段内的目标音视频切片的下载地址,包括:服务器从内容分布网络对应的服务器中获取音视频文件;服务器对音视频文件进行解析,得到目标音视频切片的下载地址。In a possible design, the server obtains the download address of the target audio and video slice in the target period from the audio and video file, including: the server obtains the audio and video file from the server corresponding to the content distribution network; the server parses the audio and video file , to obtain the download address of the target audio and video slice.
第三方面,本公开提供了一种直播音视频处理装置,包括:In a third aspect, the present disclosure provides a live audio and video processing device, including:
第一发送模块,用于向服务器发送第一请求,第一请求用于请求目标时段的直播音视频;The first sending module is used to send a first request to the server, and the first request is used to request the live audio and video of the target time period;
第一接收模块,用于从服务器接收第一消息,第一消息用于指示目标时段内的目标音视频切片的下载地址,目标音视频切片的下载地址为服务器从音视频文件中获取的,音视频文件中存储有每个音视频切片的下载地址;The first receiving module is configured to receive a first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, the download address of the target audio and video slice is obtained by the server from the audio and video file, and the audio and video The download address of each audio and video slice is stored in the video file;
下载模块,用于基于目标音视频切片的下载地址,下载目标音视频切片;The download module is used to download the target audio and video slice based on the download address of the target audio and video slice;
拼接模块,用于按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。The splicing module is configured to sequentially splice the target audio and video slices according to the live broadcast sequence of the target audio and video slices, so as to obtain the live audio and video of the target period.
在一种可能的设计中,拼接模块,具体用于按照目标音视频切片的直播时刻由小到大的顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。In a possible design, the splicing module is specifically configured to splice the target audio and video slices sequentially according to the order of the live broadcast time of the target audio and video slices from small to large, to obtain the live audio and video of the target time period.
在一种可能的设计中,拼接模块,具体用于在按照目标音视频切片的直播时刻由小到大的顺序对目标音视频切片进行下载时,按照目标音视频切片的下载由先到后的顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。In a possible design, the splicing module is specifically used to download the target audio and video slices according to the sequence of downloading the target audio and video slices from small to large In order, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
在一种可能的设计中,该装置还包括:In one possible design, the device also includes:
删除模块,用于在拼接模块得到目标时段的直播音视频后,删除目标音视频切片。The deletion module is used to delete the target audio and video slice after the splicing module obtains the live audio and video of the target period.
在一种可能的设计中,目标时段的直播时长为以第一请求的发送时刻为初始时刻,以及在初始时刻之前的预设时长。In a possible design, the live broadcast duration of the target period is the initial time when the first request is sent, and a preset duration before the initial time.
在一种可能的设计中,第一发送模块,具体用于接收用户在客户端的第一控件上执行的第一操作;响应于第一操作,向服务器发送第一请求。In a possible design, the first sending module is specifically configured to receive a first operation performed by the user on the first control of the client; and send the first request to the server in response to the first operation.
在一种可能的设计中,该装置还包括:In one possible design, the device also includes:
播放模块,用于接收用户在客户端的第二控件上执行的第二操作;响应于第二操作,在客户端中播放目标时段的直播音视频。The playing module is configured to receive a second operation performed by the user on the second control of the client; in response to the second operation, play the live audio and video of the target period in the client.
第四方面,本公开提供了一种直播音视频处理装置,包括:In a fourth aspect, the present disclosure provides a live audio and video processing device, including:
第二接收模块,用于从客户端接收第一请求,第一请求用于请求目标时段的直播音视频;The second receiving module is used to receive the first request from the client, and the first request is used to request the live audio and video of the target period;
获取模块,用于从音视频文件中获取目标时段内的目标音视频切片的下载地址,音视频文件中存储有每个音视频切片的下载地址;The obtaining module is used to obtain the download address of the target audio and video slice in the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
第二发送模块,用于向客户端发送第一消息,第一消息用于指示目标音视频切片的下载地址,以使客户端基于目标音视频切片的下载地址,下载目标音视频切片,并按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。The second sending module is configured to send a first message to the client, the first message is used to indicate the download address of the target audio and video slice, so that the client downloads the target audio and video slice based on the download address of the target audio and video slice, and according to The live broadcast sequence of the target audio and video slices, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
在一种可能的设计中,获取模块,具体用于从内容分布网络对应的服务器中获取音视频文件;对音视频文件进行解析,得到目标音视频切片的下载地址。In a possible design, the obtaining module is specifically configured to obtain audio and video files from a server corresponding to the content distribution network; analyze the audio and video files to obtain a download address of a target audio and video slice.
在一种可能的设计中,目标时段的直播时长为以第一请求的发送时刻为初始时刻,以及在初始时刻之前的预设时长。In a possible design, the live broadcast duration of the target period is the initial time when the first request is sent, and a preset duration before the initial time.
第五方面,本公开提供了一种客户端,包括:存储器和处理器;存储器用于存储程序指令;处理器用于调用存储器中的程序指令使得客户端执行第一方面及第一方面任一种可能的设计中的直播音视频处理方法。In a fifth aspect, the present disclosure provides a client, including: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions in the memory so that the client executes any one of the first aspect and the first aspect. Live audio and video processing methods in possible designs.
第六方面,本公开提供了一种服务器,包括:存储器和处理器;存储器用于存储程序指令;处理器用于调用存储器中的程序指令使得服务器执行第二方面及第二方面任一种可能的设计中的直播音视频处理方法。In a sixth aspect, the present disclosure provides a server, including: a memory and a processor; the memory is used to store program instructions; and the processor is used to call the program instructions in the memory so that the server executes any one of the second aspect and the second aspect. The live audio and video processing method in the design.
第七方面,本公开提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行第一方面及第一方面任一种可能的设计中的直播音视频处理方法,或者,使得电子设备执行第二方面及第二方面任一种可能的设计中的直播音视频处理方法。In the seventh aspect, the present disclosure provides a computer storage medium, including computer instructions. When the computer instructions are run on the electronic device, the electronic device executes the live audio and video in any possible design of the first aspect and the first aspect. The processing method, or make the electronic device execute the live audio and video processing method in any possible design of the second aspect and the second aspect.
第八方面,本公开提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行第一方面及第一方面任一种可能的设计中的直播音视频处理方法,或者,使得计算机执行第二方面及第二方面任一种可能的设计中的直播音视频处理方法。In an eighth aspect, the present disclosure provides a computer program product that, when the computer program product is run on a computer, causes the computer to execute the live audio and video processing method in any possible design of the first aspect and the first aspect, or, Make the computer execute the second aspect and the method for processing live audio and video in any possible design of the second aspect.
第九方面,本公开提供了一种芯片***,芯片***包括:处理器;当处理器执行存储器中存储的计算机指令时,电子设备执行第一方面及第一方面任一种可能的设计中的直播音视频处理方法,或者,电子设备执行第二方面及第二方面任一种可能的设计中的直播音视频处理方法。In a ninth aspect, the present disclosure provides a chip system, which includes: a processor; when the processor executes the computer instructions stored in the memory, the electronic device executes any of the possible designs of the first aspect and the first aspect A live audio and video processing method, or the electronic device executes the live audio and video processing method in the second aspect and any possible design of the second aspect.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following will briefly introduce the drawings that need to be used in the descriptions of the embodiments or related technologies. Obviously, for those of ordinary skill in the art, Other drawings can also be obtained from these drawings without any creative effort.
图1为本公开实施例提供的通信***的示意图;FIG. 1 is a schematic diagram of a communication system provided by an embodiment of the present disclosure;
图2为本公开实施例提供的直播音视频处理方法的流程示意图;FIG. 2 is a schematic flowchart of a live audio and video processing method provided by an embodiment of the present disclosure;
图3为本公开实施例提供的直播音视频处理装置的结构示意图;FIG. 3 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure;
图4为本公开实施例提供的直播音视频处理装置的结构示意图;FIG. 4 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure;
图5为本公开实施例提供的直播音视频处理装置的结构示意图;FIG. 5 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure;
图6为本公开实施例提供的直播音视频处理装置的结构示意图。FIG. 6 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行 进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。In order to understand the above-mentioned purpose, features and advantages of the present disclosure more clearly, the solutions of the present disclosure will be further described below. It should be noted that, in the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways than described here; obviously, the embodiments in the description are only some of the embodiments of the present disclosure, and Not all examples.
通常在进行直播时,直播高光片段是无法***的,常常通过虚拟直播间中的观众在线数量、观众送给主播的礼物数量、观众的评论数量等数据产生的。故,服务器需要对直播高光片段进行音视频录制,生成录制好的音视频文件(如MP4文件),使得客户端能够从服务器中下载录制好的音视频文件来得到直播高光片段。Usually during a live broadcast, live broadcast highlight clips cannot be predicted in advance, and are often generated through data such as the number of online viewers in the virtual live broadcast room, the number of gifts given to the anchor by the viewers, and the number of comments made by the viewers. Therefore, the server needs to perform audio and video recording on the live highlight segment, and generate a recorded audio and video file (such as an MP4 file), so that the client can download the recorded audio and video file from the server to obtain the live highlight segment.
然而,直播高光片段的下载需要消耗服务器的额外资源,增加了服务器的投入成本。However, the download of live highlight clips needs to consume additional resources of the server, which increases the input cost of the server.
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开提供了一种直播音视频处理方法、装置、客户端和服务器。In order to solve the above technical problems or at least partly solve the above technical problems, the present disclosure provides a live audio and video processing method, device, client and server.
根据本公开的一些实施例,请参阅图1,图1为本公开实施例提供的通信***的示意图。如图1所示,本公开提供的通信***可以包括:服务器和客户端,服务器与客户端之间可相互通信。According to some embodiments of the present disclosure, please refer to FIG. 1 , which is a schematic diagram of a communication system provided by an embodiment of the present disclosure. As shown in FIG. 1 , the communication system provided by the present disclosure may include: a server and a client, and the server and the client may communicate with each other.
其中,客户端可为主播对应的客户端,也可以为观众对应的客户端。本公开提及的主播可以理解为开设虚拟直播间的用户,本公开提及的观众可以理解为在虚拟直播间中观看直播内容的用户。Wherein, the client may be a client corresponding to the host, or may be a client corresponding to the viewer. The host mentioned in this disclosure can be understood as a user who opens a virtual live broadcast room, and the audience mentioned in this disclosure can be understood as a user who watches live content in a virtual live broadcast room.
其中,客户端可通过终端设备中的应用程序(application,APP)、公众号、网页等方式实现本公开的直播音视频处理方法。终端设备可以是手机(如折叠屏手机、智能手机等)、个人数字助理(personal digital assistant,PDA)、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本等设备,本公开对终端设备的具体类型不作任何限制。Wherein, the client can implement the live audio and video processing method of the present disclosure through an application program (application, APP), official account, web page, etc. in the terminal device. Terminal devices can be mobile phones (such as folding screen mobile phones, smart phones, etc.), personal digital assistants (personal digital assistant, PDA), tablet computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computer, UMPC), netbooks and other devices , the present disclosure does not impose any limitation on the specific type of the terminal device.
其中,本公开对终端设备的操作***的类型不做限定。例如,Android***、Linux***、Windows***或者iOS***等。Wherein, the present disclosure does not limit the type of the operating system of the terminal device. For example, Android system, Linux system, Windows system or iOS system, etc.
基于前述描述,本公开以实施例将以图1中的客户端和服务器为例,结合附图和应用场景,对本公开提供的直播音视频处理方法进行详细阐述。Based on the foregoing description, the present disclosure will take the client and server in FIG. 1 as an example in an embodiment, and describe the live audio and video processing method provided by the present disclosure in detail in combination with the accompanying drawings and application scenarios.
请参阅图2,图2为本公开实施例提供的直播音视频处理方法的流程示意图。如图2所示,本公开提供的直播音视频处理方法可以包括:Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of a method for processing live audio and video provided by an embodiment of the present disclosure. As shown in Figure 2, the live audio and video processing method provided by the present disclosure may include:
S101、客户端向服务器发送第一请求,第一请求用于请求目标时段的直播音视频。S101. The client sends a first request to the server, where the first request is used to request live audio and video in a target time period.
在主播对应的客户端检测到主播需要下载目标时段的直播音视频时,主播对应的客户端可向服务器发送第一请求。When the client corresponding to the anchor detects that the anchor needs to download the live audio and video of the target period, the client corresponding to the anchor may send a first request to the server.
或者,在观众对应的客户端检测到观众需要下载目标时段的直播音视频时,观众对应的客户端可向服务器发送第一请求。Or, when the client corresponding to the viewer detects that the viewer needs to download the live audio and video of the target period, the client corresponding to the viewer may send the first request to the server.
其中,本公开对第一请求的具体实现方式不做限定。在一些实施例中,第一请求可采用标识、二进制、字段等方式来表示目标时段的直播音视频。Wherein, the present disclosure does not limit the specific implementation manner of the first request. In some embodiments, the first request may represent the live audio and video of the target time period in the form of an identifier, a binary, or a field.
其中,目标时段的直播音视频为虚拟直播间中已直播过的直播内容中的一段音视频。本公开对目标时段的具体时段不做限定。在一些实施例中,目标时段的直播时长为以第一请求的发送时刻为初始时刻,以及在初始时刻之前的预设时长。Wherein, the live audio and video of the target time period is a piece of audio and video in the live content that has been live broadcast in the virtual live broadcast room. The present disclosure does not limit the specific time period of the target time period. In some embodiments, the live broadcast duration of the target period is the initial moment when the first request is sent, and a preset duration before the initial moment.
S102、服务器从音视频文件中获取目标时段内的目标音视频切片的下载地址,音视频文件中存储有每个音视频切片的下载地址。S102. The server obtains the download address of the target audio and video slice within the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file.
在接收到第一请求后,服务器可获知客户端需要下载目标时段的直播音视频。由于音视频文件中存储有已直播过的每个音视频切片的下载地址。因此,服务器可从音视频文件中获取目标时段内的目标音视频切片的下载地址。After receiving the first request, the server can learn that the client needs to download the live audio and video of the target period. Because the download address of each audio and video slice that has been broadcast live is stored in the audio and video file. Therefore, the server can obtain the download address of the target audio and video slice within the target time period from the audio and video file.
其中,本公开将虚拟直播间中已直播过的直播内容中的一段音视频的直播内容和直播时刻设置为一个音视频切片。每个音视频切片的直播时长可相同或不同,本公开不做限定。在一些实施例中,音视频切片可采用如传输流(transport stream,TS)切片的方式进行表示。Among them, the present disclosure sets the live content and live time of a piece of audio and video in the live content that has been live broadcast in the virtual live room as an audio and video slice. The live broadcast duration of each audio and video slice may be the same or different, which is not limited in this disclosure. In some embodiments, the audio and video slices may be expressed in a way such as transport stream (transport stream, TS) slices.
其中,目标时段内的目标音视频切片可以理解为直播时刻位于目标时段内的全部音视频切片。音视频切片的直播时刻指的是音视频切片对应的直播音视频对应的如初始时刻、中间时刻或终止时刻等播放时刻。目标音视频切片可以为一个音视频切片或者多个播放顺序顺接的音视频切片,具体基于目标时段的直播时长以及音视频切片的直播时长来确定。Wherein, the target audio and video slices within the target time period can be understood as all audio and video slices whose live broadcast time is within the target time period. The live broadcast time of the audio and video slice refers to the playback time corresponding to the live audio and video corresponding to the audio and video slice, such as the initial time, the middle time, or the end time. The target audio and video slice can be one audio and video slice or multiple audio and video slices played sequentially, which is specifically determined based on the live broadcast duration of the target period and the live broadcast duration of the audio and video slices.
在目标音视频切片为一个音视频切片时,目标音视频切片的下载地址为该音视频切片的下载地址。在目标音视频切片为多个音视频切片时,目标音视频切片的下载地址为每个音视频切片的下载地址。When the target audio and video slice is an audio and video slice, the download address of the target audio and video slice is the download address of the audio and video slice. When the target audio and video slice is multiple audio and video slices, the download address of the target audio and video slice is the download address of each audio and video slice.
其中,本公开对音视频文件的具体实现方式不做限定。在一些实施例中,音视频文件可采用m3u8文件进行表示。其中,m3u8是指UTF-8编码格式的m3u文件,m3u文件是记录了一个索引纯文本文件,在打开m3u文件时播放软件并不是播放m3u文件,而是根据m3u 文件的索引找到对应的音视频文件的网络地址进行在线播放。Wherein, the present disclosure does not limit the specific implementation manner of audio and video files. In some embodiments, audio and video files may be represented by m3u8 files. Among them, m3u8 refers to the m3u file in UTF-8 encoding format. The m3u file records an index plain text file. When opening the m3u file, the playback software does not play the m3u file, but finds the corresponding audio and video according to the index of the m3u file. The network address of the file for online playback.
其中,本公开对音视频切片的下载地址的具体实现方式不做限定。在一些实施例中,下载地址可采用统一资源定位***(uniform resource locator,URL)或者文件传输协议(file transfer protocol,FTP)地址等表示方式。Wherein, the present disclosure does not limit the specific implementation manner of the download address of the audio and video slices. In some embodiments, the download address may be represented by a uniform resource locator (uniform resource locator, URL) or a file transfer protocol (file transfer protocol, FTP) address.
S103、服务器向客户端发送第一消息,第一消息用于指示目标音视频切片的下载地址。S103. The server sends a first message to the client, where the first message is used to indicate the download address of the target audio and video slice.
在服务器获取到目标音视频切片的下载地址后,服务器可向客户端发送用于指示目标音视频切片的下载地址的第一消息。After the server obtains the download address of the target audio and video slice, the server may send a first message for indicating the download address of the target audio and video slice to the client.
其中,本公开对第一消息的具体实现方式不做限定。在一些实施例中,第一消息可以采用标识、二进制、字段等方式来表示目标音视频切片的下载地址。Wherein, the present disclosure does not limit the specific implementation manner of the first message. In some embodiments, the first message may represent the download address of the target audio and video slice by means of identification, binary, or fields.
举例而言,服务器可将目标音视频切片中的每个音视频切片的下载地址打包成一个数值,并通过消息的方式传输给客户端。For example, the server may pack the download address of each audio and video slice in the target audio and video slice into a value, and transmit it to the client in the form of a message.
S104、客户端基于目标音视频切片的下载地址,下载目标音视频切片。S104. The client downloads the target audio and video slice based on the download address of the target audio and video slice.
在接收到第一消息后,客户端基于目标音视频切片的下载地址,可下载目标音视频切片。After receiving the first message, the client can download the target audio and video slice based on the download address of the target audio and video slice.
其中,本公开对客户端下载目标音视频切片的方式不做限定。在一些实施例中,客户端可遍历目标音视频切片的下载地址,串行下载目标音视频。Wherein, the present disclosure does not limit the manner in which the client downloads the target audio and video slice. In some embodiments, the client may traverse the download addresses of the target audio and video slices, and download the target audio and video serially.
在目标音视频切片为一个音视频切片时,客户端可基于该音视频切片的下载地址,下载该音视频切片。在目标音视频切片为多个音视频切片时,客户端可基于每个音视频切片的下载地址,分别下载每个音视频切片。When the target audio and video slice is an audio and video slice, the client can download the audio and video slice based on the download address of the audio and video slice. When the target audio and video slice is multiple audio and video slices, the client can download each audio and video slice separately based on the download address of each audio and video slice.
S105、客户端按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。S105. The client sequentially stitches the target audio and video slices according to the live broadcast sequence of the target audio and video slices, to obtain the live audio and video of the target period.
在下载得到目标音视频切片后,客户端按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。After downloading the target audio and video slices, the client splices the target audio and video slices sequentially according to the live broadcast sequence of the target audio and video slices to obtain the live audio and video of the target period.
其中,一个音视频切片的直播顺序可以理解为该音视频切片对应的直播音视频在直播过程中的播放顺序。在一些实施例中,假设音视频切片1对应的直播音视频1先于音视频切片2对应的直播音视频2播放。那么,音视频切片1的直播顺序先于音视频切片2的直播顺序。Wherein, the live broadcast sequence of an audio and video slice can be understood as the playing sequence of the live audio and video corresponding to the audio and video slice during the live broadcast. In some embodiments, it is assumed that the live audio and video 1 corresponding to the audio and video slice 1 is played before the live audio and video 2 corresponding to the audio and video slice 2 . Then, the live broadcast sequence of the audio and video slice 1 is prior to the live broadcast sequence of the audio and video slice 2.
本公开提供的直播音视频处理方法,通过客户端通过第一请求向服务器请求获取目标时段的直播音视频。服务器在接收到第一请求后,从音视频文件中获取到目标时段内的目 标音视频切片的下载地址。服务器将目标音视频切片的下载地址通过第一消息发送给客户端,使得客户端基于目标音视频切片的下载地址来下载目标音视频。客户端按照目标音视频切片的播放顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。从而,客户端通过向服务器发起直播高光片段的请求,并借助服务器发送的下载地址来下载直播高光片段,服务器无需预先存储直播内容中的直播高光片段,在接收到客户端发起的直播高光片段的请求后,向客户端发送直播高光片段的下载地址,使得客户端基于下载地址来下载直播高光片段,满足了主播和观众需要下载直播高光片段的需求,减少了服务器产生额外的资源消耗,降低了服务器的投入成本。In the live audio and video processing method provided in the present disclosure, the client requests the server to obtain the live audio and video of the target time period through the first request. After receiving the first request, the server obtains the download address of the target audio and video slice in the target period from the audio and video file. The server sends the download address of the target audio and video slice to the client through the first message, so that the client downloads the target audio and video based on the download address of the target audio and video slice. The client splices the target audio and video slices sequentially according to the playing sequence of the target audio and video slices, and obtains the live audio and video of the target period. Therefore, the client initiates a request for the live highlight segment to the server and downloads the live highlight segment with the help of the download address sent by the server. The server does not need to store the live highlight segment in the live content in advance. After the request, the download address of the live highlight segment is sent to the client, so that the client downloads the live highlight segment based on the download address, which meets the needs of the anchor and the audience to download the live highlight segment, reduces the additional resource consumption of the server, and reduces the Server input costs.
基于上述步骤S105的描述,客户端可采用多种方式来表征目标音视频切片的直播顺序。Based on the description of step S105 above, the client can use various methods to represent the live sequence of the target audio and video slices.
在一些实施例中,客户端可基于目标音视频切片的直播时刻来确定音视频切片的直播顺序。In some embodiments, the client may determine the live broadcast sequence of the audio and video slices based on the live broadcast time of the target audio and video slices.
综上,客户端按照目标音视频切片的直播时刻由小到大的顺序,可对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。To sum up, the client can sequentially stitch the target audio and video slices according to the order of the live broadcast time of the target audio and video slices from small to large, and obtain the live audio and video of the target time period.
举例而言,假设目标音视频切片包括:音视频切片1和音视频切片2,假设音视频切片1的起始时刻先于音视频切片2的起始时刻。那么,客户端将音视频切片1拼接在音视频切片2之前。For example, assume that the target audio and video slice includes: audio and video slice 1 and audio and video slice 2, and assume that the start time of audio and video slice 1 is earlier than the start time of audio and video slice 2. Then, the client splices audio and video slice 1 before audio and video slice 2.
在另一些实施例中,客户端可按照音视频切片的直播时刻来下载目标音视频。由此,客户端可基于目标音视频切片的下载顺序来确定音视频切片的直播顺序。In some other embodiments, the client may download the target audio and video according to the live broadcast time of the audio and video slices. Thus, the client can determine the live broadcast sequence of the audio and video slices based on the download sequence of the target audio and video slices.
综上,客户端在按照目标音视频切片的直播时刻由小到大的顺序对目标音视频切片进行下载时,可按照目标音视频切片的下载由先到后的顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。To sum up, when the client downloads the target audio and video slices according to the order of the live broadcast time of the target audio and video slices from small to large, it can download the target audio and video slices in the order of first to last. Sequential splicing to obtain the live audio and video of the target time period.
举例而言,假设目标音视频切片包括:音视频切片1和音视频切片2,假设音视频切片1的起始时刻先于音视频切片2的起始时刻。那么,客户端可先下载音视频切片1,后下载音视频切片2。且客户端将音视频切片1拼接在音视频切片2之前。For example, assume that the target audio and video slice includes: audio and video slice 1 and audio and video slice 2, and assume that the start time of audio and video slice 1 is earlier than the start time of audio and video slice 2. Then, the client can first download the audio and video slice 1, and then download the audio and video slice 2. And the client splices audio and video slice 1 before audio and video slice 2.
基于上述实施例的描述,在获得目标时段的直播音视频之后,客户端可删除目标音视频切片。由此,减少了所造成的客户端的资源浪费。Based on the description of the above embodiments, after obtaining the live audio and video of the target period, the client can delete the target audio and video slice. Thus, the resource waste of the client is reduced.
基于上述步骤S101的描述,客户端中可设置第一控件,第一控件用于请求目标时段的直播音视频。从而,客户端在接收用户在第一控件上执行的第一操作后,可向服务器发送 第一请求。由此,方便主播或观众获取直播高光片段的操作。Based on the description of step S101 above, a first control can be set in the client, and the first control is used to request live audio and video in a target time period. Therefore, after receiving the first operation performed by the user on the first control, the client can send the first request to the server. In this way, it is convenient for the anchor or the audience to obtain the live broadcast highlights.
其中,本公开对第一控件的形状、大小、颜色、位置等参数不做限定。第一操作为作用于第一控件上的如点击、双击、长按、滑动等类型的操作。Wherein, the present disclosure does not limit parameters such as shape, size, color, and position of the first control. The first operation is an operation such as click, double-click, long-press, slide, etc. that acts on the first control.
基于上述实施例的描述,客户端中可设置第二控件,第二控件用于提供音视频播放的入口。从而,客户端在接收到用户在第二控件上执行的第二操作后,可将目标时段的直播音视频发布在客户端中,使得客户端可在客户端中播放目标时段的直播音视频。由此,为用户提供分享音视频的渠道,有利于吸引客户端中的更多用户的关注,提高了客户端的用户粘度。Based on the description of the above embodiments, a second control can be set in the client, and the second control is used to provide an entry for audio and video playback. Therefore, after receiving the second operation performed by the user on the second control, the client can publish the live audio and video of the target period on the client, so that the client can play the live audio and video of the target period on the client. Thus, providing users with a channel for sharing audio and video is beneficial to attracting more users' attention in the client terminal and increasing the user viscosity of the client terminal.
其中,本公开对第二控件的形状、大小、颜色、位置等参数不做限定。第二操作为作用于第二控件上的如点击、双击、长按、滑动等类型的操作。在一些实施例中,第二控件上执行的第二操作可包括:用户输入目标时段和确定目标时段的操作,或者,用户选择目标时段和确定目标时段的操作。Wherein, the present disclosure does not limit parameters such as shape, size, color, and position of the second control. The second operation is an operation such as click, double-click, long-press, slide, etc. that acts on the second control. In some embodiments, the second operation performed on the second control may include: an operation of the user inputting a target time period and determining the target time period, or an operation of the user selecting a target time period and determining the target time period.
基于上述步骤S102的描述,客户端可采用如实时消息传输协议(real time messaging protocol,RTMP)将音视频文件储在内容分布网络(content delivery network,CDN)对应的服务器中。其中,CDN对应的服务器与前述实施例所涉及的服务器为不同的服务器。Based on the description of the above step S102, the client can store the audio and video files in the server corresponding to the content delivery network (CDN) by using, for example, real time messaging protocol (RTMP). Wherein, the server corresponding to the CDN is different from the server involved in the foregoing embodiments.
综上,服务器可从CDN对应的服务器中获取音视频文件。服务器可对音视频文件进行解析,得到目标音视频切片的下载地址。由此,减少占用服务器的过多资源的现象。In summary, the server can obtain audio and video files from the server corresponding to the CDN. The server can analyze the audio and video file to obtain the download address of the target audio and video slice. Thus, the phenomenon of occupying excessive resources of the server is reduced.
示例性地,本公开提供一种直播音视频处理装置。Exemplarily, the present disclosure provides a device for processing live audio and video.
请参阅图3,图3为本公开实施例提供的直播音视频处理装置的结构示意图。本公开的直播音视频处理装置可设置在终端设备中,可实现上述图1-图2实施例的直播音视频处理方法对应于客户端的操作。Please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure. The apparatus for processing live audio and video of the present disclosure can be set in a terminal device, and can realize the operation corresponding to the operation of the client in the method for processing live audio and video in the embodiments of FIGS. 1-2 above.
如图3所示,本公开提供的直播音视频处理装置100可以包括:第一发送模块101、第一接收模块102、下载模块103和拼接模块104。As shown in FIG. 3 , the live audio and video processing device 100 provided by the present disclosure may include: a first sending module 101 , a first receiving module 102 , a downloading module 103 and a splicing module 104 .
第一发送模块101,用于向服务器发送第一请求,第一请求用于请求目标时段的直播音视频;The first sending module 101 is used to send a first request to the server, and the first request is used to request the live audio and video of the target time period;
第一接收模块102,用于从服务器接收第一消息,第一消息用于指示目标时段内的目标音视频切片的下载地址,目标音视频切片的下载地址为服务器从音视频文件中获取的,音视频文件中存储有每个音视频切片的下载地址;The first receiving module 102 is configured to receive a first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, the download address of the target audio and video slice is obtained by the server from the audio and video file, The download address of each audio and video slice is stored in the audio and video file;
下载模块103,用于基于目标音视频切片的下载地址,下载目标音视频切片; Download module 103, for downloading the target audio and video slice based on the download address of the target audio and video slice;
拼接模块104,用于按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。The splicing module 104 is configured to sequentially splice the target audio and video slices according to the live broadcast sequence of the target audio and video slices, so as to obtain the live audio and video of the target time period.
在一些实施例中,拼接模块104,具体用于按照目标音视频切片的直播时刻由小到大的顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。In some embodiments, the splicing module 104 is specifically configured to sequentially splice the target audio and video slices according to the order of the live broadcast time of the target audio and video slices from small to large, to obtain the live audio and video of the target time period.
在一些实施例中,拼接模块104,具体用于在按照目标音视频切片的直播时刻由小到大的顺序对目标音视频切片进行下载时,按照目标音视频切片的下载由先到后的顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。In some embodiments, the splicing module 104 is specifically configured to download the target audio and video slices according to the sequence of downloading the target audio and video slices from small to large , sequentially splicing the target audio and video slices to obtain the live audio and video of the target time period.
请参阅图4,图4为本公开实施例提供的直播音视频处理装置的结构示意图。如图4所示,本公开提供的直播音视频处理装置100在图3所示装置结构的基础上,还可以包括:删除模块105。Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure. As shown in FIG. 4 , on the basis of the device structure shown in FIG. 3 , the live audio and video processing device 100 provided by the present disclosure may further include: a deletion module 105 .
删除模块105,用于在拼接模块104得到目标时段的直播音视频后,删除目标音视频切片。The deletion module 105 is configured to delete the target audio and video slice after the splicing module 104 obtains the live audio and video of the target period.
在一些实施例中,目标时段的直播时长为以第一请求的发送时刻为初始时刻,以及在初始时刻之前的预设时长。In some embodiments, the live broadcast duration of the target period is the initial moment when the first request is sent, and a preset duration before the initial moment.
在一些实施例中,第一发送模块101,具体用于接收用户在客户端的第一控件上执行的第一操作;响应于第一操作,向服务器发送第一请求。In some embodiments, the first sending module 101 is specifically configured to receive a first operation performed by the user on the first control of the client; and send a first request to the server in response to the first operation.
请参阅图5,图5为本公开实施例提供的直播音视频处理装置的结构示意图。如图5所示,本公开提供的直播音视频处理装置100在图3或图4(以图3为例进行示意)所示装置结构的基础上,还可以包括:播放模块106。Please refer to FIG. 5 . FIG. 5 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure. As shown in FIG. 5 , on the basis of the device structure shown in FIG. 3 or FIG. 4 (taking FIG. 3 as an example), the live audio and video processing device 100 provided by the present disclosure may further include: a playback module 106 .
播放模块106,用于接收用户在客户端的第二控件上执行的第二操作;响应于第二操作,在客户端中播放目标时段的直播音视频。The playing module 106 is configured to receive a second operation performed by the user on the second control of the client; in response to the second operation, play the live audio and video of the target period in the client.
本公开提供的直播音视频处理装置,可执行上述方法实施例,其具体实现原理和技术效果,可参见上述方法实施例,本公开此处不再赘述。The live audio and video processing device provided in the present disclosure can execute the above-mentioned method embodiments. For the specific implementation principles and technical effects, please refer to the above-mentioned method embodiments, and the present disclosure will not repeat them here.
示例性地,本公开提供一种直播音视频处理装置。Exemplarily, the present disclosure provides a device for processing live audio and video.
请参阅图6,图6为本公开实施例提供的直播音视频处理装置的结构示意图。本公开的直播音视频处理装置可设置在服务器中,可实现上述图1-图2实施例的直播音视频处理方法对应于服务器的操作。Please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of a live audio and video processing device provided by an embodiment of the present disclosure. The device for processing live audio and video of the present disclosure can be set in a server, and can realize the operation of the server corresponding to the method for processing live audio and video in the embodiments of FIGS. 1-2 above.
如图6所示,本公开提供的直播音视频处理装置200可以包括:第二接收模块201、 获取模块202和第二发送模块203。As shown in FIG. 6 , the live audio and video processing apparatus 200 provided by the present disclosure may include: a second receiving module 201 , an acquiring module 202 and a second sending module 203 .
第二接收模块201,用于从客户端接收第一请求,第一请求用于请求目标时段的直播音视频;The second receiving module 201 is configured to receive a first request from a client, and the first request is used to request live audio and video of a target time period;
获取模块202,用于从音视频文件中获取目标时段内的目标音视频切片的下载地址,音视频文件中存储有每个音视频切片的下载地址;Obtaining module 202, for obtaining the download address of the target audio-video slice in the target period from the audio-video file, the download address of each audio-video slice is stored in the audio-video file;
第二发送模块203,用于向客户端发送第一消息,第一消息用于指示目标音视频切片的下载地址,以使客户端基于目标音视频切片的下载地址,下载目标音视频切片,并按照目标音视频切片的直播顺序,对目标音视频切片进行顺序拼接,得到目标时段的直播音视频。The second sending module 203 is configured to send a first message to the client, the first message is used to indicate the download address of the target audio and video slice, so that the client downloads the target audio and video slice based on the download address of the target audio and video slice, and According to the live broadcast sequence of the target audio and video slices, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target period.
在一些实施例中,获取模块203,具体用于从内容分布网络对应的服务器中获取音视频文件;对音视频文件进行解析,得到目标音视频切片的下载地址。In some embodiments, the obtaining module 203 is specifically configured to obtain audio and video files from a server corresponding to the content distribution network; analyze the audio and video files to obtain the download address of the target audio and video slice.
在一些实施例中,目标时段的直播时长为以第一请求的发送时刻为初始时刻,以及在初始时刻之前的预设时长。In some embodiments, the live broadcast duration of the target period is the initial moment when the first request is sent, and a preset duration before the initial moment.
本公开提供的直播音视频处理装置,可执行上述方法实施例,其具体实现原理和技术效果,可参见上述方法实施例,本公开此处不再赘述。The live audio and video processing device provided in the present disclosure can execute the above-mentioned method embodiments. For the specific implementation principles and technical effects, please refer to the above-mentioned method embodiments, and the present disclosure will not repeat them here.
示例性地,本公开提供一种客户端,包括:一个或多个处理器;存储器;以及一个或多个计算机程序;其中一个或多个计算机程序被存储在存储器中;一个或多个处理器在执行一个或多个计算机程序时,使得客户端实现前文实施例的直播音视频处理方法。Exemplarily, the present disclosure provides a client, comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; one or more processors When one or more computer programs are executed, the client is enabled to implement the live audio and video processing method of the foregoing embodiments.
示例性地,本公开提供一种服务器,包括:一个或多个处理器;存储器;以及一个或多个计算机程序;其中一个或多个计算机程序被存储在存储器中;一个或多个处理器在执行一个或多个计算机程序时,使得服务器实现前文实施例的直播音视频处理方法。Exemplarily, the present disclosure provides a server, comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; When one or more computer programs are executed, the server is made to implement the method for processing live audio and video in the foregoing embodiments.
示例性地,本公开提供一种芯片***,芯片***应用于包括存储器和传感器的电子设备;芯片***包括:处理器;当处理器执行前文实施例的直播音视频处理方法。Exemplarily, the present disclosure provides a chip system, which is applied to an electronic device including a memory and a sensor; the chip system includes: a processor; when the processor executes the live audio and video processing method of the foregoing embodiments.
示例性地,本公开提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器使得电子设备执行时实现前文实施例的直播音视频处理方法。Exemplarily, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor so that an electronic device implements the method for processing live audio and video in the foregoing embodiments.
示例性地,本公开提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行前文实施例的直播音视频处理方法。Exemplarily, the present disclosure provides a computer program product, which, when running on a computer, causes the computer to execute the method for processing live audio and video in the foregoing embodiments.
在上述实施例中,全部或部分功能可以通过软件、硬件、或者软件加硬件的组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产 品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本公开实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above embodiments, all or part of the functions may be implemented by software, hardware, or a combination of software and hardware. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present disclosure are produced in whole or in part. A computer can be a general purpose computer, special purpose computer, a computer network, or other programmable apparatus. Computer instructions may be stored on a computer readable storage medium. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) and the like.
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relative terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these No such actual relationship or order exists between entities or operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
以上仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above are only specific implementation manners of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

  1. 一种直播音视频处理方法,所述方法包括:A live audio and video processing method, the method comprising:
    客户端向服务器发送第一请求,所述第一请求用于请求目标时段的直播音视频;The client sends a first request to the server, and the first request is used to request the live audio and video of the target period;
    所述客户端从所述服务器接收第一消息,所述第一消息用于指示所述目标时段内的目标音视频切片的下载地址,所述目标音视频切片的下载地址为所述服务器从音视频文件中获取的,所述音视频文件中存储有每个音视频切片的下载地址;The client receives a first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, and the download address of the target audio and video slice is the download address of the target audio and video slice from the server. Acquired from the video file, the download address of each audio and video slice is stored in the audio and video file;
    所述客户端基于所述目标音视频切片的下载地址,下载所述目标音视频切片;The client downloads the target audio and video slice based on the download address of the target audio and video slice;
    所述客户端按照所述目标音视频切片的直播顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频。The client sequentially stitches the target audio and video slices according to the live broadcast sequence of the target audio and video slices, to obtain the live audio and video of the target time period.
  2. 根据权利要求1所述的方法,其中所述客户端按照所述目标音视频切片的直播顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频,包括:The method according to claim 1, wherein the client sequentially stitches the target audio and video slices according to the live broadcast order of the target audio and video slices, and obtains the live audio and video of the target period, including:
    所述客户端按照所述目标音视频切片的直播时刻由小到大的顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频;The client splices the target audio and video slices sequentially according to the order of the live broadcast time of the target audio and video slices from small to large, to obtain the live audio and video of the target time period;
    或者,or,
    所述客户端在按照所述目标音视频切片的直播时刻由小到大的顺序对所述目标音视频切片进行下载时,按照所述目标音视频切片的下载由先到后的顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频。When the client downloads the target audio and video slices in ascending order of the live broadcast time of the target audio and video slices, it downloads the target audio and video slices in the order of downloading the target audio and video slices The target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
  3. 根据权利要求1或2所述的方法,其中所述方法还包括:The method according to claim 1 or 2, wherein said method further comprises:
    所述客户端在得到所述目标时段的直播音视频后,删除所述目标音视频切片。After obtaining the live audio and video of the target period, the client deletes the target audio and video slice.
  4. 根据权利要求1-3任一项所述的方法,其中所述目标时段的直播时长为以所述第一请求的发送时刻为初始时刻,以及在所述初始时刻之前的预设时长。The method according to any one of claims 1-3, wherein the live broadcast duration of the target period is a preset duration before the initial moment when the first request is sent.
  5. 根据权利要求1-4任一项所述的方法,其中所述客户端向服务器发送第一请求,包括:The method according to any one of claims 1-4, wherein the client sends the first request to the server, comprising:
    所述客户端接收用户在所述客户端的第一控件上执行的第一操作;The client receives a first operation performed by the user on the first control of the client;
    所述客户端响应于所述第一操作,向所述服务器发送所述第一请求。The client sends the first request to the server in response to the first operation.
  6. 根据权利要求1-5任一项所述的方法,其中所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    所述客户端接收用户在所述客户端的第二控件上执行的第二操作;The client receives a second operation performed by the user on the second control of the client;
    所述客户端响应于所述第二操作,在所述客户端中播放所述目标时段的直播音视频。In response to the second operation, the client plays the live audio and video of the target period in the client.
  7. 一种获取直播音视频方法,所述方法包括:A method for obtaining live audio and video, the method comprising:
    服务器从客户端接收第一请求,所述第一请求用于请求目标时段的直播音视频;The server receives a first request from the client, and the first request is used to request the live audio and video of the target period;
    所述服务器从音视频文件中获取所述目标时段内的目标音视频切片的下载地址,所述音视频文件中存储有每个音视频切片的下载地址;The server obtains the download address of the target audio and video slice in the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
    所述服务器向所述客户端发送第一消息,所述第一消息用于指示所述目标音视频切片的下载地址,以使所述客户端基于所述目标音视频切片的下载地址,下载所述目标音视频切片,并按照所述目标音视频切片的直播顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频。The server sends a first message to the client, where the first message is used to indicate the download address of the target audio and video slice, so that the client downloads the target audio and video slice based on the download address of the target audio and video slice. The target audio and video slices, and according to the live broadcast sequence of the target audio and video slices, the target audio and video slices are spliced sequentially to obtain the live audio and video of the target time period.
  8. 根据权利要求7所述的方法,其中所述服务器从音视频文件中获取所述目标时段内的目标音视频切片的下载地址,包括:The method according to claim 7, wherein the server obtains the download address of the target audio and video slice in the target period from the audio and video file, comprising:
    所述服务器从内容分布网络对应的服务器中获取所述音视频文件;The server obtains the audio and video files from a server corresponding to the content distribution network;
    所述服务器对所述音视频文件进行解析,得到所述目标音视频切片的下载地址。The server parses the audio and video file to obtain the download address of the target audio and video slice.
  9. 一种直播音视频处理装置,所述装置包括:A live audio and video processing device, the device comprising:
    第一发送模块,用于向服务器发送第一请求,所述第一请求用于请求目标时段的直播音视频;The first sending module is used to send a first request to the server, and the first request is used to request the live audio and video of the target time period;
    第一接收模块,用于从所述服务器接收第一消息,所述第一消息用于指示所述目标时段内的目标音视频切片的下载地址,所述目标音视频切片的下载地址为所述服务器从音视频文件中获取的,所述音视频文件中存储有每个音视频切片的下载地址;The first receiving module is configured to receive a first message from the server, the first message is used to indicate the download address of the target audio and video slice within the target time period, and the download address of the target audio and video slice is the The server obtains from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
    下载模块,用于基于所述目标音视频切片的下载地址,下载所述目标音视频切片;A download module, configured to download the target audio and video slice based on the download address of the target audio and video slice;
    拼接模块,用于按照所述目标音视频切片的直播顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频。The splicing module is configured to sequentially splice the target audio and video slices according to the live broadcast sequence of the target audio and video slices, so as to obtain the live audio and video of the target time period.
  10. 一种直播音视频处理装置,所述装置包括:A live audio and video processing device, the device comprising:
    第二接收模块,用于从客户端接收第一请求,所述第一请求用于请求目标时段的直播音视频;The second receiving module is configured to receive a first request from a client, and the first request is used to request live audio and video of a target time period;
    获取模块,用于从音视频文件中获取所述目标时段内的目标音视频切片的下载地址,所述音视频文件中存储有每个音视频切片的下载地址;The obtaining module is used to obtain the download address of the target audio and video slice in the target period from the audio and video file, and the download address of each audio and video slice is stored in the audio and video file;
    第二发送模块,用于向所述客户端发送第一消息,所述第一消息用于指示所述目标音视频切片的下载地址,以使所述客户端基于所述目标音视频切片的下载地址,下载所述目标音视频切片,并按照所述目标音视频切片的直播顺序,对所述目标音视频切片进行顺序拼接,得到所述目标时段的直播音视频。The second sending module is configured to send a first message to the client, the first message is used to indicate the download address of the target audio and video slice, so that the client can download based on the target audio and video slice address, download the target audio and video slices, and sequentially stitch the target audio and video slices according to the live broadcast sequence of the target audio and video slices, to obtain the live audio and video of the target time period.
  11. 一种客户端,包括:一个或多个处理器;存储器;以及一个或多个计算机程序;其中所述一个或多个计算机程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个计算机程序时,使得所述客户端实现如权利要求1-6任一项所述的直播音视频处理方法。A client, comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; it is characterized in that the one or more When a processor executes the one or more computer programs, the client implements the live audio and video processing method according to any one of claims 1-6.
  12. 一种服务器,包括:一个或多个处理器;存储器;以及一个或多个计算机程序;其中所述一个或多个计算机程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个计算机程序时,使得所述服务器实现如权利要求7或8所述的直播音视频处理方法。A server comprising: one or more processors; memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; it is characterized in that the one or more When the processor executes the one or more computer programs, the server is enabled to implement the method for processing live audio and video according to claim 7 or 8.
  13. 一种计算机存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-6任一项所述的直播音视频处理方法,或者,使得所述电子设备执行如权利要求7或8所述的直播音视频处理方法。A computer storage medium, including computer instructions, when the computer instructions are run on the electronic device, the electronic device is made to execute the live audio and video processing method according to any one of claims 1-6, or, so that the The electronic device executes the live audio and video processing method according to claim 7 or 8.
  14. 一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-6任一项所述的直播音视频处理方法,或者,使得所述计算机执行如权利要求7或8所述的直播音视频处理方法。A computer program product, when the computer program product is run on a computer, it makes the computer execute the live audio and video processing method according to any one of claims 1-6, or makes the computer execute the method according to any one of claims 1-6 The live audio and video processing method described in claim 7 or 8.
PCT/CN2022/090942 2021-05-21 2022-05-05 Method and apparatus for processing livestream audio/video, client, and server WO2022242461A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110556761.5 2021-05-21
CN202110556761.5A CN113301374A (en) 2021-05-21 2021-05-21 Live broadcast audio and video processing method and device, client and server

Publications (1)

Publication Number Publication Date
WO2022242461A1 true WO2022242461A1 (en) 2022-11-24

Family

ID=77323623

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090942 WO2022242461A1 (en) 2021-05-21 2022-05-05 Method and apparatus for processing livestream audio/video, client, and server

Country Status (2)

Country Link
CN (1) CN113301374A (en)
WO (1) WO2022242461A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113301374A (en) * 2021-05-21 2021-08-24 北京字节跳动网络技术有限公司 Live broadcast audio and video processing method and device, client and server

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189761A1 (en) * 2012-12-28 2014-07-03 Microsoft Corporation Archiving a live media presentation
CN104202616A (en) * 2014-09-11 2014-12-10 北京阅联信息技术有限公司 Live telecasting and reviewing method and system based on naked streams
CN105872858A (en) * 2016-04-27 2016-08-17 亦非云互联网技术(上海)有限公司 Video sharing method and system, video processing system and client side
WO2018232795A1 (en) * 2017-06-19 2018-12-27 网宿科技股份有限公司 Video player client, system, and method for live broadcast video synchronization
CN109842804A (en) * 2017-11-24 2019-06-04 腾讯科技(深圳)有限公司 Processing method and server, the computer storage medium of audio, video data
CN111147878A (en) * 2019-12-30 2020-05-12 广州酷狗计算机科技有限公司 Stream pushing method and device in live broadcast and computer storage medium
CN111954005A (en) * 2019-05-17 2020-11-17 腾讯科技(深圳)有限公司 Multimedia resource transmission method and device
CN113301374A (en) * 2021-05-21 2021-08-24 北京字节跳动网络技术有限公司 Live broadcast audio and video processing method and device, client and server

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8667164B2 (en) * 2010-04-26 2014-03-04 Samsung Electronics Co., Ltd. Method and apparatus for playing live content
CN102790911B (en) * 2011-05-16 2016-02-03 腾讯科技(深圳)有限公司 Direct playing and playback method and system
CN108632675A (en) * 2018-04-09 2018-10-09 北京潘达互娱科技有限公司 A kind of direct playing and playback method, apparatus and equipment
CN111107386A (en) * 2019-12-27 2020-05-05 北京达佳互联信息技术有限公司 Live video playback method and device, electronic equipment, system and storage medium
CN112468839B (en) * 2020-11-26 2022-11-25 上海哔哩哔哩科技有限公司 Playback method, system, device and readable storage medium of live content

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140189761A1 (en) * 2012-12-28 2014-07-03 Microsoft Corporation Archiving a live media presentation
CN104202616A (en) * 2014-09-11 2014-12-10 北京阅联信息技术有限公司 Live telecasting and reviewing method and system based on naked streams
CN105872858A (en) * 2016-04-27 2016-08-17 亦非云互联网技术(上海)有限公司 Video sharing method and system, video processing system and client side
WO2018232795A1 (en) * 2017-06-19 2018-12-27 网宿科技股份有限公司 Video player client, system, and method for live broadcast video synchronization
CN109842804A (en) * 2017-11-24 2019-06-04 腾讯科技(深圳)有限公司 Processing method and server, the computer storage medium of audio, video data
CN111954005A (en) * 2019-05-17 2020-11-17 腾讯科技(深圳)有限公司 Multimedia resource transmission method and device
CN111147878A (en) * 2019-12-30 2020-05-12 广州酷狗计算机科技有限公司 Stream pushing method and device in live broadcast and computer storage medium
CN113301374A (en) * 2021-05-21 2021-08-24 北京字节跳动网络技术有限公司 Live broadcast audio and video processing method and device, client and server

Also Published As

Publication number Publication date
CN113301374A (en) 2021-08-24

Similar Documents

Publication Publication Date Title
US11620972B2 (en) System and method for association of a song, music, or other media content with a user's video content
US8843616B2 (en) Personal cloud computing with session migration
US11882180B2 (en) Dynamic content and cloud based content within collaborative electronic content creation and management tools
CN102884529B (en) For social activity summary can adaptive layout
RU2406133C2 (en) Device and methods of providing and presenting customised channel information
US20220174346A1 (en) Video playing method and apparatus
US20150288993A1 (en) Service method and system for providing multi-track video contents
CN102255951A (en) Asset resolvable bookmarks
Müller et al. A test-bed for the dynamic adaptive streaming over HTTP featuring session mobility
US20120151012A1 (en) Internet delivery of scheduled multimedia content
EP3343484A1 (en) System and method for association of a song, music, or other media content with a user's video content
WO2018157743A1 (en) Media data processing method, device, system and storage medium
WO2015070796A1 (en) Method and device for pushing resources to mobile communication terminal by smart television
CN111930973A (en) Multimedia data playing method and device, electronic equipment and storage medium
US10178431B2 (en) Hybrid stream delivery
JP2015062288A (en) Selection and distribution of content encompassing right and function
WO2022242461A1 (en) Method and apparatus for processing livestream audio/video, client, and server
CN105812845A (en) Media resource pushing method, media resource pushing system, and media player based on Android system
CN112565877B (en) Screen projection method and system, electronic equipment and storage medium
US9762703B2 (en) Method and apparatus for assembling data, and resource propagation system
CN112637626A (en) Plug flow method, system, device, electronic equipment and storage medium
WO2016184288A1 (en) Advertisement putting method, device and system
WO2016197867A1 (en) Data processing method and device applicable to computing device
US10387537B1 (en) Presentation of introductory content
JP6664587B1 (en) Information processing apparatus, information processing method, and information processing program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22803785

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE