Video stream live broadcast method, streaming media server, and readable storage medium
By acquiring multiple incoming video streams in the IPTV system, determining the main code stream and the backup code stream, and switching to the backup code stream when the main code stream is abnormal, the problem of unavailability of the live broadcast channel due to network problems is solved, and the experience quality of live video streaming is improved.
Patent Information
- Application Number
- PCT/CN2024/113261
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-07
- Filing Date
- 2024-08-20
- Publication Date
- 2025-04-10
AI Technical Summary
In the existing IPTV system, the live broadcast channel cannot receive the video stream due to network congestion or unreachable problems, resulting in the live broadcast channel being unavailable, reducing the experience quality of live video streaming.
By acquiring a plurality of incoming video streams corresponding to the live broadcast channel, the main code stream and at least one backup code stream are determined. If the main code stream is in a normal transmission state, output the main code stream to the terminal device; if the main code stream is in an abnormal transmission state, determine the target code stream from the backup code stream and output the target code stream to the terminal device.
In the event of encoder failure or network problems, we can actively sense and switch video streams to ensure the availability of live channel services and improve the quality of experience.
Smart Images

Figure CN2024113261_10042025_PF_FP_ABST
Abstract
Description
Video streaming live broadcast method, streaming media server and readable storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on October 7, 2023, with application number 202311295358.7 and invention name “Video streaming live broadcast method, streaming media server and readable storage medium”. The entire contents of the Chinese patent application are incorporated herein by reference. Technical Field
[0003] The present application relates to the field of communication technology, and in particular to a video streaming live broadcast method, a streaming media server, and a computer-readable storage medium. Background Art
[0004] In existing interactive Internet Protocol Television (IPTV) systems, live channel services generally use a streaming server (SS) architecture. The input of a live channel is generally a video stream formatted and encapsulated by an encoder or an outgoing video stream of a live channel of a superior streaming server. The streaming server receives the video stream, and after a series of internal processing, outputs the video stream to the terminal device. The terminal device can receive the video stream for video playback. When the network from the encoder or superior streaming server to the local streaming server is congested or unreachable, the live channel of the local streaming server will not be able to receive the video stream due to network problems, causing the live channel to become unavailable, thereby reducing the quality of experience (QoE) of the live video stream.
[0005] Therefore, how to improve the quality of experience of live video streaming has become an urgent problem that needs to be solved.
[0006] Summary of the Invention
[0007] In a first aspect, an embodiment of the present application provides a method for live broadcasting of a video stream, comprising: obtaining multiple incoming video streams corresponding to a live broadcast channel, determining a main code stream and at least one backup code stream from the multiple incoming video streams; if the main code stream is in a normal transmission state, outputting the main code stream to a terminal device; if the main code stream is in an abnormal transmission state, determining a target code stream from the at least one backup code stream, and outputting the target code stream to the terminal device.
[0008] In a second aspect, an embodiment of the present application further provides a streaming media server, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the above-mentioned video streaming live broadcast method when executing the computer program.
[0009] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor enables the processor to implement the video streaming live broadcast method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0011] FIG1 is a schematic diagram of the architecture of an Internet television system provided in an embodiment of the present application;
[0012] FIG2 is a software schematic diagram of a streaming media server provided in an embodiment of the present application;
[0013] FIG3 is a hardware schematic diagram of a streaming media server provided in an embodiment of the present application;
[0014] FIG4 is a schematic flow chart of a method for live streaming a video stream provided in an embodiment of the present application;
[0015] FIG5 is a schematic flow chart of sub-steps of another method for live video streaming provided by an embodiment of the present application;
[0016] FIG6 is a schematic flow chart of sub-steps of another method for live video streaming provided in an embodiment of the present application;
[0017] FIG7 is a schematic flowchart of the sub-steps of another method for live video streaming provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0019] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.
[0020] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0022] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0023] In the subsequent description, suffixes such as "module," "component," or "unit" used to represent elements are used only to facilitate the description of the present application and have no specific meaning. Therefore, "module," "component," or "unit" may be used interchangeably.
[0024] Embodiments of the present application provide a method for live video streaming, a streaming media server, an Internet television system, and a computer-readable storage medium. The method can be applied to a streaming media server in an Internet television system. By acquiring multiple video streams corresponding to a live channel and determining a primary stream and at least one backup stream from the multiple incoming video streams, the method can determine a target stream from the at least one backup stream when the primary stream is in an abnormal transmission state and output the target stream to a terminal device. This method can proactively detect and switch incoming video streams when an encoder fails or a network problem occurs, thereby ensuring the availability of the live channel service and improving the quality of experience.
[0025] For example, the terminal device may be a set-top box (STB) or other electronic device with a video playback function. For example, electronic devices such as a smartphone, a laptop computer, a tablet computer, a notebook computer, and a desktop computer. In the embodiments of the present application, the terminal device is a set-top box as an example to illustrate how to perform a live video stream.
[0026] Please refer to Figure 1, which is a schematic diagram of the architecture of an Internet TV system 10 provided in an embodiment of the present application. As shown in Figure 1, the Internet TV system 10 may include a streaming media server 100 and a set-top box (STB) 200. In the Internet TV system 10, the streaming media server 100 can receive video streams from multiple encoders, determine the primary stream and backup stream based on the priority of each video stream, use the primary stream as the input source of the live channel, perform stream conversion on the input primary stream, and then output it to the set-top box 200.
[0027] It should be noted that, in the embodiment of the present application, the backup code stream may also be referred to as a slave code stream.
[0028] In this embodiment of the present application, when creating a live channel on the streaming server 100, multiple incoming video streams with the same content but different transmission sources can be specified, and different priorities can be assigned to these incoming video streams. The streaming server 100 can simultaneously receive video stream data from both the master stream and the slave stream, but only selects the master stream as the incoming video stream for the live channel.
[0029] The streaming media server 100 can use Simulcast technology to convert the bitrate of the main stream and the slave stream, converting the bitrate of these inbound streams to the bitrate specified when creating the live channel. The streaming media server preferentially selects the main stream as the inbound video stream of the live channel. When the main stream is interrupted or the packet loss rate exceeds the preset packet loss rate threshold, the streaming media server 100 is triggered to select a high-priority backup stream from multiple backup streams as the main stream, and the original main stream is downgraded to a backup stream. When a backup stream with a higher priority than the current main stream is detected, a stream switching is triggered, that is, the restored high-priority stream becomes the main stream, and the current main stream is downgraded to a backup stream.
[0030] In the embodiment of the present application, live video streaming can be achieved through the live streaming service module in the streaming media server 100. The live streaming service module will be described in detail below.
[0031] Please refer to Figure 2, which is a software schematic diagram of a streaming media server 100 provided in an embodiment of the present application. As shown in Figure 2, the live streaming service module in the streaming media server 100 adopts a pipes and filters architecture and can include a bit rate adaptation module, a bit stream selection module, a bit stream conversion module, and a bit stream push module.
[0032] The bitrate adaptation module can be a Simulcast module. Because the bitrate of the video stream output by the multi-input encoder is inconsistent with the target bitrate specified for creating a live channel, the bitrate adaptation module is used to adapt the bitrate of the incoming video stream to the target bitrate specified by the live channel, and then serve as the input of the bitrate selection module.
[0033] Among them, the stream selection module receives multiple video streams processed by the bit rate adaptation module, analyzes the packet loss and interruption of the video stream, and at the same time determines the main stream and backup stream based on the priority of the video stream, and then uses the main stream as the input of the stream conversion module.
[0034] The stream conversion module converts the main stream selected by the stream selection module into an extended Real-Time Transport Protocol (RTP) format, and then uses the converted main stream as input to the stream push module.
[0035] The code stream push module receives the main code stream converted by the code stream conversion module and pushes the main code stream to the IP address and port specified by the set-top box.
[0036] Please refer to Figure 3, which is a hardware diagram of a streaming media server 100 provided in an embodiment of the present application. As shown in Figure 3, the streaming media server 100 may include a processor 1001 and a memory 1002, wherein the processor 1001 and the memory 1002 may be connected via a bus, such as an Inter-Integrated Circuit (I2C) bus or any other suitable bus.
[0037] The memory 1002 may include a storage medium and an internal memory. The storage medium may store an operating system and a computer program. The computer program may include program instructions that, when executed, may cause the processor to execute the video streaming live broadcast method described in any embodiment.
[0038] The processor 1001 is used to provide computing and control capabilities to support the operation of the entire streaming media server 100 .
[0039] The processor 1001 may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or any conventional processor.
[0040] In one embodiment, the processor 1001 is configured to run a computer program stored in the memory 1002 to implement the following steps:
[0041] Acquire multiple incoming video streams corresponding to the live channel, determine a main stream and at least one backup stream from the multiple incoming video streams; if the main stream is in a normal transmission state, output the main stream to the terminal device; if the main stream is in an abnormal transmission state, determine a target stream from the at least one backup stream and output the target stream to the terminal device.
[0042] In one embodiment, when determining a primary stream and at least one backup stream from multiple incoming video streams, the processor 1001 is configured to implement:
[0043] Determine the priority of each incoming video stream;
[0044] The incoming video stream with the highest priority and in normal transmission state is determined as the main code stream, and the remaining incoming video streams are determined as backup code streams. The normal transmission state is a state where no interruption occurs and the packet loss rate is less than a preset packet loss rate threshold.
[0045] In one embodiment, the processor 1001 is further configured to implement:
[0046] When a flow interruption and / or a packet loss rate greater than a packet loss rate threshold is detected for an incoming video stream, it is confirmed that the incoming video stream is in an abnormal transmission state.
[0047] In one embodiment, when determining the target bitstream from at least one backup bitstream, the processor 1001 is further configured to:
[0048] At least one candidate code stream is determined from at least one backup code stream, where the candidate code stream is a backup code stream in a normal transmission state; and a target code stream is determined based on the candidate code stream with the highest priority.
[0049] In one embodiment, before determining the primary stream and at least one backup stream from the multiple incoming video streams, the processor 1001 is further configured to:
[0050] The bitrate of the multiple incoming video streams is adapted based on the target bitrate corresponding to the live broadcast channel to obtain multiple incoming video streams with the same bitrate as the target bitrate.
[0051] In one embodiment, before outputting the main stream to the terminal device, the processor 1001 is further configured to implement:
[0052] The main stream is format-converted based on a preset target video format to obtain a main stream after format conversion.
[0053] In one embodiment, when outputting the main stream to the terminal device, the processor 1001 is configured to implement:
[0054] Output the converted main stream to the terminal device.
[0055] In one embodiment, when outputting the format-converted main stream to the terminal device, the processor 1001 is configured to implement:
[0056] Obtain the target address and target port corresponding to the terminal device; based on the target address and target port, output the main stream after format conversion to the terminal device.
[0057] In one embodiment, after determining the target bitstream from at least one backup bitstream, the processor 1001 is further configured to:
[0058] If it is detected that the main stream has returned to normal transmission status, the stream switching operation is performed to output the main stream to the terminal device.
[0059] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other unless they conflict. Please refer to Figure 4, which is a schematic flow chart of a method for live streaming a video stream provided by an embodiment of the present application. As shown in Figure 4, the method for live streaming a video stream includes steps S101 to S103.
[0060] In step S101, a plurality of incoming video streams corresponding to a live channel are obtained, and a main stream and at least one backup stream are determined from the plurality of incoming video streams.
[0061] Exemplarily, video streams sent by multiple encoders may be received to obtain multiple incoming video streams, and then a main stream and at least one backup stream are determined from the multiple incoming video streams.
[0062] The primary stream is used to transmit to a terminal device for playback, for example, to a set-top box for playback. The backup stream is used to select the highest priority backup stream from multiple backup streams as the primary stream when the primary stream is unavailable.
[0063] In some embodiments, determining a primary code stream and at least one backup code stream from a plurality of incoming video streams may include: determining a priority corresponding to each incoming video stream; determining an incoming video stream with the highest priority and in a normal transmission state as the primary code stream, and determining the remaining incoming video streams as backup code streams, wherein the normal transmission state is a state in which no interruption occurs and a packet loss rate is less than a preset packet loss rate threshold.
[0064] For example, the priority of each incoming video stream can be determined based on the priority identifier carried by each incoming video stream. Then, the transmission status of each incoming video stream is confirmed, and the incoming video stream with the highest priority and in a normal transmission state is determined as the primary stream, and the remaining incoming video streams are determined as backup streams.
[0065] It should be noted that, in the embodiment of the present application, the priority of the incoming video stream can be determined according to the quality of the incoming video stream, wherein the higher the quality of the incoming video stream, the higher the corresponding priority.
[0066] In the above embodiment, by determining the priority of each incoming video stream, the incoming video stream with the highest priority and in a normal transmission state can be determined as the primary stream, and the remaining incoming video streams can be determined as backup streams.
[0067] In some embodiments, confirming the transmission status of each incoming video stream may include: upon detecting an incoming video stream experiencing a flow interruption and / or a packet loss rate greater than a packet loss rate threshold, confirming that the incoming video stream is in an abnormal transmission state. Upon detecting an incoming video stream experiencing a flow interruption and / or a packet loss rate greater than a packet loss rate threshold, confirming that the incoming video stream is in an abnormal transmission state.
[0068] Exemplarily, when a disconnection of the incoming video stream is detected, it is confirmed that the incoming video stream is in an abnormal transmission state.
[0069] Exemplarily, when an incoming video stream having a packet loss rate greater than a packet loss rate threshold is detected, it is determined that the incoming video stream is in an abnormal transmission state.
[0070] For example, when an incoming video stream is detected to have a disconnection and a packet loss rate greater than a packet loss rate threshold, the incoming video stream is determined to be in an abnormal transmission state. When an incoming video stream is not detected to have a disconnection and a packet loss rate not greater than the packet loss rate threshold, the incoming video stream is determined to be in a normal transmission state.
[0071] It should be noted that interruption refers to the interruption of video stream transmission. Packet loss rate refers to the ratio of data packets lost in a video stream. The packet loss rate threshold can be set based on actual conditions, and the specific value is not limited here.
[0072] In the above embodiment, by detecting whether the incoming video stream is interrupted and whether the packet loss rate is greater than the packet loss rate threshold, it can be accurately determined whether the incoming video stream is in a normal transmission state.
[0073] In step S102, if the main stream is in a normal transmission state, the main stream is output to the terminal device.
[0074] Exemplarily, after determining a primary stream and at least one backup stream from a plurality of incoming video streams, if the primary stream is in a normal transmission state, the primary stream is output to the terminal device.
[0075] It should be noted that, in the embodiment of the present application, when the main stream is in a normal transmission state, that is, when the main stream is not interrupted and the packet loss rate is less than a preset packet loss rate threshold, the main stream is output to the terminal device.
[0076] In step S103, if the main stream is in an abnormal transmission state, a target stream is determined from at least one backup stream and the target stream is output to the terminal device.
[0077] Exemplarily, after determining a primary stream and at least one backup stream from multiple incoming video streams, if the primary stream is in an abnormal transmission state, a target stream is determined from the at least one backup stream and output to the terminal device.
[0078] It should be noted that by determining the target stream from at least one backup stream and outputting the target stream to the terminal device when the main stream is in an abnormal transmission state, it is possible to actively sense and switch to the incoming video stream when an encoder fails or a network problem occurs, thereby ensuring the availability of the live channel service and improving the quality of experience.
[0079] In some embodiments, determining the target codestream from the at least one backup codestream may include: determining at least one candidate codestream from the at least one backup codestream, where the candidate codestream is a backup codestream in a normal transmission state; and determining the target codestream based on the candidate codestream with the highest priority.
[0080] For example, a backup code stream in a normal transmission state can be determined as a candidate code stream, wherein there is at least one candidate code stream. Then, the candidate code stream with the highest priority can be determined as the target code stream.
[0081] In the above embodiment, by determining the backup stream in the normal transmission state as the candidate stream and determining the candidate stream with the highest priority as the target stream, it is possible to ensure that the selected target stream has the best quality, thereby ensuring the availability of the live channel service and improving the quality of experience.
[0082] Please refer to Figure 5, which is a schematic flow chart of sub-steps of another method for live streaming video provided by an embodiment of the present application. As shown in Figure 5, the following steps S201 to S204 may be included.
[0083] In step S201, bit rate adaptation is performed on multiple incoming video streams based on a target bit rate corresponding to a live broadcast channel to obtain multiple incoming video streams having the same bit rate as the target bit rate.
[0084] In some embodiments, after obtaining multiple incoming video streams corresponding to the live channel, the multiple incoming video streams can be rate-adapted based on the target bit rate corresponding to the live channel to obtain multiple incoming video streams with the same bit rate as the target bit rate.
[0085] Exemplarily, as shown in FIG2 , the rate adaptation module can determine whether the bit rates of multiple incoming video streams are consistent with the target bit rate corresponding to the live channel. If the bit rates of multiple incoming video streams are inconsistent with the target bit rate corresponding to the live channel, the multiple incoming video streams can be rate adapted according to the target bit rate to obtain multiple incoming video streams with the same bit rate as the target bit rate. Of course, for incoming video streams with the same bit rate as the target bit rate, the rate adaptation operation is not performed. The specific process of rate adaptation can be referred to the relevant technology and is not limited here.
[0086] In the above embodiment, by adapting the bit rate of multiple incoming video streams based on the target bit rate corresponding to the live channel, multiple incoming video streams with the same bit rate as the target bit rate are obtained. This can ensure that the bit rate of each incoming video stream is the same as the target bit rate required by the live channel, avoiding the subsequent problem of inconsistent bit rates causing the terminal device to be unable to play the video stream, thereby improving the quality of experience.
[0087] In step S202, a primary stream and at least one backup stream are determined from a plurality of incoming video streams.
[0088] In step S203, if the main stream is in a normal transmission state, the main stream is output to the terminal device.
[0089] In step S204, if the main stream is in an abnormal transmission state, a target stream is determined from at least one backup stream and the target stream is output to the terminal device.
[0090] It can be understood that the above steps S202 to S204 are the same as the above steps S101 to S103 and are not described in detail here.
[0091] Please refer to Figure 6, which is a schematic flow chart of sub-steps of another method for live streaming video provided by an embodiment of the present application. As shown in Figure 6, the method may include the following steps S301 to S303.
[0092] In step S301, a plurality of incoming video streams corresponding to a live channel are obtained, and a main stream and at least one backup stream are determined from the plurality of incoming video streams.
[0093] It can be understood that the above step S302 is the same as the above step S101 and will not be described in detail here.
[0094] In step S302, if the main stream is in a normal transmission state, the main stream is format-converted based on a preset target video format to obtain a main stream after format conversion.
[0095] Exemplarily, when the main stream is in a normal transmission state, the main stream may be format-converted based on the target video format to obtain a main stream after format conversion.
[0096] The target video format can be determined based on the video format required by the terminal device. The target video format can be RTP format or Transport Stream (TS) format. For example, when the target video format is RTP format, the format of the main stream can be converted to RTP format to obtain the main stream after format conversion.
[0097] In the above embodiment, by converting the format of the main code stream based on a preset target video format to obtain the main code stream after format conversion, it can be ensured that the video format of the main code stream is the same as the target video format, thereby avoiding the problem of the terminal device being unable to play the main code stream due to inconsistent video formats, thereby improving the quality of experience.
[0098] In step S303, the format-converted main stream is output to the terminal device.
[0099] Exemplarily, after the format conversion is performed on the main stream based on the preset target video format to obtain the format-converted main stream, the format-converted main stream can be output to the terminal device.
[0100] In some embodiments, outputting the format-converted main stream to the terminal device may include: acquiring a target address and a target port corresponding to the terminal device; and outputting the format-converted main stream to the terminal device based on the target address and the target port.
[0101] Exemplarily, the media stream server can request the target address and target port corresponding to the terminal device, and based on the target address and target port, establish a communication link with the terminal device, and output the main code stream after format conversion to the terminal device, so that the terminal device can receive the main code stream through the communication link and play the video.
[0102] In the above embodiment, by obtaining the target address and target port corresponding to the terminal device, the main stream after format conversion can be output to the terminal device based on the target address and target port.
[0103] Please refer to Figure 7, which is a schematic flow chart of sub-steps of another method for live streaming video provided by an embodiment of the present application. As shown in Figure 7, the following steps S401 to S403 may be included.
[0104] In step S401, a plurality of incoming video streams corresponding to a live channel are obtained, and a main stream and at least one backup stream are determined from the plurality of incoming video streams.
[0105] In step S402, if the main stream is in an abnormal transmission state, a target stream is determined from at least one backup stream and the target stream is output to the terminal device.
[0106] It can be understood that the above steps S401 and S402 are the same as the above steps S101 and S103, and are not described in detail here.
[0107] In step S403, if it is detected that the main stream has returned to a normal transmission state, a stream switching operation is performed to output the main stream to the terminal device.
[0108] It should be noted that, in the embodiment of the present application, when it is detected that a video stream with a higher priority than the current target stream is restored, the stream switching operation is triggered, that is, the restored high-priority stream becomes the main stream, and the current target stream is downgraded to a backup stream.
[0109] Exemplarily, after determining a target stream from at least one backup stream and outputting the target stream to the terminal device, if it is detected that the main stream has recovered to a normal transmission state, a stream switching operation is performed to output the main stream to the terminal device.
[0110] In the above embodiment, when it is detected that the main code stream has returned to a normal transmission state, a code stream switching operation is performed and the main code stream is output to the terminal device. This ensures that the highest priority video stream is output to the terminal device, thereby ensuring the availability of the live channel service and improving the quality of experience.
[0111] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which includes program instructions. The processor executes the above program instructions to implement any one of the video streaming live broadcast methods provided in the embodiments of the present application.
[0112] For example, when the program is loaded by the processor, the following steps may be performed:
[0113] Acquire multiple incoming video streams corresponding to the live channel, determine a main stream and at least one backup stream from the multiple incoming video streams; if the main stream is in a normal transmission state, output the main stream to the terminal device; if the main stream is in an abnormal transmission state, determine a target stream from the at least one backup stream and output the target stream to the terminal device.
[0114] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0115] In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a storable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0116] The above description of some embodiments of the present application with reference to the accompanying drawings does not limit the scope of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present application shall be within the scope of the present application.
Claims
1. A method for live video streaming, the method comprising: Acquire multiple incoming video streams corresponding to the live channel, and determine a main stream and at least one backup stream from the multiple incoming video streams; If the main code stream is in a normal transmission state, outputting the main code stream to the terminal device; If the main code stream is in an abnormal transmission state, a target code stream is determined from the at least one backup code stream, and the target code stream is output to the terminal device.
2. The video streaming live broadcast method according to claim 1, wherein: The step of determining a main code stream and at least one backup code stream from the multiple incoming video streams comprises: Determine the priority corresponding to each of the incoming video streams; The incoming video stream with the highest priority and in a normal transmission state is determined as the main code stream, and the remaining incoming video streams are determined as the backup code streams. The normal transmission state is a state in which no interruption occurs and the packet loss rate is less than a preset packet loss rate threshold.
3. The video streaming live broadcast method according to claim 2, wherein: The method further comprises: When it is detected that the incoming video stream is disconnected and / or the packet loss rate is greater than the packet loss rate threshold, it is confirmed that the incoming video stream is in an abnormal transmission state.
4. The video streaming live broadcast method according to claim 1, wherein: The determining the target bitstream from the at least one backup bitstream comprises: Determine at least one candidate codestream from the at least one backup codestream, wherein the candidate codestream is a backup codestream in a normal transmission state; The target code stream is determined according to the candidate code stream with the highest priority.
5. The video streaming live broadcast method according to claim 1, wherein: Before determining the main code stream and at least one backup code stream from the multiple incoming video streams, the method further includes: The multiple incoming video streams are rate adapted based on the target bit rate corresponding to the live channel to obtain the multiple incoming video streams with the same bit rate as the target bit rate.
6. The video streaming live broadcast method according to claim 1, wherein: Before outputting the main stream to the terminal device, the method further includes: Performing format conversion on the main stream based on a preset target video format to obtain a main stream after format conversion; The outputting the main stream to the terminal device comprises: The main code stream after format conversion is output to the terminal device.
7. The video streaming live broadcast method according to claim 6, wherein: Outputting the format-converted main stream to the terminal device includes: Obtaining the target address and target port corresponding to the terminal device; Based on the target address and the target port, the main stream after format conversion is output to The terminal device.
8. The video streaming live broadcast method according to any one of claims 1 to 7, wherein: After determining the target bitstream from the at least one backup bitstream, the method further includes: If it is detected that the main code stream is restored to a normal transmission state, a code stream switching operation is performed to output the main code stream to the terminal device.
9. A streaming media server, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the computer program, when executed by the processor, realizes the video streaming live broadcast method as described in any one of claims 1 to 8.
10. A computer-readable storage medium for readable storage, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the video streaming live broadcast method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Live broadcast transcoding method and system supporting time delay
CN110677687A
Live video processing method, system and device and terminal
CN111601118A
Data distribution method and device, electronic equipment and storage medium
CN115499450A
Intelligent Video Streaming System
US20160316234A1