File carousel stream pushing method based on live broadcast system and related device

By querying the keyframe index file in the file carousel system and determining the push stream position, the problem of repeated transcoding in the file carousel system is solved, and resource savings and live broadcast delays are achieved for low-code rate transcoding.

CN120034680AInactive Publication Date: 2025-05-23HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510473791.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-05-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There is a problem of repeated transcoding for different clarity of the same multimedia file in the file carousel system, resulting in the waste of transcoding resources.

Method used

By obtaining the transcoding request from the audience, query the keyframe index file under the multimedia file corresponding to the live broadcast stream of the original picture quality, determine the current push stream position based on the query results, and start pushing the streaming transcoding file from this position to avoid repeated transcoding.

Benefits of technology

It only takes one time to transcoding a low-code rate of multimedia files. When the audience pulls the stream, it directly pushes the stream from the keyframe position, saving transcoding resources and reducing live broadcast delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034680A_ABST
    Figure CN120034680A_ABST
Patent Text Reader

Abstract

The invention provides a file carousel stream pushing method based on a live broadcast system and a related device, and relates to the technical field of pseudo live broadcast of file carousel, and the method comprises the steps: obtaining a transcoding request of an audience side, the transcoding request comprising a transcoding request of a target code rate; a key frame index file under a multimedia file corresponding to the original image quality live broadcast stream is inquired at a target code rate, the key frame index file comprises key frame positions of all GOP groups in the multimedia file, and a transcoding file associated with the key frame index file comprises transcoding results of all frames in the multimedia file at the target code rate; if the key frame index file is queried, comparing the current plug flow position with the key frame position of each GOP group; if it is determined that the current stream pushing position is the key frame position of the first GOP group according to the comparison result, the transcoding file is pushed to the audience side frame by frame from the current stream pushing position. According to the method, one-time low-code-rate transcoding is carried out on the multimedia, stream pushing is carried out on the transcoding file from the position of the key frame when the audience side has a demand, and repeated transcoding is not needed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pseudo live broadcast of file carousel, and in particular to a file carousel streaming method and related devices based on a live broadcast system. Background Art

[0002] In order to meet the needs of anchors to interact with the audience during non-live broadcast periods, a file carousel system based on the live broadcast system came into being. Anchors can choose to play pre-recorded multimedia files (audio files or video files, etc.), and continue to attract audiences through live broadcast carousel, realizing uninterrupted pseudo live broadcast throughout the day.

[0003] However, unlike the live broadcast format, the original quality live stream of the file carousel system is generated by the streaming tool reading the multimedia files in the carousel file list in turn. The same multimedia file will be repeatedly streamed and broadcast at regular intervals. When viewers need to pull a low-bitrate live stream due to insufficient network bandwidth or other reasons, the original quality live stream will be transcoded in real time to generate a low-definition live stream. This leads to the problem of repeated transcoding of different levels of clarity of the same multimedia file, resulting in a waste of transcoding resources. Summary of the invention

[0004] In view of the above problems, the present application provides a file carousel streaming method and related devices based on a live broadcast system to solve the problem of repeated transcoding in the file carousel system. The specific solution is as follows:

[0005] The first aspect of the present application provides a file carousel streaming method based on a live broadcast system, the method comprising:

[0006] Obtaining a transcoding request from a viewer, wherein the transcoding request includes a target bit rate;

[0007] Querying a key frame index file under a multimedia file corresponding to the original quality live stream at the target bit rate, wherein the key frame index file includes key frame positions of each GOP group in the multimedia file, and the key frame index file has an associated transcoding file, wherein the transcoding file includes transcoding results of each frame in the multimedia file at the target bit rate;

[0008] If the key frame index file is found, compare the current streaming position of the original quality live stream with the key frame positions of each GOP group;

[0009] When it is determined according to the comparison result that the current streaming position is the key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the current streaming position.

[0010] In a possible implementation, the method further includes:

[0011] When it is determined according to the comparison result that the current streaming position is a non-key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the first GOP group until the current streaming position reaches the key frame position of the second GOP group, and then the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the second GOP group, and the second GOP group is the next GOP group of the first GOP group.

[0012] In a possible implementation, the method further includes:

[0013] If the key frame index file is not found, comparing the current streaming position with the first frame position in the multimedia file;

[0014] When the current streaming position is not the first frame position, transcoding the original quality live stream at the target bit rate and then streaming it to the viewer end;

[0015] When the current streaming position is the first frame position, the original quality live stream is transcoded at the target bit rate and then streamed to the viewer, while the transcoded file is recorded and the key frame index file is generated.

[0016] In a possible implementation, the method further includes:

[0017] In response to a deletion operation on the multimedia file, the transcoded file and the key frame index file are deleted.

[0018] In a possible implementation, the method further includes:

[0019] If the key frame index file is found, an integrity check is performed on the key frame index file, and if the key frame index file passes the integrity check, the comparison between the current streaming position of the original quality live stream and the key frame position of each GOP group is performed.

[0020] A second aspect of the present application provides a file carousel streaming device based on a live broadcast system, the device comprising:

[0021] A request acquisition module, used to acquire a transcoding request from a viewer, wherein the transcoding request includes a target bit rate;

[0022] An index query module, used to query a key frame index file under a multimedia file corresponding to the original quality live stream at the target bit rate, wherein the key frame index file contains key frame positions of each GOP group in the multimedia file, and the key frame index file has an associated transcoding file, wherein the transcoding file contains transcoding results of each frame in the multimedia file at the target bit rate;

[0023] The streaming output module is used to compare the current streaming position of the original quality live stream with the key frame position of each GOP group if the key frame index file is queried; when it is determined that the current streaming position is the key frame position of the first GOP group according to the comparison result, the transcoded file is streamed to the viewer frame by frame starting from the current streaming position.

[0024] In a possible implementation, the streaming output module is further used to:

[0025] When it is determined according to the comparison result that the current streaming position is a non-key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the first GOP group until the current streaming position reaches the key frame position of the second GOP group, and then the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the second GOP group, and the second GOP group is the next GOP group of the first GOP group.

[0026] The third aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the file carousel streaming method based on the live broadcast system according to the first aspect or any implementation method of the first aspect.

[0027] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0028] The memory is used to store computer programs;

[0029] The processor is used to execute the computer program so that the electronic device can implement the file carousel streaming method based on the live broadcast system according to the first aspect or any implementation method of the first aspect.

[0030] The fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the file carousel streaming method based on the live broadcast system according to the first aspect or any implementation method of the first aspect.

[0031] By means of the above technical scheme, the present application provides a file carousel streaming method and related devices based on a live broadcast system, which obtain a transcoding request from the audience end, wherein the transcoding request includes a transcoding request for a target bit rate; the key frame index file under the multimedia file corresponding to the original image quality live stream is queried at the target bit rate, wherein the key frame index file includes the key frame position of each GOP group in the multimedia file, and its associated transcoding file includes the transcoding result of each frame in the multimedia file at the target bit rate; if the key frame index file is queried, the current streaming position of the original image quality live stream is compared with the key frame position of each GOP group; when it is determined that the current streaming position is the key frame position of the first GOP group according to the comparison result, the transcoded file is streamed to the audience end frame by frame starting from the current streaming position. The present application can perform a complete low-bitrate transcoding of multimedia files in the carousel file list. When the audience needs to pull the low-bitrate live stream later, if the current push stream position is determined to be the key frame position by querying the key frame index file, the transcoded file can be pushed from the key frame position. A bit rate only needs to be transcoded once, and there is no need for repeated transcoding, thereby saving transcoding resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0033] Figure 1 A flowchart of a file carousel streaming method based on a live broadcast system provided in an embodiment of the present application;

[0034] Figure 2 Another flowchart of a file carousel streaming method based on a live broadcast system provided in an embodiment of the present application;

[0035] Figure 3 Another flowchart of a file carousel streaming method based on a live broadcast system provided in an embodiment of the present application;

[0036] Figure 4 A structural diagram of a file carousel streaming device based on a live broadcast system provided in an embodiment of the present application;

[0037] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0039] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0040] The terms "first", "second" etc. in the specification of the application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, and this is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0041] For ease of understanding, the following first describes the relevant concepts involved in this application:

