CN114079805A - Multi-code rate switching method, device, system, equipment and storage medium - Google Patents
Multi-code rate switching method, device, system, equipment and storage medium Download PDFInfo
- Publication number
- CN114079805A CN114079805A CN202010841914.6A CN202010841914A CN114079805A CN 114079805 A CN114079805 A CN 114079805A CN 202010841914 A CN202010841914 A CN 202010841914A CN 114079805 A CN114079805 A CN 114079805A
- Authority
- CN
- China
- Prior art keywords
- rate
- media file
- code
- density
- played
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000004891 communication Methods 0.000 claims abstract description 6
- 238000012545 processing Methods 0.000 claims description 5
- 238000001514 detection method Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
- H04N21/2393—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
- H04N21/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44204—Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a storage medium for multi-code rate switching, belonging to the technical field of communication. The method comprises the following steps: detecting the code rate of the received media file to be played; if the code rate of the media file to be played changes, playing a pre-generated high-code-rate high-density IDR frame media file on a switching point; and switching to the high-bit-rate media file when the high-bit-rate high-density IDR frame media file is played to the next I frame.
Description
Technical Field
The present invention relates to the field of streaming media technologies, and in particular, to a method, an apparatus, a system, a device, and a storage medium for multi-rate handover.
Background
The OTT (Over The Top TV, internet television) streaming media technology has The advantages of low requirements on streaming servers and terminals, and The smoothness of playing under different networks can be ensured through multiple code rates, so that The OTT streaming media technology occupies a mainstream position in The application of internet video services in recent years. How to realize seamless and fast switching among multiple code rates is always the direction of research in the field of OTT streaming media. In the related art, there is a problem that the switching time is too long.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a multi-code rate switching method, device and storage medium, aiming at shortening the switching time.
In order to achieve the above object, an embodiment of the present invention provides a method for multi-rate handover, where the method includes the following steps:
detecting the code rate of the received media file to be played;
if the code rate of the media file to be played changes, playing a pre-generated high-code-rate high-density (instant Decoding Refresh) IDR frame media file on a switching point;
and switching to the high-bit-rate media file when the high-bit-rate high-density IDR frame media file is played to the next I frame.
To achieve the above object, an embodiment of the present invention provides a multi-rate handover apparatus, including:
the detection module is used for detecting the code rate of the received media file to be played;
and the switching processing module is used for playing the pre-generated high-bit-rate high-density IDR frame media file on a switching point if the bit rate of the media file to be played changes, and switching to the high-bit-rate media file when the high-bit-rate high-density IDR frame media file is played to the next I frame.
In order to achieve the above object, an embodiment of the present invention further provides an apparatus for multi-rate switching, where the apparatus includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for implementing connection communication between the processor and the memory, and the program implements the steps of the foregoing method when executed by the processor.
To achieve the above object, the present invention provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the aforementioned method.
The invention provides a multi-code-rate switching method, a multi-code-rate switching device, a multi-code-rate switching equipment and a multi-code-rate switching storage medium, which can realize more rapid OTT code rate switching, and the time reaches millisecond level.
Drawings
Fig. 1 is a flowchart of a multi-rate handover method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a multi-rate handover apparatus according to a second embodiment of the present invention.
Fig. 3 is a flow chart among modules according to an embodiment of the present invention.
Fig. 4 is a diagram comparing prior art and inventive handover provided by an embodiment of the present invention.
Fig. 5 is a networking diagram provided by an embodiment of the invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "part", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no peculiar meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
Example one
Fig. 1 is a flowchart of a method for multi-rate handover according to this embodiment, as shown in fig. 1, including the following steps:
step S110: detecting the code rate of the received media file to be played;
before detecting the code rate of the received media file to be played, the method further comprises: as shown in fig. 3, an OTT raw code stream is provided by a source end, for example, an HLS (HTTP LIVE Streaming, dynamic rate adaptation technology) content provider obtains the HLS raw code stream through an HLS encoder, where the HLS raw code stream includes a description file and a media file; alternatively, as shown in fig. 5, the HLS content provider provides general HLS content, which includes a main index index.m3u8, a sub-index $ rateid.m3u8, and a ts (media) file corresponding to the sub-index.
As shown in fig. 3, in this embodiment, an encoding module is deployed on an OTT streaming media server, and is configured to re-encode a high-rate media file to obtain a high-density IDR frame index file and a corresponding media file. That is to say, as shown in fig. 5, after a streaming media CDN (Content Delivery Network) is introduced, an encoding module is deployed at a central node, and a high-rate media file is re-encoded, so as to obtain a high-density IDR frame index file $ rateid-idr.m3u8 and a corresponding ts file.
Before detecting the code rate of the received media file to be played, the method further comprises: the client (set-top box) sends media file requests with different code rates to the server according to the current network bandwidth state. That is, the client requests the low-bit-rate index file, the low-bit-rate media file, the high-bit-rate index file, the high-bit-rate media file, and the high-bit-rate IDR frame index file, and starts playing from the low bit rate. That is, the set-top box requests the main index, the sub-index, the ts file and the IDR index file to start playing from the low bit rate.
Step S120: if the code rate of the media file to be played changes, playing a pre-generated high-code-rate high-density IDR frame media file on a switching point;
the high-bit-rate and high-density IDR frame described in this embodiment is also an I frame, and a more precise technique is used to shorten the interval between I frames.
Wherein generating the high bit rate high density IDR frame media file comprises: and re-encoding the high-code-rate media file to generate a high-code-rate high-density IDR frame index file and a high-code-rate high-density IDR frame media file.
Specifically, the code rate of the media file to be played changes from a low code rate to a high code rate.
Further, if the bit rate of the media file to be played changes, playing the pre-generated high-bit-rate high-density IDR frame media file on the switch point includes: if the code rate of the media file to be played changes, determining a high-code-rate high-density IDR frame index file of the high-code-rate media file; and searching a high-code-rate high-density IDR frame media file corresponding to the high-code-rate high-density IDR frame index file according to the high-code-rate high-density IDR frame index file of the high-code-rate media file so as to play the high-code-rate high-density IDR frame media file on a switching point.
Step S130: and switching to the high-bit-rate media file when the high-bit-rate high-density IDR frame media file is played to the next I frame. Specifically, as shown in fig. 3 and 4, the client bitrate adaptive module performs switching from a low bitrate to a high bitrate, downloads the IDR frame closest to the switching point until the IDR media file of the next ordinary I frame is used as a bridge video, and then plays the high bitrate media file beginning with the next I frame. That is to say. When the low code rate is switched to the high code rate, a section of high-density IDR frame media file is played as transition, and then the next I frame with the high code rate is played continuously. It can also be said that, as shown in fig. 5, the set-top box code rate adaptation module performs switching from a low code rate to a high code rate, downloads ts corresponding to the closest IDR frame of the switching point until IDR ts of the next ordinary I frame is used as a bridge video, and then plays a high code rate ts file beginning with the next I frame.
The embodiment of the invention also comprises the following steps: and if the code rate of the media file to be played changes, switching to the low-code-rate media file when the next segment of the high-code-rate media file is played. And changing the code rate of the media file to be played into the change of the code rate of the media file to be played from a high code rate to a low code rate.
Specifically, as shown in fig. 3, when the network condition changes (the network bandwidth becomes lower), the bit rate adaptation module at the client (set top box) switches from high bit rate to low bit rate, and continues to play the high bit rate media (ts) file until the next slice is switched to the low bit rate media (ts) file. That is, when the high code rate is switched to the low code rate, the playing is switched to the next segment.
Example two
Fig. 2 is a schematic diagram of a multi-rate handover apparatus according to a second embodiment of the present invention, as shown in fig. 2, including: a detection module 201 and a handover processing module 202.
The detection module 201 is configured to detect a code rate of a received media file to be played; the switching processing module 202 is configured to play a pre-generated high-density IDR frame media file on a switching point if the bit rate of the media file to be played changes, and play the high-bit rate media file starting from the next I frame after the high-density IDR frame media file is played.
A third embodiment of the present invention provides a multi-rate switching device, where the device includes a memory, a processor, a program stored in the memory and capable of running on the processor, and a data bus for implementing connection communication between the processor and the memory, where the program is executed by the processor to implement the specific steps shown in fig. 1.
A fourth embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs, where the one or more programs are executable by one or more processors to implement the specific steps shown in fig. 1.
The method, the device, the equipment and the storage medium for multi-code rate switching, provided by the embodiment of the invention, have the advantages that the code rate switching speed is increased and the user playing experience is improved by introducing the high-code rate IDR frame index and the IDR frame media file.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not to be construed as limiting the scope of the invention. Any modifications, equivalents and improvements which may occur to those skilled in the art without departing from the scope and spirit of the present invention are intended to be within the scope of the claims.
Claims (10)
1. A method for multi-rate handover, the method comprising:
detecting the code rate of the received media file to be played; if the code rate of the media file to be played changes, playing a pre-generated high-code-rate high-density IDR frame media file on a switching point;
and switching to the high-bit-rate media file when the high-bit-rate high-density IDR frame media file is played to the next I frame.
2. The method of claim 1, wherein generating the high bit rate high density IDR frame media file comprises:
and re-encoding the high-code-rate media file to generate a high-code-rate high-density IDR frame index file and a high-code-rate high-density IDR frame media file.
3. The method according to claim 2, wherein the bitrate of the media file to be played changes from a low bitrate to a high bitrate.
4. The method of claim 3, wherein playing the pre-generated high bit rate high density IDR frame media file on a switch point if the bit rate of the media file to be played changes comprises:
if the code rate of the media file to be played changes, determining a high-code-rate high-density IDR frame index file of the high-code-rate media file;
and searching a high-code-rate high-density IDR frame media file corresponding to the high-code-rate high-density IDR frame index file according to the high-code-rate high-density IDR frame index file of the high-code-rate media file so as to play the high-code-rate high-density IDR frame media file on a switching point.
5. The method of claim 1, wherein before detecting the bitrate of the received media file to be played, the method further comprises:
and sending media file requests with different code rates to a server side according to the current network bandwidth state.
6. The method of claim 1, further comprising:
and if the code rate of the media file to be played changes, switching to the low-code-rate media file when the next segment of the high-code-rate media file is played.
7. The method according to claim 6, wherein the bitrate of the media file to be played changes from a high bitrate to a low bitrate.
8. An apparatus for multi-rate handover, comprising:
the detection module is used for detecting the code rate of the received media file to be played;
and the switching processing module is used for playing the pre-generated high-bit-rate high-density IDR frame media file on a switching point if the bit rate of the media file to be played changes, and switching to the high-bit-rate media file when the high-bit-rate high-density IDR frame media file is played to the next I frame.
9. An apparatus for multi-rate switching, the apparatus comprising a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for enabling connection communication between the processor and the memory, the program when executed by the processor implementing the steps of the method for multi-rate switching as claimed in any one of claims 1-7.
10. A computer readable storage medium, characterized in that the storage medium stores one or more programs which are executable by one or more processors to implement the steps of the method of multi-rate switching of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010841914.6A CN114079805A (en) | 2020-08-20 | 2020-08-20 | Multi-code rate switching method, device, system, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010841914.6A CN114079805A (en) | 2020-08-20 | 2020-08-20 | Multi-code rate switching method, device, system, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114079805A true CN114079805A (en) | 2022-02-22 |
Family
ID=80281687
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010841914.6A Pending CN114079805A (en) | 2020-08-20 | 2020-08-20 | Multi-code rate switching method, device, system, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114079805A (en) |
-
2020
- 2020-08-20 CN CN202010841914.6A patent/CN114079805A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11451862B2 (en) | System and method for effectuating fast channel change in an adaptive streaming environment | |
CN109314784B (en) | System and method for encoding video content | |
USRE48360E1 (en) | Method and apparatus for providing trick play service | |
US11553154B2 (en) | Method and arrangement for supporting playout of content | |
US9444856B2 (en) | System and method for managing adjacent channels in an adaptive streaming environment | |
US9961395B2 (en) | Video caching | |
US8477844B2 (en) | Method and apparatus for transmitting video | |
US8649669B2 (en) | Systems and methods for performing smooth visual search of media encoded for adaptive bitrate streaming via hypertext transfer protocol using trick play streams | |
US9894366B2 (en) | Variant and buffer handling for adaptive bitrate streaming | |
JP2024056880A (en) | Adaptive bit rate method against live broad casting | |
US20150089072A1 (en) | System and method for managing adjacent channels in an adaptive streaming environment | |
US11743535B2 (en) | Video fragment file processing | |
CN110022498B (en) | Method and device for realizing code rate switching | |
CN110073341B (en) | System and method for adaptive buffering for digital video streaming | |
CN114079805A (en) | Multi-code rate switching method, device, system, equipment and storage medium | |
WO2021013558A1 (en) | A media client with adaptive buffer size and the related method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |