Video transmission method and device

By encapsulating audio and video data and establishing network transmission connections during video transmission, streaming media data can be directly pushed to the live streaming server. This solves the problem of high equipment encoding and decoding requirements and high costs caused by server transcoding in existing technologies, and achieves low-cost video transmission.

CN121967745APending Publication Date: 2026-05-01BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-10-30
Publication Date
2026-05-01

Smart Images

  • Figure CN121967745A_ABST
    Figure CN121967745A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video transmission method and device, and the method comprises the steps: obtaining live broadcast multimedia data in response to a detected live broadcast starting operation; encoding the multimedia data to obtain audio and video data, and encapsulating the audio and video data into streaming media data in a preset video format; establishing a network transmission connection with the live broadcast server, and creating a data transmission channel on the established network transmission connection; and transmitting the streaming media data in the preset video format to the live broadcast server through the data transmission channel, so that the live broadcast server pushes the streaming media data through a content distribution network CDN. The method can be adapted to the current mainstream content distribution network live broadcast system and live broadcast service, and the transmission cost of the live broadcast video is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Methods and equipment for video transmission Technical Field

[0001] This disclosure relates to the field of Internet technology, and in particular to a method and device for video transmission. Background Technology

[0002] Current video transmission solutions primarily use the WebRTC protocol, which has the following drawbacks: To be compatible with current streaming media CDN (Content Delivery Network) technology, audio needs to be converted to the common AAC (Advanced Audio Coding) format. Simultaneously, to reduce video transmission latency, B-frames (Bidirectional Frames) in the video need to be transcoded and removed.

[0003] The above operations require additional server-side transcoding configuration, resulting in high transmission costs for the current video transmission solution. Summary of the Invention

[0004] This disclosure provides a video transmission method and apparatus that can be adapted to current mainstream content delivery network live streaming systems and live streaming services, reducing the transmission cost of live video.

[0005] In a first aspect, embodiments of this disclosure provide a method for video transmission, including:

[0006] In response to the detection of a live stream start operation, acquire the multimedia data of the live stream;

[0007] The multimedia data is encoded to obtain audio and video data, and the audio and video data is encapsulated into streaming media data in a preset video format;

[0008] Establish a network transmission connection with the live streaming server, and create a data transmission channel on the established network transmission connection;

[0009] The preset video format streaming media data is transmitted to the live streaming server through the data transmission channel, so that the live streaming server can push the streaming media data through the content delivery network (CDN).

[0010] In a second aspect, embodiments of this disclosure provide a video transmission device, comprising:

[0011] The acquisition unit is used to acquire the multimedia data of the live stream in response to the detection of a live stream start operation;

[0012] The encapsulation unit is used to encode the multimedia data to obtain audio and video data, and encapsulate the audio and video data into streaming media data in a preset video format.

[0013] Create a unit to establish a network transmission connection with the live streaming server and create a data transmission channel on the established network transmission connection;

[0014] The transmission unit is used to transmit streaming media data in the preset video format to the live streaming server through the data transmission channel, so that the live streaming server can push the streaming media data through the content delivery network (CDN).

[0015] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;

[0016] The memory stores computer-executed instructions;

[0017] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video transmission method as described in the first aspect and various possible designs of the first aspect.

[0018] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video transmission method described in the first aspect and various possible designs of the first aspect.

[0019] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the video transmission method described in the first aspect and various possible designs of the first aspect.

[0020] This embodiment provides a video transmission method and apparatus. The method includes: in response to detecting a live broadcast start operation, acquiring multimedia data of the live broadcast; encoding the multimedia data to obtain audio and video data, and encapsulating the audio and video data into streaming media data of a preset video format; establishing a network transmission connection with a live broadcast server, and creating a data transmission channel on the established network transmission connection; and transmitting the streaming media data of the preset video format to the live broadcast server through the data transmission channel, so that the live broadcast server can push the streaming media data through a content delivery network (CDN). In this technical solution, by encapsulating the audio and video data to obtain streaming media data of a preset video format, and by creating a data transmission channel on the network transmission connection established with the live broadcast server, the streaming media data of the preset video format can be transmitted through the data transmission channel, thus eliminating the need for transcoding operations on the server side and reducing the transmission cost of live video. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 is a flowchart of a video transmission method provided in an embodiment of this disclosure;

[0023] Figure 2 is a flowchart of a video transmission method provided in an embodiment of this disclosure;

[0024] Figure 3 is a schematic diagram of a video transmission method provided in an embodiment of this disclosure;

[0025] Figure 4 is a schematic diagram of the video transmission method provided in this embodiment of the present disclosure;

[0026] Figure 5 is a schematic diagram of the structure of the video transmission device provided in an embodiment of this disclosure;

[0027] Figure 6 is a schematic diagram of the structure of the electronic device provided in the embodiment of this disclosure. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0029] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0030] Current video transmission solutions primarily use the WebRTC protocol, which has the following drawbacks:

[0031] 1. Requirements for the device's encoding and decoding capabilities.

[0032] 2. To be compatible with current streaming CDN (Content Delivery Network) technology, the audio will be converted to the common AAC (Advanced Audio Coding) format. Simultaneously, to reduce video transmission latency, B-frames (Bidirectional Frames) in the video need to be transcoded and removed.

[0033] This shows that current WebRTC live streaming solutions have high requirements for device encoding and decoding capabilities, require additional server-side transcoding configuration, and have high transmission costs for live video.

[0034] In response to the technical problems in the existing technology, the inventors have the following technical concept: In order to solve the problems of high requirements for the encoding and decoding capabilities of the device and the need for additional server-side transcoding configuration in the current WebRTC live streaming solution, which increases the cost of live streaming, a video transmission solution based on WebTransport (network transmission) has been designed. This solution can be adapted to the current mainstream CDN live streaming system and live streaming business, reduce the cost of live streaming, and improve ease of use.

[0035] Accordingly, the specific steps may include: First, in response to detecting a live stream start operation, acquiring the multimedia data for the live stream. Then, encoding the multimedia data to obtain audio and video data, and encapsulating the audio and video data into streaming media data in a preset video format; establishing a network transmission connection with the live stream server, and creating a data transmission channel on the established network transmission connection. Finally, transmitting the streaming media data in the preset video format to the live stream server through the data transmission channel, so that the live stream server can push the streaming media data through a content delivery network (CDN).

[0036] In this technical solution, by encapsulating audio and video data to obtain streaming media data in a preset video format, and by creating a data transmission channel on the network transmission connection established between the live streaming server, the streaming media data in the preset video format can be transmitted through the data transmission channel, thus eliminating the need for transcoding operations on the server side and reducing the transmission cost of live video.

[0037] The following describes the specific implementation process of the video transmission method and device involved in the embodiments of this disclosure. Some examples are merely illustrative and not intended to limit the scope. The execution subject of the video transmission method involved in the embodiments of this disclosure is an electronic device, which may be a terminal, server, etc.

[0038] Figure 1 is a flowchart of a video transmission method provided in an embodiment of this disclosure. As shown in Figure 1, the video transmission method may include:

[0039] S101. In response to detecting a live streaming start operation, acquire the multimedia data of the live stream.

[0040] In this embodiment of the disclosure, the live streaming start operation can be a live streaming start operation on a web-based live streaming client or a live streaming application. In the live streaming scenario of this embodiment, the web-based live streaming client can be an HTML (HyperText Markup Language) live streaming client. For example, an HTML5 web-based live streaming client.

[0041] Optionally, as shown in Figure 2, the multimedia data may include video data and audio data. After starting the live stream by activating the live streaming function of the web-based live streaming client or application, audio data can be acquired through an audio acquisition device on the terminal, and video data can be acquired through a video acquisition device on the terminal. The audio acquisition device can be a microphone, and the video acquisition device can be a camera module. For example, the multimedia data mentioned above may be video and audio data uploaded by the broadcaster through their terminal device.

[0042] S102. Encode the multimedia data to obtain audio and video data, and encapsulate the audio and video data into streaming media data in a preset video format.

[0043] In this embodiment of the disclosure, the multimedia data includes first audio data and first video data. Accordingly, the multimedia data is encoded to obtain audio and video data, and the audio and video data is encapsulated into streaming media data in a preset video format. This includes: calling the browser's WebCodec API (Webpage Encoding and Decoding Interface) to encode the first video data to obtain second video data; and calling the browser's WebAssembly API (Webpage Assembly Interface) to encode the first audio data to obtain second audio data; and encapsulating the second video data and the second video data into streaming media data in a preset video format. For example, as shown in Figure 2, the aforementioned WebAssembly interface can be abbreviated as the Wasm interface.

[0044] Optionally, the preset video format can be a video format with a transmission redundancy of less than a preset redundancy threshold. Transmission redundancy represents the proportion of invalid data to the total transmitted data. Transmission redundancy can be expressed as: Redundancy = 1 - (Size of valid data / Total amount of transmitted data). For example, as shown in Figure 2, the preset video format includes FLV (FlashVideo) format.

[0045] S103. Establish a network transmission connection with the live streaming server and create a data transmission channel on the established network transmission connection.

[0046] In this embodiment of the disclosure, the network transmission connection is a WebTransport connection; accordingly, establishing a network transmission connection with the live streaming server includes: initiating an HTTP connection request to the live streaming server based on HTTP (Hypertext Transfer Protocol), so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request; and determining that a WebTransport connection is established with the live streaming server in response to receiving a successful response information from the live streaming server.

[0047] Optionally, as shown in Figure 3, the success response information returned by the live streaming server includes: "200 OK".

[0048] The process of initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP) to enable the live streaming server to upgrade the HTTP protocol to the WebTransport protocol via the HTTP connection request includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), wherein the HTTP connection request includes a WebTransport protocol identifier, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol via the WebTransport protocol identifier in the HTTP connection request, thereby establishing a WebTransport connection.

[0049] Optionally, as shown in Figure 3, the Hypertext Transfer Protocol (HTTP) includes the Hypertext Transfer Protocol HTTP3. Accordingly, an HTTP connection request is initiated to the live streaming server based on the HTTP protocol, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request. This includes: initiating an HTTP3 connection request to the live streaming server based on the HTTP3 protocol, wherein the protocol pseudo header field in the HTTP3 connection request is set to WebTransport, so that the live streaming server upgrades the HTTP3 protocol to the WebTransport protocol according to the protocol pseudo header field in the HTTP3 connection request, thereby establishing a WebTransport connection.

[0050] S104. Transmit streaming media data in a preset video format to the live streaming server through the data transmission channel, so that the live streaming server can push the streaming media data through the content delivery network (CDN).

[0051] In this embodiment of the disclosure, the data transmission channel includes a bidirectional data transmission channel; correspondingly, transmitting streaming media data in a preset video format to the live streaming server through the data transmission channel includes: receiving transmission control information sent by the live streaming server through the bidirectional data transmission channel; and transmitting streaming media data in a preset video format to the live streaming server through the bidirectional data transmission channel according to the transmission control information.

[0052] Alternatively, a bidirectional data transmission channel can be represented as a Bidirectional Stream.

[0053] It should be noted that the transmission control information can be any configuration information related to streaming media data. In some embodiments, the streaming media data includes the resolution, data transmission speed, etc. In this example, the data transmission speed can be the transmission bitrate of the streaming media data. Furthermore, the live streaming server can adjust the transmission control information based on the smoothness of the streaming media data transmission.

[0054] This disclosure provides a video transmission method: First, in response to detecting a live stream start operation, multimedia data for the live stream is acquired. Then, the multimedia data is encoded to obtain audio and video data, which is then encapsulated into streaming media data in a preset video format. A network transmission connection is established with the live stream server, and a data transmission channel is created on the established network transmission connection. Finally, the streaming media data in the preset video format is transmitted to the live stream server through the data transmission channel, enabling the live stream server to push the streaming media data through a Content Delivery Network (CDN). In this technical solution, by encapsulating the audio and video data to obtain streaming media data in a preset video format and creating a data transmission channel on the established network transmission connection with the live stream server, the streaming media data in the preset video format is transmitted through the data transmission channel, thus eliminating the need for transcoding operations on the server side and reducing the transmission cost of live video.

[0055] It should be noted that, as shown in Figure 3, the bidirectional data transmission channel can be closed and the streaming can end when the live stream ends. In this embodiment of the present disclosure, as shown in Figure 4, the method further includes: S105, in response to receiving a closing instruction for the network transmission channel, closing the network transmission channel and stopping the transmission of streaming media data in a preset video format to the live streaming server through the data transmission channel.

[0056] Figure 5 is a schematic diagram of the structure of the video transmission device provided in an embodiment of this disclosure. As shown in Figure 5, the video transmission device includes:

[0057] The acquisition unit 501 is used to acquire multimedia data of the live stream in response to the detection of a live stream start operation;

[0058] The encapsulation unit 502 is used to encode the multimedia data to obtain audio and video data, and encapsulate the audio and video data into streaming media data in a preset video format.

[0059] Create unit 503 to establish a network transmission connection with the live streaming server and create a data transmission channel on the established network transmission connection;

[0060] The transmission unit 504 is used to transmit the streaming media data in the preset video format to the live streaming server through the data transmission channel, so that the live streaming server can push the streaming media data through the content delivery network CDN.

[0061] According to one or more embodiments of this disclosure, the multimedia data includes first audio data and first video data; correspondingly, the encapsulation unit 502 encodes the multimedia data to obtain audio and video data, and encapsulates the audio and video data into streaming media data in a preset video format, including: calling the browser's WebCodec API to encode the first video data to obtain second video data, and calling the browser's WebAssembly API to encode the first audio data to obtain second audio data; encapsulating the second video data and the second video data into streaming media data in a preset video format; wherein, the preset video format includes Flash Video (FLV) format.

[0062] According to one or more embodiments of this disclosure, the network transmission connection is a WebTransport connection; correspondingly, the creation unit 503 establishes a network transmission connection with the live streaming server, including: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request; and determining that a WebTransport connection is established with the live streaming server in response to receiving a successful response information from the live streaming server.

[0063] According to one or more embodiments of this disclosure, the creation unit 503 initiates an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request. This includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), wherein the HTTP connection request includes a WebTransport protocol identifier, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the WebTransport protocol identifier in the HTTP connection request, thereby establishing a WebTransport connection.

[0064] According to one or more embodiments of this disclosure, the Hypertext Transfer Protocol (HTTP) includes Hypertext Transfer Protocol HTTP3; correspondingly, the creation unit 503 initiates an HTTP connection request to the live streaming server based on HTTP, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request, including: initiating an HTTP3 connection request to the live streaming server based on HTTP3, wherein the protocol pseudo header field in the HTTP3 connection request is set to WebTransport, so that the live streaming server upgrades the HTTP3 protocol to the WebTransport protocol according to the protocol pseudo header field in the HTTP3 connection request, thereby establishing a WebTransport connection.

[0065] According to one or more embodiments of this disclosure, the data transmission channel includes a bidirectional data transmission channel; correspondingly, the transmission unit 504 transmits streaming media data of the preset video format to the live streaming server through the data transmission channel, including: receiving transmission control information sent by the live streaming server through the bidirectional data transmission channel; and transmitting the streaming media data of the preset video format to the live streaming server through the bidirectional data transmission channel according to the transmission control information.

[0066] According to one or more embodiments of this disclosure, the device further includes: a shutdown unit, configured to shut down the network transmission channel and stop transmitting the streaming media data of the preset video format to the live streaming server through the data transmission channel in response to receiving a shutdown command from the network transmission channel.

[0067] Referring to Figure 6, a schematic diagram of the structure of an electronic device 600 suitable for implementing embodiments of the present disclosure is shown. The electronic device 600 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic device shown in Figure 6 is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present disclosure.

[0068] As shown in Figure 6, the electronic device 600 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the electronic device 600. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0069] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although FIG. 6 shows electronic device 600 with various devices, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0070] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0071] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0072] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0073] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0074] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0075] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0076] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0077] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0078] In a first aspect, according to one or more embodiments of the present disclosure, a method for video transmission is provided, comprising:

[0079] In response to the detection of a live stream start operation, acquire the multimedia data of the live stream;

[0080] The multimedia data is encoded to obtain audio and video data, and the audio and video data is encapsulated into streaming media data in a preset video format;

[0081] Establish a network transmission connection with the live streaming server, and create a data transmission channel on the established network transmission connection;

[0082] The preset video format streaming media data is transmitted to the live streaming server through the data transmission channel, so that the live streaming server can push the streaming media data through the content delivery network (CDN).

[0083] According to one or more embodiments of this disclosure, the multimedia data includes first audio data and first video data; correspondingly, the encapsulation unit 502 encodes the multimedia data to obtain audio and video data, and encapsulates the audio and video data into streaming media data in a preset video format, including: calling the browser's WebCodec API to encode the first video data to obtain second video data, and calling the browser's WebAssembly API to encode the first audio data to obtain second audio data; encapsulating the second video data and the second video data into streaming media data in a preset video format; wherein, the preset video format includes Flash Video (FLV) format.

[0084] According to one or more embodiments of this disclosure, the network transmission connection is a WebTransport connection; correspondingly, establishing a network transmission connection with the live streaming server includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request; and determining that a WebTransport connection is established with the live streaming server in response to receiving a successful response information from the live streaming server.

[0085] According to one or more embodiments of this disclosure, the step of initiating an HTTP connection request to a live streaming server based on the Hypertext Transfer Protocol (HTTP) to enable the live streaming server to upgrade the HTTP protocol to the WebTransport protocol through the HTTP connection request includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), wherein the HTTP connection request includes a WebTransport protocol identifier, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the WebTransport protocol identifier in the HTTP connection request, thereby establishing a WebTransport connection.

[0086] According to one or more embodiments of this disclosure, the Hypertext Transfer Protocol (HTTP) includes Hypertext Transfer Protocol HTTP3; correspondingly, the step of initiating an HTTP connection request to the live streaming server based on HTTP, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request, includes: initiating an HTTP3 connection request to the live streaming server based on HTTP3, wherein the protocol pseudo header field in the HTTP3 connection request is set to WebTransport, so that the live streaming server upgrades the HTTP3 protocol to the WebTransport protocol according to the protocol pseudo header field in the HTTP3 connection request, thereby establishing a WebTransport connection.

[0087] According to one or more embodiments of this disclosure, the data transmission channel includes a bidirectional data transmission channel; correspondingly, transmitting the streaming media data of the preset video format to the live streaming server through the data transmission channel includes: receiving transmission control information sent by the live streaming server through the bidirectional data transmission channel; and transmitting the streaming media data of the preset video format to the live streaming server through the bidirectional data transmission channel according to the transmission control information.

[0088] According to one or more embodiments of this disclosure, the method further includes: in response to receiving a shutdown command for the network transmission channel, closing the network transmission channel and stopping the transmission of the streaming media data of the preset video format to the live streaming server through the data transmission channel.

[0089] Secondly, according to one or more embodiments of this disclosure, a video transmission device is provided, comprising:

[0090] The acquisition unit is used to acquire the multimedia data of the live stream in response to the detection of a live stream start operation;

[0091] The encapsulation unit is used to encode the multimedia data to obtain audio and video data, and encapsulate the audio and video data into streaming media data in a preset video format.

[0092] Create a unit to establish a network transmission connection with the live streaming server and create a data transmission channel on the established network transmission connection;

[0093] The transmission unit is used to transmit streaming media data in the preset video format to the live streaming server through the data transmission channel, so that the live streaming server can push the streaming media data through the content delivery network (CDN).

[0094] According to one or more embodiments of this disclosure, the multimedia data includes first audio data and first video data; correspondingly, the encapsulation unit 502 encodes the multimedia data to obtain audio and video data, and encapsulates the audio and video data into streaming media data in a preset video format, including: calling the browser's WebCodec API to encode the first video data to obtain second video data, and calling the browser's WebAssembly API to encode the first audio data to obtain second audio data; encapsulating the second video data and the second video data into streaming media data in a preset video format; wherein, the preset video format includes Flash Video (FLV) format.

[0095] According to one or more embodiments of this disclosure, the network transmission connection is a WebTransport connection; correspondingly, the creation unit establishes a network transmission connection with the live streaming server, including: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request; and determining that a WebTransport connection is established with the live streaming server in response to receiving a successful response information from the live streaming server.

[0096] According to one or more embodiments of this disclosure, the creation unit initiates an HTTP connection request to a live streaming server based on the Hypertext Transfer Protocol (HTTP) to enable the live streaming server to upgrade the HTTP protocol to the WebTransport protocol through the HTTP connection request. This includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), wherein the HTTP connection request includes a WebTransport protocol identifier, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the WebTransport protocol identifier in the HTTP connection request, thereby establishing a WebTransport connection.

[0097] According to one or more embodiments of this disclosure, the Hypertext Transfer Protocol (HTTP) includes Hypertext Transfer Protocol HTTP3; correspondingly, the creation unit initiates an HTTP connection request to the live streaming server based on HTTP, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request, including: initiating an HTTP3 connection request to the live streaming server based on HTTP3, wherein the protocol pseudo header field in the HTTP3 connection request is set to WebTransport, so that the live streaming server upgrades the HTTP3 protocol to the WebTransport protocol according to the protocol pseudo header field in the HTTP3 connection request, thereby establishing a WebTransport connection.

[0098] According to one or more embodiments of this disclosure, the data transmission channel includes a bidirectional data transmission channel; correspondingly, the transmission unit transmits the streaming media data of the preset video format to the live streaming server through the data transmission channel, including: receiving transmission control information sent by the live streaming server through the bidirectional data transmission channel; and transmitting the streaming media data of the preset video format to the live streaming server through the bidirectional data transmission channel according to the transmission control information.

[0099] According to one or more embodiments of this disclosure, the device further includes: a shutdown unit, configured to shut down the network transmission channel and stop transmitting the streaming media data of the preset video format to the live streaming server through the data transmission channel in response to receiving a shutdown command from the network transmission channel.

[0100] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0101] The memory stores computer-executed instructions;

[0102] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video transmission method as described in the first aspect and various possible designs of the first aspect.

[0103] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, implement the video transmission method described in the first aspect and various possible designs of the first aspect.

[0104] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the video transmission method as described in the first aspect and various possible designs of the first aspect.

[0105] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0106] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0107] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for video transmission, characterized in that, The method includes: in response to detecting a live broadcast start operation, acquiring multimedia data of the live broadcast; encoding the multimedia data to obtain audio and video data, and encapsulating the audio and video data into streaming media data in a preset video format; establishing a network transmission connection with the live broadcast server, and creating a data transmission channel on the established network transmission connection; and transmitting the streaming media data in the preset video format to the live broadcast server through the data transmission channel, so that the live broadcast server pushes the streaming media data through a content delivery network (CDN).

2. The method according to claim 1, characterized in that, The multimedia data includes first audio data and first video data; correspondingly, the multimedia data is encoded to obtain audio and video data, and the audio and video data is encapsulated into streaming media data in a preset video format, including: calling the browser's WebCodec API to encode the first video data to obtain second video data, and calling the browser's WebAssembly API to encode the first audio data to obtain second audio data; the second video data and the second video data are then encapsulated into streaming media data in a preset video format; wherein, the preset video format includes Flash Video (FLV) format.

3. The method according to claim 1, characterized in that, The network transmission connection is a WebTransport connection; correspondingly, establishing a network transmission connection with the live streaming server includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the HTTP connection request; and determining that a WebTransport connection is established with the live streaming server in response to receiving a successful response information from the live streaming server.

4. The method according to claim 3, characterized in that, The step of initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP) to enable the live streaming server to upgrade the HTTP protocol to the WebTransport protocol through the HTTP connection request includes: initiating an HTTP connection request to the live streaming server based on the Hypertext Transfer Protocol (HTTP), wherein the HTTP connection request includes a WebTransport protocol identifier, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol through the WebTransport protocol identifier in the HTTP connection request, thereby establishing a WebTransport connection.

5. The method according to claim 4, characterized in that, The Hypertext Transfer Protocol (HTTP) includes the Hypertext Transfer Protocol HTTP3. Correspondingly, the step of initiating an HTTP connection request to the live streaming server based on HTTP, so that the live streaming server upgrades the HTTP protocol to the WebTransport protocol via the HTTP connection request, includes: initiating an HTTP3 connection request to the live streaming server based on HTTP3, wherein the protocol pseudo header field in the HTTP3 connection request is set to WebTransport, so that the live streaming server upgrades the HTTP3 protocol to the WebTransport protocol according to the protocol pseudo header field in the HTTP3 connection request, thereby establishing a WebTransport connection.

6. The method according to claim 1, characterized in that, The data transmission channel includes a bidirectional data transmission channel; correspondingly, transmitting the streaming media data of the preset video format to the live streaming server through the data transmission channel includes: receiving transmission control information sent by the live streaming server through the bidirectional data transmission channel; and transmitting the streaming media data of the preset video format to the live streaming server through the bidirectional data transmission channel according to the transmission control information.

7. The method according to any one of claims 1-6, characterized in that, Also includes: In response to receiving a shutdown command for the network transmission channel, the network transmission channel is shut down, and the transmission of the preset video format streaming media data to the live streaming server through the data transmission channel is stopped.

8. A video transmission device, characterized in that, The device includes: an acquisition unit, configured to acquire multimedia data of a live stream in response to a detected live stream start operation; an encapsulation unit, configured to encode the multimedia data to obtain audio and video data, and encapsulate the audio and video data into streaming media data in a preset video format; a creation unit, configured to establish a network transmission connection with a live stream server and create a data transmission channel on the established network transmission connection; and a transmission unit, configured to transmit the streaming media data in the preset video format to the live stream server through the data transmission channel, so that the live stream server can push the streaming media data through a content delivery network (CDN).

9. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the video transmission method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the video transmission method as described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the video transmission method as described in any one of claims 1 to 7.