[0042] GOP (full name of Group of Pictures): It is called Group of Pictures or Group of Picture in Chinese. GOP is a basic unit in video encoding, which consists of a series of continuous frames (such as I frame, P frame, B frame) and is used to compress and store video data.

[0043] IDR (Instantaneous Decoder Refresh) frame: In Chinese, it is called instant decoding refresh frame. IDR frame is a special I frame (key frame) in video coding standards such as H.264 / AVC and H.265 / HEVC. Its function is to force the refresh of the decoder state to ensure that the decoding of subsequent frames does not depend on any frame before the IDR frame, thereby achieving random access and error recovery functions.

[0044] With the development of Internet technology, more and more live broadcast forms have emerged, most of which are mainly based on providing bullet screen-style live broadcast rooms. The anchor uploads the live video to the content distribution network in real time, and the audience logs in to the live broadcast room to pull the corresponding live stream for real-time viewing, and interacts with the anchor through bullet screen or participation in the microphone. However, this form of live real-time broadcast is limited by the online time of the anchor or operator, and it is impossible to broadcast offline multimedia content (audio or video, etc.). At the same time, for anchors who have just entered the live broadcast platform, due to the limited number of users who follow them, it is difficult to quickly broadcast the anchor's anchor field and anchor content to a large number of viewers only through limited live real-time broadcast methods. At the same time, it is also difficult for the audience to quickly understand the anchor's situation in a short live broadcast time. To solve this demand, a file carousel system based on the live broadcast system came into being. It can combine the live broadcast system with offline files to realize 24-hour uninterrupted pseudo-live broadcast of offline files, so as to maintain the interaction and activity of the anchor with the audience during the non-live broadcast period, improve the anchor's exposure and attract and expand the attention group in a short time.

[0045] However, the carousel live broadcast method based on offline files is different from the conventional live broadcast format. Its original quality live stream is a pseudo live stream generated by the streaming tool reading the multimedia files in the carousel file list provided by the anchor. The same multimedia file will be repeatedly streamed and broadcast at regular intervals. If it is simply pushed in the form of live real-time streaming, when viewers need to pull a low-bitrate live stream for playback due to insufficient network bandwidth and other reasons, triggering low-definition transcoding, the original quality live stream will be directly transcoded in real time to generate a low-definition live stream. This will result in repeated transcoding of different levels of clarity of the same multimedia file, resulting in a waste of transcoding resources.

[0046] To solve the above problems, the present application can make a minimal functional upgrade to the transcoding service component in the original file carousel system. For a certain bit rate, a complete low-bit rate transcoding is performed on the multimedia files in the carousel file list. When the audience subsequently needs to pull the low-bit rate live stream, if the current push stream position is determined to be the key frame position by querying the key frame index file, the transcoding service component can be triggered to read the data at the key frame position in the transcoded file, and the transcoded file can be pushed to the content distribution network in the form of a real-time stream from the key frame position for the audience to pull the stream for playback. For a multimedia file, a bit rate only needs to be transcoded once, and there is no need for repeated transcoding, which can achieve effective and reasonable utilization of transcoding resources and achieve the purpose of reducing costs and increasing efficiency.

[0047] See also Figure 1 , Figure 1 The following is a flow chart of a method for streaming a file carousel based on a live broadcast system provided in an embodiment of the present application. Figure 1As shown, a file carousel streaming method based on a live broadcast system provided in an embodiment of the present application may include the following steps S10 to S40, and these steps are described in detail below.

[0048] S10, obtaining a transcoding request from the viewer, where the transcoding request includes a target bit rate.

[0049] In the embodiment of the present application, during the process of pushing the original quality live stream, the audience end can report the transcoding demand according to its own definition demand. Specifically, when the network bandwidth is insufficient or network jitter occurs, the player can detect the network status and automatically or actively switch to a low-definition live stream. Different definitions have their own corresponding bit rates. For this, a transcoding request including a target bit rate can be reported, thereby triggering the transcoding service component to transcode the original quality live stream at a reduced bit rate, and generate a low-bit rate live stream for the audience end to pull and play. For this, the transcoding service component can obtain the audience end's transcoding request for the target bit rate.

