Video stream transmission method, device, electronic device, storage medium and product

By integrating the color channel data and transparent channel data in the video stream into composite frame transmission, the problem of video frame misalignment caused by subframe loss is solved and the video playback effect is improved.

CN115103228BActive Publication Date: 2025-01-24SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210684393.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2025-01-24
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

During the transmission of the video stream, the loss of subframes will cause the video frame to be misaligned, reducing the video playback effect.

Method used

The color channel data and transparent channel data in the video stream are encoded into multiple subframes respectively, integrated into a composite frame, and transmitted to the playback end.

Benefits of technology

During the transmission of composite frames, the color channel data and transparent channel data of the data are lost when the data is lost. It avoids the dislocation of the video frame and improves the playback effect of the video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115103228B_ABST
    Figure CN115103228B_ABST
Patent Text Reader

Abstract

The present application provides a video stream transmission method, device, electronic device, storage medium and product, belonging to the field of multimedia technology. The method includes: obtaining color channel data and transparent channel data of a target video frame from a video stream; encoding the color channel data and transparent channel data respectively to obtain multiple subframes; determining a target frame header based on multiple subframes, the target frame header including decoding information of multiple subframes; integrating the target frame header and multiple subframes into a composite frame, the frame header of the composite frame is the target frame header, and the frame content is multiple subframes; transmitting the composite frame to the playback end. The method integrates the subframes corresponding to the color channel data and the transparent channel data into a composite frame, so that in the case of data loss during the transmission of the composite frame, the color channel data and the transparent channel data are both lost, thereby avoiding the misalignment of video frames in the video stream, thereby improving the video playback effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multimedia technology, and in particular to a video stream transmission method, device, electronic device, storage medium and product. Background Art

[0002] With the development of multimedia technology, transparent channel data is increasingly used in video streams to create video special effects; therefore, during the transmission of the video stream, not only the color channel data of the video stream is transmitted to the playback end, but also the transparent channel data of the video stream is transmitted to the playback end, so that the playback end can realize the playback of the video with special effects through the transparent channel data and color channel data.

[0003] In the related art, when transmitting a video stream to a playback end, for any video frame in the video stream, the color channel data and the transparent channel data in the video frame are encoded separately to obtain two sub-frames, which are then transmitted to the playback end.

[0004] However, during the transmission of subframes, subframes may be lost. Regardless of whether the subframe corresponding to the color channel data or the subframe corresponding to the transparent channel data is lost, it will cause the video frame to be misaligned. As a result, when the video is played based on the video stream on the playback end, the video will have ghosting and the video color will be polluted, which will reduce the video playback effect. Summary of the invention

[0005] The embodiments of the present application provide a video stream transmission method, device, electronic device, storage medium and product, which can improve the video playback effect. The technical solution is as follows:

[0006] In one aspect, a video stream transmission method is provided, the method comprising:

[0007] Get the color channel data and transparent channel data of the target video frame from the video stream;

[0008] Encoding the color channel data and the transparent channel data respectively to obtain a plurality of subframes;

[0009] Based on the multiple subframes, determine a target frame header, where the target frame header includes decoding information of the multiple subframes;

[0010] Integrate the target frame header and the multiple subframes into a composite frame, wherein the frame header of the composite frame is the target frame header, and the frame content is the multiple subframes;

[0011] The composite frame is transmitted to a playback end.

[0012] In another aspect, a video stream transmission method is provided, the method comprising:

[0013] Receive composite frames;

[0014] Parsing the composite frame to obtain a target frame header and frame content, wherein the frame content includes multiple subframes, and the target frame header includes decoding information of the multiple subframes;

[0015] Based on the decoding information of the multiple subframes, the frame content is decoded to obtain the color channel data and the transparent channel data of the target video frame;

[0016] The target video frame is displayed based on the color channel data and the transparent channel data of the target video frame.

[0017] In another aspect, a video stream transmission device is provided, the device comprising:

[0018] A first acquisition module is used to acquire color channel data and transparent channel data of a target video frame from a video stream;

[0019] An encoding module, used for encoding the color channel data and the transparent channel data respectively to obtain a plurality of subframes;

[0020] A determination module, configured to determine a target frame header based on the multiple subframes, wherein the target frame header includes decoding information of the multiple subframes;

[0021] An integration module, used for integrating the target frame header and the multiple subframes into a composite frame, wherein the frame header of the composite frame is the target frame header, and the frame content is the multiple subframes;

[0022] The transmission module is used to transmit the composite frame to the playback end.

[0023] In another aspect, a video stream transmission device is provided, the device comprising:

[0024] A first receiving module, used for receiving a composite frame;

[0025] A parsing module, used for parsing the composite frame to obtain a target frame header and frame content, wherein the frame content includes a plurality of subframes, and the target frame header includes decoding information of the plurality of subframes;

[0026] A decoding module, configured to decode the frame content based on the decoding information of the multiple subframes to obtain color channel data and transparent channel data of the target video frame;

[0027] The display module is used to display the target video frame based on the color channel data and the transparent channel data of the target video frame.

[0028] On the other hand, an electronic device is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the video stream transmission method described in any of the above implementation methods.

[0029] On the other hand, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the video stream transmission method described in any of the above implementations.

[0030] On the other hand, a computer program product is provided, wherein the computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the video stream transmission method as described in any of the above implementations.

[0031] The present application provides a video stream transmission method. Since the method integrates the subframes corresponding to the color channel data and the transparent channel data into a composite frame, when data is lost during the transmission of the composite frame, both the color channel data and the transparent channel data are lost, thereby avoiding the misalignment of video frames in the video stream, thereby improving the video playback effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of an implementation environment shown in an exemplary embodiment of the present application is shown;

[0033] Figure 2 A flowchart of a video stream transmission method shown in an exemplary embodiment of the present application is shown;

[0034] Figure 3 A flowchart of a video stream transmission method shown in an exemplary embodiment of the present application is shown;

[0035] Figure 4 A flowchart of a video stream transmission method shown in an exemplary embodiment of the present application is shown;

[0036] Figure 5 A schematic diagram of data encoding is shown in an exemplary embodiment of the present application;

[0037] Figure 6 A flowchart of a video stream transmission method shown in an exemplary embodiment of the present application is shown;

[0038] Figure 7 A flowchart of a video stream transmission method shown in an exemplary embodiment of the present application is shown;

