Video stream real-time transcoding and distribution method and device, equipment and storage medium

By dynamically adjusting the transcoding parameters of the video stream to adapt to changes in the user-side network, the problems of high resource consumption and poor network adaptability of the existing video transcoding system are solved, and low latency and smooth video stream distribution are achieved.

CN120223898APending Publication Date: 2025-06-27HAINAN HAILAN HUANYU MARINE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510375857.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The existing video transcoding system consumes high resources and cannot dynamically adjust the resolution, frame rate and other parameters to adapt to complex network environments, resulting in poor latency and weak network adaptability.

Method used

By obtaining the on-demand trigger signal from the user, pushing the original video stream and analyzing its basic information, establishing a variety of transcoding parameter combinations, selecting alternative combinations based on the current transcoding processing capabilities, transcoding in real time and periodically obtaining the network bandwidth of the user side, and dynamically adjusting the video stream to adapt to network changes.

Benefits of technology

It reduces the video acquisition delay, improves the weak network adaptability of video stream distribution, avoids excessive resource consumption, and ensures the smoothness of the playback process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120223898A_ABST
    Figure CN120223898A_ABST
Patent Text Reader

Abstract

A video stream real-time transcoding and distribution method, apparatus and device, and a storage medium, the method comprising: if a video-on-demand trigger signal of a user side is obtained, accessing a corresponding photoelectric address according to the video-on-demand trigger signal to obtain an original video stream and basic information of the original video stream; establishing a plurality of transcoding parameter combinations for transcoding different video stream formats; pushing the original video stream to a user side; selecting one or more transcoding parameter combinations as alternative transcoding combinations according to the current transcoding processing capability; synchronously transcoding the original video stream into a corresponding alternative video stream according to the alternative transcoding combination; periodically acquiring the window bandwidth condition of the network of the user side in the first time period; determining a target switching video stream corresponding to the window bandwidth condition according to a preset mapping relationship; and pushing the video to the streaming user side to replace the currently pushed video. According to the scheme, the video stream suitable for the network bandwidth condition can be quickly and smoothly pushed to the user side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of video transcoding and distribution, and specifically relates to a method, device, equipment, and storage medium for real-time transcoding and distribution of video streams. Background Art

[0002] With the surge in demand for high-definition videos and the popularity of streaming media applications, traditional video transcoding systems face the following bottlenecks:

[0003] High resource consumption: Real-time transcoding relies on high-performance servers, and fixed bitrate templates lead to redundant calculations, increasing hardware costs and latency.

[0004] Poor adaptability to weak networks: Existing technologies are mostly based on simple bitrate switching (such as HLS layering) and cannot dynamically adjust multiple parameters such as resolution and frame rate to adapt to complex network environments. Summary of the Invention

[0005] This application provides a method, device, equipment, and storage medium for real-time transcoding and distribution of video streams, which can solve the related problems existing in the prior art.

[0006] In a first aspect, an embodiment of this application provides a method for real-time transcoding and distribution of video streams, adopting the following technical solution:

[0007] A method for real-time transcoding and distribution of video streams, which includes:

[0008] If a on-demand trigger signal from the user end is obtained, access its corresponding optical and electrical address according to the on-demand trigger signal to obtain the original video stream, and parse the basic information of the original video stream;

[0009] According to the basic information of the original video stream, establish multiple transcoding parameter combinations for transcoding different video stream formats;

[0010] Push the original video stream to the user end;

[0011] According to the current transcoding processing ability, select at least one or more transcoding parameter combinations closest to the original video stream as alternative transcoding combinations;

[0012] According to one or more of the alternative transcoding combinations, synchronously transcode the original video stream into the corresponding one or more alternative video streams;

[0013] Periodically obtain the window bandwidth situation of the network at the user end within a set first time period;

[0014] According to the mapping relationship between the preset network bandwidth and multiple transcoding parameter combinations, determine the transcoding parameter combination corresponding to the window bandwidth situation and its corresponding alternative video stream from the selected video streams as the target switching video stream;