[0050] S20, querying the key frame index file under the multimedia file corresponding to the original quality live stream at the target bit rate, the key frame index file contains the key frame position of each GOP group in the multimedia file, the key frame index file has an associated transcoding file, and the transcoding file contains the transcoding results of each frame in the multimedia file at the target bit rate.

[0051] In the embodiment of the present application, the transcoding service component can query whether there is a key frame index file corresponding to the target bit rate under the multimedia file corresponding to the original quality live stream on the local storage or cloud storage server. Specifically, it can query on the local storage or cloud storage server according to the file identifier and the target bit rate of the multimedia file to determine whether the corresponding key frame index file exists. Among them, the key frame index file contains the key frame position of each GOP group in the multimedia file corresponding to the original quality live stream, and the key frame can be an IDR frame.

[0052] If there is a key frame index file of the target bit rate under the multimedia file corresponding to the original quality live stream, it is determined that the multimedia file has been transcoded according to the target bit rate, and then the transcoded file associated with the key frame index file is obtained according to the file identifier and the target bit rate. The transcoded file includes the transcoding results of each frame in the multimedia file corresponding to the original quality live stream at the target bit rate.

[0053] S30: If the key frame index file is found, compare the current streaming position of the original quality live stream with the key frame positions of each GOP group.

[0054] In an embodiment of the present application, if a key frame index file is queried on a local storage or cloud storage server, the transcoding service component obtains the current streaming position of the original quality live stream, and compares it with the key frame position of each GOP group in the key frame index file to determine the GOP group to which the current streaming position belongs, and whether the current streaming position is the key frame position of the GOP group to which it belongs.

[0055] In a possible implementation, in order to avoid transcoding interruption due to network failure or live broadcast interruption, it is also necessary to perform integrity check on the key frame index file to determine whether the transcoded file is complete. In this regard, the present application provides a file carousel streaming method based on a live broadcast system, which also includes the following steps:

[0056] If a key frame index file is found, an integrity check is performed on the key frame index file, and if the key frame index file passes the integrity check, a comparison is performed between the current push stream position of the original quality live stream and the key frame position of each GOP group.

[0057] In an embodiment of the present application, if a key frame index file is found in a local storage or cloud storage server, the transcoding service component can perform an integrity check on the key frame index file to determine whether there is an integrity mark bit therein. If there is an integrity mark bit in the key frame index file, it is determined that the key frame index file has passed the integrity check, and the associated transcoded file is also complete. Conversely, if there is no integrity mark bit in the key frame index file, it is determined that the key frame index file has not passed the integrity check, and the associated transcoded file is also incomplete. In this regard, the key frame index file and its associated transcoded file can be deleted from the local storage or cloud storage server.

[0058] S40, when it is determined according to the comparison result that the current streaming position is the key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the current streaming position.

[0059] In an embodiment of the present application, based on the comparison results, it is determined that the GOP group to which the current streaming position belongs is the first GOP group, and the current streaming position is the key frame position of the first GOP group. The transcoding service component can then start streaming the transcoded file frame by frame to the viewer end from the current streaming position until the multimedia file corresponding to the original quality live stream is pushed.

[0060] In a possible implementation, if the current push stream position is not the key frame position, the stream can be pushed from the key frame position. However, at this time, the low-bitrate live stream is slightly later than the original quality live stream. Therefore, the low-bitrate live stream can be jumped when the original quality live stream pushes to the key frame of the next GOP group, so as to achieve synchronization with the live broadcast room. Figure 2 , Figure 2 Another flowchart of a method for streaming a file carousel based on a live broadcast system provided in an embodiment of the present application is shown below. Figure 2 As shown, a file carousel streaming method based on a live broadcast system provided in an embodiment of the present application also includes the following step S50, and these steps are described in detail below.

[0061] S50, when it is determined according to the comparison result that the current streaming position is a non-key frame position of the first GOP group, the transcoded file is streamed to the audience frame by frame starting from the key frame position of the first GOP group until the current streaming position reaches the key frame position of the second GOP group, then the transcoded file is streamed to the audience frame by frame starting from the key frame position of the second GOP group, and the second GOP group is the next GOP group of the first GOP group.

[0062] In an embodiment of the present application, it is determined based on the comparison results that the GOP group to which the current push stream position belongs is the first GOP group, and the current push stream position is the non-key frame position of the first GOP group. The transcoding service component can then push the transcoded file frame by frame to the audience end starting from the key frame position of the first GOP group, until the current push stream position reaches the GOP group to which it belongs, which is the second GOP group, and the current push stream position is the key frame position of the second GOP group. Then, the transcoded file is pushed frame by frame to the audience end starting from the key frame position of the second GOP group until the multimedia file corresponding to the original quality live stream is pushed.

[0063] The second GOP group is the next GOP group of the first GOP group in the key frame index file.

[0064] In a possible implementation, if there is no key frame index file of the target bit rate under the multimedia file corresponding to the original quality live stream, it is determined that this is the first time that the multimedia file is transcoded at the target bit rate. In this regard, the present application can determine whether to generate the transcoded file and key frame index file at the target bit rate according to the current streaming position. Figure 3 , Figure 3 Another flowchart of a method for streaming a file carousel based on a live streaming system provided in an embodiment of the present application is shown below. Figure 3 As shown, a file carousel streaming method based on a live broadcast system provided in an embodiment of the present application also includes the following steps S60 to S80, which are described in detail below.

[0065] S60: If no key frame index file is found, compare the current streaming position with the first frame position in the multimedia file.

[0066] In an embodiment of the present application, if no key frame index file is found in the local storage or cloud storage server, the transcoding service component obtains the current streaming position of the original quality live stream and compares it with the first frame position in the multimedia file corresponding to the original quality live stream.

[0067] S70: When the current streaming position is not the first frame position, the original quality live stream is transcoded at the target bit rate and then streamed to the viewer.

[0068] In an embodiment of the present application, if the current streaming position is not the first frame position in the multimedia file corresponding to the original quality live stream, since the complete transcoded file cannot be maintained otherwise, the transcoding service component transcodes the original quality live stream at the target bit rate and directly pushes the stream to the audience end without recording the transcoded file.

[0069] S80, when the current streaming position is the first frame position, the original quality live stream is transcoded at the target bit rate and then streamed to the viewer end, while recording the transcoded file and generating a key frame index file.

[0070] In an embodiment of the present application, if the current streaming position is the first frame position in the multimedia file corresponding to the original quality live stream, the transcoding service component transcodes the original quality live stream at the target bit rate and pushes the stream to the audience end. At the same time, it records the transcoded file and generates a key frame index file.

[0071] On this basis, in an embodiment of the present application, in response to the host's deletion operation of a multimedia file in the carousel file list, the transcoded files and key frame index files of different bit rates under the multimedia file can be deleted.

[0072] This application uses a single multimedia file in the carousel file list as a unit, and stores transcoded files and key frame index files at different bit rates. When the host adds, deletes, or even adjusts the order of the multimedia files in the carousel file list, it will not affect the normal operation of the existing logical framework. If a new multimedia file is added to the carousel file list, it only needs to trigger real-time transcoding for the newly added multimedia file and generate the transcoded file and key frame index file at the same time. Conventional deletion and sequential operations will not generate new transcoding actions.

[0073] This application is implemented in the transcoding service component of the original file carousel system, achieving minimal system architecture transformation, using the characteristic attribute of multimedia files in the carousel file list to repeatedly push pseudo live streaming, and save the transcoded files as multimedia files on the local disk or cloud storage server when transcoding is first triggered, and at the same time establish a key frame index file associated with the transcoded file to facilitate subsequent rapid positioning of the corresponding key frame for frame-by-frame streaming. This application only transcodes each bit rate of the multimedia file once, exchanging cheap storage space for more expensive and scarce transcoding resources, achieving the purpose of reducing costs and increasing efficiency, while also reducing the live broadcast delay caused by the need for real-time low-definition transcoding.

[0074] Based on the above description, the file carousel streaming method based on the live broadcast system provided in the embodiment of the present application has the following advantages:

