CN114157643B - 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 PDF

Info

Publication number
CN114157643B
CN114157643B CN202111559559.4A CN202111559559A CN114157643B CN 114157643 B CN114157643 B CN 114157643B CN 202111559559 A CN202111559559 A CN 202111559559A CN 114157643 B CN114157643 B CN 114157643B
Authority
CN
China
Prior art keywords
transcoder
file
address
level
code rate
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.)
Active
Application number
CN202111559559.4A
Other languages
Chinese (zh)
Other versions
CN114157643A (en
Inventor
程亚辉
董丽莎
王宗杨
张晓刚
许强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haikan Network Technology Shandong Co ltd
Original Assignee
Haikan Network Technology Shandong Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Haikan Network Technology Shandong Co ltd filed Critical Haikan Network Technology Shandong Co ltd
Priority to CN202111559559.4A priority Critical patent/CN114157643B/en
Publication of CN114157643A publication Critical patent/CN114157643A/en
Application granted granted Critical
Publication of CN114157643B publication Critical patent/CN114157643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2181Source 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network 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/63Control 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/647Control 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/64746Control signals issued by the network directed to the server or the client
    • H04N21/64761Control signals issued by the network directed to the server or the client directed to the server
    • H04N21/64769Control signals issued by the network directed to the server or the client directed to the server for rate control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking 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 second-level M3U8 file is coded with a transcoder, whether the pull stream address of the second-level M3U8 is locked or not needs to be determined, if the pull stream address is locked, a multi-column table name mode is added into the transcoder, namely, the macro batch processing 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 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

Method for fixing code rate parameters based on transcoder HLS protocol
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, provincial broadcast television stations are used as a broadcast control platform, operators are used as transmission units, and the two parties cooperate to establish a high-efficiency and reasonable platform architecture and interface specifications. Therefore, a bit rate increase operation which seems to be simple involves a large amount of operations on two sides, which not only consumes a large amount of manpower, but also causes large-scale channel cutoff, and affects 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 of the primary M3U8 is:
http://XX.XX.XX.XX:port/00/SDM/CHANNEL00000029/index.m3u8;
the request format of the second level 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 code rates, a primary M3U8 may contain multiple secondary M3U8 requests. The bitrate in the second level 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 M3U8. This approach is indeed efficient and feasible without changing the video bitrate. But once the live video bitrate changes, the actual second level M3U8 address changes. And the second-level M3U8 request address manually configured by the operator cannot be changed along with the request address, so that the live streaming is interrupted.
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 cutoff, 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 a video stream of an information source, a transcoder firstly carries out audio and video decoding work, and aims to decode a packaged UDP stream;
s2, carrying out audio and video coding work, and defining a series of parameters such as 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 the second-level M3U8 file and the transcoder are coded, whether the stream pulling address of the second-level M3U8 is locked or not needs to be determined, if the stream pulling address is locked, a multi-column table name mode is added into the transcoder, namely, the macro batch processing is cancelled, the url address is manually filled, if the stream pulling address is not locked, a single-column table name is selected from the transcoder, and the url address is automatically filled through the macro batch processing of the transcoder;
s7, caching the transcoded M3U8 file and TS slices in an RAMDISK cache service system;
and S8, injecting the TS file into the CDN content distribution system by the RAMDISK cache service system, sending a stream pulling request to the CDN by an operator, wherein 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 a video stream of an information source, a transcoder firstly carries out audio and video decoding work, and aims to decode a packaged UDP stream;
s2, the transcoder carries out audio and video coding work and defines a series of parameters such as code rate, resolution, aspect ratio, frame rate, coding format and the like of the video stream;
s3, packaging the coded video, and aiming at a unicast stream, generally packaging by adopting an HLS protocol, wherein HLS (HTTP Live Streaming) is an Apple dynamic code rate self-adaption technology and is mainly used for audio and video services of PC (personal computer) and Apple terminals, and the HLS is an m3u (8) index file, a TS (transport stream) media fragment file and a key encryption string file, performing TS (transport stream) slicing on the video by utilizing the HLS protocol, performing proper caching by utilizing a set-top box, and exchanging the played stability with a small amount of delayed play, so that 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, and the format is
http://XX.XX.XX.XX:port/2/00/CHANNEL00000029/930400/1.m3u8;
S6, when the 930400 in the second-level M3U8 file is coded with a transcoder, the set code rate has a direct relation, and when the audio or video code rate changes, the parameter also changes, so that 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 filling of url address 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 an RAMDISK cache service system;
s8, the RAMDISK cache service system injects the TS file into the CDN content distribution system through injection, an operator sends a stream pulling 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: because fields in the url address in the prior art are automatically filled in by batch processing through a macro of a transcoder, when an audio/video code rate improvement operation is performed on a CHANNEL of CHANNEL00000029, the url address of a first-level M3U8 is not changed, and the url address of a second-level M3U8 is changed and 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, 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 be changed, so that when the url address of the first-level M3U8 is not configured, although the process of analyzing the first-level M3U8 is not performed, the multi-column table name mode is selected in the transcoder, when the code rate of audio and video is changed, the second-level M3U8 is not updated, and therefore 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/m3u8).
#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 multiple list name mode is used, as shown in fig. 3, the M3U8 list name can be filled in manually, and after the primary M3U8 is resolved, the generated secondary M3U8 address, the M3U8 file (hls _ CHANNEL00000315_0_5840800.M3U 8) has been changed to the manually filled 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 a video stream of an information source, a transcoder firstly decodes 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 the second-level M3U8 file and the transcoder are coded, whether the stream pulling address of the second-level M3U8 is locked or not needs to be determined, if the stream pulling address is locked, a multi-column table name mode is added into the transcoder, namely, the macro batch processing is cancelled, the url address is manually filled, if the stream pulling address is not locked, a single-column table name is selected from the transcoder, and the url address is automatically filled through the macro batch processing of the transcoder;
s7, caching the transcoded M3U8 file and TS slice in an RAMDISK cache service system;
s8, the RAMDISK cache service system injects the TS file into the CDN content distribution system through injection, an operator sends a stream pulling 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 parameters of code rate, resolution, aspect ratio, frame rate and coding format series of the video stream in the coding work.
CN202111559559.4A 2021-12-20 2021-12-20 Method for fixing code rate parameters based on transcoder HLS protocol Active CN114157643B (en)

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 CN114157643A (en) 2022-03-08
CN114157643B true 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 (6)