[0015] Push the target switched video stream to the streaming client to replace the currently pushed video.

[0016] In combination with the first aspect, in one embodiment, before periodically obtaining the window bandwidth condition of the network of the client within a set first time period, the following steps are included:

[0017] Obtain the instantaneous network bandwidth condition of the client, and based on the instantaneous network bandwidth condition, determine whether it is necessary to adjust the alternative transcoding combination, and when necessary, make adjustments and synchronously adjust the transcoded alternative video streams.

[0018] In combination with the first aspect, in one embodiment, in the determining whether it is necessary to adjust the alternative transcoding combination according to the instantaneous network bandwidth condition,

[0019] Determine the transcoding parameter combination corresponding to the instantaneous network bandwidth condition from the mapping relationship between the preset network bandwidth and multiple transcoding parameter combinations;

[0020] Judge whether the transcoding parameter combination corresponding to the instantaneous network bandwidth condition and multiple transcoding parameter combinations near this combination are consistent with the alternative transcoding combination;

[0021] If so, there is no need to adjust the alternative transcoding combination;

[0022] If not, it is necessary to adjust the alternative transcoding combination to the transcoding parameter combination corresponding to the instantaneous network bandwidth condition and multiple transcoding parameter combinations near this combination.

[0023] In combination with the first aspect, in one embodiment, in the adjusting the alternative transcoding combination to the transcoding parameter combination corresponding to the instantaneous network bandwidth condition and multiple transcoding parameter combinations near this combination,

[0024] The multiple transcoding parameter combinations nearby include at least one transcoding parameter combination that is better than and at least one transcoding parameter combination that is worse than the transcoding parameter combination corresponding to the instantaneous network bandwidth condition.

[0025] In combination with the first aspect, in one embodiment, in the if a on-demand trigger signal of the client is obtained, accessing its corresponding optical and electrical address according to the on-demand trigger signal to obtain the original video stream, and parsing to obtain the basic information of the original video stream,

[0026] The basic information of the original video stream includes resolution, bit rate, frame rate, and I-frame interval.

[0027] In combination with the first aspect, in one embodiment, in the establishing multiple transcoding parameter combinations for transcoding different video stream formats according to the basic information of the original video stream,

[0028] Combining and enumerating the basic information of the original video stream and various sets of resolution, bit rate, frame rate, and I-frame interval lower than the basic information of the original video stream to obtain various combinations of the transcoding parameters.

[0029] Combined with the first aspect, in an implementation manner, in the step of selecting at least one or more transcoding parameter combinations closest to the original video stream as the alternative transcoding combinations according to the current transcoding processing capability,

[0030] Determine the number and specific combination categories of multiple transcoding parameter combinations closest to the original video stream according to the magnitude relationship between the current transcoding processing capability and a plurality of preset processing capability thresholds.

[0031] In a second aspect, an embodiment of the present application provides a video stream real-time transcoding and distribution device, adopting the following technical solution:

[0032] A transcoding module, configured to establish various transcoding parameter combinations for transcoding different video stream formats according to the basic information of the original video stream; and select at least one or more transcoding parameter combinations closest to the original video stream as alternative transcoding combinations according to the current transcoding processing capability;

[0033] A distribution module, configured to push the original video stream to the user side; synchronously transcode the original video stream into one or more alternative video streams according to one or more of the alternative transcoding combinations; periodically obtain the window bandwidth condition of the network at the user side within a set first time period; determine, according to the mapping relationship between the preset network bandwidth and various transcoding parameter combinations, the transcoding parameter combination corresponding to the window bandwidth condition and its corresponding alternative video stream as the target switching video stream from the alternative video streams; and push the target switching video stream to the user side of the stream to replace the currently pushed video.

[0034] In a third aspect, an embodiment of the present application provides a video stream real-time transcoding and distribution device, adopting the following technical solution:

[0035] A video stream real-time transcoding and distribution device, the video stream real-time transcoding and distribution device includes a processor, a memory, and a video stream real-time transcoding and distribution program stored on the memory and executable by the processor, wherein when the video stream real-time transcoding and distribution program is executed by the processor, the steps of the video stream real-time transcoding and distribution method as described above are implemented.

[0036] In a fourth aspect, an embodiment of the present application provides a storage medium, adopting the following technical solution:

[0037] A storage medium stores a real-time transcoding and distribution program for video streams. When the real-time transcoding and distribution program for video streams is executed by a processor, the steps of the real-time transcoding and distribution method for video streams as described above are implemented.

[0038] The beneficial effects brought by the technical solutions provided in the embodiments of the present application include:

[0039] After receiving the on-demand trigger signal from the client, the original video stream is first pushed to the client in the first time, ensuring that the client can receive the video picture in the first time and greatly reducing the latency time when obtaining the picture.

[0040] At the same time, in this process, different alternative video streams will be transcoded in real time according to the information of the original video stream. The picture quality parameters of these alternative video streams will be lower than those of the original video stream. After the network window bandwidth situation of the client in the first time period can be mastered subsequently, the video stream can be switched in time according to the real state of the client network situation, and the alternative video stream version more suitable for the client is pushed, realizing strong adaptability to weak networks in the video stream distribution process. And since the alternative video streams are transcoded synchronously during the switching process, there will be no freezing situation, and the overall playback process can proceed smoothly.

[0041] On the other hand, during the real-time transcoding process of the alternative video streams, it will also be carried out based on the current transcoding processing ability of the processor, realizing dynamic video transcoding according to the resource capabilities, avoiding excessive resource consumption, and at the same time being able to smoothly carry out the transcoding work within a small range when there are fewer available resources. Description of the Drawings

[0042] Figure 1 It is a schematic flowchart of an embodiment of the real-time transcoding and distribution method for video streams of the present application;

[0043] Figure 2 It is a schematic diagram of the function modules of an embodiment of the real-time transcoding and distribution device for video streams of the present application;

[0044] Figure 3 It is a schematic diagram of the hardware structure of the video stream real-time transcoding and distribution device involved in the solution of the embodiment of the present application. Detailed Embodiments

[0045] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0046] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be further described in detail below in conjunction with the accompanying drawings.

[0048] In a first aspect, an embodiment of this application provides a method for real-time transcoding and distribution of video streams.

[0049] In one embodiment, referring to Figure 1 , Figure 1 is a schematic flowchart of the first embodiment of the method for real-time transcoding and distribution of video streams in this application. As Figure 1 shown, the method for real-time transcoding and distribution of video streams includes:

[0050] S100. If a on-demand trigger signal from the client is obtained, access its corresponding optical and electrical address according to the on-demand trigger signal to obtain the original video stream, and parse the basic information of the original video stream;

[0051] S200. According to the basic information of the original video stream, establish multiple transcoding parameter combinations for transcoding different video stream formats;

[0052] S300. Push the original video stream to the client;

[0053] S400. According to the current transcoding processing ability, select at least one or more transcoding parameter combinations that are closest to the original video stream as alternative transcoding combinations;

[0054] S500. According to one or more of the alternative transcoding combinations, synchronously transcode the original video stream into the corresponding one or more alternative video streams;

[0055] S600. Periodically obtain the window bandwidth situation of the client's network within a set first time period; wherein, the window bandwidth situation is a characterization value that can reflect the actual network bandwidth ability of the client within the first time period, such as an average value or other characterization values with practical significance.

[0056] S700. According to the mapping relationship between the preset network bandwidth and multiple transcoding parameter combinations, determine the transcoding parameter combination corresponding to the window bandwidth situation and its corresponding alternative video stream from the selected video streams as the target switching video stream;

[0057] In step S800, push the target switched video stream to the stream client to replace the currently pushed video.

[0058] Specifically, in step S400, some combinations will be selected from multiple transcoding parameter combinations closest to the original video stream according to the current transcoding processing ability, that is, whether the relevant resources required by the server for video transcoding are sufficient, as alternative transcoding combinations. When the transcoding processing ability is sufficient, multiple alternative transcoding combinations can be determined according to the preset maximum number, and when the transcoding processing ability is insufficient, only one alternative transcoding can be used for subsequent use.

[0059] In this embodiment, after receiving the on-demand trigger signal from the client, the original video stream is first pushed to the client in the first time to ensure that the video picture can be received by the client in the first time. At the same time, different alternative video streams will be transcoded according to the information of the original video stream during this process. The picture quality parameters of these alternative video streams will be lower than those of the original video stream. After the window bandwidth situation of the client's network in the first time period can be mastered subsequently, the video stream can be switched in time according to the real state of the client's network situation, and a more suitable video stream version for the client can be pushed, realizing strong adaptability in the video stream distribution process. In addition, during the real-time transcoding process of the alternative video stream, it will also be based on the current transcoding processing ability of the processor, realizing dynamic video transcoding according to the resource ability, avoiding excessive resource consumption, and at the same time being able to smoothly carry out the transcoding work within a small range when the available resources are less.

[0060] Since steps S500 - 800 are executed periodically, therefore, after the network of the client fluctuates, this application can also respond and adjust according to the window bandwidth situation of the network in the most recent first time period, ensuring that the client can proceed smoothly and fluently during the entire process of receiving the video stream. During this process, the bandwidth will be calculated with different weights (the closer the bandwidth value, the greater the weight, and the total weight is 1), that is, the system will calculate the weight based on the average value of the bandwidth in the first time period and the historical bandwidth average value. For example, after the network bandwidth of the client decreases, the system calculates based on 70% of the average value of the bandwidth in the recent 5 seconds + 30% of the historical bandwidth average value, and further selects different transcoding parameter combinations for transcoding based on this.

[0061] Further, in an embodiment, before step S600, periodically obtaining the window bandwidth situation of the client's network in the set first time period includes the following steps:

[0062] S510. Obtain the instantaneous network bandwidth situation of the client, and based on the instantaneous network bandwidth situation, determine whether it is necessary to adjust the alternative transcoding combination, and if necessary, make adjustments and synchronously adjust the alternative video streams being transcoded.

[0063] Specifically, when determining the transcoding parameter combination corresponding to the instantaneous network bandwidth situation in accordance with the mapping relationship between the preset network bandwidth and multiple transcoding parameter combinations, the following steps will be included:

[0064] S511. Determine whether the transcoding parameter combination corresponding to the instantaneous network bandwidth situation and multiple transcoding parameter combinations near this combination are the same as the alternative transcoding combination;

[0065] S512. If so, there is no need to adjust the alternative transcoding combination;

[0066] S513. If not, it is necessary to adjust the alternative transcoding combination to the transcoding parameter combination corresponding to the instantaneous network bandwidth situation and multiple transcoding parameter combinations near this combination.

[0067] Among them, in this embodiment, the multiple transcoding parameter combinations nearby specifically include at least one transcoding parameter combination that is better than and at least one transcoding parameter combination that is worse than the transcoding parameter combination corresponding to the instantaneous network bandwidth situation.

[0068] With such a setting, before achieving a relatively stable window bandwidth situation at the client during the first time period, first utilize the instantaneous network bandwidth situation obtained at the first moment when docking with the client to preliminarily determine whether the currently established and obtained alternative video streams are appropriate. When they are not appropriate, for example, the bandwidth situation after the client is stably connected is much lower than the picture quality requirements of the original video stream, resulting in the lack of a suitable one among the initially established alternative video streams. At this time, the transition change of the alternative video streams can be achieved through steps S510 - S51. Eventually, after the first time period at the client, it is possible to effectively find a suitable one among the alternative video streams for subsequent video stream switching.

[0069] Further, in an embodiment, when obtaining the on - demand trigger signal of the client, access its corresponding optical - electrical address according to the on - demand trigger signal to obtain the original video stream, and in parsing the basic information of the original video stream,

