Rtmp video stream pushing method and device based on msdk technology and medium
Through MSDK technology, the RTMP protocol and H.264 decoding are used to realize the stable live streaming of drone videos, solving the stability of drone video streaming and the needs of multiple people to view, and providing cross-platform and cross-platform Audio and video communication solutions for devices.
Patent Information
- Application Number
- CN202411709469.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-27
Smart Images

Figure CN119211591A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrical communication technology, and in particular to an RTMP video streaming method, device and medium based on the MSDK technology. Background Art
[0002] In recent years, with the popularization of mobile Internet and the explosion of the live broadcast industry, more and more users have begun to watch and share audio and video content through live broadcast platforms. As one of the core technologies of the live broadcast industry, RTMP video streaming technology has been widely used and developed rapidly. With the diversification of smart devices, users have an increasing demand for cross-platform and cross-device audio and video communication. The RTMP protocol supports a variety of operating systems and platforms, allowing RTMP video streaming technology to meet this demand. After years of optimization and accumulation, MSDK technology provides stable and reliable audio and video processing and network transmission functions, which enables RTMP video streaming technology to maintain efficient and stable transmission performance in complex network environments. At present, it is difficult to directly and stably live stream the videos collected by drones. When there is a need for multiple people to view the videos, an optional method is to push them to others by uploading the videos. This method has spatial and temporal limitations. Therefore, the present invention proposes an RTMP video streaming method, device and medium based on MSDK technology. Summary of the invention
[0003] The purpose of the present invention is to propose an RTMP video streaming method, device and medium based on MSDK technology to solve the problem of difficulty in stably streaming drone videos proposed in the above background technology.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions: The rtmp video streaming method based on msdk technology includes: Step S1, collecting raw video data through the target drone and setting stream parameters for the raw video data; Step S2, encapsulating the original video data in combination with the Stream parameter of the original video data to obtain an encapsulated encoded video; Step S3, the live streaming device performs H.264 decoding on the encapsulated coded video based on the MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated coded video; Step S4, the live streaming device obtains the decoded streaming video, and streams the decoded streaming video to the live streaming platform through the RTMP protocol; Step S5: The user searches and watches the decoded streaming video through the live broadcast platform, so that multiple people can simultaneously view the video images captured by the drone at multiple locations.
[0005] Furthermore, the step S2 includes the following sub-steps: Step S21, obtaining original video data, and dividing the original video data into a plurality of original video frames; Step S22, calculating pixel difference values between adjacent video frames; Step S23, comparing the pixel difference value between adjacent video frames with the pixel difference threshold; Step S24, if the pixel difference value is less than or equal to the pixel difference threshold, the corresponding adjacent video frames are recorded as an initial video frame group; If the pixel difference value is greater than the pixel difference threshold, the next video frame is recorded as another initial video frame group; and then a plurality of initial video frame groups corresponding to the original video data are obtained.
[0006] Furthermore, the step S2 further includes the following sub-steps: Step S25, for any initial video frame group, record the first initial video frame as a feature frame, and process the remaining initial video frames in the order of forward reference frame-forward reference frame-bidirectional reference frame to obtain a processed video frame group; Forward reference frame: Compresses the previous video frame based on the current video frame, and only stores the difference information with the previous frame; Bidirectional reference frame: compresses the previous video frame and the next video frame based on the current video frame, and stores the difference information between the previous video frame and the next video frame; Step S26, splicing the processed video frame groups to obtain a packaged encoded video, and sending the packaged encoded video to the live streaming device.
[0007] Furthermore, the calculation process of the pixel difference value in step S22 is specifically as follows: Step S221, obtaining the pixel value of each pixel between two adjacent video frames, recording the pixel value of the pixel in the previous video frame as XSqi, and recording the pixel value of the pixel in the next video frame as XShi; Wherein, i represents the number of the pixel point, i=1, 2, ..., n, and n is the upper limit of the pixel point number; since adjacent video frames are segmented from the same video, the number of pixels corresponding to all video frames is the same; Step S222, calculating the pixel difference value XSC between adjacent video frames by a formula, the specific formula is: .
[0008] Furthermore, the step S3 includes the following sub-steps: Step S31, obtaining the encapsulated encoded video, and obtaining a plurality of processed video frame groups corresponding to the encapsulated encoded video; Step S32, obtaining an MSDK decoder, and importing a plurality of processed video frame groups into the MSDK decoder in chronological order; Step S33, for the feature frame, directly read the image corresponding to the feature frame and record it as the first reference frame; Step S34, for the first forward reference frame after the feature frame, read the first forward reference frame, and then superimpose the forward reference frame with the first reference frame to obtain a second reference frame; Step S35: for the second forward reference frame after the feature frame, read the second forward reference frame, and then superimpose the second forward reference frame with the second reference frame to obtain a third reference frame; Step S36, for the bidirectional reference frame, read the bidirectional reference frame and the first forward reference frame after the bidirectional reference frame; superimpose the bidirectional reference frame with the third reference frame and the first forward reference frame after the bidirectional reference frame to obtain a fourth reference frame; Step S37, and so on until the decoding of one processed video frame group is completed, and then the next processed video frame group is read; Step S38, complete the decoding of all processed video frame groups, and splice all reference frames in chronological order to obtain decoded streaming video.
[0009] Furthermore, the step S4 includes the following sub-steps: Step S41, the live streaming device establishes a handshake connection with the live streaming platform; Step S42, the live streaming device establishes a network connection with the live streaming platform; Step S43, the live streaming device sends a "create network stream" command to the live streaming platform, and after receiving the "create network stream" command, the live streaming platform responds with the result of the "create network stream" command; Step S44, the live streaming device obtains the length of the network stream from the live streaming platform and creates the network stream; wherein the network stream is used to transmit video or audio between the live streaming device and the live streaming platform; Step S45, the live streaming device sends a "play" command to the live streaming platform, and after receiving the "play" command, the platform sends the ID corresponding to the network stream to the live streaming device; Step S46, after receiving the ID corresponding to the network stream, the live streaming device searches for the corresponding network stream through the ID and transmits the decoded streaming video to the live streaming platform through the network stream; Step S47, after receiving the decoded push streaming video, the live streaming platform pushes and plays the decoded push streaming video to realize live streaming.
[0010] Furthermore, the handshake connection process in step S41 is specifically as follows: Step S411, the live streaming device sends a first streaming signal and a second streaming signal to the live streaming platform; Step S412: If the live streaming platform first receives the first streaming signal or the second streaming signal, the first live streaming signal and the second live streaming signal are sent to the live streaming device; Step S413: After receiving the first live broadcast signal and the second live broadcast signal, the live broadcast streaming device sends a third streaming signal to the live broadcast platform; Step S414: If the live streaming platform receives the other signal of the first streaming signal and the second streaming signal, a third live streaming signal is sent to the live streaming device; Step S415: the live streaming device receives the third live streaming signal, the live streaming platform receives the third streaming signal, and the handshake connection is established.
[0011] Furthermore, the network connection process in step S42 is specifically as follows: Step S421, the live streaming device sends a network connection request to the live streaming platform; Step S422, the live broadcast platform receives the network connection request, and then the live broadcast platform sets the sending bandwidth size of the live broadcast streaming device and the size of the data block received by the live broadcast platform; Step S423: The live streaming device sets the size of the data block to be sent and completes the establishment of the network connection.
[0012] A computer device, comprising: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the above method is implemented.
[0013] A computer-readable storage medium stores a computer program, which is used by a processor to execute the above method.
[0014] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: The present invention firstly collects original video data through a target drone, sets a code stream Stream parameter for the original video data, and then encapsulates the original video data in combination with the Stream parameter of the original video data to obtain an encapsulated coded video, and then uses a live streaming device to perform H.264 decoding on the encapsulated coded video based on an MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated coded video, and streams the decoded streaming video to a live streaming platform through an RTMP protocol. Finally, users search and watch the decoded streaming video through the live streaming platform, thereby realizing the requirement of multiple points and multiple people viewing the video images collected by the drone at the same time. The present invention realizes stable streaming of drone videos. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0016] Figure 1 is a flow chart of the method of the present invention; Figure 2 It is a schematic diagram of the composition of the video frame group in the present invention; Figure 3 A schematic diagram of a process for establishing a handshake connection between a live streaming device and a live streaming platform in the present invention; Figure 4 It is a structural schematic diagram of the computer device in the present invention. DETAILED DESCRIPTION
[0017] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Example 1: Please refer to Figure 1-Figure 3 The technical solution provided by the present invention is: an rtmp video streaming method based on msdk technology, wherein the msdk technology is composed of the abbreviations of M30 (product model), DJI RC (remote controller), and Android SDK (software development kit), and rtmp is the abbreviation of real-time messaging protocol, which is a protocol for real-time transmission of audio, video and data streams on the Internet; The method includes a target drone for collecting raw video data and a live streaming device for live streaming. The method is as follows: Step S1, collecting raw video data through a target drone, and setting stream parameters for the raw video data; wherein the stream parameters specifically include resolution, bit rate, encoding format, and color depth, etc.; Resolution refers to the number of pixels contained in a unit length. The higher the resolution, the more detailed the encapsulated encoded video; bit rate refers to the data flow used by the encapsulated encoded video per unit time. The higher the bit rate, the better the video quality, but at the same time it occupies more bandwidth and storage space; encoding format refers to the compression format of the encapsulated encoded video. The preferred encoding format in this embodiment is H.264; color depth refers to the number of bits used to store the color of 1 pixel in the encapsulated encoded video. The higher the color depth, the richer the color expression of the image.
[0019] Step S2, encapsulating the original video data in combination with the Stream parameter of the original video data to obtain an encapsulated encoded video; In this embodiment, step S2 includes the following sub-steps: Step S21, obtaining original video data, and dividing the original video data into a plurality of original video frames; Step S22, calculating the pixel difference value between adjacent video frames, the calculation process is as follows: Step S221, obtaining the pixel value of each pixel between two adjacent video frames, recording the pixel value of the pixel in the previous video frame as XSqi, and recording the pixel value of the pixel in the next video frame as XShi; Wherein, i represents the number of the pixel point, i=1, 2, ..., n, and n is the upper limit of the pixel point number; since adjacent video frames are segmented from the same video, the number of pixels corresponding to all video frames is the same; Step S222, calculating the pixel difference value XSC between adjacent video frames by a formula, the specific formula is: ; Step S23, comparing the pixel difference value between adjacent video frames with the pixel difference threshold; Step S24, if the pixel difference value is less than or equal to the pixel difference threshold, the corresponding adjacent video frames are recorded as an initial video frame group; If the pixel difference value is greater than the pixel difference threshold, the next video frame is recorded as another initial video frame group; and then multiple initial video frame groups corresponding to the original video data are obtained, and each initial video frame group is recorded as SPZs, where s represents the number of the initial video frame group; Step S25, see Figure 2 As shown, for any initial video frame group, the first initial video frame is recorded as a feature frame, and the remaining initial video frames are processed in the order of forward reference frame-forward reference frame-bidirectional reference frame to obtain a processed video frame group; Forward reference frame: Compresses the previous video frame based on the current video frame, and only stores the difference information with the previous frame; Bidirectional reference frame: compresses the previous video frame and the next video frame based on the current video frame, and stores the difference information between the previous video frame and the next video frame; Step S26, splicing the processed video frame groups to obtain a packaged encoded video, and sending the packaged encoded video to the live streaming device.
[0020] Step S3, the live streaming device performs H.264 decoding on the encapsulated coded video based on the MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated coded video; wherein the MSDK decoder is installed in the live streaming device; In this embodiment, step S3 includes the following sub-steps: Step S31, obtaining the encapsulated encoded video, and obtaining a plurality of processed video frame groups corresponding to the encapsulated encoded video; Step S32, obtaining an MSDK decoder, and importing a plurality of processed video frame groups into the MSDK decoder in chronological order; Step S33, for the feature frame, directly read the image corresponding to the feature frame and record it as the first reference frame; Step S34, for the first forward reference frame after the feature frame, read the first forward reference frame, and then superimpose the forward reference frame with the first reference frame to obtain a second reference frame; Step S35: for the second forward reference frame after the feature frame, read the second forward reference frame, and then superimpose the second forward reference frame with the second reference frame to obtain a third reference frame; Step S36, for the bidirectional reference frame, read the bidirectional reference frame and the first forward reference frame after the bidirectional reference frame; superimpose the bidirectional reference frame with the third reference frame and the first forward reference frame after the bidirectional reference frame to obtain a fourth reference frame; Step S37, and so on until the decoding of one processed video frame group is completed, and then the next processed video frame group is read; Step S38, complete the decoding of all processed video frame groups, and splice all reference frames in chronological order to obtain decoded streaming video.
[0021] Step S4, the live streaming device obtains the decoded streaming video, and streams the decoded streaming video to the live streaming platform through the RTMP protocol; In this embodiment, step S4 includes the following sub-steps: Step S41, as Figure 3 As shown, the live streaming device and the live streaming platform establish a handshake connection; wherein the handshake connection can be used for the live streaming device and the live streaming platform to mutually verify each other's identity, thereby ensuring the smooth transmission of subsequent data; The handshake connection process in step S41 is specifically as follows: Step S411, the live streaming device sends a first streaming signal and a second streaming signal to the live streaming platform; Step S412: If the live streaming platform first receives the first streaming signal or the second streaming signal, the first live streaming signal and the second live streaming signal are sent to the live streaming device; Step S413: After receiving the first live broadcast signal and the second live broadcast signal, the live broadcast streaming device sends a third streaming signal to the live broadcast platform; Step S414: If the live streaming platform receives the other signal of the first streaming signal and the second streaming signal, a third live streaming signal is sent to the live streaming device; Step S415: the live streaming device receives the third live streaming signal, the live streaming platform receives the third streaming signal, and the handshake connection is established; Step S42, the live streaming device establishes a network connection with the live streaming platform; The step S42 includes the following sub-steps: Step S421, the live streaming device sends a network connection request to the live streaming platform; Step S422, the live broadcast platform receives the network connection request, and then the live broadcast platform sets the sending bandwidth size of the live broadcast streaming device and the size of the data block received by the live broadcast platform; Step S423, the live streaming device sets the size of the data block to be sent, and completes the establishment of the network connection; Step S43, the live streaming device sends a "create network stream" command to the live streaming platform, and after receiving the "create network stream" command, the live streaming platform responds with the result of the "create network stream" command; Step S44, the live streaming device obtains the length of the network stream from the live streaming platform and creates the network stream; wherein the network stream is used to transmit video or audio between the live streaming device and the live streaming platform; Step S45, the live streaming device sends a "play" command to the live streaming platform, and after receiving the "play" command, the platform sends the ID corresponding to the network stream to the live streaming device; Step S46, after receiving the ID corresponding to the network stream, the live streaming device searches for the corresponding network stream through the ID and transmits the decoded streaming video to the live streaming platform through the network stream; Step S47, after receiving the decoded push streaming video, the live streaming platform pushes and plays the decoded push streaming video to realize live streaming.
[0022] Step S5: The user searches and watches the decoded streaming video through the live broadcast platform, so that multiple people can simultaneously view the video images captured by the drone at multiple locations.
[0023] In this application, if corresponding calculation formulas appear, the above calculation formulas are all dimensionless and take their numerical calculations. The weight coefficients, proportional coefficients and other coefficients in the formulas are set to a result value obtained by quantifying each parameter. The size of the weight coefficient and the proportional coefficient can be determined as long as it does not affect the proportional relationship between the parameter and the result value.
[0024] Embodiment 2: Figure 4The structural diagram of a computer device is illustrated, and the computer device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The processor may call the logic instructions in the memory to execute the RTMP video streaming method based on the MSDK technology, and the method includes: collecting original video data through a target drone, setting a stream parameter for the original video data; encapsulating the original video data in combination with the stream parameter of the original video data to obtain an encapsulated coded video; the live streaming device decodes the encapsulated coded video in H.264 based on the MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated coded video; the live streaming device obtains the decoded streaming video, and streams the decoded streaming video to the live streaming platform through the RTMP protocol; the user searches and watches the decoded streaming video through the live streaming platform, so as to realize the requirement of multiple points and multiple people to view the video images collected by the drone at the same time.
[0025] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0026] Embodiment 3: The present application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the RTMP video streaming method based on the MSDK technology provided by the above methods, and the method includes: collecting original video data through a target drone, and setting a stream Stream parameter for the original video data; encapsulating the original video data in combination with the Stream parameter of the original video data to obtain an encapsulated encoded video; the live streaming device performs H.264 decoding on the encapsulated encoded video based on the MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated encoded video; the live streaming device obtains the decoded streaming video, and streams the decoded streaming video to the live streaming platform through the RTMP protocol; users search and watch the decoded streaming video through the live streaming platform, so as to realize the need of multiple points and multiple people to view the video images collected by the drone at the same time.
[0027] Embodiment 4: The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned RTMP video streaming method based on the MSDK technology, the method comprising: collecting original video data through a target drone, and setting a stream Stream parameter for the original video data; encapsulating the original video data in combination with the Stream parameter of the original video data to obtain an encapsulated encoded video; a live streaming device performs H.264 decoding on the encapsulated encoded video based on an MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated encoded video; the live streaming device obtains the decoded streaming video, and streams the decoded streaming video to a live streaming platform through the RTMP protocol; users search and watch the decoded streaming video through the live streaming platform, thereby realizing the need for multiple points and multiple people to simultaneously view the video images collected by the drone.
[0028] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0029] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0030] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. The rtmp video streaming method based on msdk technology is characterized by: include: Step S1, collecting raw video data through the target drone and setting stream parameters for the raw video data; Step S2, encapsulating the original video data in combination with the Stream parameter of the original video data to obtain an encapsulated encoded video; Step S3, the live streaming device performs H.264 decoding on the encapsulated coded video based on the MSDK decoder to obtain a decoded streaming video corresponding to the encapsulated coded video; Step S4, the live streaming device obtains the decoded streaming video, and streams the decoded streaming video to the live streaming platform through the RTMP protocol; Step S5: The user searches and watches the decoded streaming video through the live broadcast platform, so that multiple people can simultaneously view the video images captured by the drone at multiple locations.
2. The rtmp video streaming method based on msdk technology according to claim 1 is characterized in that: The step S2 includes the following sub-steps: Step S21, obtaining original video data, and dividing the original video data into a plurality of original video frames; Step S22, calculating pixel difference values between adjacent video frames; Step S23, comparing the pixel difference value between adjacent video frames with the pixel difference threshold; Step S24, if the pixel difference value is less than or equal to the pixel difference threshold, the corresponding adjacent video frames are recorded as an initial video frame group; If the pixel difference value is greater than the pixel difference threshold, the next video frame is recorded as another initial video frame group; and then a plurality of initial video frame groups corresponding to the original video data are obtained.
3. The rtmp video streaming method based on msdk technology according to claim 2 is characterized in that: The step S2 further comprises the following sub-steps: Step S25, for any initial video frame group, record the first initial video frame as a feature frame, and process the remaining initial video frames in the order of forward reference frame-forward reference frame-bidirectional reference frame to obtain a processed video frame group; Forward reference frame: Compresses the previous video frame based on the current video frame, and only stores the difference information with the previous frame; Bidirectional reference frame: compresses the previous video frame and the next video frame based on the current video frame, and stores the difference information between the previous video frame and the next video frame; Step S26, splicing the processed video frame groups to obtain a packaged encoded video, and sending the packaged encoded video to the live streaming device.
4. The rtmp video streaming method based on msdk technology according to claim 2 is characterized in that: The calculation process of the pixel difference value in step S22 is specifically as follows: Step S221, obtaining the pixel value of each pixel between two adjacent video frames, recording the pixel value of the pixel in the previous video frame as XSqi, and recording the pixel value of the pixel in the next video frame as XShi; Wherein, i represents the number of the pixel point, i=1, 2, ..., n, and n is the upper limit of the pixel point number; since adjacent video frames are segmented from the same video, the number of pixels corresponding to all video frames is the same; Step S222, calculating the pixel difference value XSC between adjacent video frames by a formula, the specific formula is: 。 5. The rtmp video streaming method based on msdk technology according to claim 3 is characterized in that: The step S3 includes the following sub-steps: Step S31, obtaining the encapsulated encoded video, and obtaining a plurality of processed video frame groups corresponding to the encapsulated encoded video; Step S32, obtaining an MSDK decoder, and importing a plurality of processed video frame groups into the MSDK decoder in chronological order; Step S33, for the feature frame, directly read the image corresponding to the feature frame and record it as the first reference frame; Step S34, for the first forward reference frame after the feature frame, read the first forward reference frame, and then superimpose the forward reference frame with the first reference frame to obtain a second reference frame; Step S35: for the second forward reference frame after the feature frame, read the second forward reference frame, and then superimpose the second forward reference frame with the second reference frame to obtain a third reference frame; Step S36, for the bidirectional reference frame, read the bidirectional reference frame and the first forward reference frame after the bidirectional reference frame; superimpose the bidirectional reference frame with the third reference frame and the first forward reference frame after the bidirectional reference frame to obtain a fourth reference frame; Step S37, and so on until the decoding of one processed video frame group is completed, and then the next processed video frame group is read; Step S38, complete the decoding of all processed video frame groups, and splice all reference frames in chronological order to obtain decoded streaming video.
6. The rtmp video streaming method based on msdk technology according to claim 5 is characterized in that: The step S4 includes the following sub-steps: Step S41, the live streaming device establishes a handshake connection with the live streaming platform; Step S42, the live streaming device establishes a network connection with the live streaming platform; Step S43, the live streaming device sends a "create network stream" command to the live streaming platform, and after receiving the "create network stream" command, the live streaming platform responds with the result of the "create network stream" command; Step S44, the live streaming device obtains the length of the network stream from the live streaming platform and creates the network stream; wherein the network stream is used to transmit video or audio between the live streaming device and the live streaming platform; Step S45, the live streaming device sends a "play" command to the live streaming platform, and after receiving the "play" command, the platform sends the ID corresponding to the network stream to the live streaming device; Step S46, after receiving the ID corresponding to the network stream, the live streaming device searches for the corresponding network stream through the ID and transmits the decoded streaming video to the live streaming platform through the network stream; Step S47, after receiving the decoded push streaming video, the live streaming platform pushes and plays the decoded push streaming video to realize live streaming.
7. The rtmp video streaming method based on msdk technology according to claim 6 is characterized in that: The handshake connection process in step S41 is specifically as follows: Step S411, the live streaming device sends a first streaming signal and a second streaming signal to the live streaming platform; Step S412: If the live streaming platform first receives the first streaming signal or the second streaming signal, the first live streaming signal and the second live streaming signal are sent to the live streaming device; Step S413: After receiving the first live broadcast signal and the second live broadcast signal, the live broadcast streaming device sends a third streaming signal to the live broadcast platform; Step S414: If the live streaming platform receives the other signal of the first streaming signal and the second streaming signal, a third live streaming signal is sent to the live streaming device; Step S415: the live streaming device receives the third live streaming signal, the live streaming platform receives the third streaming signal, and the handshake connection is established.
8. The rtmp video streaming method based on msdk technology according to claim 6 is characterized in that: The network connection process in step S42 is specifically as follows: Step S421, the live streaming device sends a network connection request to the live streaming platform; Step S422, the live broadcast platform receives the network connection request, and then the live broadcast platform sets the sending bandwidth size of the live broadcast streaming device and the size of the data block received by the live broadcast platform; Step S423: The live streaming device sets the size of the data block to be sent and completes the establishment of the network connection.
9. A computer device, characterized in that: The computer device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and when the computer program is executed by the processor, the method described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Video decoding method and device
CN111246214A
RTMP-based low-delay live broadcast method
CN112887750A
Online unmanned aerial vehicle live broadcast method and device, storage medium and electronic equipment
CN113973212A
Game data processing method and apparatus, and storage medium
US20230256345A1