* Cited by examiner, † Cited by third party
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
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
CN112911327A (en) * 2021-02-01 2021-06-04 深圳市茅庐信息科技有限公司 Automatic configuration method, system and storage medium for live broadcast software

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105657578B (en) * 2015-10-29 2018-06-29 乐视致新电子科技(天津)有限公司 Live broadcasting method, system and client based on HLS protocol
CN109787983A (en) * 2019-01-24 2019-05-21 北京百度网讯科技有限公司 Live stream dicing method, device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN114157643A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
US11800200B2 (en) Low latency media ingestion system, devices and methods
US10237589B2 (en) System and method for facilitating fast channel change
CN103843301B (en) The switching between expression during the network crossfire of decoded multi-medium data
CN107743703B (en) Method, apparatus and computer-readable storage medium for media data transmission
US9609340B2 (en) Just-in-time (JIT) encoding for streaming media content
CN100456678C (en) Method for providing IPTV service for different type terminals, and IPTV service system
US10165032B2 (en) Chunking of multiple track audio for adaptive bit rate streaming
CN101895750B (en) Set-top box and PC-oriented real-time streaming media server and working method
US20230035998A1 (en) System and method for data stream fragmentation
US9451296B2 (en) Extracting data from advertisement files for ad insertion
CN107743252A (en) A kind of method for reducing live delay
US11297119B2 (en) Methods, systems, and apparatuses for improved content delivery
CN105306969A (en) Adaptive streaming media processing system and method
US20170134764A1 (en) Reception device, reception method, transmission device, and transmission method
CN203015055U (en) Digital television set top box with transcoding function
Concolato et al. Usages of DASH for rich media services
CN108494792A (en) A kind of flash player plays the converting system and its working method of hls video flowings
CN103873948A (en) Streaming media self-adaption matching transmission method, system and server
CN106453270B (en) Adaptive Transmission algorithm based on PI control Streaming Media
CN105430510A (en) Video on demand method, gateway, smart terminal and video on demand system
US20220210518A1 (en) Methods and systems for content output adjustment
CN114157643B (en) Method for fixing code rate parameters based on transcoder HLS protocol
CN109756774A (en) A kind of method and device of OTT multicast channel switching
US11228799B2 (en) Methods and systems for content synchronization
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