[0070] The basic information of the original video stream includes resolution, bit rate, frame rate, and I - frame interval.

[0071] Specifically, in this embodiment, the original resolution, bit rate, frame rate, and I - frame interval of the original video stream are regarded as the best video quality, and each parameter is reduced for combination respectively.

[0072] For example, in a common video stream, the selectable resolutions include 4K, 2K, 1080P, 720P, and 480P. The selectable bitrates include 8M, 6M, 4M, 2M, and 1M. The selectable frame rates include 50 frames, 25 frames, 15 frames, and 12 frames. The I-frame interval generally corresponds to the frame rate and can be equal to the frame rate or twice the frame rate.

[0073] In this embodiment, taking the original resolution of the original video stream as 1080P as an example, when establishing multiple transcoding parameter combinations for transcoding different video stream formats according to the basic information of the original video stream, the basic information of the original video stream and multiple set resolutions, bitrates, frame rates, and I-frame intervals lower than the basic information of the original video stream are combined and enumerated to obtain multiple transcoding parameter combinations. For example, the selectable resolutions include 1080P, 720P, and 480P; the selectable bitrates include 4M, 2M, and 1M; the selectable frame rates include 25 frames, 15 frames, and 12 frames; and the I-frame intervals include 50, 25, 30, 15, 24, 12, etc.

[0074] Further, in one embodiment, in S400, according to the current transcoding processing capability, at least one or more transcoding parameter combinations closest to the original video stream are selected as alternative transcoding combinations.

[0075] According to the size relationship between the current transcoding processing capability and multiple preset processing capability thresholds, the number and specific combination categories of multiple transcoding parameter combinations closest to the original video stream are determined.

[0076] With this setting, when the resources of the current processor are different, that is, when the transcoding processing capabilities are different, multiple transcoding parameter combinations that match its capabilities can be determined. For example, when the capabilities are limited, only two or one transcoding parameter combination will be determined for video synchronous transcoding, while when the capabilities are sufficient, more video transcoding can be performed according to multiple transcoding parameter combinations simultaneously, preparing for the switching of the video stream to be pushed later, and effectively avoiding the problems caused by fixed video transcoding of several types of transcoding parameters when the resources are insufficient.

[0077] In a second aspect, the embodiments of the present application further provide a video stream real-time transcoding and distribution device.

[0078] In one embodiment, referring to Figure 2 , Figure 2 is a schematic diagram of the functional modules of an embodiment of the video stream real-time transcoding and distribution device of the present application. As Figure 2 shown, the video stream real-time transcoding and distribution device includes:

[0079] The video stream real-time transcoding and distribution device includes:

[0080] An access module, configured to access its corresponding optoelectronic address according to the on-demand trigger signal if the on-demand trigger signal of the client is obtained, obtain an original video stream, and parse the basic information of the original video stream;

[0081] A transcoding module, configured to establish multiple transcoding parameter combinations for transcoding different video stream formats according to the basic information of the original video stream; and at least select one or more transcoding parameter combinations closest to the original video stream as alternative transcoding combinations according to the current transcoding processing capability;

[0082] A distribution module, configured to push the original video stream to the client; synchronously transcode the original video stream into one or more alternative video streams according to one or more of the alternative transcoding combinations; periodically obtain the window bandwidth condition of the network at the client within a set first time period; determine, according to the mapping relationship between the preset network bandwidth and multiple transcoding parameter combinations, the transcoding parameter combination corresponding to the window bandwidth condition and its corresponding alternative video stream from the alternative video streams as the target switching video stream; and push the target switching video stream to the client to replace the currently pushed video.

[0083] Wherein, the function implementation of each module in the above video stream real-time transcoding and distribution device corresponds to each step in the embodiment of the above video stream real-time transcoding and distribution method, and its function and implementation process will not be described in detail here.