[0075] 1) It is only implemented within the transcoding service component of the original file carousel system, and the original system framework is upgraded with minimal functional transformation, while maximizing the benefits. In addition, only partial transformation and upgrading of the framework is conducive to functional upgrades. The functions are modularized and the corresponding switch logic is configured. When an abnormal situation occurs, it can quickly switch to the original logic to continue running.

[0076] 2) There is no need to pre-process the transcoded file. When the real-time transcoding of a single multimedia file is triggered for the first time, the transcoded file of the corresponding bit rate is generated, and the transcoded file and key frame index file of the corresponding bit rate are saved with a single multimedia file as a unit. Only one transcoding is required for the corresponding bit rate. If new multimedia files are added to the carousel file list later, only the real-time transcoding of the newly added multimedia files needs to be triggered, and the transcoded file and key frame index file need to be generated at the same time. Conventional deletion and sequential operations will not generate new transcoding actions.

[0077] 3) Similar to the mechanism of the live broadcast room opening function, when the transcoded file of the bit rate required by the audience under the original quality live stream has been generated, the current push stream position may not be exactly at the key frame position. Therefore, it is necessary to read the transcoded file from the key frame position of the GOP group where the current inference position is located and push the stream frame by frame. The picture of the low-bitrate live stream is slightly later than that of the original quality live stream. When the original quality live stream is pushed to the key frame of the next GOP group, the low-bitrate live stream is jumped to achieve synchronization with the picture of the live broadcast room.

[0078] A file carousel streaming method based on a live broadcast system provided in an embodiment of the present application is introduced above. A device for executing the file carousel streaming method based on a live broadcast system is introduced below.

[0079] See also Figure 4 , Figure 4The following is a schematic diagram of a file carousel streaming device based on a live streaming system provided in an embodiment of the present application. Figure 4 As shown, an embodiment of the present application provides a file carousel streaming device based on a live broadcast system, comprising:

[0080] A request acquisition module 10 is used to acquire a transcoding request from a viewer, wherein the transcoding request includes a target bit rate;

[0081] An index query module 20 is used to query a key frame index file under a multimedia file corresponding to the original quality live stream at a target bit rate, wherein the key frame index file contains the key frame position of each GOP group in the multimedia file, and the key frame index file has an associated transcoding file, wherein the transcoding file contains the transcoding result of each frame in the multimedia file at the target bit rate;

[0082] The streaming output module 30 is used to compare the current streaming position of the original quality live stream with the key frame position of each GOP group if a key frame index file is queried; when the current streaming position is determined to be the key frame position of the first GOP group according to the comparison result, the transcoded file is streamed to the audience frame by frame starting from the current streaming position.

[0083] In a possible implementation, the streaming output module 30 is further used to:

[0084] When it is determined according to the comparison results that the current streaming position is a non-key frame position of the first GOP group, the transcoded file is streamed to the audience frame by frame starting from the key frame position of the first GOP group until the current streaming position reaches the key frame position of the second GOP group, then the transcoded file is streamed to the audience frame by frame starting from the key frame position of the second GOP group, and the second GOP group is the next GOP group of the first GOP group.

[0085] In a possible implementation, the streaming output module 30 is further used to:

[0086] If the key frame index file is not found, compare the current streaming position with the first frame position in the multimedia file; if the current streaming position is not the first frame position, transcode the original quality live stream at the target bit rate and then push it to the audience; if the current streaming position is the first frame position, transcode the original quality live stream at the target bit rate and then push it to the audience, and record the transcoded file and generate a key frame index file.

[0087] In a possible implementation, the streaming output module 30 is further used to:

[0088] In response to the deletion operation of the multimedia file, the transcoded file and the key frame index file are deleted.

[0089] In a possible implementation, the streaming output module 30 is further used to:

[0090] If a key frame index file is found, an integrity check is performed on the key frame index file, and if the key frame index file passes the integrity check, a comparison is performed between the current push stream position of the original quality live stream and the key frame position of each GOP group.

[0091] It should be noted that the detailed functions of each module in the embodiment of the present application can be found in the corresponding public part of the above-mentioned file carousel streaming method embodiment based on the live broadcast system, and will not be repeated here.