[0039] Figure 8 A schematic diagram of a playback end playing a video according to an exemplary embodiment of the present application is shown;

[0040] Fig. 9 A block diagram of a video stream transmission device shown in an exemplary embodiment of the present application is shown;

[0041] Fig.10 A block diagram of a video stream transmission device shown in an exemplary embodiment of the present application is shown;

[0042] Fig.11 A block diagram of an electronic device according to an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0043] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0044] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0045] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the color channel data and transparent channel data involved in this application are all obtained with full authorization.

[0046] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. In the implementation environment, the electronic device includes a transmitter 100 and a player 200, and the transmitter 100 and the player 200 transmit data through a wired or wireless network. Among them, the transmitter 100 is used to encode the data of the video frame in the video stream and transmit the encoded data to the player 200; the player 200 is used to receive the encoded data and decode the encoded data to obtain the video frame in the video stream and display it, thereby playing the video at the player 200.

[0047] In some embodiments, the transmitting end 100 is provided as a terminal or a server, and the playing end 200 is provided as a terminal. The terminal may be at least one of a smart phone, a smart watch, a desktop computer, a laptop, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop computer. The terminal has a communication function and can access a wired network or a wireless network. The terminal may generally refer to one of a plurality of terminals, and those skilled in the art may know that the number of the above terminals may be more or less. The server may be an independent physical server, or a server cluster or a distributed file system composed of a plurality of physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the server and the terminal are directly or indirectly connected by wired or wireless communication, which is not limited in the embodiments of the present disclosure. Optionally, the number of the above servers may be more or less, which is not limited in the embodiments of the present disclosure. Of course, the server may also include other functional servers to provide more comprehensive and diversified services. Among them, the server undertakes the main computing work, and the terminal undertakes the secondary computing work; or, the server undertakes the secondary computing work, and the terminal undertakes the main computing work; or, the server or the terminal can undertake the computing work independently, which is not limited in the embodiments of the present disclosure.

[0048] In some embodiments, the video stream transmission method provided in the embodiments of the present application is applied in real-time video playback scenarios such as live video broadcast, video connection or video conferencing, but is not limited thereto. When the video stream is transmitted from the transmitting end 100 to the playing end 200, the data of the video frame in the video stream is transmitted to the playing end 200 based on the method provided in the embodiments of the present application, so as to play the video at the playing end 200.

[0049] Please refer to Figure 2 , which shows a flow chart of a video stream transmission method shown in an exemplary embodiment of the present application. The method includes:

[0050] 201. The sending end obtains color channel data and transparent channel data of a target video frame from a video stream.

[0051] In the embodiment of the present application, the video stream includes multiple video frames, any video frame includes color channel data and transparent channel data, the transparent channel data is alpha transparent channel data, and the target video frame is the video frame currently to be transmitted among the multiple video frames. The sending end sequentially performs steps 201-205 on the multiple video frames, that is, sequentially transmits the composite frames corresponding to the multiple video frames to the playback end, so as to realize the transmission of the video stream between the sending end and the playback end.

[0052] 202. The transmitting end encodes the color channel data and the transparent channel data respectively to obtain multiple subframes.

[0053] In an embodiment of the present application, the transmitting end performs lossy encoding on the color channel data and the transparent channel data respectively through two independent encoders to obtain multiple subframes.

[0054] 203. The transmitting end determines a target frame header based on multiple subframes.

[0055] In an embodiment of the present application, the target frame header includes decoding information of multiple subframes, and the decoding information is used to decode the multiple subframes to obtain color channel data and transparent channel data.

[0056] 204. The transmitting end integrates the target frame header and multiple subframes into a composite frame.

[0057] In the embodiment of the present application, the frame header of the composite frame is a target frame header, and the frame content is a plurality of subframes.

[0058] 205. The sending end transmits the composite frame to the playing end.

[0059] The present application provides a video stream transmission method. Since the method integrates the subframes corresponding to the color channel data and the transparent channel data into a composite frame, when data is lost during the transmission of the composite frame, both the color channel data and the transparent channel data are lost, thereby avoiding the misalignment of video frames in the video stream, thereby improving the video playback effect.

[0060] Please refer to Figure 3 , which shows a flow chart of a video stream transmission method shown in an exemplary embodiment of the present application. The method includes:

[0061] 301. The playback end receives the composite frame.

[0062] In the embodiment of the present application, the composite frame is a composite frame corresponding to the target video frame, and the composite frame is determined based on the color channel data and the transparent channel data of the target video frame.

[0063] 302. The playback end parses the composite frame to obtain a target frame header and frame content.

[0064] In an embodiment of the present application, the frame content includes multiple subframes, and the target frame header includes decoding information of the multiple subframes.

[0065] 303. The playback end decodes the frame content based on the decoding information of the multiple sub-frames to obtain the color channel data and the transparent channel data of the target video frame.

[0066] In the embodiment of the present application, since the frame content of the composite frame is decoded, one-to-one corresponding color channel data and transparent channel data can be obtained, thereby avoiding the misalignment of the video frame and ensuring the effect of playing the video based on the video frame.

[0067] 304. The playback end displays the target video frame based on the color channel data and the transparent channel data of the target video frame.

[0068] An embodiment of the present application provides a video stream transmission method. Since the method receives a composite frame, and the composite frame can be decoded to obtain color channel data and transparent channel data, the color channel data and transparent channel data of the video frame can be simultaneously obtained through the composite frame, and the video is played based on the color channel data and transparent channel data of the video frame, thereby avoiding the misalignment of the video frame in the video stream, thereby improving the video playback effect.

[0069] Please refer to Figure 4 , which shows a flow chart of a video stream transmission method shown in an exemplary embodiment of the present application. The method includes:

[0070] 401. The sending end obtains color channel data and transparent channel data of a target video frame from a video stream.

[0071] Optionally, the image format of multiple video frames in the video stream is YUVA420P, wherein Y represents the brightness component of the image in the video, U represents the chrominance component of the image in the video, which is obtained by removing the brightness of the blue part of the image, V represents the chrominance component of the image in the video, which is obtained by removing the brightness of the red part of the image, and A represents transparent channel data. Accordingly, the sending end extracts the color channel data and transparent channel data of the target video frame to obtain the color channel data and transparent channel data of the target video frame.

[0072] 402. The transmitting end encodes the color channel data and the transparent channel data respectively to obtain multiple subframes.

[0073] In some embodiments, the plurality of subframes include a first subframe corresponding to the color channel data and a second subframe corresponding to the transparent channel data; see Figure 5 , which shows a data encoding schematic diagram shown in an exemplary embodiment of the present application. After the sender obtains the color channel data and transparent channel data of the target video frame from the video stream, the color channel data and the transparent channel data are independently encoded to obtain a first subframe and a second subframe, wherein Y, U and V represent color channel data, A represents transparent channel data, and X represents padding data in the transparent channel data, which is 0 or noise data to increase the length of the transparent channel data so that the transparent channel data can be encoded as a subframe.

[0074] The transmitting end performs lossy encoding on the color channel data and the transparent channel data respectively through at least one of the encoders VP8 and VP9. Optionally, the transmitting end encodes the color channel data and the transparent channel data respectively through the encoders VP8 and VP9; or the transmitting end encodes the color channel data and the transparent channel data respectively through the encoder VP8; or the transmitting end encodes the color channel data and the transparent channel data respectively through the encoder VP9.

[0075] In some embodiments, the sending end encodes the color channel data and the transparent channel data respectively to obtain multiple subframes, including the following steps: the sending end obtains the video content data of the target video frame; the sending end encodes the color channel data, the transparent channel data and the video content data respectively to obtain multiple subframes.

[0076] The video content data is data that is strongly related to the content data to be displayed in the target video frame, and can also be the content data to be displayed in the target video frame, so that the video content data is strictly synchronized with the content data to be displayed. For example, in a question-answering scenario of video playback, the video content can be the question and answer, which is encoded as one of multiple subframes, and then the subframes corresponding to the color channel data and the transparent channel data are subsequently integrated into a composite frame, ensuring the correspondence between the video content data and the color channel data and the video content data, avoiding the misalignment of the video frame, and ensuring the effect of video playback.

[0077] 403. The transmitting end obtains the subframe number of the multiple subframes and the first starting position of the first subframe in the composite frame.

[0078] The first starting position is the byte position of the first subframe in the composite frame. For example, if the data before the first subframe in the composite frame occupies 3 bytes, the first starting position is the 4th byte.

[0079] 404. The transmitting end generates decoding information based on the number of subframes and the first starting position.

[0080] Optionally, the decoding information only includes the number of subframes and the first starting position. The transmitting end combines the number of subframes and the first starting position to obtain the decoding information. The arrangement order of the number of subframes and the first starting position in the decoding information can be set and changed as needed, and is not specifically limited here.

[0081] 405. The sender determines the target frame header based on the decoded information.

[0082] In some embodiments, in order to identify the target video frame, the target frame header also includes a first index identifier of the target video frame. The sending end determines the target frame header based on the decoding information, including the following steps: the sending end obtains the first index identifier of the target video frame; the sending end generates the target frame header based on the decoding information and the first index identifier.

[0083] Among them, the position of the number of subframes, the first starting position and the first index identifier in the target frame header can be set and changed as needed, and is not specifically limited here; for example, the sending end arranges the number of subframes, the first index identifier and the first starting position in sequence to obtain the target frame header. Among them, the number of bytes occupied by the number of subframes, the first index identifier and the first starting position can be set and changed as needed. Please refer to Table 1, which shows the data structure of a composite frame shown in an exemplary embodiment of the present application, which includes a target frame header and multiple subframes, the number of subframes, the first index identifier and the first starting position are arranged in sequence in the target frame header, and the number of bytes occupied by the number of subframes, the first index identifier and the first starting position are 1, 2 and 4 respectively.

[0084] Table 1

[0085]

[0086] In this embodiment, by generating a target frame header based on the first index identifier, the target video frame is identified, and it is convenient to sort multiple video frames in the video stream at the playback end and determine whether there is any video frame loss in the video stream.

[0087] In this embodiment, decoding information is generated by the number of subframes and the first starting position, and then a target frame header is generated based on the decoding information, so that the composite frame can be quickly decoded based on the decoding information in the target frame header, thereby improving the efficiency of video playback.

[0088] 406. The transmitting end determines subframe headers corresponding to the plurality of subframes and frame data corresponding to the plurality of subframes.

[0089] In some embodiments, the process of determining the subframe header of a subframe includes the following steps: the transmitting end obtains the second starting position of the subframe header of the subframe in the composite frame, the second index identifier of the subframe in the composite frame, the third starting position of the frame data of the subframe in the composite frame, the length of the frame data of the subframe and the type of the subframe; the transmitting end generates the subframe header based on the second starting position, the second index identifier, the third starting position, the length and the type.

[0090] The second starting position indicates the starting position of the subframe header of the subframe in the composite frame; in one implementation, if the second starting position is marked as 0, it indicates that the subframe is the last subframe. The second index identifier is used to identify which subframe of the multiple subframes the subframe is. For example, if the number of the multiple subframes is two, if the second index identifier is 0, it indicates that the subframe is the first subframe, and if the second index identifier is 1, it indicates that the subframe is the second subframe.

[0091] Among them, the length of the frame data refers to the number of bytes occupied by the frame data, and the type of the subframe includes the encoder type corresponding to the subframe and the frame type of the subframe; optionally, if the encoder type is marked as 1, it indicates that the corresponding encoder is VP8, and if the encoder type is marked as 2, it indicates that the corresponding encoder is VP9. If the frame type is marked as 1, it indicates that the subframe is a key frame, and if the frame type is marked as 0, it indicates that the subframe is a non-key frame. Among them, the positions of the second starting position, the second index identifier, the third starting position, the length and the type in the subframe header can be set and changed as needed; for example, the sending end arranges the second starting position, the second index identifier, the third starting position, the length and the type in sequence to obtain the subframe header. Among them, the number of subframes, the first index identifier and the number of bytes occupied by the first starting position can be set and changed as needed.

[0092] Please refer to Table 2, which shows the data structure of a subframe shown in an exemplary embodiment of the present application, which includes a subframe header and frame data, and the second starting position, the second index mark, the third starting position, the length, the encoder type and the frame type are arranged in sequence in the subframe header, and the number of bytes occupied by the second starting position, the second index mark, the third starting position, the length, the encoder type and the frame type are 4, 1, 4, 4, 1 and 1 respectively. After the terminal arranges the subframe headers of multiple subframes in sequence, it arranges the frame data of the multiple subframes in sequence behind the multiple subframe headers. Among them, the frame data is encoded data in binary format.

[0093] Table 2

[0094]

[0095] In an embodiment of the present application, a subframe header is obtained based on the second starting position, the second index identifier, the third starting position, the length and the type, so that the subframe header can effectively represent the frame information of the subframe and the related information of the frame data of the subframe, and then the frame data can be quickly obtained based on the subframe header, thereby improving the efficiency of acquiring the frame data.

[0096] 407. The transmitting end sequentially arranges the target frame header, the subframe headers corresponding to the plurality of subframes, and the frame data corresponding to the plurality of subframes to obtain a composite frame.

[0097] In this embodiment, by arranging the target frame header, the subframe headers corresponding to the multiple subframes, and the frame data corresponding to the multiple subframes in sequence, it is convenient to decode the multiple subframes in the composite frame based on the target frame header arranged in front, thereby improving the efficiency of obtaining the frame data corresponding to the multiple subframes.

[0098] 408. The sending end transmits the composite frame to the playing end.

[0099] In some embodiments, the transmitting end transmits a composite frame to the playing end, including the following steps: the transmitting end divides the composite frame into multiple sub-data; the transmitting end obtains header information corresponding to the multiple sub-data respectively; the transmitting end encapsulates the multiple sub-data based on the header information to obtain multiple fragmented data packets, and the fragmented data packets include header information and sub-data; the transmitting end sends the multiple fragmented data packets to the playing end.

[0100] It should be noted that, since data often needs to be processed by intermediate devices such as gateways during transmission, and since the data processed by these intermediate devices cannot exceed the rated bytes, in the embodiment of the present application, the amount of bytes of the transmitted data is reduced by sending the composite frame in the form of fragmented data packets, thereby ensuring the effective processing of the composite frame by the gateway device, so that the composite frame can be smoothly transmitted to the playback end, thereby improving the stability of the composite frame transmission to the playback end.

[0101] In some embodiments, the process of determining the header information corresponding to the sub-data includes the following steps: the sending end obtains the header field of the target transmission protocol, the serial number and timestamp of the sub-data; the sending end generates the header information corresponding to the sub-data based on the header field, serial number and timestamp.

[0102] The sequence number is used to indicate the order in which the sub-data are sent, and the timestamp is used to indicate the sampling time of the sub-data. Optionally, the sequence number occupies 16 bits and is used to indicate the order in which the sub-data are sent, that is, the order in which the fragmented data packets are sent. Usually, each time the sender sends a fragmented data packet, the sequence number of the fragmented data packet increases by 1. Optionally, the timestamp occupies 32 bits.

[0103] Optionally, the target transport protocol is the Real-time Transport Protocol (RTP), and the header field includes multiple bits, the first 12 bits of which are the fixed header of the target transport protocol; please refer to Table 3, which shows the data structure of a fragmented data packet shown in an exemplary embodiment of the present application. The header field includes V, P, X, CC, M and PT; wherein V is a version indicator bit, which occupies 2 bits and is used to indicate the version number of the target transport protocol. P is a fill indicator bit, which occupies 1 bit and is used to indicate whether there is an RTP fill field at the end of the fragmented data packet. X is an extension indicator bit, which occupies 1 bit and is used to indicate whether there is an extended header field between the header information and the sub-data. If X is 1, it indicates that there is an extended header field, such as the extended header field before the sub-data in Table 3. CC is a contributing source field indicator bit, which occupies 4 bits and is used to indicate the number of contributing source identifiers (CSRC). M is a mark indicator bit, which occupies one bit and is used to indicate whether the fragmented data packet is the last fragmented data packet. PT is the payload type indicator, which occupies 7 bits and is used to indicate the type of sub-data.

[0104] Table 3

[0105]

[0106] In some embodiments, the header information also includes a synchronization source identifier (SSRC), a CSRC, and a common header of the sub-data, and the common header occupies one byte; please refer to Table 4, which shows the data structure of the common header shown in an exemplary embodiment of the present application.

[0107] Table 4

[0108]

[0109] Wherein, E is an extended indicator bit, if E is 1, then there are two bytes of extended data behind it, usually expressed as a picture identifier (picture_id). S is used to identify whether the slice data packet is the first slice data packet of a composite frame, if S is 1, it indicates that it is the first slice data packet of a composite frame. F represents the frame type of the slice data packet, for example, F is 1 for a key frame, and F is 0 for a non-key frame. Wherein, the general header is followed by the sub-data of the composite frame in sequence, and the sub-data includes at least one of a target frame header, a sub-frame header of a plurality of sub-frames, and a frame data of a plurality of sub-frames. In some embodiments, the sub-data is also followed by a padding field, and the padding field is custom data agreed upon by the transmitting end and the playing end, which is not specifically limited here.

[0110] In an embodiment of the present application, header information is generated through a header field, a sequence number, and a timestamp. Since the sequence number and the timestamp respectively identify the sending order and the sampling time of the sub-data, the sub-data is encapsulated based on the header information, so that the multiple fragmented data packets are sorted in sequence, thereby ensuring the orderliness of the multiple fragmented data packets corresponding to the composite frame, and making it convenient for the playback end to sort and combine the multiple fragmented data packets based on the header information to obtain a composite frame.

[0111] The present application provides a video stream transmission method. Since the method integrates the subframes corresponding to the color channel data and the transparent channel data into a composite frame, when data is lost during the transmission of the composite frame, both the color channel data and the transparent channel data are lost, thereby avoiding the misalignment of video frames in the video stream, thereby improving the video playback effect.

[0112] Please refer to Figure 6 , which shows a flow chart of a video stream transmission method shown in an exemplary embodiment of the present application. The method includes:

[0113] 601. A playback end receives at least one fragmented data packet, where the fragmented data packet includes sub-data and header information of the sub-data.

[0114] The composite frame is transmitted in the form of multiple fragmented data packets, and the playback end receives at least one data packet to achieve reception of the composite frame.

[0115] 602. When the playback end determines that there is no transmission error in the composite frame during transmission based on the header information respectively included in at least one fragment data packet, the playback end parses the composite frame to obtain a target frame header and frame content.

[0116] The frame content includes multiple subframes, and the target frame header includes decoding information of the multiple subframes.

[0117] In the embodiment of the present application, the composite frame is parsed only when there is no transmission error in the composite frame during transmission. At this time, the received composite frame is a composite frame with accurate data, thereby ensuring the effectiveness of parsing the composite frame.

[0118] In other embodiments, when the playback end determines that a transmission error occurs in the composite frame during transmission based on header information respectively included in at least one fragmented data packet, the playback end discards the composite frame.

[0119] Wherein, the header information includes a header field, a sequence number and a timestamp, and the playback end determines that there is a transmission error in the transmission process of the composite frame based on the header information respectively included in at least one fragment data packet, including at least one of the following implementations: In one implementation, the playback end determines that there is a transmission error in the transmission process of the composite frame when the header information of any fragment data packet in the header information respectively included in at least one fragment data packet does not match the header information of other fragment data packets in the at least one fragment data packet. In another implementation, the playback end determines that there is a transmission error in the transmission process of the composite frame when the timestamp of any fragment data packet in at least one fragment data packet does not match the timestamp of other fragment data packets in the at least one fragment data packet. In another implementation, the playback end determines that there is a fragment data packet loss in the transmission process of the composite frame when the number of at least one fragment data packet is less than the number of multiple fragment data packets of the composite frame, or when the sequence numbers respectively included in at least one fragment data packet are not continuous, and then determines that there is a transmission error in the transmission process of the composite frame.

[0120] In this embodiment, when a composite frame has a transmission error during transmission, the composite frame is directly discarded, thereby preventing the composite frame with the transmission error from adversely affecting video playback, thereby improving the video playback effect.

[0121] 603. The playback end decodes the frame content based on the decoding information of the multiple sub-frames to obtain the color channel data and the transparent channel data of the target video frame.

[0122] In some embodiments, the playback end decodes the frame content based on the decoding information of multiple subframes to obtain the color channel data and transparent channel data of the target video frame, including the following steps: the playback end determines the number of subframes of the multiple subframes included in the frame content and the first starting position of the first subframe of the multiple subframes in the composite frame based on the decoding information of the multiple subframes; the playback end determines the multiple subframe headers and the multiple frame data arranged in sequence in the frame content based on the number of subframes and the first starting position; the playback end determines the frame data corresponding to the multiple subframes from the multiple frame data based on the multiple subframe headers; the playback end decodes the frame data corresponding to the multiple subframes to obtain the color channel data and transparent channel data.

[0123] The playback end independently decodes the frame data corresponding to the multiple subframes through the decoder VP8 or VP9 to obtain the color channel data and the transparent channel data. In this embodiment, by determining the number of subframes of the multiple subframes and the first starting position of the first subframe, multiple subframe headers and multiple frame data are obtained, and then the frame data corresponding to the multiple subframes are decoded, so that the color channel data and the transparent channel data of the target video frame can be obtained, ensuring the orderliness and regularity of decoding the multiple subframes.

[0124] In one implementation, the playback end decodes the frame data corresponding to multiple subframes to obtain color channel data and transparent channel data, including the following steps: the playback end decodes the frame data corresponding to multiple subframes to obtain color channel data, transparent channel data and video content data of the target video frame.

[0125] In this implementation, the subframes corresponding to the video content data and the subframes corresponding to the color channel data and the transparent channel data are integrated into a composite frame, thereby ensuring the correspondence between the video content data and the color channel data and the transparent channel data. Then, the frame data corresponding to the multiple subframes are decoded to obtain one-to-one corresponding color channel data, transparent channel data and video content data, thereby avoiding the misalignment of the video frames and ensuring the effect of video playback.

[0126] 604. The playback end displays the target video frame based on the color channel data and the transparent channel data of the target video frame.

[0127] In one implementation, the playback end combines the color channel data and the transparent channel data to obtain a target video frame, and then renders the target video frame through a rendering module of the playback end to display the target video frame.

[0128] In some embodiments, if the playback end decodes the frame data corresponding to multiple subframes respectively to obtain color channel data, transparent channel data and video content data of the target video frame, then accordingly, the playback end displays the target video frame based on the color channel data and transparent channel data of the target video frame, including the following steps: the playback end displays the target video frame based on the color channel data, transparent channel data and video content data.

[0129] In this embodiment, the playback end displays the target data based on the color channel data, transparent channel data and video content data, thereby ensuring a one-to-one correspondence between the color channel data, transparent channel data and video content data, avoiding video frame dislocation, and thereby ensuring the effect of video playback.

[0130] Please refer to Figure 7, which shows a flow chart of a video stream transmission method shown in an exemplary embodiment of the present application. Wherein, the target video frame is a YUVA420 frame, and the playback end disassembles the target video frame to obtain color channel data and transparent channel data, and then encodes the color channel data and the transparent channel data respectively to obtain the first subframe and the second subframe, and integrates the two into a composite frame, which is packaged and transmitted in the RTP protocol and transmitted to the playback end through the network. The playback end receives the fragmented data packets transmitted in the RTP protocol and combines them into a composite frame, obtains the first subframe and the second subframe from the composite frame and decodes them to obtain color channel data and transparent channel data, and then combines the color channel data and the transparent channel data into a YUVA420 frame, and renders the video frame to display the target video frame on the playback end to achieve video playback.

[0131] The video stream transmission method provided in the embodiment of the present application realizes the transmission of a video stream with transparent channel data in a real-time transmission protocol, which ensures a one-to-one correspondence between the transparent channel data and the color channel data, thereby being able to achieve the effect of playing transparent video in a real-time audio and video scene, thereby expanding the use scenarios of real-time audio and video. In addition, this method can also reduce the cost of later-stage fusion of multiple data in the video.

[0132] In some embodiments, the method provided in the embodiments of the present application is used to transmit a video stream with transparent channel data, so that the playback end can set the background of the front-end object to a transparent state, and then dynamically add a background during playback, such as referring to Figure 8 , which shows a schematic diagram of a playback end playing a video according to an exemplary embodiment of the present application, which can dynamically add any background to the transparent background of the front-end object.

[0133] In some embodiments, the transmitter can also convert the video frame with transparent channel data into a format supported by the encoder for full-frame encoding, thereby ensuring the correspondence between the color channel data and the transparent channel data. For example, the UV part of the video frame in the YUVA420 format is filled and combined into the YUV444 format, and then the video frame in the YUV444 format is encoded using encoders such as VP8, VP9 or H264. The encoded data is transmitted in the RTP protocol. After the player decodes the encoded data, it is restored to the video frame in the YUVA420 format according to the filling rules of the transmitter for playback, ensuring the correspondence between the color channel data and the transparent channel data when playing the video. And only one encoder is needed to encode the entire frame of the video stream, thereby reducing the complexity of encoding.

[0134] An embodiment of the present application provides a video stream transmission method. Since the method receives a composite frame, and the composite frame can be decoded to obtain color channel data and transparent channel data, the color channel data and transparent channel data of the video frame can be simultaneously obtained through the composite frame, and the video is played based on the color channel data and transparent channel data of the video frame, thereby avoiding the misalignment of the video frame in the video stream, thereby improving the video playback effect.

[0135] Please refer to Fig. 9 , which shows a block diagram of a video stream transmission device shown in an exemplary embodiment of the present application, the device includes:

[0136] A first acquisition module 901 is used to acquire color channel data and transparent channel data of a target video frame from a video stream;

[0137] The encoding module 902 is used to encode the color channel data and the transparent channel data respectively to obtain multiple subframes;

[0138] A determination module 903 is used to determine a target frame header based on multiple subframes, where the target frame header includes decoding information of the multiple subframes;

[0139] An integration module 904 is used to integrate the target frame header and multiple subframes into a composite frame, where the frame header of the composite frame is the target frame header and the frame content is multiple subframes;

[0140] The transmission module 905 is used to transmit the composite frame to the playback end.

[0141] In some embodiments, the determination module 903 is configured to:

[0142] Obtaining the subframe numbers of the multiple subframes and the first starting position of the first subframe of the multiple subframes in the composite frame;

[0143] generating decoding information based on the number of subframes and the first starting position;

[0144] Based on the decoded information, the target frame header is determined.

[0145] In some embodiments, the determination module 903 is configured to:

[0146] Obtain a first index identifier of a target video frame;

[0147] A target frame header is generated based on the decoding information and the first index identifier.

[0148] In some embodiments, the integration module 904 is used to:

[0149] Determine subframe headers corresponding to the plurality of subframes and frame data corresponding to the plurality of subframes;

[0150] The target frame header, the subframe headers respectively corresponding to the plurality of subframes, and the frame data respectively corresponding to the plurality of subframes are arranged in sequence to obtain a composite frame.

[0151] In some embodiments, the apparatus further comprises:

[0152] A second acquisition module, used to acquire a second starting position of a subframe header of a subframe in a composite frame, a second index identifier of the subframe in the composite frame, a third starting position of frame data of the subframe in the composite frame, a length of the frame data of the subframe, and a type of the subframe;

[0153] A generating module is used to generate a subframe header based on the second starting position, the second index identifier, the third starting position, the length and the type.

[0154] In some embodiments, the transmission module 905 is used to:

[0155] Dividing the composite frame into a plurality of sub-data;

[0156] Obtaining header information corresponding to multiple sub-data respectively;

[0157] Based on the header information, encapsulate the multiple sub-data respectively to obtain multiple fragmented data packets, where the fragmented data packets include the header information and the sub-data;

[0158] Send multiple fragmented data packets to the player.

[0159] In some embodiments, the transmission module 905 is used to:

[0160] Obtain the header field of the target transmission protocol, the sequence number and timestamp of the sub-data, where the sequence number is used to indicate the sending order of the sub-data and the timestamp is used to indicate the sampling time of the sub-data;

[0161] Based on the header field, sequence number and timestamp, generate header information corresponding to the sub-data.

[0162] In some embodiments, the encoding module 902 is used to:

[0163] Obtain video content data of a target video frame;

[0164] The color channel data, the transparent channel data and the video content data are encoded respectively to obtain a plurality of sub-frames.

[0165] The present application provides a video stream transmission device, which integrates subframes corresponding to color channel data and transparent channel data into a composite frame, so that when data is lost during the transmission of the composite frame, both the color channel data and the transparent channel data are lost, thereby avoiding the misalignment of video frames in the video stream, thereby improving the video playback effect.

[0166] Please refer to Fig.10 , which shows a block diagram of a video stream transmission device shown in an exemplary embodiment of the present application, the device includes:

[0167] The first receiving module 1001 is used to receive a composite frame;

[0168] A parsing module 1002 is used to parse the composite frame to obtain a target frame header and frame content, wherein the frame content includes multiple subframes, and the target frame header includes decoding information of the multiple subframes;

[0169] A decoding module 1003 is used to decode the frame content based on the decoding information of the multiple subframes to obtain color channel data and transparent channel data of the target video frame;

[0170] The display module 1004 is configured to display the target video frame based on the color channel data and the transparent channel data of the target video frame.

[0171] In some embodiments, the composite frame is transmitted in the form of a plurality of fragmented packets;

[0172] The device also includes:

[0173] A second receiving module, configured to receive at least one fragmented data packet, wherein the fragmented data packet includes sub-data and header information of the sub-data;

[0174] The execution module is used to perform the step of parsing the composite frame to obtain the target frame header and frame content when it is determined that there is no transmission error in the transmission process of the composite frame based on the header information respectively included in the at least one fragment data packet.

[0175] In some embodiments, the apparatus further comprises:

[0176] The discarding module is used to discard the composite frame when it is determined that there is a transmission error in the transmission process of the composite frame based on the header information respectively included in the at least one fragment data packet.

[0177] In some embodiments, the decoding module 1003 is used to:

[0178] Determine, based on the decoded information of the multiple subframes, the number of subframes of the multiple subframes included in the frame content and a first starting position of a first subframe of the multiple subframes in the composite frame;

[0179] Based on the number of subframes and the first starting position, determining a plurality of subframe headers and a plurality of frame data sequentially arranged in the frame content;

[0180] Based on the multiple subframe headers, determine the frame data corresponding to the multiple subframes respectively from the multiple frame data;

[0181] The frame data corresponding to the multiple subframes are decoded to obtain the color channel data and the transparent channel data.

[0182] In some embodiments, the decoding module 1003 is used to:

[0183] Decoding the frame data respectively corresponding to the multiple subframes to obtain the color channel data, the transparent channel data and the video content data of the target video frame;

[0184] The display module 1004 is used for:

[0185] The target video frame is displayed based on the color channel data, the transparency channel data and the video content data.

[0186] An embodiment of the present application provides a video stream transmission device. Since a composite frame is received, and the composite frame can be decoded to obtain color channel data and transparent channel data, the color channel data and transparent channel data of the video frame can be simultaneously obtained through the composite frame. Video playback is performed based on the color channel data and transparent channel data of the video frame, thereby avoiding the misalignment of video frames in the video stream, thereby improving the video playback effect.

[0187] Please refer to Fig.11 , which shows a structural block diagram of an electronic device 1100 provided by an exemplary embodiment of the present application. The electronic device 1100 may be a smart home, a wearable device, a television, a headset, a smart phone, a tablet computer, etc. The electronic device 1100 in the present application may include one or more of the following components: a processor 1110, a memory 1120, and a display screen 1130.

[0188] The processor 1110 may include one or more processing cores. The processor 1110 uses various interfaces and lines to connect the various parts of the entire electronic device 1100, and executes various functions and processes data of the electronic device 1100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1110 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content that needs to be displayed on the display screen 1130; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1110, but may be implemented by a separate chip.

[0189] The memory 1120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book), etc., created according to the use of the electronic device 1100.

[0190] The display screen 1130 is a display component for displaying a user interface. Optionally, the display screen 1130 is a display screen with a touch function, through which the user can use any suitable object such as a finger, a touch pen, etc. to perform touch operations on the display screen 1130.

[0191] The display screen 1130 is usually arranged on the front panel of the electronic device 1100. The display screen 1130 can be designed as a full screen, a curved screen, a special-shaped screen, a double-sided screen or a folding screen. The display screen 1130 can also be designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which is not limited in this embodiment.

[0192] In addition, those skilled in the art can understand that the structure of the electronic device 1100 shown in the above drawings does not constitute a limitation on the electronic device 1100, and the electronic device 1100 may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device 1100 also includes a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, Wi-Fi) module, a power supply, a Bluetooth module and other components, which will not be repeated here.

[0193] An embodiment of the present application further provides a computer-readable medium, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the video stream transmission method shown in the above embodiments.

[0194] An embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the video stream transmission method shown in the above embodiments.

[0195] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0196] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A video stream transmission method, characterized in that: The method comprises: Acquire color channel data and transparent channel data of a target video frame from a video stream, wherein the target video frame is a video frame currently to be transmitted in the video stream; Encoding the color channel data and the transparent channel data respectively to obtain a plurality of subframes; Obtaining the number of subframes of the multiple subframes and the first starting position of the first subframe of the multiple subframes in the composite frame; generating decoding information based on the number of subframes and the first starting position, the decoding information including the number of subframes and the first starting position, and the decoding information is used to decode the multiple subframes to obtain the color channel data and the transparent channel data; Determine a target frame header based on the decoding information, wherein the target frame header includes the decoding information of the plurality of subframes; Determine the subframe headers corresponding to the multiple subframes and the frame data corresponding to the multiple subframes; arrange the target frame header, the subframe headers corresponding to the multiple subframes and the frame data corresponding to the multiple subframes in sequence to obtain a composite frame, wherein the frame header of the composite frame is the target frame header, and the frame content is the subframe headers and frame data corresponding to the multiple subframes; Transmitting the composite frame to a playback end; The process of determining the subframe header of the subframe includes: Obtain the second starting position of the subframe header of the subframe in the composite frame, the second index identifier of the subframe in the composite frame, the third starting position of the frame data of the subframe in the composite frame, the length of the frame data of the subframe and the type of the subframe; generate the subframe header based on the second starting position, the second index identifier, the third starting position, the length and the type.

2. The method according to claim 1, characterized in that The step of determining a target frame header based on the decoded information comprises: Obtaining a first index identifier of the target video frame; The target frame header is generated based on the decoding information and the first index identifier.

3. The method according to claim 1, characterized in that The transmitting the composite frame to the playback end includes: Dividing the composite frame into a plurality of sub-data; Obtaining header information corresponding to each of the plurality of sub-data; Based on the header information, encapsulate the plurality of sub-data respectively to obtain a plurality of fragmented data packets, wherein the fragmented data packets include the header information and the sub-data; The multiple fragmented data packets are sent to the playback end.

4. The method according to claim 3, characterized in that The process of determining the header information corresponding to the sub-data includes: Acquire a header field of a target transmission protocol, a sequence number and a timestamp of the sub-data, wherein the sequence number is used to indicate a sending order of the sub-data, and the timestamp is used to indicate a sampling time of the sub-data; Based on the header field, the sequence number and the timestamp, header information corresponding to the sub-data is generated.

5. The method according to claim 1, characterized in that: The encoding of the color channel data and the transparent channel data respectively to obtain a plurality of subframes includes: Acquire video content data of the target video frame; The color channel data, the transparent channel data and the video content data are encoded respectively to obtain the multiple sub-frames.

6. A video stream transmission method, characterized in that: The method comprises: Receive composite frames; Parsing the composite frame to obtain a target frame header and frame content, wherein the frame content includes subframe headers and frame data corresponding to a plurality of subframes respectively, and the target frame header includes decoding information of the plurality of subframes; Determine, based on the decoded information of the multiple subframes, the number of subframes of the multiple subframes included in the frame content and a first starting position of a first subframe of the multiple subframes in the composite frame; Based on the number of subframes and the first starting position, determining a plurality of subframe headers and a plurality of frame data sequentially arranged in the frame content; Based on the multiple subframe headers, determine a second starting position of the subframe header of the subframe in the composite frame, a second index identifier of the subframe in the composite frame, a third starting position of the frame data of the subframe in the composite frame, a length of the frame data of the subframe, and a type of the subframe; Determine, from the multiple frame data, frame data corresponding to the multiple subframes respectively based on a second starting position of a subframe header of the subframe in the composite frame, a second index identifier of the subframe in the composite frame, a third starting position of frame data of the subframe in the composite frame, a length of the frame data of the subframe, and a type of the subframe; Decoding the frame data respectively corresponding to the multiple subframes to obtain color channel data and transparent channel data of the target video frame; The target video frame is displayed based on the color channel data and the transparent channel data of the target video frame.

7. The method according to claim 6, characterized in that The composite frame is transmitted in the form of multiple fragmented data packets; The method further comprises: receiving at least one fragmented data packet, the fragmented data packet comprising sub-data and header information of the sub-data; When it is determined that there is no transmission error in the composite frame during transmission based on the header information respectively included in the at least one fragment data packet, the step of parsing the composite frame to obtain the target frame header and frame content is performed.

8. The method according to claim 7, characterized in that The method further comprises: When it is determined that a transmission error occurs in the composite frame during transmission based on the header information respectively included in the at least one fragment data packet, the composite frame is discarded.

9. The method according to claim 6, characterized in that The decoding of the frame data respectively corresponding to the multiple subframes to obtain the color channel data and the transparent channel data of the target video frame includes: Decoding the frame data respectively corresponding to the multiple subframes to obtain the color channel data, the transparent channel data and the video content data of the target video frame; The step of displaying the target video frame based on the color channel data and the transparent channel data of the target video frame comprises: The target video frame is displayed based on the color channel data, the transparency channel data and the video content data.

10. A video stream transmission device, characterized in that: The device comprises: A first acquisition module, used to acquire color channel data and transparent channel data of a target video frame from a video stream, wherein the target video frame is a video frame currently to be transmitted in the video stream; An encoding module, used for encoding the color channel data and the transparent channel data respectively to obtain a plurality of subframes; A determination module, configured to obtain the number of subframes of the multiple subframes and a first starting position of a first subframe of the multiple subframes in the composite frame; based on the number of subframes and the first starting position, generate decoding information, the decoding information including the number of subframes and the first starting position, and the decoding information is used to decode the multiple subframes to obtain the color channel data and the transparent channel data; based on the decoding information, determine a target frame header, the target frame header including the decoding information of the multiple subframes; an integration module, configured to determine the subframe headers corresponding to the plurality of subframes and the frame data corresponding to the plurality of subframes; sequentially arrange the target frame header, the subframe headers corresponding to the plurality of subframes and the frame data corresponding to the plurality of subframes to obtain a composite frame, wherein the frame header of the composite frame is the target frame header, and the frame content is the subframe headers and the frame data corresponding to the plurality of subframes; A transmission module, used for transmitting the composite frame to a playback end; A second acquisition module is used to acquire a second starting position of a subframe header of the subframe in the composite frame, a second index identifier of the subframe in the composite frame, a third starting position of frame data of the subframe in the composite frame, a length of the frame data of the subframe, and a type of the subframe; A generating module is used to generate the subframe header based on the second starting position, the second index identifier, the third starting position, the length and the type.

11. The device according to claim 10, characterized in that The determination module is used to obtain a first index identifier of the target video frame; and generate the target frame header based on the decoding information and the first index identifier.

12. The device according to claim 10, characterized in that The transmission module is used to divide the composite frame into a plurality of sub-data; obtain header information corresponding to the plurality of sub-data respectively; based on the header information, respectively encapsulate the plurality of sub-data to obtain a plurality of fragmented data packets, wherein the fragmented data packets include the header information and the sub-data; The multiple fragmented data packets are sent to the playback end.

13. The device according to claim 12, characterized in that The transmission module is used to obtain a header field of a target transmission protocol, a sequence number and a timestamp of the sub-data, wherein the sequence number is used to indicate a sending order of the sub-data, and the timestamp is used to indicate a sampling time of the sub-data; Based on the header field, the sequence number and the timestamp, header information corresponding to the sub-data is generated.

14. The device according to claim 10, characterized in that The encoding module is used to obtain the video content data of the target video frame; encode the color channel data, the transparent channel data and the video content data respectively to obtain the multiple sub-frames.

15. A video stream transmission device, characterized in that: The device comprises: A first receiving module, used for receiving a composite frame; A parsing module, used to parse the composite frame to obtain a target frame header and frame content, wherein the frame content includes subframe headers and frame data corresponding to a plurality of subframes respectively, and the target frame header includes decoding information of the plurality of subframes; A decoding module, used to determine the number of subframes of the multiple subframes included in the frame content and the first starting position of the first subframe of the multiple subframes in the composite frame based on the decoding information of the multiple subframes; determine the multiple subframe headers and multiple frame data arranged in sequence in the frame content based on the number of subframes and the first starting position; determine the second starting position of the subframe header of the subframe in the composite frame, the second index mark of the subframe in the composite frame, the third starting position of the frame data of the subframe in the composite frame, the length of the frame data of the subframe and the type of the subframe based on the multiple subframe headers; determine the frame data corresponding to the multiple subframes from the multiple frame data based on the second starting position of the subframe header of the subframe in the composite frame, the second index mark of the subframe in the composite frame, the third starting position of the frame data of the subframe in the composite frame, the length of the frame data of the subframe and the type of the subframe; decode the frame data corresponding to the multiple subframes to obtain the color channel data and transparent channel data of the target video frame; The display module is used to display the target video frame based on the color channel data and the transparent channel data of the target video frame.

16. The device according to claim 15, characterized in that The composite frame is transmitted in the form of multiple fragmented data packets; The device also includes: A second receiving module, configured to receive at least one fragmented data packet, wherein the fragmented data packet includes sub-data and header information of the sub-data; The execution module is used to perform the step of parsing the composite frame to obtain the target frame header and frame content when it is determined that there is no transmission error in the transmission process of the composite frame based on the header information respectively included in the at least one fragment data packet.

17. The device according to claim 16, characterized in that The device also includes: The discarding module is used to discard the composite frame when it is determined that there is a transmission error in the transmission process of the composite frame based on the header information respectively included in the at least one fragment data packet.

18. The device according to claim 15, characterized in that The decoding module is used to decode the frame data corresponding to the multiple subframes respectively to obtain the color channel data, the transparent channel data and the video content data of the target video frame; The display module is used to display the target video frame based on the color channel data, the transparent channel data and the video content data.

19. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the video stream transmission method according to any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that: At least one program code is stored in the storage medium, and the at least one program code is loaded and executed by the processor to implement the video stream transmission method according to any one of claims 1 to 9.

21. A computer program product, characterized in that The computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the video stream transmission method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method for improving receiving performance of mobile multimedia broadcasting terminal

    CN101072360A

  • Video transmitting device and video playing device

    US20180255308A1