CN108900855B - Live content recording method and device, computer readable storage medium and server - Google Patents

Live content recording method and device, computer readable storage medium and server Download PDF

Info

Publication number
CN108900855B
CN108900855B CN201810763680.0A CN201810763680A CN108900855B CN 108900855 B CN108900855 B CN 108900855B CN 201810763680 A CN201810763680 A CN 201810763680A CN 108900855 B CN108900855 B CN 108900855B
Authority
CN
China
Prior art keywords
audio
video data
recording
live broadcast
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810763680.0A
Other languages
Chinese (zh)
Other versions
CN108900855A (en
Inventor
谢金运
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810763680.0A priority Critical patent/CN108900855B/en
Publication of CN108900855A publication Critical patent/CN108900855A/en
Application granted granted Critical
Publication of CN108900855B publication Critical patent/CN108900855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/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/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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • 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/439Processing of audio elementary streams
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Abstract

The invention relates to the technical field of computer program application, in particular to a live broadcast content recording method and device.

Description

Live content recording method and device, computer readable storage medium and server
Technical Field
The invention relates to the technical field of internet, in particular to a live content recording method and device, a computer readable storage medium and a server.
Background
With the full rise of the live broadcast industry, the broadcast mode of the live broadcast is more and more popular. Meanwhile, with the rapid increase of the live broadcast room, the live broadcast content is more and more abundant, and as the live broadcast content has the characteristics of timeliness and abruptness, the recording of wonderful content in the live broadcast process becomes a problem to be solved.
Currently, the retention of wonderful content in the live broadcast process mainly adopts the following two modes:
the first scheme is as follows: obtained by post-cropping the highlight video. As shown in fig. 1, immediately after the live broadcast starts, recording is started, and the whole live broadcast process is completely recorded and stored in a storage medium. And after the live broadcast is finished, extracting the recorded video from the storage medium to review and clip, and finally storing the wonderful video segment obtained by clipping in the storage system again for sharing and reviewing.
Scheme II: and when finding the wonderful video, the anchor client pushes a recording request to a background to record the wonderful video. As shown in fig. 2, in the live broadcast process, the anchor continuously pushes live broadcast content to the live broadcast server, when there is a recording demand, a recording request is sent to the recording server through the anchor client, and the recording server responds to the recording request and pulls audio and video data from the live broadcast server for recording.
However, the first scheme stores not only the highlight video obtained by final editing, but also the content in the whole live broadcast process, and the storage cost is huge, and most of the stored whole live broadcast content is useless data. Secondly, a wonderful video needs to be edited from the recorded video manually, so that the timeliness is low, and the labor cost cannot be ignored. In the second scheme, the audio and video transmission rate usually lags behind the instruction transmission, and the highlight video is usually very short, so that the final recorded content is not the content desired by the anchor due to the asynchronous transmission rate, and the highlight video is not wonderful any more.
Disclosure of Invention
In view of the foregoing problems in the prior art, an object of the present invention is to provide a live content recording method and apparatus. The technical scheme can solve the problem that the recorded content is inconsistent with the content required by the user in the prior art.
In one aspect, the present invention provides a live content recording method, including:
acquiring live broadcast data generated by a live broadcast room, wherein the live broadcast data at least comprises audio and video data;
generating live broadcast protocol data according to the live broadcast data, and generating live broadcast protocol data according to the audio and video data when the live broadcast data is the audio and video data; when the live broadcast data comprises audio and video data and a recording instruction, embedding the recording instruction into the audio and video data to generate live broadcast protocol data;
the live broadcast protocol data are sent to a server, the server is used for judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data, if the recording instruction is embedded in the audio and video data, the audio and video data are recorded according to the recording instruction, and the recorded audio and video data are stored;
and receiving the storage address of the audio and video data returned by the server.
In another aspect, the present invention provides a live content recording method, including:
receiving live broadcast protocol data sent by a main broadcast client;
judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data;
if the audio and video data are embedded with a recording instruction, recording the audio and video data according to the recording instruction, and storing the recorded audio and video data;
and returning the storage address of the audio and video data to the anchor client.
In another aspect, the present invention provides a live content recording apparatus, including:
the live broadcast data acquisition unit is used for acquiring live broadcast data generated by a live broadcast room, and the live broadcast data at least comprises audio and video data;
the live broadcast protocol data generating unit is used for generating live broadcast protocol data according to the live broadcast data and comprises a first generating module and a second generating module, wherein the first generating module is used for generating the live broadcast protocol data according to the audio and video data when the live broadcast data is the audio and video data, and the second generating module is used for embedding the recording instruction into the audio and video data to generate the live broadcast protocol data when the live broadcast data comprises the audio and video data and a recording instruction;
the live broadcast protocol data sending unit is used for sending the live broadcast protocol data to a server, the server is used for judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data, if the recording instruction is embedded in the audio and video data, the audio and video data are recorded according to the recording instruction, and the recorded audio and video data are stored;
and the address receiving unit is used for receiving the storage address of the audio and video data returned by the server.
In another aspect, the present invention provides a live content recording apparatus, including:
the data receiving unit is used for receiving the live broadcast protocol data sent by the anchor client;
the judging unit is used for judging whether a recording instruction is embedded in the audio and video data contained in the live broadcast protocol data;
the data processing unit is used for recording the audio and video data according to the recording instruction when the recording instruction is embedded in the audio and video data, and storing the recorded audio and video data;
and the address sending unit is used for returning the storage address of the audio and video data to the anchor client.
In another aspect, the present invention provides a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions; the at least one instruction, the at least one program, the set of codes or the set of instructions is loaded and executed by a processor to implement a live content recording method as described above.
In another aspect, the present invention provides a server having at least one instruction, at least one program, set of codes, or set of instructions stored therein; the at least one instruction, the at least one program, the set of codes or the set of instructions is loaded and executed by a processor to implement a live content recording method as described above.
The invention has the following beneficial effects:
according to the live broadcast content recording scheme provided by the invention, the recording signaling is embedded into the audio and video data, so that the recording signaling and the audio and video data share the same transmission connection, the signaling is synchronous with the live broadcast content, the functions of accurately starting and closing the recording at the anchor terminal are realized, the recorded file is ensured to completely meet the user requirements, and the user experience is improved. Compared with the prior art, the method and the device have the advantages that the storage cost and the labor cost are saved while the accurate recording is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a method for acquiring a recording file in the prior art;
fig. 2 is a schematic flow chart of another method for acquiring a recording file in the prior art;
fig. 3 is a schematic diagram of an embodiment of a live content recording system provided by an embodiment of the present invention;
fig. 4 is an application scene diagram of a live content recording method according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a live content recording method according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for generating live protocol data according to live data according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a flow of a method for embedding a recording instruction into audio/video data according to an embodiment of the present invention;
fig. 8 is an application scene diagram of a live content recording method according to an embodiment of the present invention;
fig. 9 is a flowchart illustrating a live content recording method according to an embodiment of the present invention;
fig. 10 is a flowchart illustrating a live content recording method according to an embodiment of the present invention;
fig. 11 is a flowchart illustrating a live content recording method according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a data flow of a live protocol output provided by an embodiment of the invention;
fig. 13 is a block diagram illustrating a structure of a live content recording apparatus according to an embodiment of the present invention;
fig. 14 is a block diagram of a live protocol data generation unit according to an embodiment of the present invention;
fig. 15 is a block diagram illustrating a structure of a live content recording apparatus according to an embodiment of the present invention;
fig. 16 is a block diagram of a client according to an embodiment of the present invention.
Fig. 17 is a block diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the existing scheme of initiating live video recording through a main broadcasting client, because the instruction TCP connection of a recording request is independent of the TCP connection of audio and video transmission, audio and video data and the initiating recording instruction are transmitted independently, and the audio and video transmission rate lags behind the instruction transmission, the transmission rate is asynchronous, which easily causes the recorded audio and video content to be inconsistent with the content desired by a user. For example: the start time of the audio and video content required to be recorded by the anchor is 10:00:00, the recording instruction is transmitted to the recording server at 10:00:01, the recording server responds to the recording instruction at 10:00:02 to pull the audio and video file from the live broadcasting server, however, due to the hysteresis of audio and video transmission, the time stamp corresponding to the audio and video pushed to the live broadcasting server by the anchor client is 9:59:20, the recording server starts recording from 9:59:20, the recording is started earlier than the recording start point required by the user, and similarly, the recording is stopped earlier than the recording end point required by the user, the obtained recording content is not the content required by the user, and the user experience is reduced.
Aiming at the defects, the invention provides a live broadcast content recording method and a live broadcast content recording device, and the technical scheme can solve the problem that the recorded content is inconsistent with the content required by a user in the prior art.
Referring to fig. 3, fig. 3 is a schematic diagram of a live content recording system according to an embodiment of the present invention, and as shown in fig. 3, the live content recording system may include an anchor client 100 and a server 200.
Specifically, the anchor client 100 may include entity devices of smart phones, desktop computers, tablet computers, notebook computers, digital assistants, smart wearable devices, and the like; wherein, wearable equipment of intelligence can include intelligent bracelet, intelligent wrist-watch, intelligent glasses, intelligent helmet etc.. Of course, the anchor client 100 is not limited to the electronic device with certain entities, and may also be software running in the electronic device. Specifically, for example, the anchor client 100 may provide a webpage for a user for service providers such as a bullfight, a pepper, QQ music, a microblog, and the like, or may provide applications for the user for the service providers.
Specifically, the server 200 may include a server operating independently, or a distributed server, or a server cluster composed of a plurality of servers, for example: server 200 may include a live server 201, a recording server 202, and a database 203. The server 200 may comprise functional components and underlying data that implement the relevant functions of the anchor client.
In this embodiment, the anchor client 100 may interact with the server 200. The anchor client 100 collects audio and video data in a live broadcast room, generates a recording signaling according to user operation, embeds the recording signaling into the audio and video data to obtain live broadcast protocol data, and sends the live broadcast protocol data to the server 200, after receiving the live broadcast protocol data, the server 200 records audio and video contents according to the recording signaling in the live broadcast protocol data, stores the recorded audio and video data, and returns a storage address of the recorded audio and video data to the anchor client 100. According to the scheme, the recording signaling and the live stream (audio and video data) share the same transmission connection, so that the recording signaling and the live content are synchronized, the accuracy of starting and closing a recording function is improved, and the recorded content is ensured to meet the requirements of users.
An embodiment of a live content recording method according to the present invention is described below, and fig. 5 is a flowchart of an embodiment of a live content recording method according to the present invention, where the present specification provides the method operation steps as described in the embodiment or the flowchart, but more or less operation steps may be included based on conventional or non-creative labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In practice, the system products may be executed sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) in accordance with the methods described in the embodiments or figures. Specifically, fig. 4 is an application scenario diagram of a live content recording method according to this embodiment, in this embodiment, a server includes a live server, a recording server, and a database, and the live content recording method provided in this embodiment is applied to a anchor client, and is explained by information interaction between the anchor client and the server. As shown in fig. 5, the live content recording method may include:
s401: and acquiring live broadcast data generated in a live broadcast room, wherein the live broadcast data at least comprises audio and video data.
In the embodiment of the specification, after the live broadcast room is opened, audio and video data are collected through the camera and the microphone, and the audio and video data are sent to the server in real time, so that the server processes and outputs the audio and video data to be viewed by a main broadcast and audiences in the live broadcast room. In the process of sending audio and video data to a server, if an anchor wants to record upcoming video content, recording operation can be carried out, an anchor client can recognize the operation and generate a corresponding recording instruction, the recording instruction is embedded into the audio and video data to generate live broadcast protocol data, and the live broadcast protocol data are sent to the server. In fact, the live broadcast protocol data is equivalent to the audio and video data without a recording instruction, and when the recording instruction exists, the live broadcast protocol data also comprises a recording instruction embedded in the audio and video data besides the audio and video data.
The recording instruction comprises a recording starting instruction and a recording ending instruction. In the live broadcasting process, if the anchor broadcasts the wonderful content, and the wonderful content is required to be reserved, for example, the anchor broadcasts a small magic to be played and a complete process of the magic is required to be recorded, a start recording instruction can be issued through operation when the magic is formally played, and an end recording instruction is issued through operation when the performance is ended, so that the audio and video content between the start recording instruction and the end recording instruction is recorded, the recorded content which can be repeatedly watched and read is formed, and the wonderful content which the anchor broadcasts are required to be reserved is accurately recorded.
In a specific embodiment, the acquiring live data generated in the live broadcast room includes:
acquiring audio and video data of a live broadcast room, and taking the audio and video data as live broadcast data; alternatively, the first and second electrodes may be,
the method comprises the steps of responding to the operation of recording live broadcast contents of a user while acquiring audio and video data of a live broadcast room, obtaining a recording instruction, and taking the audio and video data and the recording instruction as live broadcast data.
S402: and generating live broadcast protocol data according to the live broadcast data.
In the embodiment of the present invention, the live data may be any one of the following cases:
(1) the live broadcast data is audio and video data;
(2) the live broadcast data comprises audio and video data and a recording instruction, wherein the recording instruction is generated by responding to the recording operation of a user (which can be a main broadcast) in the audio and video data generation process.
Referring to fig. 6, in a specific embodiment, the generating live protocol data according to the live data includes:
s4021: and when the live broadcast data is audio and video data, generating live broadcast protocol data according to the audio and video data.
And when the live broadcast data is audio and video data, processing the audio and video data to obtain live broadcast protocol data. The original data obtained after the video or audio is acquired is generally processed before being encoded and compressed, such as time stamping or watermarking by company Logo, removing speckle and beautifying, and processing sound confusion, in order to enhance some field effects or add some additional effects. The processing links include audio processing, video processing and synthesis processing, the audio processing specifically includes processing of sound mixing, noise reduction, special sound effects and the like, the video processing includes processing of beauty, watermarking, various custom filters and the like, and the synthesis processing is to synthesize the processed audio and video in real time so that the picture and sound presented by the client or the server are synchronous.
S4022: and when the live broadcast data comprises audio and video data and a recording instruction, embedding the recording instruction into the audio and video data to generate live broadcast protocol data.
When the live data contains both audio and video data and a recording instruction, the recording instruction is embedded into the processed audio and video data and then encoded and compressed, besides the audio and video data is subjected to effect processing. The audio and video data processing includes audio processing, video processing and synthesis processing, the audio processing specifically includes processing of sound mixing, noise reduction, special sound effects and the like, the video processing includes processing of beauty, watermarking, various custom filters and the like, and the synthesis processing is to synthesize the processed audio and video in real time so that the picture and sound presented by the client or the server are synchronous.
Referring to fig. 7, in a specific embodiment, the embedding the recording instruction into the audio and video data, and generating live protocol data includes:
s701: respectively acquiring timestamp information of the audio and video data and timestamp information of a recording instruction;
s702: taking the audio and video data with the same timestamp information as the recording instruction as target audio and video data;
s703: and determining the target position of the target audio and video data in the audio and video data, and inserting the recording instruction into the audio and video data according to the target position to generate live broadcast protocol data.
The recording instruction comprises a recording starting instruction and a recording ending instruction. The live broadcast content occurring in the period from the time when the user initiates the recording starting instruction to the time when the user initiates the recording ending instruction is the content which the user wants to record and store.
The inserting the recording instruction into the audio and video data according to the target position comprises:
s7031, counting the times of the recording instructions;
s7032, judging whether the frequency of the recording instruction is an odd number;
s7033, if the number of times of recording the instruction is an odd number, judging that the recording instruction is a recording starting instruction, and inserting the recording starting instruction into a previous position adjacent to the target position;
s7034, if the number of times of recording the instruction is not an odd number, judging that the recording instruction is a recording ending instruction, and inserting the recording ending instruction into a next position adjacent to the target position.
It should be noted that the content of the recorded audio/video data is determined by the start recording instruction and the first end recording instruction sent after the start recording instruction.
S403: and sending the live broadcast protocol data to a server, wherein the server is used for judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data, if the recording instruction is embedded in the audio and video data, recording the audio and video data according to the recording instruction, and storing the recorded audio and video data.
In a possible embodiment, if the live protocol data does not contain a recording instruction, the live protocol data is discarded while being output, that is, the live protocol data is not stored; in addition, if the live broadcast protocol data contains a recording instruction, the audio and video data are recorded according to the recording instruction while the live broadcast protocol data are output, the live broadcast protocol data are discarded while being output, and only the recorded audio and video data are stored, so that the storage space can be saved.
S404: and receiving the storage address of the recorded audio and video data returned by the server.
In this embodiment, the recorded audio and video data may exist in the form of a recording file, and the server performs a callback of a review address of the recording file every time a recording file is generated, notifies the anchor client that recording of the video is ready, improves the real-time performance of recording of the highlight video, facilitates the anchor client to share the highlight video while live broadcasting, and promotes the attraction of audiences.
The recording file may be used to: 1. sharing a microblog wonderful live video, 2, playing back an on-demand video of a live platform, and 3, covering a dynamic wonderful video of a live room.
In the live broadcast process, the anchor continuously pushes live broadcast content to a live broadcast server. When a recording requirement exists, the anchor terminal initiates a recording signaling to the cloud recording server, and the recording module receives the starting signaling and then pulls the live broadcast content from the live broadcast server to record. In the process, the recording signaling is started to be independent of live audio and video data, and a new TCP connection is started for transmission, so that the transmission rate of the live stream and the recording signaling are difficult to synchronize, namely, a recording module cannot accurately record the content desired by a main broadcast, and wonderful video segments in the live process are easily missed. For example: the doll is clamped by using the doll machine, a recording request is initiated to a background when the doll clamping is started by coin inserting, a user wants to record the whole process of clamping the doll, but because the speed of audio and video transmission lags behind the instruction transmission, the starting time and the ending time of a recording file are both earlier than the starting time and the ending time of audio and video content corresponding to the content required by the user.
According to the live content recording method provided by the embodiment, the recording signaling is embedded into the audio and video data, so that the recording signaling and the audio and video data share the same transmission connection, the signaling is synchronous with the live content, the functions of accurately starting and closing the recording of the anchor terminal are realized, the recorded data are ensured to completely meet the user requirements, and the user experience is improved. Compared with the prior art, the method and the device have the advantages that the storage cost and the labor cost are saved while the accurate recording is realized.
Another embodiment of the live content recording method according to the present invention is described below, and fig. 9 is a flowchart of an embodiment of the live content recording method according to the present invention, and the present specification provides the method operation steps described in the embodiment or the flowchart, but may include more or less operation steps based on conventional or non-creative labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In practice, the system products may be executed sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) in accordance with the methods described in the embodiments or figures. Specifically, fig. 8 is an application scenario diagram of a live content recording method according to this embodiment, in this embodiment, a server includes a live server, a recording server, and a database, and the live content recording method provided in this embodiment is applied to a server side, and is explained by information interaction between a main broadcast client and the server. As shown in fig. 9, the live content recording method may include:
s901: and receiving live broadcast protocol data sent by the anchor client.
In this embodiment, the live broadcast protocol data may be generated by audio/video data, or may be generated by mixing audio/video data and a recording instruction. The anchor client acquires live broadcast data, processes the live broadcast data into live broadcast protocol data, generates the live broadcast protocol data from audio and video data if the live broadcast data is only audio and video data, and generates the live broadcast protocol data by mixing the audio and video data and a recording instruction if the live broadcast data contains the audio and video data and the recording instruction.
S902: and judging whether a recording instruction is embedded in the audio and video data contained in the live broadcast protocol data.
S903: and if the audio and video data is embedded with a recording instruction, recording the audio and video data according to the recording instruction, and storing the recorded audio and video data.
In this embodiment, the recording instruction includes a start recording instruction and a stop recording instruction.
In a possible embodiment, the recording the audio/video data according to the recording instruction includes: respectively determining the positions of a recording starting instruction and a first recording ending instruction after the recording starting instruction in audio and video data; and extracting audio and video data in an interval from the start of the recording instruction to the end of the recording instruction, and taking the extracted audio and video data as the recorded audio and video data.
In one possible embodiment, the extracting of the audio-video data in the interval from the start of the recording instruction to the end of the recording instruction may include: recording is started from the first I frame of the audio and video data after the recording instruction is started until the I frame before the first recording ending instruction after the recording instruction is started is recorded, and recording data are obtained. Data streams output by live broadcast protocol data are shown in fig. 12, where av tag is audio/video data, command tag is instruction data, and each tag data has information such as a timestamp, so as to ensure that related data packets are sent in order. And the audio and video data between the start recording instruction and the end recording instruction is wonderful video data to be recorded. In order to simplify the logic of the recording server, the first video tag data after the instruction tag is inserted into the live protocol data is encoded into I frame data, so that the recording server can record from the I frame, and the problem of screen omission of the first GOP is avoided.
In a possible embodiment, live broadcast content recording is performed according to a recording instruction while the live broadcast protocol data is output, and at the same time, the output live broadcast protocol data is discarded, and only the recorded audio and video data is stored, so that the purpose of saving storage space is achieved.
S904: and returning the storage address of the recorded audio and video data to the anchor client.
Further, the method further comprises: and if the audio and video data are not embedded with the recording instruction, discarding the live protocol data.
According to the live broadcast content recording scheme provided by the invention, the recording signaling is embedded into the audio and video data, so that the recording signaling and the audio and video data share the same transmission connection, the signaling is synchronous with the live broadcast content, the functions of accurately starting and closing the recording at the anchor terminal are realized, the recorded content is ensured to completely meet the user requirements, and the user experience is improved. In the aspect of storage, only once audio and video is stored, and the video is a short and wonderful audio and video, so that a large amount of storage cost is saved.
In the existing system architecture, a server includes a live broadcast server, a recording server and a database, wherein both the live broadcast server and the recording server can communicate with a main broadcast client. The scheme of the invention can realize the method for accurately starting and closing the recording of the wonderful video on the premise of not changing the existing system architecture, ensure that the recording quantity is not increased and the recording quantity is not reduced, improve the product experience of acquiring the wonderful video by the anchor and save the cost of storage and manpower at the same time. The solution of the invention will be explained below with reference to fig. 10 and 11.
Fig. 10 is a flowchart illustrating a live content recording method according to an embodiment of the present invention. Referring to fig. 10, a live content recording method provided in this embodiment includes:
s101: and the live broadcast server receives live broadcast protocol data pushed by the anchor client.
When the live data comprise the audio and video data and a recording instruction, the live server embeds the recording instruction into the audio and video data to generate the live protocol data. Please refer to the above embodiment for a specific method for embedding a recording instruction into audio/video data to generate live protocol data.
S102: and the live broadcast server outputs live broadcast content according to the live broadcast protocol data and sends a first notice to the recording server, wherein the first notice is used for indicating the recording server to acquire the live broadcast protocol data. In order to avoid the recording server missing live broadcast protocol data, the live broadcast server informs the recording server to pull stream when receiving the first live broadcast protocol data packet pushed by the anchor client.
S103: the recording server responds to the first notice, pulls live broadcast protocol data from the live broadcast server, analyzes the live broadcast protocol data, judges whether the live broadcast protocol data contains a recording instruction or not, and directly discards the live broadcast protocol data if the live broadcast protocol data does not contain the recording instruction; and if the recording instruction is contained, recording audio and video data contained in the live broadcast protocol data according to the recording instruction to obtain recorded data, discarding the live broadcast protocol data and storing the recorded data in a database.
S104: and the recording server sends the storage address of the recorded audio and video data to the anchor client. The recorded audio and video data can be in a recording file form, and the recording server performs recording file review address callback every time a recording file is generated, so that a live broadcast client is informed that the recorded video is ready, the real-time performance of recording the wonderful video is improved, the recorded audio and video data is beneficial to promotion and watching of the wonderful video sharing while live broadcast of a main broadcast, and audiences are attracted.
Fig. 11 shows another live content recording method under the system architecture, which includes:
s111: and the live broadcast server receives live broadcast protocol data pushed by the anchor client.
When the live data comprise the audio and video data and a recording instruction, the live server embeds the recording instruction into the audio and video data to generate the live protocol data. Please refer to the above embodiment for a specific method for embedding a recording instruction into audio/video data to generate live protocol data.
S112: the live broadcast server receives the live broadcast protocol data, decodes the live broadcast protocol data, judges whether the live broadcast protocol data contains a recording instruction or not, if not, the live broadcast protocol data is discarded after being output, if the live broadcast protocol data contains the recording instruction, the live broadcast protocol data is cached, and a second notification is sent to the recording server, and the second notification is used for indicating the recording server to acquire the cached live broadcast protocol data.
S113: and the recording server responds to the second notification, pulls the live broadcast protocol data from the live broadcast server, analyzes the live broadcast protocol data to obtain audio and video data and a recording instruction, records the audio and video data according to the recording instruction to obtain recorded data, discards the live broadcast protocol data and stores the recorded data in a database.
S114: and the recording server sends the storage address of the recorded audio and video data to the anchor client.
In a possible embodiment, the recording server may further send the information of successful recording to the live broadcast server, and the live broadcast server deletes the cached live broadcast protocol data after receiving the information of successful recording. If the recording is unsuccessful, the live broadcast protocol data can be obtained from the live broadcast server again for recording processing. Thus, the success rate of recording can be ensured.
In the embodiment, the instruction data is embedded in the audio and video data, so that the method for accurately starting and closing the recording is realized. In the aspect of storage, only once audio and video is stored, and the video is a short and wonderful audio and video, so that a large amount of storage cost is saved.
The embodiment of the present invention further provides a live content recording apparatus, where the live content recording apparatus 1300 includes a live data obtaining unit 1310, a live protocol data generating unit 1320, a live protocol data sending unit 1330, and an address receiving unit 1340. Wherein the content of the first and second substances,
the live broadcast data acquiring unit 1310 is configured to acquire live broadcast data generated in a live broadcast room, where the live broadcast data at least includes audio and video data;
the live broadcast protocol data generating unit 1320 is configured to generate live broadcast protocol data according to the live broadcast data;
the live broadcast protocol data sending unit 1330 is configured to send the live broadcast protocol data to a server, where the server is configured to determine whether a recording instruction is embedded in audio and video data included in the live broadcast protocol data, and if a recording instruction is embedded in the audio and video data, record the audio and video data according to the recording instruction, and store the recorded audio and video data;
the address receiving unit 1340 is configured to receive a storage address of the recorded audio and video data returned by the server.
In one possible implementation, the live protocol data generating unit 1320 includes:
the first generation module 1321 is configured to generate live broadcast protocol data according to the audio and video data when the live broadcast data is the audio and video data;
the second generating module 1322 is configured to, when the live broadcast data includes audio/video data and a recording instruction, embed the recording instruction into the audio/video data to generate live broadcast protocol data.
In one possible implementation, the second generating module 1322 includes:
the obtaining submodule 13221 is configured to obtain timestamp information of the audio and video data and timestamp information of the recording instruction respectively;
the searching submodule 13222 is configured to use the audio and video data that is the same as the timestamp information of the recording instruction as target audio and video data;
the processing submodule 13223 is configured to determine a target position of the target audio/video data in the audio/video data, insert the recording instruction into the audio/video data according to the target position, and generate live broadcast protocol data.
In one possible implementation manner, the recording instruction includes a start recording instruction and an end recording instruction. The processing submodule 13223 is configured to: counting the times of recording the instructions; judging whether the frequency of the recording instruction is an odd number; if the number of times of the recording instruction is an odd number, judging that the recording instruction is a recording starting instruction, and inserting the recording starting instruction into a previous position adjacent to the target position; and if the number of times of recording the command is not an odd number, judging that the recording command is a command for ending recording, and inserting the command for ending recording into the next position adjacent to the target position.
The embodiment of the present invention further provides a live content recording apparatus, where the live content recording apparatus 1500 includes a data receiving unit 1510, a determining unit 1520, a data processing unit 1530, and an address sending unit 1540. Wherein the content of the first and second substances,
the data receiving unit 1510 is configured to receive live broadcast protocol data sent by a anchor client;
the judging unit 1520 is configured to judge whether a recording instruction is embedded in audio and video data included in the live broadcast protocol data;
the data processing unit 1530 is configured to record the audio and video data according to the recording instruction when the recording instruction is embedded in the audio and video data, and store the audio and video data obtained by recording;
the address sending unit 1540 is configured to return the storage address of the recorded audio and video data to the anchor client.
The embodiment provides a scheme for embedding the recording signaling in the live stream, the recording signaling and the live stream share the same transmission connection, the synchronization of the signaling and the live content is ensured, and the accurate starting and the recording closing of the main broadcast end are realized. According to the scheme, the defects of the background technology are overcome while recording is finished by accurate starting, and storage and labor cost are greatly saved.
It should be noted that: the live content recording device provided in the foregoing embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the live content recording device and the live content recording method provided by the above embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment and are not described herein again.
An embodiment of the present invention further provides a schematic structural diagram of a client, as shown in fig. 16, where the client may be used to implement the live content recording method provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the client may include RF (Radio Frequency) circuitry 1610, memory 1620 including one or more computer readable storage media, input unit 1630, display unit 1640, sensor 1650, audio circuitry 1660, WiFi (wireless fidelity) module 1670, processor 1680 including one or more processing cores, and power supply 1690 among other components. Those skilled in the art will appreciate that the client architecture shown in fig. 16 does not constitute a limitation on the client, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components. Wherein:
RF circuitry 1610 may be configured to receive and transmit signals during a message transmission or call, and in particular, receive downlink messages from a base station and process them in one or more processors 1680; in addition, data relating to uplink is transmitted to the base station. In general, RF circuitry 1610 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, RF circuit 810 may also communicate with networks and other clients via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
The memory 1620 may be used to store software programs and modules, and the processor 1680 executes various functional applications and data processing by operating the software programs and modules stored in the memory 1620. The memory 1620 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the client, and the like. Further, the memory 1620 may comprise high speed random access memory, and may also comprise non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 1620 may also include a memory controller to provide the processor 880 and the input unit 1630 access to the memory 1620.
The input unit 1630 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input unit 1630 may include a touch-sensitive surface 1631 as well as other input devices 1632. The touch-sensitive surface 1631, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 1631 (e.g., operations by a user on or near the touch-sensitive surface 1631 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch-sensitive surface 1631 may comprise both touch detection means and touch controller portions. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1680, and can receive and execute commands sent by the processor 1680. Additionally, the touch-sensitive surface 1631 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 1630 may also include other input devices 1632 in addition to the touch-sensitive surface 1631. In particular, other input devices 1632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1640 may be used to display information input by or provided to a user and various graphical user interfaces of the client, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 1640 may include a display panel 1641, and optionally, the display panel 1641 may be configured in the form of an LCD (Liquid crystal display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch-sensitive surface 1631 may overlay display panel 1641, and when touch-sensitive surface 1631 detects a touch operation on or near touch-sensitive surface, communicate to processor 1680 to determine the type of touch event, and processor 1680 may then provide a corresponding visual output on display panel 1641 in accordance with the type of touch event. Touch-sensitive surface 1631 and display panel 1641 may be implemented as two separate components for input and output functions, although touch-sensitive surface 1631 and display panel 1641 may be integrated for input and output functions in some embodiments.
The client may also include at least one sensor 1650, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 1641 according to the brightness of ambient light and a proximity sensor that may turn off the display panel 1641 and/or backlight when the client moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the device is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for identifying client gestures, and related functions (such as pedometer and tapping) for vibration identification; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured at the client, detailed description is omitted here.
Audio circuitry 1660, speaker 1661, microphone 1662 may provide an audio interface between the user and the client. The audio circuit 1660 can transmit the received electrical signal converted from the audio data to the speaker 1661, and the received electrical signal is converted into an acoustic signal by the speaker 1661 for output; on the other hand, the microphone 1662 converts collected sound signals into electrical signals, which are received by the audio circuitry 1660 and converted into audio data, which are processed by the audio data output processor 1680 and then passed through the RF circuitry 1610 for transmission to, for example, another client, or for output of the audio data to the memory 1620 for further processing. Audio circuitry 1660 may also include an earbud jack to provide communication of peripheral headphones with the client.
WiFi belongs to short-distance wireless transmission technology, the client can help a user to send and receive e-mails, browse webpages, access streaming media and the like through a WiFi module 1670, and wireless broadband internet access is provided for the user. Although a WiFi module 1670 is shown in fig. 16, it is understood that it does not belong to the essential constitution of the client and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 1680 is a control center of the client, connects various parts of the entire client by using various interfaces and lines, performs various functions of the client and processes data by running or executing software programs and/or modules stored in the memory 1620 and calling data stored in the memory 1620, thereby performing overall monitoring of the client. Alternatively, processor 1680 may include one or more processing cores; preferably, the processor 1680 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1680.
The client also includes a power supply 1690 (e.g., a battery) for powering the various components, which may preferably be logically connected to the processor 1680 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. Power supply 1690 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and any like components.
Although not shown, the client may further include a camera, a bluetooth module, and the like, which are not described herein again. Specifically, in this embodiment, the display unit of the client is a touch screen display, the client further includes a memory and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors according to the instructions of the method embodiments of the present invention.
The embodiment of the present invention further provides a storage medium, where the storage medium may be configured in a client to store at least one instruction, at least one program, a code set, or an instruction set related to implementing a live content recording method in the method embodiment, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the live content recording method provided in the method embodiment.
Optionally, in this embodiment, the storage medium may be located in at least one network client of a plurality of network clients of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The embodiment of the present invention provides a server, where the server includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the live content recording method provided in the foregoing method embodiment.
The memory may be used to store software programs and modules, and the processor may execute various functional applications and live content recording by executing the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
Referring to fig. 17, the server 1700 is configured to implement the live content recording method provided in the foregoing embodiment, and specifically, the server structure may include the live content recording device. The server 1700 may vary significantly by configuration or performance and may include one or more Central Processing Units (CPUs) 1710 (e.g., one or more processors) and memory 1730, one or more storage media 1720 (e.g., one or more mass storage devices) that store applications 1723 or data 1722. The memory 1730 and the storage medium 1720 may be transitory or persistent storage, among other things. The program stored on storage medium 1720 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the central processor 1710 may be configured to communicate with the storage medium 1720 to execute a series of instruction operations in the storage medium 1720 on the server 1700. The server 1700 may also include one or more power supplies 1760, one or more wired or wireless network interfaces 1750, one or more input-output interfaces 1740, and/or one or more operating systems 1721, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
Embodiments of the present invention further provide a storage medium, where the storage medium may be disposed in a server to store at least one instruction, at least one program, a code set, or an instruction set related to implementing a live content recording method in the method embodiments, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the live content recording method provided in the method embodiments.
Alternatively, in this embodiment, the storage medium may be located in at least one network server of a plurality of network servers of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
As can be seen from the above embodiments of the live content recording method, apparatus, server, or client provided by the present invention, in this specification, the recording signaling is embedded in the audio/video data, so that the recording signaling and the audio/video data share the same transmission connection, and the signaling is synchronized with the live content, thereby realizing the functions of accurately starting and closing the recording at the anchor terminal, ensuring that the recorded file completely meets the user requirements, and improving the user experience. It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and server embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (11)

1. A live content recording method is characterized by comprising the following steps:
acquiring live broadcast data generated by a live broadcast room, wherein the live broadcast data at least comprises audio and video data;
generating live broadcast protocol data according to the live broadcast data, and generating live broadcast protocol data according to the audio and video data when the live broadcast data is the audio and video data; when the live broadcast data comprises audio and video data and a recording instruction, embedding the recording instruction into the audio and video data to generate live broadcast protocol data;
the live broadcast protocol data are sent to a server, the server is used for judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data, if the recording instruction is embedded in the audio and video data, the audio and video data are recorded according to the recording instruction, and the recorded audio and video data are stored;
receiving a storage address of the audio and video data returned by the server;
the step of embedding the recording instruction into the audio and video data and generating live broadcast protocol data comprises the following steps:
respectively acquiring timestamp information of the audio and video data and timestamp information of a recording instruction;
taking the audio and video data with the same timestamp information as the recording instruction as target audio and video data;
and determining the target position of the target audio and video data in the audio and video data, and inserting the recording instruction into the audio and video data according to the target position to generate live broadcast protocol data.
2. The method of claim 1, wherein the recording instructions include a start recording instruction and an end recording instruction,
the inserting the recording instruction into the audio and video data according to the target position comprises:
counting the times of recording the instructions;
judging whether the frequency of the recording instruction is an odd number;
if the number of times of the recording instruction is an odd number, judging that the recording instruction is a recording starting instruction, and inserting the recording starting instruction into a previous position adjacent to the target position;
and if the number of times of recording the command is not an odd number, judging that the recording command is a command for ending recording, and inserting the command for ending recording into the next position adjacent to the target position.
3. The method of claim 1, wherein obtaining live data generated by a live room comprises:
acquiring audio and video data of a live broadcast room, and taking the audio and video data as live broadcast data; alternatively, the first and second electrodes may be,
the method comprises the steps of responding to the operation of recording live broadcast contents of a user while acquiring audio and video data of a live broadcast room, obtaining a recording instruction, and taking the audio and video data and the recording instruction as live broadcast data.
4. A live content recording method is characterized by comprising the following steps:
receiving live broadcast protocol data sent by a main broadcast client; when the live broadcast data is audio and video data, generating the live broadcast protocol data according to the audio and video data; when the live broadcast data comprises audio and video data and a recording instruction, respectively acquiring timestamp information of the audio and video data and timestamp information of the recording instruction, taking the audio and video data which is the same as the timestamp information of the recording instruction as target audio and video data, determining a target position of the target audio and video data in the audio and video data, inserting the recording instruction into the audio and video data according to the target position, and generating live broadcast protocol data;
judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data;
if the audio and video data are embedded with a recording instruction, recording the audio and video data according to the recording instruction, and storing the recorded audio and video data;
and returning the storage address of the audio and video data to the anchor client.
5. The method of claim 4, wherein the recording instructions include a start recording instruction and an end recording instruction;
the recording the audio and video data according to the recording instruction comprises the following steps:
respectively determining the positions of a recording starting instruction and a first recording ending instruction after the recording starting instruction in audio and video data; and extracting audio and video data in an interval from the start of the recording instruction to the end of the recording instruction, and taking the extracted audio and video data as the recorded audio and video data.
6. The method of claim 4,
the method further comprises the following steps: and if the audio and video data are not embedded with the recording instruction, discarding the live protocol data.
7. A live content recording apparatus, comprising:
the live broadcast data acquisition unit is used for acquiring live broadcast data generated by a live broadcast room, and the live broadcast data at least comprises audio and video data;
the live broadcast protocol data generating unit is used for generating live broadcast protocol data according to the live broadcast data and comprises a first generating module and a second generating module, wherein the first generating module is used for generating the live broadcast protocol data according to the audio and video data when the live broadcast data is the audio and video data, and the second generating module is used for embedding the recording instruction into the audio and video data to generate the live broadcast protocol data when the live broadcast data comprises the audio and video data and a recording instruction;
the live broadcast protocol data sending unit is used for sending the live broadcast protocol data to a server, the server is used for judging whether a recording instruction is embedded in audio and video data contained in the live broadcast protocol data, if the recording instruction is embedded in the audio and video data, the audio and video data are recorded according to the recording instruction, and the recorded audio and video data are stored;
the address receiving unit is used for receiving the storage address of the audio and video data returned by the server;
wherein the second generating module comprises:
the acquisition submodule is used for respectively acquiring the timestamp information of the audio and video data and the timestamp information of the recording instruction;
the searching submodule is used for taking the audio and video data which are the same as the timestamp information of the recording instruction as target audio and video data;
and the processing submodule is used for determining the target position of the target audio and video data in the audio and video data, inserting the recording instruction into the audio and video data according to the target position and generating live broadcast protocol data.
8. The apparatus of claim 7, wherein the recording instructions comprise a start recording instruction and an end recording instruction,
the processing submodule is used for: counting the times of recording the instructions; judging whether the frequency of the recording instruction is an odd number; if the number of times of the recording instruction is an odd number, judging that the recording instruction is a recording starting instruction, and inserting the recording starting instruction into a previous position adjacent to the target position; and if the number of times of recording the command is not an odd number, judging that the recording command is a command for ending recording, and inserting the command for ending recording into the next position adjacent to the target position.
9. A live content recording apparatus, comprising:
the data receiving unit is used for receiving the live broadcast protocol data sent by the anchor client; when the live broadcast data is audio and video data, generating the live broadcast protocol data according to the audio and video data; when the live broadcast data comprises audio and video data and a recording instruction, respectively acquiring timestamp information of the audio and video data and timestamp information of the recording instruction, taking the audio and video data which is the same as the timestamp information of the recording instruction as target audio and video data, determining a target position of the target audio and video data in the audio and video data, inserting the recording instruction into the audio and video data according to the target position, and generating live broadcast protocol data;
the judging unit is used for judging whether a recording instruction is embedded in the audio and video data contained in the live broadcast protocol data;
the data processing unit is used for recording the audio and video data according to the recording instruction when the recording instruction is embedded in the audio and video data, and storing the recorded audio and video data;
and the address sending unit is used for returning the storage address of the audio and video data to the anchor client.
10. A computer-readable storage medium, characterized in that the storage medium stores a computer program, which is executed by a processor to implement a live content recording method according to any one of claims 1 to 3.
11. A server, characterized in that the server comprises a processor and a memory for storing a computer program, the processor being adapted to execute the computer program for implementing the live content recording method as claimed in any of claims 4 to 6.
CN201810763680.0A 2018-07-12 2018-07-12 Live content recording method and device, computer readable storage medium and server Active CN108900855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810763680.0A CN108900855B (en) 2018-07-12 2018-07-12 Live content recording method and device, computer readable storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810763680.0A CN108900855B (en) 2018-07-12 2018-07-12 Live content recording method and device, computer readable storage medium and server

Publications (2)

Publication Number Publication Date
CN108900855A CN108900855A (en) 2018-11-27
CN108900855B true CN108900855B (en) 2020-06-02

Family

ID=64349043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810763680.0A Active CN108900855B (en) 2018-07-12 2018-07-12 Live content recording method and device, computer readable storage medium and server

Country Status (1)

Country Link
CN (1) CN108900855B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958465A (en) * 2019-12-17 2020-04-03 广州酷狗计算机科技有限公司 Video stream pushing method and device and storage medium
CN111147882B (en) * 2019-12-31 2022-02-08 北京达佳互联信息技术有限公司 Video processing method and device, terminal equipment and storage medium
CN112165643B (en) * 2020-09-07 2023-02-24 青岛海信移动通信技术股份有限公司 Communication terminal
CN112954483B (en) * 2021-02-09 2024-02-02 西安万像电子科技有限公司 Data transmission method, system and non-volatile storage medium
CN113645481B (en) * 2021-08-23 2023-01-24 歌尔科技有限公司 Video recording method, camera equipment, control terminal and video recording system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050166230A1 (en) * 2003-03-18 2005-07-28 Gaydou Danny R. Systems and methods for providing transport control
CN102281474B (en) * 2011-09-02 2013-03-27 乐视网信息技术(北京)股份有限公司 Live network broadcasting and recording method
CN105120299B (en) * 2015-08-28 2020-02-14 广州酷狗计算机科技有限公司 Video pushing method and device
CN106412645B (en) * 2016-09-09 2019-09-20 广州酷狗计算机科技有限公司 To the method and apparatus of multimedia server uploaded videos file

Also Published As

Publication number Publication date
CN108900855A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108900855B (en) Live content recording method and device, computer readable storage medium and server
CN108737908B (en) Media playing method, device and storage medium
CN107454416B (en) Video stream sending method and device
US9621950B2 (en) TV program identification method, apparatus, terminal, server and system
CN104113787B (en) Based on the comment method of program, terminal, server and system
CN107360458B (en) Play control method, device, storage medium and terminal
CN104796743B (en) Content item display system, method and device
CN106412662B (en) Timestamp distribution method and device
CN107682715B (en) Video synchronization method and device
CN103391473B (en) Method and device for providing and acquiring audio and video
KR101650804B1 (en) Method for sharing media content, terminal device, and content sharing system
CN109151494B (en) Multimedia data transmission method, multimedia acquisition equipment and server
CN107274882B (en) Data transmission method and device
WO2015062224A1 (en) Tv program identification method, apparatus, terminal, server and system
CN106658064B (en) Virtual gift display method and device
CN112771881B (en) Bullet screen processing method and device, electronic equipment and computer readable storage medium
CN112995759A (en) Interactive service processing method, system, device, equipment and storage medium
CN112969093A (en) Interactive service processing method, device, equipment and storage medium
CN110636337B (en) Video image intercepting method, device and system
CN110248233B (en) Audio and video playing method, device, equipment and storage medium
CN110198452B (en) Live video previewing method, device and system
CN106034065B (en) Information display method and device
CN105282628B (en) A kind of method and apparatus of video playing
CN112203116A (en) Video generation method, video playing method and related equipment
CN106330875B (en) Message display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant