Processing method and electronic equipment

By introducing target header files and long connection transmission modes into AV1 encoded video streams, the video stream is divided into sub-video streams, which solves the problem of AV1 lag on low-performance devices, and improves the video fluency and user in live broadcast scenarios Experience.

CN119255017APending Publication Date: 2025-01-03LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411364696.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

AV1-encoded videos may stutter on low-performance devices, and the real-time requirements in live broadcast scenarios are high, which limits their use.

Method used

By introducing the target header file, the target transmission protocol is compatible with the AV1 codec format, and the video stream is divided into at least two sub-video streams, adopting a long connection transmission mode to ensure the timeliness and efficiency of the video stream.

Benefits of technology

It avoids stuttering of video streaming, improves video fluency and user experience in live broadcast scenarios, and realizes the effective use of AV1 on low-performance devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255017A_ABST
    Figure CN119255017A_ABST
Patent Text Reader

Abstract

The invention discloses a processing method and electronic equipment, and the method comprises the steps: obtaining a first video stream corresponding to a target video, the coding and decoding format of the first video stream being a target coding and decoding format, and the target coding and decoding format being AV1; and transmitting the first video stream to the terminal based on the target transmission protocol, the version information of the target coding and decoding format and the coding information, so that the terminal plays the target video, wherein the target transmission protocol is used for dividing the first video stream into at least two sub-video streams, and transmitting the first video stream in a long connection transmission mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of video stream processing, and in particular to a processing method and electronic device. Background Art

[0002] AV1-encoded videos have excellent quality, but may experience lag on some low-performance devices. In addition, the use of AV1 is limited in scenarios such as live streaming that have high real-time requirements. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a processing method and an electronic device.

[0004] In a first aspect, an embodiment of the present application provides a processing method, including:

[0005] Obtaining a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1;

[0006] Based on the target transmission protocol and the version information and encoding information of the target codec format, transmitting the first video stream to the terminal so that the terminal plays the target video;

[0007] The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.

[0008] In a possible implementation manner, the transmitting the first video stream to the terminal based on the target transmission protocol and the version information and the encoding information of the target codec format includes:

[0009] Introducing a target header file into the target transmission protocol file, so that the target transmission protocol can be compatible with the target codec format, thereby enabling the first video stream to be transmitted to the terminal;

[0010] The target header file at least includes version information and encoding information of the target codec format.

[0011] In a possible implementation manner, the transmitting the first video stream to the terminal based on the target transmission protocol and the version information and the encoding information of the target codec format includes:

[0012] Based on the target transmission protocol, slicing the first video stream to obtain at least two sub-video streams;

[0013] Determining a target encapsulation standard based on the version information and encoding information of the target codec format;

[0014] Encapsulating each of the sub-video streams according to a target encapsulation standard;

[0015] The long connection transmission mode is adopted to transmit each encapsulated sub-video stream to the terminal.

[0016] In a possible implementation manner, before encapsulating each of the sub-video streams, the process includes:

[0017] The identification information of the target codec format is added to the message header of the initial encapsulation standard, and the version information and the bit rate information of the target codec format are added to the extended message header of the initial encapsulation standard to obtain the target encapsulation standard.

[0018] In a possible implementation manner, the slicing the first video stream to obtain at least two sub-video streams includes:

[0019] Based on the key frames and / or preset duration in the target video, the first video stream is sliced ​​to obtain at least two sub-video streams, and the key frames are multiple.

[0020] In a possible implementation manner, at least two of the sub-video streams are arranged in sequence according to the order of key frames in the target video;

[0021] The step of transmitting each encapsulated sub-video stream to the terminal includes:

[0022] Each encapsulated sub-video stream is transmitted to the terminal in sequence according to the arrangement order of at least two of the sub-video streams.

[0023] In a possible implementation manner, transmitting each encapsulated sub-video stream to the terminal includes:

[0024] caching the encapsulated sub-video stream and its corresponding uniform resource locator to a content distribution network;