[0084] In a third aspect, an embodiment of the present application provides a video stream real-time transcoding and distribution device, and the video stream real-time transcoding and distribution device may be a device with data processing functions such as a personal computer (PC), a laptop computer, a server, etc.

[0085] Refer to Figure 3 , Figure 3 which is a schematic hardware structure diagram of the video stream real-time transcoding and distribution device involved in the solution of the embodiment of the present application. In the embodiment of the present application, the video stream real-time transcoding and distribution device may include a processor, a memory, a communication interface, and a communication bus.

[0086] Wherein, the communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0087] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, etc., which are used to implement the interconnection of components inside the video stream real-time transcoding and distribution device, as well as interfaces for implementing the interconnection between the video stream real-time transcoding and distribution device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0088] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical memory, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0089] The processor can be a general-purpose processor, which can call the video stream real-time transcoding and distribution program stored in the memory and execute the video stream real-time transcoding and distribution method provided by the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). Among them, the method executed when the video stream real-time transcoding and distribution program is called can refer to the various embodiments of the video stream real-time transcoding and distribution method of the present application, which will not be elaborated here.

[0090] Those skilled in the art can understand that Figure 3 the hardware structure shown in does not constitute a limitation to the present application, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0091] Fourthly, the embodiments of the present application also provide a storage medium.

[0092] The video stream real-time transcoding and distribution program is stored on the storage medium of the present application. When the video stream real-time transcoding and distribution program is executed by a processor, it realizes the steps of the video stream real-time transcoding and distribution method as described above.

[0093] Among them, the method realized when the video stream real-time transcoding and distribution program is executed can refer to the various embodiments of the video stream real-time transcoding and distribution method of the present application, which will not be elaborated here.

[0094] It should be noted that the serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0095] The terms "including" and "having" and any variations thereof in the description of the specification, claims and drawings of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products or devices. The descriptions of the terms "first", "second", "third", etc. are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit that "first", "second" and "third" are of different types.

[0096] In the description of the embodiments of the present application, terms such as "exemplary", "for example" or "for illustration" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary", "for example" or "for illustration" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or designs. Rather, the use of terms such as "exemplary", "for example" or "for illustration" is intended to present related concepts in a specific manner.

[0097] In the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.

[0098] In some processes described in the embodiments of the present application, a plurality of operations or steps appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in order or in parallel, and these operations or steps may be combined.

[0099] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above and includes several instructions for causing a terminal device to execute the methods described in the various embodiments of the present application.

[0100] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A method for real-time transcoding and distribution of video streams, characterized in that: It includes: If a video-on-demand trigger signal from the user is obtained, the corresponding optoelectronic address is accessed according to the video-on-demand trigger signal to obtain the original video stream, and the basic information of the original video stream is obtained by parsing; According to the basic information of the original video stream, establishing a plurality of transcoding parameter combinations for transcoding different video stream formats; Pushing the original video stream to the user end; According to the current transcoding processing capability, at least one or more transcoding parameter combinations closest to the original video stream are selected as candidate transcoding combinations; According to one or more of the alternative transcoding combinations, synchronously transcode the original video stream to one or more corresponding alternative video streams; Periodically obtaining the window bandwidth of the network of the user terminal within a set first time period; According to the mapping relationship between the preset network bandwidth and the multiple transcoding parameter combinations, the transcoding parameter combination corresponding to the window bandwidth condition and the corresponding candidate video stream are determined from the selected video stream as the target switching video stream; The target switching video stream is pushed to the stream user end to replace the currently pushed video.

2. The video stream real-time transcoding and distribution method according to claim 1, characterized in that: Before the periodic acquisition of the window bandwidth of the network of the user terminal within the set first time period, the following steps are included: The instantaneous network bandwidth of the user terminal is obtained, and according to the instantaneous network bandwidth, it is determined whether the alternative transcoding combination needs to be adjusted, and the adjustment is made when necessary and the transcoded alternative video stream is adjusted synchronously.

