CN114157643A - Method for fixing code rate parameters based on transcoder HLS protocol - Google Patents
Method for fixing code rate parameters based on transcoder HLS protocol Download PDFInfo
- Publication number
- CN114157643A CN114157643A CN202111559559.4A CN202111559559A CN114157643A CN 114157643 A CN114157643 A CN 114157643A CN 202111559559 A CN202111559559 A CN 202111559559A CN 114157643 A CN114157643 A CN 114157643A
- Authority
- CN
- China
- Prior art keywords
- transcoder
- file
- address
- code rate
- video
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- 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/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2181—Source of audio or video content, e.g. local disk arrays comprising remotely distributed storage units, e.g. when movies are replicated over a plurality of video servers
-
- 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/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- 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/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64746—Control signals issued by the network directed to the server or the client
- H04N21/64761—Control signals issued by the network directed to the server or the client directed to the server
- H04N21/64769—Control signals issued by the network directed to the server or the client directed to the server for rate control
-
- 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/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
- H04N21/8586—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Communication Control (AREA)
Abstract
The invention relates to a method for fixing code rate parameters based on a transcoder HLS protocol, which comprises the following steps: after receiving the video stream of the information source, the transcoder firstly carries out the operations of decoding, encoding and packaging of the audio and video; the packaged playing url is a first-level M3U8 file; after the primary M3U8 file is analyzed, a secondary M3U8 file is obtained; when the two-level M3U8 file is encoded with a transcoder, whether the pull address of the two-level M3U8 is locked or not needs to be determined, if the pull address is locked, a multi-column table name mode is added to the transcoder, namely, the macro batch processing is cancelled, the url address is manually filled, if the pull address is not locked, a single-column table name is selected to be used in the transcoder, and the url address is automatically filled through the macro batch processing of the transcoder. The method adopted in the application solves the problem of large workload of operation of increasing the code rate of the live channel while maintaining high-efficiency stream playing, greatly reduces the investment of labor cost, can greatly reduce the time for cutting off, even has no perception for a user, and greatly improves the user experience.
Description
Technical Field
The invention relates to the technical field of video service, in particular to a method for fixing code rate parameters based on a transcoder HLS protocol.
Background
With the continuous upgrade of the set-top box and the high-definition television of the terminal, the household bandwidth of the user is continuously increased. Users have increasingly demanded greater clarity of television programming. For IPTV, in order to meet user requirements, high-definition modification and video rate improvement of channels become a normalized task. However, in the current operation mode of the IPTV, a provincial broadcast station is used as a broadcast control platform, and an operator is used as a transmission unit, so that efficient and reasonable platform architecture and interface specifications are established by cooperation of the two parties. Therefore, a code rate increasing operation which seems to be simple involves a large amount of operations of two parties, which not only consumes a large amount of manpower, but also causes large-scale channel cutoff, and influences user experience.
For example, the current unicast stream of IPTV in a certain province includes two levels of M3U8 according to the interface specifications agreed by both parties, where:
the request format for level one M3U8 is:
http://XX.XX.XX.XX:port/00/SDM/CHANNEL00000029/index.m3u8;
the request format of the secondary M3U8 is:
http://XX.XX.XX.XX:port/2/00/CHANNEL00000029/930400/1.m3u8;
wherein: 00 is cmsid, SD is providerid, 2 is live broadcast, CHANNEL00000029 is CHANNEL id, 9340800 is code rate.
Since a live channel may contain multiple bit rates, a primary M3U8 may contain multiple secondary M3U8 requests. The bitrate in the secondary M3U8 is changed according to the actual bitrate of the video in the live stream. And in order to improve the flow pulling efficiency when the operator pulls the flow, the operator directly skips the first-level M3U8 and directly pulls the second-level M3U 8. This approach is indeed efficient and feasible without changing the video bitrate. But once the live video bitrate changes, the actual secondary M3U8 address changes. And the secondary M3U8 request address configured manually by the operator will not change with it, resulting in interruption of the live stream.
Therefore, when a channel coding rate is increased, a downstream streaming operator needs to delete a previous channel, reconfigure a newly generated second-level M3U8 streaming address, and then issue the new second-level M3U8 streaming address to a city platform and a district/county platform step by step through a provincial center platform, which causes huge workload and causes long-time live channel cut-off, thereby affecting user experience.
Disclosure of Invention
In order to overcome the defects, the invention aims to provide a method for fixing code rate parameters based on a transcoder HLS protocol.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for fixing code rate parameters based on a transcoder HLS protocol comprises the following steps:
s1, after receiving the video stream of the information source, the transcoder firstly decodes the audio and video, and aims to decode the encapsulated UDP stream;
s2, carrying out audio and video coding work, and defining a series of parameters of code rate, resolution, aspect ratio, frame rate, coding format and the like of the video stream;
s3, packaging the coded video;
s4, the packaged playing url is a first-level M3U8 file;
s5, after the primary M3U8 file is analyzed, a secondary M3U8 file is obtained;
s6, when encoding a secondary M3U8 file and a transcoder, determining whether a pull stream address of the secondary M3U8 is locked, if so, adding a multi-column table name mode in the transcoder, namely, canceling the batch processing of a macro, selecting to manually fill in a url address, if not, selecting a single-column table name in the transcoder, and automatically filling in the url address through the batch processing of the macro of the transcoder;
s7, caching the transcoded M3U8 file and TS slice in a RAMDISK caching service system;
s8, the RAMDISK cache service system injects the TS file into the CDN content distribution system through injection, the operator sends a pull stream request to the CDN, and url is a second-level M3U8 address.
The invention has the following beneficial effects: the method adopted in the application solves the problem of large workload of code rate increasing operation of the live broadcast channel while maintaining efficient stream playing, and greatly reduces the investment of labor cost; the method solves the problem that the cut-off time of a single channel is about 30 minutes when the code rate increasing operation of the live channel is executed in the prior art, can greatly reduce the cut-off time, even has no perception of a user, and greatly improves the user experience.
Drawings
Fig. 1 is a flow chart of the present application.
FIG. 2 is a schematic diagram of an interface in the single list name mode.
FIG. 3 is a schematic diagram of an interface in a multi-column table name mode.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings.
A method for fixing code rate parameters based on a transcoder HLS protocol as shown in fig. 1-3, comprising:
s1, after receiving the video stream of the information source, the transcoder firstly decodes the audio and video, and aims to decode the encapsulated UDP stream;
s2, the transcoder carries out audio and video coding work, and defines a series of parameters of code rate, resolution, aspect ratio, frame rate, coding format and the like of the video stream;
s3, packaging the coded video, and aiming at the unicast stream, generally packaging by adopting an HLS protocol, wherein HLS (HTTP Live streaming) is the dynamic code rate self-adaptive technology of Apple, is mainly used for audio and video services of PC and Apple terminals, and comprises an m3u (8) index file, a TS media fragment file and a key encryption string file, TS slicing is carried out on the video by utilizing the HLS protocol, proper caching is carried out by utilizing a set-top box, the play stability is exchanged by a small amount of delay play, and the Live broadcast blockage or screen splash caused by network fluctuation can be well dealt with;
s4, the packaged playing url is a first-level M3U8 file with the format:
http://XX.XX.XX.XX:port/00/SDM/CHANNEL00000029/index.m3u8;
s5, after the primary M3U8 file is analyzed, a secondary M3U8 file is obtained in the format of
http://XX.XX.XX.XX:port/2/00/CHANNEL00000029/930400/1.m3u8;
S6, when 930400 in the second-level M3U8 file is coded with a transcoder, the set code rate has a direct relation, when the audio or video code rate is changed, the parameter is changed, therefore, whether the pull stream address of the second-level M3U8 is locked or not needs to be determined during transcoding, if the pull stream address is locked, a multi-column table name mode is added into the transcoder, namely, the batch processing of macro is cancelled, manual url address filling is selected, if the pull stream address is not locked, a single-column table name is selected from the transcoder, and the url address is automatically filled through the batch processing of the macro of the transcoder;
s7, caching the transcoded M3U8 file and TS slice in a RAMDISK caching service system;
s8, the RAMDISK cache service system injects the TS file into the CDN content distribution system through injection, the operator sends a pull stream request to the CDN, and url is a second-level M3U8 address:
http://XX.XX.XX.XX:port/2/00/CHANNEL00000029/930400/1.m3u8。
the principle is as follows: since the fields in the url address are automatically filled in by batch processing through the macro of the transcoder in the prior art, when the CHANNEL00000029 is subjected to the operation of audio/video rate enhancement, the url address of the primary M3U8 is not changed, and the url address of the secondary M3U8 is changed, which may become:
http://XX.XX.XX.XX:port/2/00/CHANNEL00000029/2540800/1.m3u8;
therefore, the multi-column table name mode is added into the transcoder, namely, macro batch processing is cancelled, manual filling of the url address is selected, and therefore when the operation of improving the code rate is executed, the multi-column table name mode can be selected, and the url address is guaranteed not to change, so that when the url address of the first-level M3U8 is not configured, although the process of analyzing the first-level M3U8 is omitted, the multi-column table name mode is selected in the transcoder, and when the code rate of the audio and video changes, the second-level M3U8 is not updated, so that the operator can still normally acquire the live stream.
As shown in fig. 2, when the list name mode is selected, the bandwidth parameters are automatically calculated by substituting parameters such as audio/video code rate and the like into the algorithm formula built in the transcoder, and after the primary M3U8 is analyzed, a secondary M3U8 address is generated, wherein 5840800 is the bandwidth parameter generated by automatic calculation, and the playing address is automatically complemented by the system according to the generated M3U8 file (hls _ CHANNEL00000315_0_5840800.M3U 8).
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=5840800,RESOLUTION=1920x1080,CODECS="avc1.64001e,mp4a.40.2"
hls_CHANNEL00000315_0_5840800.m3u8。
When the multi-list name mode is used, as shown in fig. 3, the list name of M3U8 can be manually filled in, and after the primary M3U8 is resolved, the generated secondary M3U8 address, M3U8 file (hls _ CHANNEL00000315_0_5840800.M3U8) is changed into a manually filled-in style.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2540800,RESOLUTION=1920x1080,CODECS="avc1.64001e,mp4a.40.2"
hls_CHANNEL00000315_0_2540800.m3u8。
The present invention is not limited to the above embodiments, and any structural changes made under the teaching of the present invention shall fall within the protection scope of the present invention, which is similar or similar to the technical solutions of the present invention.
The techniques, shapes, and configurations not described in detail in the present invention are all known techniques.
Claims (2)
1. A method for fixing code rate parameters based on a transcoder HLS protocol is characterized in that: the method comprises the following steps:
s1, after receiving the video stream of the information source, the transcoder firstly decodes the audio and video;
s2, carrying out audio and video coding work;
s3, packaging the coded video;
s4, the packaged playing url is a first-level M3U8 file;
s5, after the primary M3U8 file is analyzed, a secondary M3U8 file is obtained;
s6, when encoding a secondary M3U8 file and a transcoder, determining whether a pull stream address of the secondary M3U8 is locked, if so, adding a multi-column table name mode in the transcoder, namely, canceling the batch processing of a macro, selecting to manually fill in a url address, if not, selecting a single-column table name in the transcoder, and automatically filling in the url address through the batch processing of the macro of the transcoder;
s7, caching the transcoded M3U8 file and TS slice in a RAMDISK caching service system;
s8, the RAMDISK cache service system injects the TS file into the CDN content distribution system through injection, the operator sends a pull stream request to the CDN, and url is a second-level M3U8 address.
2. The method of claim 1 for fixing the code rate parameters based on a transcoder HLS protocol, wherein: and defining the parameters of code rate, resolution, aspect ratio, frame rate and coding format series of the video stream in the coding work.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111559559.4A CN114157643B (en) | 2021-12-20 | 2021-12-20 | Method for fixing code rate parameters based on transcoder HLS protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111559559.4A CN114157643B (en) | 2021-12-20 | 2021-12-20 | Method for fixing code rate parameters based on transcoder HLS protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114157643A true CN114157643A (en) | 2022-03-08 |
CN114157643B CN114157643B (en) | 2023-01-13 |
Family
ID=80451816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111559559.4A Active CN114157643B (en) | 2021-12-20 | 2021-12-20 | Method for fixing code rate parameters based on transcoder HLS protocol |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114157643B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106791986A (en) * | 2017-01-10 | 2017-05-31 | 环球智达科技(北京)有限公司 | A kind of live index list encrypted antitheft catenary systems of HLS and method |
CN108124192A (en) * | 2016-11-30 | 2018-06-05 | 亦非云互联网技术(上海)有限公司 | The playback method and system of HLS Streaming Medias |
CN108271040A (en) * | 2016-12-30 | 2018-07-10 | 华为软件技术有限公司 | The method and apparatus for playing video |
US20180227648A1 (en) * | 2015-10-29 | 2018-08-09 | Le Holdings (Beijing) Co., Ltd. | Method for live broadcast based on hls protocol and electronic device |
CN108494792A (en) * | 2018-04-09 | 2018-09-04 | 四川百视通科技有限公司 | A kind of flash player plays the converting system and its working method of hls video flowings |
CN110677727A (en) * | 2019-09-10 | 2020-01-10 | 北京奇艺世纪科技有限公司 | Audio and video playing method and device, electronic equipment and storage medium |
US20200245042A1 (en) * | 2019-01-24 | 2020-07-30 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method, apparatus and system for slicing live streaming |
CN112911327A (en) * | 2021-02-01 | 2021-06-04 | 深圳市茅庐信息科技有限公司 | Automatic configuration method, system and storage medium for live broadcast software |
-
2021
- 2021-12-20 CN CN202111559559.4A patent/CN114157643B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180227648A1 (en) * | 2015-10-29 | 2018-08-09 | Le Holdings (Beijing) Co., Ltd. | Method for live broadcast based on hls protocol and electronic device |
CN108124192A (en) * | 2016-11-30 | 2018-06-05 | 亦非云互联网技术(上海)有限公司 | The playback method and system of HLS Streaming Medias |
CN108271040A (en) * | 2016-12-30 | 2018-07-10 | 华为软件技术有限公司 | The method and apparatus for playing video |
CN106791986A (en) * | 2017-01-10 | 2017-05-31 | 环球智达科技(北京)有限公司 | A kind of live index list encrypted antitheft catenary systems of HLS and method |
CN108494792A (en) * | 2018-04-09 | 2018-09-04 | 四川百视通科技有限公司 | A kind of flash player plays the converting system and its working method of hls video flowings |
US20200245042A1 (en) * | 2019-01-24 | 2020-07-30 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method, apparatus and system for slicing live streaming |
CN110677727A (en) * | 2019-09-10 | 2020-01-10 | 北京奇艺世纪科技有限公司 | Audio and video playing method and device, electronic equipment and storage medium |
CN112911327A (en) * | 2021-02-01 | 2021-06-04 | 深圳市茅庐信息科技有限公司 | Automatic configuration method, system and storage medium for live broadcast software |
Also Published As
Publication number | Publication date |
---|---|
CN114157643B (en) | 2023-01-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103843301B (en) | The switching between expression during the network crossfire of decoded multi-medium data | |
US9351020B2 (en) | On the fly transcoding of video on demand content for adaptive streaming | |
US9258333B2 (en) | Method for recovering content streamed into chunk | |
EP2750405B1 (en) | Information stream management | |
US10375373B2 (en) | Method and apparatus for encoding three-dimensional (3D) content | |
WO2017103856A1 (en) | Media distribution with sample variants for normalized encryption | |
US20230035998A1 (en) | System and method for data stream fragmentation | |
CN102714624A (en) | Method and apparatus for adaptive streaming using segmentation | |
CN101321275B (en) | System and method for processing video stream | |
US20150074129A1 (en) | Augmenting media presentation description and index for metadata in a network environment | |
CN105165015A (en) | Enhanced playlist definition and delivery for fast channel change with HTTP adaptive streaming | |
CN102957672A (en) | Method, client side and system for self-adaptive playing of FLV (flash video) media streams | |
CA2939250A1 (en) | Processing continuous multi-period content | |
US20190200052A1 (en) | System, Device and Method for Transrating File Based Assets | |
CN106453270B (en) | Adaptive Transmission algorithm based on PI control Streaming Media | |
US12107909B2 (en) | Methods, systems, and apparatuses for improved content delivery | |
US20170134764A1 (en) | Reception device, reception method, transmission device, and transmission method | |
Concolato et al. | Usages of DASH for rich media services | |
CN103873948A (en) | Streaming media self-adaption matching transmission method, system and server | |
CN105656674B (en) | A kind of double net access methods of IPTV private network and internet | |
EP3094097A1 (en) | Method for displaying bit depth for playing video using dash | |
US20220210518A1 (en) | Methods and systems for content output adjustment | |
CN114157643B (en) | Method for fixing code rate parameters based on transcoder HLS protocol | |
CN113810741A (en) | Direct recording playing video mixed editing playing control system and method | |
CN105933282A (en) | Video and audio screen code stream self-adaption method based on OTT service |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |