CN108206957B - Method for playing NGOD video file by HLS - Google Patents

Method for playing NGOD video file by HLS Download PDF

Info

Publication number
CN108206957B
CN108206957B CN201711228821.0A CN201711228821A CN108206957B CN 108206957 B CN108206957 B CN 108206957B CN 201711228821 A CN201711228821 A CN 201711228821A CN 108206957 B CN108206957 B CN 108206957B
Authority
CN
China
Prior art keywords
ngod
file
fragment
cdn
request
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
CN201711228821.0A
Other languages
Chinese (zh)
Other versions
CN108206957A (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.)
Guizhou Broadcasting & Tv Information Network Co ltd
Original Assignee
Guizhou Broadcasting & Tv Information Network 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 Guizhou Broadcasting & Tv Information Network Co ltd filed Critical Guizhou Broadcasting & Tv Information Network Co ltd
Priority to CN201711228821.0A priority Critical patent/CN108206957B/en
Publication of CN108206957A publication Critical patent/CN108206957A/en
Application granted granted Critical
Publication of CN108206957B publication Critical patent/CN108206957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
    • 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/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • 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/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand

Abstract

The invention discloses a method for playing NGOD (Next Generation On Demand Video architecture) standard Video files by HLS (HTTP Live streaming), which comprises the following steps: c2 obtaining index file; c2 index file to M3U 8; and acquiring TS fragment data. The invention utilizes the original resources to build a new all-IP media platform. The original video file is converted into a new media IP stream, and the index file is converted into the M3U8 without reconstructing storage and cache, thereby wasting investment.

Description

Method for playing NGOD video file by HLS
Technical Field
The invention belongs to the technical field of interactive on demand, and particularly relates to a method for playing an NGOD video file by an HLS.
Background
The interactive on-demand system constructed by the radio and television operators is mostly constructed by adopting the NGOD standard, and mainly comprises a content distribution system (CDN), a background management system (BO), a Video Streaming Server (VSS), a resource management system (ERM), a PORTAL system (PORTAL), an EPG and other systems.
In summary, the broadcasting and television operators rebuild a new media all-IP platform based on the OTT/IPTV technology, so that the storage system is rebuilt, the investment is wasted, and the injection time cost is high.
Disclosure of Invention
The invention aims to provide a method for playing NGOD video files by HLS, which aims to solve the problems that a broadcasting and television operator rebuilds a new media full IP platform based on OTT/IPTV technology, a storage system is rebuilt, investment is wasted, and injection time cost is high.
The NGOD index file is analyzed and converted into an M3U8 file on the edge plug flow server, and then the NGOD index file corresponds to a complete TS file, wherein the CDN data return source is a C2 interface adopting the NGOD standard and is compatible with the NGOD CDN adopted by a broadcasting and television operator, so that when the edge plug flow server provides plug flow service for IP users, a newly-built central content library and cache are not needed, and the currently-built central content library and cache can be used, thereby avoiding investment waste.
The implementation method of the invention comprises the following steps:
step one, C2 obtains an index file;
step two, converting the C2 index file into M3U 8;
and step three, acquiring TS fragment data.
Further, the C2 specifically obtains the index file, including:
1) the edge streaming server acquires the indexed CDN back-to-source address from the NGOD CDN by using a content positioning request of C2;
2) the NGOD CDN responds to the content positioning request of the C2 and returns an address capable of providing an index file downloading service to the edge plug flow server;
3) the edge streaming server uses the content transmission request of C2 to request the index file download from the NGOD CDN service address;
4) the NGOD CDN responds to the content delivery request of C2 and replies with data to the edge streaming server.
Further, the converting the C2 index file into M3U8 specifically includes:
1) analyzing an index record table of the index file according to the format of the NGOD index file, and generating a key frame information queue, wherein the content stored by each node in the queue is the time and position offset of a key frame relative to the start of the file;
2) traversing a key frame queue according to the configured maximum fragment length of M3U8 fragments to form a fragment data information queue, wherein each node in the queue stores fragment offset position and fragment duration information;
3) and generating an M3U8 file according to the generated fragment information queue, wherein the URL of each fragment stores the downloading information of the complete TS file, the offset position of the TS fragment, the file size of the TS fragment and the time length of the TS fragment.
Further, the acquiring of the TS fragment data specifically includes:
1) the edge stream pushing server acquires a CDN return source address of the TS file from the NGOD CDN by using a content positioning request of C2;
2) the NGOD CDN responds to the content positioning request of the C2 and returns an address capable of providing TS file downloading service to the edge streaming server;
3) the edge stream pushing server uses a content transmission request of C2 to request the downloading of the TS file from the NGOD CDN service address, analyzes the cheap position and the fragment size of the TS fragment file relative to the complete TS file in a user request string, and uses a Range mode to request the TS fragment data;
4) and the NGOD CDN responds to the content transmission request of the C2 and responds TS fragment data to the edge stream pushing server according to the Range parameter of the request.
Another object of the present invention is to provide a new media platform using the method for playing NGOD video files by using the HLS.
The HLS method for playing the NGOD video file provided by the invention utilizes the original resources to build a new full IP media platform; the original video file is converted into a new media IP stream, and the index file is converted into the M3U8 without reconstructing storage and cache, thereby wasting investment.
Drawings
Fig. 1 is a flowchart of a method for playing an NGOD video file by an HLS according to an embodiment of the present invention.
Fig. 2 is a timing diagram provided by an embodiment of the invention.
Fig. 3 is a flowchart illustrating the process of C2 obtaining the index file according to the embodiment of the present invention.
Fig. 4 is a schematic diagram of a TS fragmentation data acquisition flow provided by the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The following detailed description of the principles of the invention is provided in connection with the accompanying drawings.
As shown in fig. 1, the method for playing an NGOD video file by the HLS according to the embodiment of the present invention includes the following steps:
s101: c2 obtaining index file;
s102: c2 index file to M3U 8;
s103: and acquiring TS fragment data.
The application of the principles of the present invention will now be described in further detail with reference to the accompanying drawings.
The timing diagram is shown in fig. 2.
1): firstly, the terminal acquires a play string of M3U8 from EPG, and a media ID of a corresponding NGOD video file is stored in an ID parameter in the play string
Such as: http://10.2.10.10/nv.m3u8id ═ OTHE0000357723010400
2): after receiving the request of the terminal, the stream pushing server analyzes the NGOD video file ID (OTHE 0000357710400) and downloads the index file by using an NGOD C2 interface
a) The method comprises the following steps An index file positioning request sent to the NGOD-CDN:
Figure BDA0001487810620000051
Figure BDA0001487810620000061
b) the method comprises the following steps NGOD-CDN responds to a transfer Port and transfer ID which can provide index file download to the edge streaming server
Figure BDA0001487810620000062
c) The method comprises the following steps The push streaming service uses the transferPort and the transferID to generate request string to request data
GET
POBJACB5FEC794BE64A2EDF7FD81B5B6BFCB6AD8BCF2AC2E3D37ACB6ABB7ACB6ABB7ACB6ABB7ACA40DB7HTTP/1.1
Host:10.2.85.3
Accept-Encoding:identity
Transfer-Delay:0
Range:bytes=0-1221898
Ingress-Capacity:800000000
d) The method comprises the following steps NGOD-CDN response index file data
HTTP/1.1 206Partial Content
Server:Cisco/CDS Gateway/3.0
Content-Length:1221899
Content-Range:bytes 0-1221898/1221899
Content-Type:video/mpeg
Transfer-Encoding:chunked
Cache-Control:public
Connection:Keep-Alive
059E
Video Index File...........Cisco System…………………
3) Converting index file into M3U8 file
After the index file is obtained, the index file is analyzed to analyze the index list information of the base speed file, the push streaming server forms the content of the M3U8 list file according to the index information and the configured duration (generally 10 seconds), and the offset position of the fragment relative to the base speed file and the size of the fragment are recorded in each TS fragment URL in the M3U8 content.
The Index records in the Index file record key frame information of the base speed TS file, and the specific structure is as follows:
Figure BDA0001487810620000081
wherein for translating the HLS function there are two main parameters
1: PacketOffset for calculating the starting position and length of the slice
2: PCR for calculating a slicing time duration
If the index file is:
Figure BDA0001487810620000082
assuming that the time difference of each key frame is 5 seconds, and the TS duration slice of the converted M3U8 is 10 seconds, the generated M3U8 is:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:10
#EXTINF:10,
nv.tsid=assert_id&cp=provider_id&begin=PacketOffset1&filesize=(PacketOffset3-PacketOffset1)
#EXTINF:10,
nv.tsid=assert_id&cp=provider_id&begin=PacketOffset3&filesize=(PacketOffset5+PacketOffset3)
#EXTINF:10,
nv.tsid=assert_id&cp=provider_id&begin=PacketOffset5&filesize=(TS_FILE_SIZE-PacketOffset5)
#EXT-X-ENDLIST
4) TS sliced data acquisition
When the terminal requests the TS fragment data, the stream pushing server returns the source request data from the cisco CDN by using the C2 and carrying the upper range parameter according to the offset position of the fragment data carried in the URL with respect to the base speed file and the size of the fragment, so as to respond to the TS fragment data request of the terminal.
For example, the URL of the first TS fragment requested is:
nv.tsid=OTHE0000357723010400&begin=0&filesize=1879812
a) a video file positioning request sent to the NGOD-CDN:
Figure BDA0001487810620000091
Figure BDA0001487810620000101
b) the method comprises the following steps NGOD-CDN responds to a transfer Port and transfer ID capable of promoting video file download to the edge streaming server
Figure BDA0001487810620000102
Figure BDA0001487810620000111
c) The method comprises the following steps The push streaming service generates a request string to request data by using the transferPort and the transferID, and determines the Range of Range in the request according to the start and filesize parameters in the URL
GET
POBJACB5FEC794BE64A0EDF7FD83B5B6BFC96BF662ECACA82F37ACB6ABB7ACB6ABB7ACB6ABB7BAE977B7HTTP/1.1
Host:10.2.85.130
Accept-Encoding:identity
Transfer-Delay:0
Range:bytes=0-1879812
Ingress-Capacity:800000000
d) The method comprises the following steps NGOD-CDN answering video file data
HTTP/1.1 206Partial Content
Server:Cisco/CDS Gateway/3.0
Content-Length:1879813
Content-Range:bytes 0-1879812/375380728
Content-Type:video/mpeg
Transfer-Encoding:chunked
Cache-Control:public
Connection:Keep-Alive
007B
G@...............................................。
As shown in fig. 3, the C2 obtains the index file, and the process is as follows:
1): the edge push flow server obtains an indexed CDN back source address from the NGOD CDN by using C2Content location (Content positioning request of C2);
2): the NGOD CDN responds to the C2Content location and returns an address capable of providing an index file downloading service to the edge plug-flow server;
3): the edge streaming server uses C2Content Transfer (Content transmission request of C2) to request the index file download from the NGOD CDN service address;
4): the NGOD CDN corresponds to the C2Content Transfer and replies with the data to the edge push server.
The conversion of the C2 index file into the M3U8 specifically comprises the following steps:
1): and analyzing an index record table of the index file according to the format of the NGOD index file, and generating a key frame information queue, wherein each node in the queue stores the time and position offset of the key frame relative to the start of the file.
2): according to the configured maximum fragment length of M3U8 fragments, traversing the key frame queue to form a fragment data information queue, wherein each node in the queue stores information such as fragment offset position, fragment duration and the like.
3): and generating an M3U8 file according to the generated fragment information queue, wherein the URL of each fragment stores the downloading information of the complete TS file, the offset position of the TS fragment, the file size of the TS fragment and the time length of the TS fragment.
As shown in fig. 4, the TS fragment data acquisition process is as follows:
1): the edge stream pushing server uses C2Content Locate (Content positioning request of C2) to obtain a CDN back source address of the TS file from the NGOD CDN;
2): the NGOD CDN responds to the C2Content location and returns an address capable of providing TS file downloading service to the edge stream pushing server;
3): the edge stream pushing server uses C2Content Transfer (Content transmission request of C2) to request TS file downloading from NGOD CDN service address, analyzes cheap position and fragment size of TS fragment file relative to complete TS file in user request string, and uses Range mode to request TS fragment data;
4): and the NGOD CDN responds to the C2Content Transfer and responds TS fragment data to the edge stream pushing server according to the Range parameter of the request.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (2)

1. A method for playing NGOD video files by HLS is characterized in that the method for playing NGOD video files by HLS analyzes NGOD index files on an edge plug flow server and converts the NGOD index files into M3U8 files; then corresponding to the complete TS file, the CDN data source returning is all the C2 interface adopting the NGOD standard, which is compatible with the NGOD CDN adopted by the broadcasting and TV operators;
the method for playing the NGOD video file by the HLS specifically comprises the following steps:
step one, C2 obtains an index file;
step two, converting the C2 index file into M3U 8;
step three, TS fragment data is obtained;
the C2 specifically includes:
1) the edge streaming server acquires the indexed CDN back-to-source address from the NGOD CDN by using a content positioning request of C2;
2): the NGOD CDN responds to the content positioning request of the C2 and returns an address capable of providing an index file downloading service to the edge streaming server;
3): the edge streaming server uses the content transmission request of C2 to request the index file download from the NGOD CDN service address;
4): the NGOD CDN responds to the content transmission request of C2 and replies the index file data to the edge plug flow server;
the conversion of the C2 index file into the M3U8 specifically comprises the following steps:
1): analyzing an index record table of the index file according to the format of the NGOD index file, and generating a key frame information queue, wherein the content stored by each node in the queue is the time and position offset of a key frame relative to the start of the file;
2): traversing a key frame information queue according to the configured maximum fragment length of M3U8 fragments to form a fragment data information queue, wherein each node in the queue stores fragment offset position and fragment time length information;
3): generating an M3U8 file according to the generated fragment data information queue, wherein the URL of each fragment stores the download information of the complete TS file, the offset position of the TS fragment, the file size of the TS fragment and the time length of the TS fragment;
the acquiring of the TS fragment data specifically includes:
1) the edge stream pushing server acquires a CDN return source address of the TS file from the NGOD CDN by using a content positioning request of C2;
2): the NGOD CDN responds to the content positioning request of the C2 and returns an address capable of providing TS file downloading service to the edge streaming server;
3): the edge stream pushing server uses a content transmission request of C2 to request a TS file to download to an NGOD CDN service address, analyzes the offset position and the fragment size of the TS fragment file relative to the complete TS file from a user request string, and uses a Range mode to request TS fragment data;
4): and the NGOD CDN responds to the content transmission request of the C2 and responds TS fragment data to the edge stream pushing server according to the Range parameter of the request.
2. A new media platform that performs the method of HLS playing NGOD video files of claim 1.
CN201711228821.0A 2017-11-29 2017-11-29 Method for playing NGOD video file by HLS Active CN108206957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711228821.0A CN108206957B (en) 2017-11-29 2017-11-29 Method for playing NGOD video file by HLS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711228821.0A CN108206957B (en) 2017-11-29 2017-11-29 Method for playing NGOD video file by HLS

Publications (2)

Publication Number Publication Date
CN108206957A CN108206957A (en) 2018-06-26
CN108206957B true CN108206957B (en) 2021-05-28

Family

ID=62604037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711228821.0A Active CN108206957B (en) 2017-11-29 2017-11-29 Method for playing NGOD video file by HLS

Country Status (1)

Country Link
CN (1) CN108206957B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143380A (en) * 2010-12-31 2011-08-03 华为技术有限公司 Content provision control method, content provision control device and content provision control system for content transmission network
CN104469391A (en) * 2014-11-21 2015-03-25 深圳市天威视讯股份有限公司 Cloud-platform-based digital television content distribution system and method
CN105979373A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Play method and device
CN106162377A (en) * 2015-04-08 2016-11-23 中国移动通信集团公司 The conversion method of adaptive stream media technology, device, BM-SC and terminal
CN106303747A (en) * 2015-05-29 2017-01-04 中兴通讯股份有限公司 The Internet protocol IP video system merged and implementation method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012222530A (en) * 2011-04-06 2012-11-12 Sony Corp Receiving device and method, and program
US9609340B2 (en) * 2011-12-28 2017-03-28 Verizon Patent And Licensing Inc. Just-in-time (JIT) encoding for streaming media content

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143380A (en) * 2010-12-31 2011-08-03 华为技术有限公司 Content provision control method, content provision control device and content provision control system for content transmission network
CN104469391A (en) * 2014-11-21 2015-03-25 深圳市天威视讯股份有限公司 Cloud-platform-based digital television content distribution system and method
CN106162377A (en) * 2015-04-08 2016-11-23 中国移动通信集团公司 The conversion method of adaptive stream media technology, device, BM-SC and terminal
CN106303747A (en) * 2015-05-29 2017-01-04 中兴通讯股份有限公司 The Internet protocol IP video system merged and implementation method
CN105979373A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Play method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于融合CDN的流媒体系统及其关键技术研究;马少林;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130715(第7期);正文第59页4.3.4、第64页4.4.1节,图4.3,4.6 *

Also Published As

Publication number Publication date
CN108206957A (en) 2018-06-26

Similar Documents

Publication Publication Date Title
KR101956121B1 (en) Apparatus and method for providing streaming contents
Stockhammer Dynamic adaptive streaming over HTTP-- standards and design principles
JP5341186B2 (en) Proxy function
Sodagar The mpeg-dash standard for multimedia streaming over the internet
US9392307B2 (en) Smart pre-load for video-on-demand in an HTTP adaptive streaming environment
US9615119B2 (en) Method and apparatus for providing timeshift service in digital broadcasting system and system thereof
CN102547478B (en) Triggered slice on-demand system and method of streaming media based on CDN (Content Distribution Network)
Walker et al. ROUTE/DASH IP streaming-based system for delivery of broadcast, broadband, and hybrid services
WO2014208377A1 (en) Content supply device, content supply method, program, terminal device, and content supply system
WO2015109847A1 (en) Method for rapidly delivering segmented programs, server and client
CN107920072B (en) Multimedia sharing method and system based on data characteristics
Lim MMT, new alternative to MPEG-2 TS and RTP
KR20160138044A (en) Targeted advertisement insertion for streaming media data
CN108271039B (en) File sending method and device
JP6597604B2 (en) Reception device, transmission device, data communication method, and data processing method
CN108206957B (en) Method for playing NGOD video file by HLS
EP3951597A1 (en) Video content processing systems and methods
WO2016090912A1 (en) Method, device, terminal and system for generating and playing live video
Kang et al. Method of DASH segments into a MMTP stream for switching contents under a hybrid broadcasting environment
CN115942001A (en) Cross-platform video transcoding and stream pushing method for airport supervision

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