[0092] The present application also provides an electronic device in an embodiment. Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0093] like Figure 5 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0094] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a memory card, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0095] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any file carousel streaming method based on a live broadcast system provided in the embodiment of the present application.

[0096] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any file carousel streaming method based on a live broadcast system provided in an embodiment of the present application.

[0097] It should also be noted that the device embodiments described above are merely schematic, 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 over 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. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0098] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0099] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0100] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A file carousel streaming method based on a live broadcast system, characterized in that: The method comprises: Obtaining a transcoding request from a viewer, wherein the transcoding request includes a target bit rate; Querying a key frame index file under a multimedia file corresponding to the original quality live stream at the target bit rate, wherein the key frame index file includes key frame positions of each GOP group in the multimedia file, and the key frame index file has an associated transcoding file, wherein the transcoding file includes transcoding results of each frame in the multimedia file at the target bit rate; If the key frame index file is found, compare the current streaming position of the original quality live stream with the key frame positions of each GOP group; When it is determined according to the comparison result that the current streaming position is the key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the current streaming position.

2. The file carousel streaming method based on the live broadcast system according to claim 1 is characterized in that: The method further comprises: When it is determined according to the comparison result that the current streaming position is a non-key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the first GOP group until the current streaming position reaches the key frame position of the second GOP group, and then the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the second GOP group, and the second GOP group is the next GOP group of the first GOP group.

3. The file carousel streaming method based on the live broadcast system according to claim 1 is characterized in that: The method further comprises: If the key frame index file is not found, comparing the current streaming position with the first frame position in the multimedia file; When the current streaming position is not the first frame position, transcoding the original quality live stream at the target bit rate and then streaming it to the viewer end; When the current streaming position is the first frame position, the original quality live stream is transcoded at the target bit rate and then streamed to the viewer, while the transcoded file is recorded and the key frame index file is generated.

4. The file carousel streaming method based on the live broadcast system according to claim 3 is characterized in that: The method further comprises: In response to a deletion operation on the multimedia file, the transcoded file and the key frame index file are deleted.

5. The file carousel streaming method based on the live broadcast system according to claim 1 is characterized in that: The method further comprises: If the key frame index file is found, an integrity check is performed on the key frame index file, and if the key frame index file passes the integrity check, the comparison between the current streaming position of the original quality live stream and the key frame position of each GOP group is performed.

6. A file carousel streaming device based on a live broadcast system, characterized in that: The device comprises: A request acquisition module, used to acquire a transcoding request from a viewer, wherein the transcoding request includes a target bit rate; An index query module, used to query a key frame index file under a multimedia file corresponding to the original quality live stream at the target bit rate, wherein the key frame index file contains key frame positions of each GOP group in the multimedia file, and the key frame index file has an associated transcoding file, wherein the transcoding file contains transcoding results of each frame in the multimedia file at the target bit rate; The streaming output module is used to compare the current streaming position of the original quality live stream with the key frame position of each GOP group if the key frame index file is queried; when it is determined that the current streaming position is the key frame position of the first GOP group according to the comparison result, the transcoded file is streamed to the viewer frame by frame starting from the current streaming position.

7. The file carousel streaming device based on the live broadcast system according to claim 6 is characterized in that: The streaming output module is also used for: When it is determined according to the comparison result that the current streaming position is a non-key frame position of the first GOP group, the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the first GOP group until the current streaming position reaches the key frame position of the second GOP group, and then the transcoded file is streamed to the viewer end frame by frame starting from the key frame position of the second GOP group, and the second GOP group is the next GOP group of the first GOP group.

8. A computer program product, characterized in that It includes computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the file carousel streaming method based on a live broadcast system as described in any one of claims 1 to 5.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the file carousel streaming method based on the live broadcast system as described in any one of claims 1 to 5.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the file carousel streaming method based on the live broadcast system as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video transcoding method and system in cloud environment

    CN103686206A

  • Live broadcast data flow pushing method

    CN109688425A

  • Video transcoding method and device

    CN110602555A

  • Code rate adaptive switching method and device, electronic equipment and storage medium

    CN110636346A

  • Deduplication method for preventing repeated transcoding of video and processing terminal

    CN110662088A