[0025] In response to the playback request of the terminal, a plurality of encapsulated sub-video streams are transmitted to the terminal based on a target transmission protocol and a uniform resource locator.

[0026] In a possible implementation manner, transmitting the multiple encapsulated sub-video streams to the terminal includes:

[0027] Each encapsulated sub-video stream is read in sequence and transmitted to the terminal until the reading fails or the read encapsulated sub-video stream carries a tail frame identifier.

[0028] In a possible implementation manner, the processing method further includes:

[0029] If the codec format of the second video stream corresponding to the target video is a non-target codec format, the second video stream is re-encoded and decoded based on the target codec format to obtain the first video stream corresponding to the target video; the codec format of the first video stream is the target codec format.

[0030] In a second aspect, an embodiment of the present application further provides an electronic device, including:

[0031] An obtaining module configured to obtain a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1;

[0032] A transmission module, configured to transmit the first video stream to a terminal based on a target transmission protocol and version information and encoding information of the target codec format, so that the terminal plays the target video;

[0033] The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.

[0034] In an embodiment of the present application, the version information and encoding information of the target transmission protocol and the target codec format are configured so that the target transmission protocol can be compatible with the target codec format, and thus the first video stream can be transmitted to the terminal; at the same time, the first video stream is divided into at least two sub-video streams through the target transmission protocol, and the first video stream is transmitted using a long connection transmission mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0036] Figure 1 A flowchart of a processing method provided by the present application is shown;

[0037] Figure 2 A flowchart of transmitting a first video stream to a terminal in a processing method provided by the present application is shown;

[0038] Figure 3 A schematic diagram of the structure of an electronic device provided by the present application is shown;

[0039] Figure 4 A structural schematic diagram of another electronic device provided by the present application is shown. DETAILED DESCRIPTION

[0040] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0041] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0042] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0043] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0044] It should also be understood that, although the present application has been described with reference to some specific examples, those skilled in the art will be able to realize many other equivalent forms of the present application that have the features described in the claims and are therefore within the scope of protection defined thereby.

[0045] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0046] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0047] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0048] To facilitate understanding of this application, a processing method provided by this application is first introduced in detail. Here, Figure 1 A flowchart of a processing method provided in an embodiment of the present application is shown, wherein specific steps include S101 and S102.

[0049] S101, obtaining a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1.

[0050] Here, FFmpeg (Fast Forward Mpeg) is a cross-platform open source software that can be used for video encoding, decoding and format conversion. Usually, FFmpeg is set in the operating system to realize the video playback function. Based on this, a transmission channel for the video stream is created to complete the acquisition and playback of the video stream. Specifically, an input interface and an output interface are created. Both the input interface and the output interface can transmit the video stream, such as the input interface receives the video stream, and the output interface outputs the video stream to play the video corresponding to the video stream.

[0051] In the live broadcast scenario, the anchor captures the target video through a video capture device and generates a corresponding source video stream and stores it in the electronic device. Of course, the video capture device and the electronic device can be the same device or two different devices. Afterwards, the electronic device processes the source video stream through FFmpeg to obtain a first video stream corresponding to the target video.

[0052] The codec format of the first video stream is the target codec format, and the target codec format is AV1.

[0053] S102: Based on the target transmission protocol and the version information of the target codec format and the encoding information, the first video stream is transmitted to the terminal, so that the terminal plays the target video.

[0054] After obtaining the first video stream corresponding to the target video, the electronic device transmits the first video stream to the terminal through the network so that the terminal plays the target video. Specifically, when transmitting the first video stream, the first video stream is transmitted to the terminal based on the version information and encoding information of the target transmission protocol and the target codec format.

[0055] As one example, considering that the current TS standard format is incompatible with AV1, based on this, when the first video stream is transmitted to the terminal based on the version information and encoding information of the target transmission protocol and the target codec format, a target header file is introduced into the target transmission protocol file, wherein the target header file at least includes the version information and encoding information of the target codec format. Thus, the target transmission protocol can be compatible with the target codec format, and the first video stream can be transmitted to the terminal.

[0056] Optionally, the target transmission protocol is the HLS (HTTP Live Streaming) protocol, which is used to divide the first video stream into at least two sub-video streams, and then when the first video stream is transmitted based on the target transmission protocol and the target codec format, that is, when at least two sub-video streams are transmitted, since each sub-video stream is smaller than the source video stream corresponding to the target video, transmission jams can be avoided when transmitting at least two sub-video streams, thereby ensuring the timeliness of the transmission of the first video stream is high.

[0057] Moreover, when transmitting the first video stream, that is, transmitting at least two sub-video streams, a long connection transmission mode is adopted, that is, the target transmission protocol (HLS protocol) is a long connection of HTTPS, so that when responding to the playback request of the terminal, there is no need to establish a connection for each sub-video stream separately, and the transmission of at least two sub-video streams is realized on one connection, which not only saves network resources, but also improves transmission efficiency and ensures transmission timeliness.

[0058] In the embodiment of the present application, the version information and encoding information of the target transmission protocol and the target codec format are configured so that the target transmission protocol can be compatible with the target codec format, thereby realizing the use of AV1 in a live broadcast scenario; at the same time, the first video stream is divided into at least two sub-video streams through the target transmission protocol, thereby avoiding transmission jams and ensuring that the timeliness of the transmission of the first video stream is high; and when transmitting the first video stream, that is, transmitting at least two sub-video streams, a long connection transmission mode is adopted, and there is no need to establish a connection for each sub-video stream separately. The transmission of at least two sub-video streams is realized on one connection, which not only saves network resources, but also improves transmission efficiency, ensures transmission timeliness, and improves the user's viewing experience as a whole.

[0059] As one example, Figure 2 A flow chart of a method for transmitting a first video stream to a terminal based on version information of a target transmission protocol and a target codec format and encoding information is shown, wherein specific steps include S201-S204.

[0060] S201, based on a target transmission protocol, slicing a first video stream to obtain at least two sub-video streams.

[0061] S202: Determine a target encapsulation standard based on the version information and encoding information of the target codec format.

[0062] S203, encapsulating each sub-video stream according to the target encapsulation standard.

[0063] S204, using the long connection transmission mode to transmit each encapsulated sub-video stream to the terminal.

[0064] In a specific implementation, the working principle of the target transmission protocol includes dividing the video content into multiple TS format video segments. Therefore, based on the target transmission protocol, the first video stream is sliced ​​to obtain at least two sub-video streams, each of which is a TS format video segment.

[0065] As one example, when slicing the first video stream, the first video stream is sliced ​​based on key frames and / or preset duration in the target video to obtain at least two sub-video streams, wherein there are multiple key frames in the target video.

[0066] For example, each key frame in the target video is determined, and the first video stream is sliced ​​according to the slicing rule that a preset number of consecutive key frames corresponds to one sub-video stream to obtain at least two sub-video streams, and each obtained sub-video stream includes a preset number of key frames. For another example, the total duration of the target video is determined, and the first video stream is sliced ​​according to the preset duration to obtain at least two sub-video streams, and the duration corresponding to each obtained sub-video stream is the preset duration. For another example, the first video stream is sliced ​​according to the slicing rule that a preset number of consecutive key frames corresponds to one sub-video stream and the preset duration at the same time. If the duration of the sub-video stream corresponding to the preset number of consecutive key frames is greater than the preset duration, the video stream corresponding to the preset number of consecutive key frames is determined as the sub-video stream to ensure the quality of the sub-video stream, thereby ensuring the quality of the target video played by the terminal.

[0067] Of course, it is also possible to pre-set a threshold corresponding to the size of the sub-video stream to slice the first video stream based on the threshold, thereby improving the controllability of the slicing of the first video stream, and accordingly improving the storage and readability of the sub-video stream, while also improving the decoding and display efficiency of the sub-video stream by the terminal.

[0068] In an embodiment of the present application, the first video stream can be sliced ​​based on one or more of the threshold, key frames, and preset durations, which is determined by actual needs and is not specifically limited here.

[0069] In a specific implementation, different encapsulation standards are set for different codec formats so that the target transmission protocol can be compatible with the codec format. Therefore, after obtaining the version information and encoding information of the target codec format included in the target header file in the target transmission protocol file, the target encapsulation standard is determined based on the version information and the encoding information to encapsulate each sub-video stream according to the target encapsulation standard.

[0070] As another example, before encapsulating each sub-video stream, the identification information of the target codec format is added to the message header of the initial encapsulation standard, and the version information and bit rate information of the target codec format are added to the extended message header of the initial encapsulation standard to obtain the target encapsulation standard, so that the sub-video streams encapsulated according to the target encapsulation standard can comply with the target transmission protocol.

[0071] After each sub-video stream is encapsulated, each encapsulated sub-video stream is transmitted to the terminal so that the terminal can play the target video.

[0072] As one example, after slicing the first video stream according to the key frames in the target video, the obtained at least two sub-video streams are arranged in sequence according to the order of the key frames in the target video, wherein the order of the key frames is the order in which the key frames appear in the target video.

[0073] Based on this, when each encapsulated sub-video stream is transmitted to the terminal, each encapsulated sub-video stream is transmitted to the terminal in sequence according to the arrangement order of at least two sub-video streams to ensure the accuracy and integrity of the target video.

[0074] In another example, each encapsulated sub-video stream is configured with its corresponding uniform resource locator, which includes at least one or more of the network address corresponding to the sub-video stream in the server, the corresponding relative path of the sub-video stream, and the name of the sub-video stream, and the corresponding sub-video stream can be obtained based on the uniform resource locator.

[0075] The encapsulated sub-video streams and their corresponding uniform resource locators are cached in a content distribution network. Optionally, a playlist, such as an m3u8 file, is created using UTF-8 encoding. The encapsulated sub-video streams and the playlist are cached in a content distribution network so that all sub-video streams, i.e., the first video stream, are transmitted to the terminal through the content distribution network.

[0076] Optionally, in response to the playback request of the terminal, multiple encapsulated sub-video streams are transmitted to the terminal based on the target transmission protocol and the uniform resource locator. In one example, the terminal can parse the playlist to obtain the uniform resource locator corresponding to each sub-video stream, and then obtain all the sub-video streams from the content distribution network in turn according to the uniform resource locator.

[0077] Among them, the content distribution network is set as a multi-level network topology, and multiple edge servers are set. After the terminal sends a play request to its corresponding edge server, if the edge server cannot respond to the play request, that is, the resource corresponding to the play request is not cached on the edge server (such as a video stream), then the source station (that is, the previous node server of the edge server) is obtained, and the resource corresponding to the play request is returned to the terminal; at the same time, other terminals do not need to obtain resources from the source station when obtaining the same resource. For example, in a live broadcast scenario, if a host's video is watched by multiple users at the same time, at this time, there are multiple terminals requesting to play the same video. At this time, terminal A sends a play request to its corresponding edge server. Terminal A is the first terminal to request to play the host's video. Afterwards, if the edge server cannot respond to the play request, that is, the video stream corresponding to the play request is not cached on the edge server, the video stream corresponding to the play request is obtained from the source station, and the video stream is returned to terminal A. At this time, terminal B sends a playback request to its corresponding edge server. Terminal B is any terminal other than terminal A that requests to play the host's video. The video stream can be directly returned to terminal B, which means that there is no need to obtain resources from the source station, which greatly improves the response speed and thus improves the user experience.

[0078] In another example, when slicing different first video streams, the number of sub-video streams obtained is also different. Based on this, when transmitting multiple encapsulated sub-video streams to the terminal, each encapsulated sub-video stream is read in turn and transmitted to the terminal until the reading fails or the read encapsulated sub-video stream carries a tail frame identifier, thereby ensuring that the sub-video stream transmitted to the terminal is complete, that is, ensuring that the target video played by the terminal is complete. Among them, the reading failure indicates that there is no cached sub-video stream, that is, the sub-video stream has been fully transmitted to the terminal; when encapsulating the sub-video stream, a tail frame identifier is added to the sub-video stream corresponding to the tail frame, and the tail frame identifier indicates that the corresponding sub-video stream is the last sub-video stream corresponding to the first video stream.

[0079] That is, after it is determined that all sub-video streams are transmitted to the terminal, or after it is determined that the last sub-video stream is transmitted to the terminal, the reading operation is stopped.

[0080] In another example, the source video stream corresponding to the target video can be in the target codec format or in the non-target codec format. If the source video stream is in the target codec format, the source video stream is directly determined to be the first video stream corresponding to the target video; if the source video stream is in the non-target codec format, the source video stream is determined to be the second video stream corresponding to the target video, that is, the codec format of the second video stream corresponding to the target video is the non-target codec format. At this time, based on the target codec format, the second video stream is re-encoded and decoded to obtain the first video stream corresponding to the target video; of course, the codec format of the first video stream is the target codec format.

[0081] Optionally, after obtaining the second video stream, the codec format of the second video stream is identified, and the second video stream is decoded using a decoder corresponding to the codec format of the second video stream. Thereafter, the decoded second video stream is re-encoded using an encoder corresponding to the target codec format to obtain a first video stream corresponding to the target video, that is, a video stream having a codec format of the target codec format, so that the first video stream can be transmitted to the terminal based on the target transmission protocol and version information of the target codec format and encoding information.

[0082] It should be noted that before obtaining the first video stream or the second video stream corresponding to the target video, a decoder corresponding to the codec format of the second video stream is created. Since the codec format of the second video stream is not fixed, multiple encoders can be created in advance to ensure that the second video streams with different codec formats can be decoded. At the same time, an encoder corresponding to the target codec format and corresponding encoding parameters are created to re-encode the second video stream using the encoder corresponding to the target codec format, thereby obtaining a first video stream with the target codec format.

[0083] The second aspect of the present application also provides an electronic device corresponding to a processing method. Since the principle of solving the problem by the electronic device in the present application is similar to the above-mentioned processing method of the present application, the implementation of the electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0084] Figure 3 A schematic diagram of an electronic device provided in an embodiment of the present application is shown, which may include:

[0085] An obtaining module 301 is configured to obtain a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1;

[0086] A transmission module 302, configured to transmit the first video stream to a terminal based on a target transmission protocol and version information and encoding information of the target codec format, so that the terminal plays the target video;

[0087] The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.

[0088] In yet another embodiment, the transmission module 302 may be configured as follows:

[0089] Introducing a target header file into the target transmission protocol file, so that the target transmission protocol can be compatible with the target codec format, thereby enabling the first video stream to be transmitted to the terminal;

[0090] The target header file at least includes version information and encoding information of the target codec format.

[0091] In yet another embodiment, the transmission module 302 may be configured as follows:

[0092] Based on the target transmission protocol, slicing the first video stream to obtain at least two sub-video streams;

[0093] Determining a target encapsulation standard based on the version information and encoding information of the target codec format;

[0094] Encapsulating each of the sub-video streams according to a target encapsulation standard;

[0095] The long connection transmission mode is adopted to transmit each encapsulated sub-video stream to the terminal.

[0096] In yet another embodiment, the electronic device further includes an adding module 303, which is configured to:

[0097] The identification information of the target codec format is added to the message header of the initial encapsulation standard, and the version information and the bit rate information of the target codec format are added to the extended message header of the initial encapsulation standard to obtain the target encapsulation standard.

[0098] In yet another embodiment, the transmission module 302 is further configured to:

[0099] Based on the key frames and / or preset duration in the target video, the first video stream is sliced ​​to obtain at least two sub-video streams, and the key frames are multiple.

[0100] In yet another embodiment, at least two of the sub-video streams are arranged in sequence according to the order of key frames in the target video; and the transmission module 302 is further configured to:

[0101] Each encapsulated sub-video stream is transmitted to the terminal in sequence according to the arrangement order of at least two of the sub-video streams.

[0102] In yet another embodiment, the transmission module 302 is further configured to:

[0103] caching the encapsulated sub-video stream and its corresponding uniform resource locator to a content distribution network;

[0104] In response to the playback request of the terminal, a plurality of encapsulated sub-video streams are transmitted to the terminal based on a target transmission protocol and a uniform resource locator.

[0105] In yet another embodiment, the transmission module 302 is further configured to:

[0106] Each encapsulated sub-video stream is read in sequence and transmitted to the terminal until the reading fails or the read encapsulated sub-video stream carries a tail frame identifier.

[0107] In yet another embodiment, the electronic device further includes a coding and decoding module 304, which is configured as follows:

[0108] If the codec format of the second video stream corresponding to the target video is a non-target codec format, the second video stream is re-encoded and decoded based on the target codec format to obtain the first video stream corresponding to the target video; the codec format of the first video stream is the target codec format.

[0109] In an embodiment of the present application, the version information and encoding information of the target transmission protocol and the target codec format are configured so that the target transmission protocol can be compatible with the target codec format, and thus the first video stream can be transmitted to the terminal; at the same time, the first video stream is divided into at least two sub-video streams through the target transmission protocol, and the first video stream is transmitted in a long connection transmission mode, thereby avoiding the situation where the first video stream is stuck in transmission, ensuring the smoothness and clarity of the terminal playing the target video, realizing the use of AV1 in live broadcast scenarios, and improving the user's viewing experience.

[0110] The present application also provides another electronic device. The structural diagram of the electronic device can be as follows: Figure 4 As shown, at least a memory 401 and a processor 402 are included, the memory 401 stores a computer program, and the processor 402 implements the method provided by any embodiment of the present application when executing the computer program on the memory 401. Exemplarily, the steps of the electronic device computer program are as follows S11 and S12:

[0111] S11, obtaining a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1;

[0112] S12, based on the target transmission protocol and the version information and encoding information of the target codec format, transmitting the first video stream to the terminal so that the terminal plays the target video;

[0113] The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.

[0114] An embodiment of the present application provides a storage medium, which is a computer-readable medium and stores a computer program. When the computer program is executed by a processor, the method provided by any embodiment of the present application is implemented, including the following steps S21 and S22:

[0115] S21, obtaining a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1;

[0116] S22, based on the target transmission protocol and the version information and encoding information of the target codec format, transmitting the first video stream to the terminal so that the terminal plays the target video;

[0117] The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.

[0118] In an embodiment of the present application, the version information and encoding information of the target transmission protocol and the target codec format are configured so that the target transmission protocol can be compatible with the target codec format, and thus the first video stream can be transmitted to the terminal; at the same time, the first video stream is divided into at least two sub-video streams through the target transmission protocol, and the first video stream is transmitted in a long connection transmission mode, thereby avoiding the situation where the first video stream is stuck in transmission, ensuring the smoothness and clarity of the terminal playing the target video, realizing the use of AV1 in live broadcast scenarios, and improving the user's viewing experience.

[0119] Optionally, in this embodiment, the above-mentioned storage medium may include, but is not limited to, various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk. Optionally, in this embodiment, the processor executes the method steps recorded in the above-mentioned embodiment according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment can refer to the examples described in the above-mentioned embodiment and the optional implementation mode, and this embodiment is not repeated here. Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented with a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with executable program codes of computing devices, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps in them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0120] In addition, although exemplary embodiments have been described herein, the scope includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., various embodiments intersecting schemes), adaptations or changes. The elements in the claims will be interpreted broadly based on the language adopted in the claims, and are not limited to the examples described in this specification or during the implementation of the application, and the examples will be interpreted as non-exclusive. Therefore, this specification and examples are intended to be considered as examples only, and the true scope and spirit are indicated by the following claims and the full scope of their equivalents.

[0121] The above description is intended to be illustrative rather than restrictive. For example, the above examples (or one or more of them) can be used in combination with each other. For example, those of ordinary skill in the art can use other embodiments when reading the above description. In addition, in the above-mentioned specific embodiments, various features can be grouped together to simplify the application. This should not be interpreted as an intention that a disclosed feature that does not require protection is necessary for any claim. On the contrary, the subject matter of the present application may be less than all the features of a specific disclosed embodiment. Thus, the following claims are incorporated into the specific embodiments as examples or embodiments, wherein each claim is independently used as a separate embodiment, and it is considered that these embodiments can be combined with each other in various combinations or arrangements. The scope of the present application should be determined with reference to the attached claims and the full scope of equivalent forms granted by these claims.

[0122] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.

Claims

1. A processing method comprising: Obtaining a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1; Based on the target transmission protocol and the version information and encoding information of the target codec format, transmitting the first video stream to the terminal so that the terminal plays the target video; The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.

2. The processing method according to claim 1, wherein the transmitting the first video stream to the terminal based on the target transmission protocol and the version information and encoding information of the target codec format comprises: Introducing a target header file into the target transmission protocol file, so that the target transmission protocol can be compatible with the target codec format, thereby enabling the first video stream to be transmitted to the terminal; The target header file at least includes version information and encoding information of the target codec format.

3. The processing method according to claim 1, wherein the transmitting the first video stream to the terminal based on the target transmission protocol and the version information and encoding information of the target codec format comprises: Based on the target transmission protocol, slicing the first video stream to obtain at least two sub-video streams; Determining a target encapsulation standard based on the version information and encoding information of the target codec format; Encapsulating each of the sub-video streams according to a target encapsulation standard; The long connection transmission mode is adopted to transmit each encapsulated sub-video stream to the terminal.

4. The processing method according to claim 3, before encapsulating each of the sub-video streams, comprises: The identification information of the target codec format is added to the message header of the initial encapsulation standard, and the version information and the bit rate information of the target codec format are added to the extended message header of the initial encapsulation standard to obtain the target encapsulation standard.

5. The processing method according to claim 3, wherein slicing the first video stream to obtain at least two sub-video streams comprises: Based on the key frames and / or preset duration in the target video, the first video stream is sliced ​​to obtain at least two sub-video streams, and the key frames are multiple.

6. The processing method according to claim 5, wherein at least two of the sub-video streams are arranged in sequence according to the order of key frames in the target video; The step of transmitting each encapsulated sub-video stream to the terminal includes: Each encapsulated sub-video stream is transmitted to the terminal in sequence according to the arrangement order of at least two of the sub-video streams.

7. The processing method according to any one of claims 3 to 6, wherein transmitting each encapsulated sub-video stream to the terminal comprises: caching the encapsulated sub-video stream and its corresponding uniform resource locator to a content distribution network; In response to the playback request of the terminal, a plurality of encapsulated sub-video streams are transmitted to the terminal based on a target transmission protocol and a uniform resource locator.

8. The processing method according to claim 7, wherein transmitting the plurality of packaged sub-video streams to the terminal comprises: Each encapsulated sub-video stream is read in sequence and transmitted to the terminal until the reading fails or the read encapsulated sub-video stream carries a tail frame identifier.

9. The processing method according to claim 1, further comprising: If the codec format of the second video stream corresponding to the target video is a non-target codec format, the second video stream is re-encoded and decoded based on the target codec format to obtain the first video stream corresponding to the target video; the codec format of the first video stream is the target codec format.

10. An electronic device, comprising: An obtaining module configured to obtain a first video stream corresponding to a target video, wherein a codec format of the first video stream is a target codec format, and the target codec format is AV1; A transmission module, configured to transmit the first video stream to a terminal based on a target transmission protocol and version information and encoding information of the target codec format, so that the terminal plays the target video; The target transmission protocol is used to divide the first video stream into at least two sub-video streams, and transmit the first video stream using a long connection transmission mode.