3. The video stream real-time transcoding and distribution method according to claim 2, characterized in that: The determining whether to adjust the candidate transcoding combination according to the instantaneous network bandwidth condition. Determine the transcoding parameter combination corresponding to the instantaneous network bandwidth according to the mapping relationship between the preset network bandwidth and the plurality of transcoding parameter combinations; Determine whether the transcoding parameter combination corresponding to the instantaneous network bandwidth situation and multiple transcoding parameter combinations near the combination are consistent with the candidate transcoding combination; If yes, there is no need to adjust the alternative transcoding combination; If not, the candidate transcoding combination needs to be adjusted to the transcoding parameter combination corresponding to the instantaneous network bandwidth situation and multiple transcoding parameter combinations near the combination.

4. The video stream real-time transcoding and distribution method according to claim 3, characterized in that: The candidate transcoding combination needs to be adjusted to be a transcoding parameter combination corresponding to the instantaneous network bandwidth situation and a plurality of transcoding parameter combinations near the combination, The plurality of nearby transcoding parameter combinations include at least one transcoding parameter combination that is better than and at least one transcoding parameter combination that is worse than the transcoding parameter combination corresponding to the instantaneous network bandwidth condition.

5. The video stream real-time transcoding and distribution method according to claim 1, characterized in that: If a video-on-demand trigger signal from the user is obtained, the corresponding optoelectronic address is accessed according to the video-on-demand trigger signal to obtain the original video stream, and the basic information of the original video stream is obtained by parsing. The basic information of the original video stream includes resolution, bit rate, frame rate and I-frame interval.

6. The video stream real-time transcoding and distribution method according to claim 5, characterized in that: According to the basic information of the original video stream, a plurality of transcoding parameter combinations for transcoding different video stream formats are established, The basic information of the original video stream and multiple set resolutions, bit rates, frame rates and I frame intervals lower than the basic information of the original video stream are combined and enumerated to obtain multiple transcoding parameter combinations.

7. The video stream real-time transcoding and distribution method according to claim 1, characterized in that: According to the current transcoding processing capability, at least one or more transcoding parameter combinations closest to the original video stream are selected as candidate transcoding combinations. According to the size relationship between the current transcoding processing capability and a plurality of preset processing capability thresholds, the number and specific combination categories of the plurality of transcoding parameter combinations that are closest to the original video stream are determined.

8. A video stream real-time transcoding and distribution device, characterized in that: The video stream real-time transcoding and distribution device comprises: The access module is configured to obtain the on-demand trigger signal from the user end, access the corresponding optoelectronic address according to the on-demand trigger signal, obtain the original video stream, and parse to obtain basic information of the original video stream; A transcoding module, which is configured to establish a plurality of transcoding parameter combinations for transcoding different video stream formats according to the basic information of the original video stream; and select at least one or more transcoding parameter combinations closest to the original video stream as candidate transcoding combinations according to the current transcoding processing capability; A distribution module is configured to push the original video stream to a user terminal; synchronously transcode the original video stream to one or more corresponding alternative video streams according to one or more alternative transcoding combinations; periodically obtain the window bandwidth status of the network of the user terminal within a set first time period; determine the transcoding parameter combination corresponding to the window bandwidth status and its corresponding alternative video stream from the selected video stream as a target switching video stream according to a mapping relationship between a preset network bandwidth and a plurality of transcoding parameter combinations; and push the target switching video stream to the stream user terminal to replace the currently pushed video.

9. A video stream real-time transcoding and distribution device, characterized in that: The video stream real-time transcoding and distribution device includes a processor, a memory, and a video stream real-time transcoding and distribution program stored in the memory and executable by the processor, wherein when the video stream real-time transcoding and distribution program is executed by the processor, the steps of the video stream real-time transcoding and distribution method as described in any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a video stream real-time transcoding and distribution program, wherein when the video stream real-time transcoding and distribution program is executed by the processor, the steps of the video stream real-time transcoding and distribution method according to any one of claims 1 to 7 are implemented.