CN106657123A - Live broadcast time shifting scheme based on hls protocol - Google Patents

Live broadcast time shifting scheme based on hls protocol Download PDF

Info

Publication number
CN106657123A
CN106657123A CN201611271879.9A CN201611271879A CN106657123A CN 106657123 A CN106657123 A CN 106657123A CN 201611271879 A CN201611271879 A CN 201611271879A CN 106657123 A CN106657123 A CN 106657123A
Authority
CN
China
Prior art keywords
module
time
section
computing module
shift
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
Application number
CN201611271879.9A
Other languages
Chinese (zh)
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.)
Hangzhou Arcvideo Technology Co ltd
Original Assignee
Hangzhou Arcvideo Technology 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 Hangzhou Arcvideo Technology Co ltd filed Critical Hangzhou Arcvideo Technology Co ltd
Priority to CN201611271879.9A priority Critical patent/CN106657123A/en
Publication of CN106657123A publication Critical patent/CN106657123A/en
Pending legal-status Critical Current

Links

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/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • 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/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • 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/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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • 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/43Processing 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4333Processing operations in response to a pause request
    • 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
    • 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/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • 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/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Abstract

The invention discloses a live broadcast time shifting scheme based on an hls protocol. The live broadcast time shifting scheme comprises a monitoring module, a first computing module, a first filtering module, a storage module, a second filtering module, a second computing module and an integration module, the switch of time shifting playback and live broadcast playback is realized by simple parameter control, no database is realized by a unique position storage principle, and the efficiency of processing a time shifting request is improved.

Description

A kind of direct broadcast time-shift scheme based on hls agreements
Technical field
The present invention relates to a kind of direct broadcast time-shift scheme based on hls agreements.
Background technology
The database purchase slice position mode that common time shift is adopted, dependence is high, and database interaction is too many, and impact is processed Performance.
The content of the invention
It is an object of the invention to overcome of the prior art not enough and provide a kind of direct broadcast time-shift side based on hls agreements Case.
For achieving the above object, on the one hand, the present invention provide a kind of direct broadcast time-shift scheme based on hls agreements, including Monitoring modular, the first computing module, the first filtering module, memory module, the second filtering module, the second computing module and integration mould Block,
Monitoring modular is used to record the change of live source,
First computing module be used for by the section name translation of live generation be the peculiar title of time-shifted service, and first calculate Module is used to for current live source to make unique mark,
First filtering module is used to filter the time point belonging to section, and the section of same period is made to unify Storage is processed,
Memory module is used to the section after the first computing module and the first filtering module are processed file and cache Process,
Second filtering module is used to filter time shifting request parameter and checking parameter validity,
Second computing module is used to calculate the slice position of required time shift for the time parameter of request,
Integrating module is used to update the section path for getting.
Preferably, monitoring modular monitors the m3u8 files of live source and judges whether to generate new ts sections, new when generating Ts section be then considered as live source change and record.
It is simple sharp due to without the need for data base system according to a kind of direct broadcast time-shift scheme based on hls agreements that the present invention is provided The features such as being positioned with position storage and correlation computations, can greatly improve the treatment effeciency of time shift.
Description of the drawings
Fig. 1 is a kind of logical blocks figure of direct broadcast time-shift scheme based on hls agreements of one embodiment of the invention.
The realization of the object of the invention, functional characteristics and advantage will be described further referring to the drawings in conjunction with the embodiments.
Specific embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, by reference to accompanying drawing The embodiment of description is exemplary, it is intended to for explaining the present invention, and be not considered as limiting the invention.
One embodiment of the invention provides a kind of direct broadcast time-shift scheme based on hls agreements, including time-shifted service stage Monitoring modular, the first computing module, the first filtering module, memory module, and obtain the second filter module of section service stage Block, the second computing module, integration module.
As shown in figure 1, the logical blocks figure of the direct broadcast time-shift scheme for the present invention.
The synchronous averaging time-shifted service in live startup.
The monitoring modular of time-shifted service is used to observing and recording the change of live source, after transferring to after the content for recording change Continuous resume module.
Specifically, the monitoring modular of time-shifted service is monitored to the m3u8 file contents of live source, determines whether new Ts sections generate, determination methods are contrasting, because in memory module according to last ts files sequence number in m3u8 files Last ts section sequence number of each storage can be recorded, if the currently monitored module has the ts for monitoring the sequence number more than storage Information, is judged as newly-generated section, records and gives subsequent module for processing.
First computing module of time-shifted service is used for the section name translation of live generation into the distinctive name of time-shifted service Claim, be made up of information such as section time point, section duration, section sequence numbers, while using current live source url as this subtask Unique mark.
Specifically, the first computing module of time-shifted service takes the new ts slice informations that monitoring modular is passed over, with reference to The context-descriptive of section, and according to position store predetermined, the section title for facilitating time shift is calculated, for example:Time file Folder/second _ section duration _ section sequence number .ts belonging to section, while need definition this time shift task to be designated live source url, It is mainly used in subsequently according to live url come the affiliated catalogue of located slices.
First filtering module of time-shifted service is mainly filtered to the time point belonging to section, is carried out according to minute Screening, the section of output per minute carries out unified file folder storage.
Specifically, the first filtering module of time-shifted service is mainly processed the concrete time of section, and will be same The section of period is made unified storage and is processed.In the present embodiment, minute can be accurate to, the then section to belonging to same minute is carried out Unified file folder storage is processed, it is ensured that section per minute will not be chaotic.
The memory module of time-shifted service mainly files the section after calculating and filtration, while carrying out at caching Reason, is all to carry out corresponding section caching for per second during memory buffers so that follow-up time shifting broadcasting is used, and conveniently obtains section Service is used.
Specifically, the memory module of time-shifted service is obtained in storage by the first computing module, the first filtering module Need content and the path of storage.It is important that be the use of buffer memory, because document storage system is that section is deposited Storage, each section has the time difference, if time shift is just asked to the time point between the time difference, needs the row for carrying out file storage Table returns source inquiry, can affect search efficiency, so in memory buffers, duration and the time for calculating each section is needed, Add up duration on the basis of the section time, is accurate to the second, that is, ensure that each second in the buffer can find corresponding section Information, so as to improve time shift efficiency.
Corresponding file storage structure is as follows:
201612050751
--01_3.333_260.ts
--04_3.334_261.ts
--07_3.333_262.ts
--11_3.333_263.ts
Corresponding buffer memory structure is as follows:
20161205075101→201612050751/01_3.333_260.ts
20161205075102→201612050751/01_3.333_260.ts
20161205075103→201612050751/01_3.333_260.ts
20161205075104→201612050751/04_3.334_261.ts
20161205075105→201612050751/04_3.334_261.ts
20161205075106→201612050751/04_3.334_261.ts
20161205075107→201612050751/07_3.333_262.ts
20161205075108→201612050751/07_3.333_262.ts
20161205075109→201612050751/07_3.333_262.ts
20161205075110→201612050751/07_3.333_262.ts
20161205075111→201612050751/11_3.333_263.ts
Operate by more than, time shift preparation has been completed.Description be the following is how by these data arrangement rules To take corresponding slice information.
The second filtering module for obtaining section service mainly filters the URL parameter that time shift is sent, when starting comprising time shift Between, playback the end time (optional parameters), checking parameter validity:Contrasted with live time started, time shift maximum duration.
Specifically, if normal time shift viewing, request URL trailing parameter is beginTime, this parameter demonstrate the need for from This time point proceeds by broadcasting, and this parameter can not can not be later than the live end time earlier than the live time started, can not be with The time difference of current time, (time-shifted service can arrange this live time shift with dynamic more than the maximum time shift scope that time shift specifies Scope), containing this parameter return is normal live m3u8 file contents.If needing direct playing and playback to watch, request URL Trailing parameter needs to add endTime, and this parameter demonstrates the need for the end time point of direct playing and playback, same this parameter verification mode Identical with beginTime, containing this parameter return is the m3u8 file contents of order video.
The time parameter that second computing module of time shifting request service is primarily directed to ask is calculated and needs cutting for time shift Piece position, is inquired about if not finding section (the expired situation of caching) and carrying out Hui Yuan (file storage) according to ts sections title.
Specifically, by the time parameter of computation requests, it is converted into the form of time-shifted service storage: YyyyMMddHHmmss, goes in buffer service to inquire about corresponding ts file paths by key, when finding first ts file, leads to The duration crossed in the title of ts sections finds by that analogy the ts in regulation m3u8 file calculating the key of next ts section Section number.If caching expired or caching server to delay machine, need to go back to source from document storage server and obtain, first by working as Obtain in the file that the time (be converted into and be accurate to the time format of minute) of front request is gone in corresponding document storage server Take, because each section title has its corresponding number of seconds, if the number of seconds of current request is not in lists, need to request Number of seconds is overlapped process and inquires about again, until finding corresponding section.
The integration module of time shifting request service mainly updates the section path for getting, if detected playback terminated Time parameter also needs to finally add endlist labels to show this file for program request file in m3u8 files.
Specifically, integrated service is mainly processed the section that the second computing module is inquired, and is opened in time-shifted service During the beginning, can be the m3u8 archives of live source, integrating module this file acquisition and can update its content, finally return to.
The URL of normal time shifting request:
http://XXXX/XXX/xxxx.m3u8BeginTime=20161013065122
The return of normal time shifting request:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:22Z
#EXTINF:3.333
201610130651/22_3.333_1.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:26Z
#EXTINF:3.333
201610130651/26_3.333_2.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:29Z
#EXTINF:3.334
201610130651/29_3.334_3.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:32Z
#EXTINF:3.333
201610130651/32_3.333_4.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:36Z
#EXTINF:3.333
201610130651/36_3.333_5.ts
The request URL of direct playing and playback:
http://XXXX/XXX/xxxx.m3u8BeginTime=20161013065122&endTime= 20161013065136
The request of direct playing and playback is returned:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:22Z
#EXTINF:3.333
201610130651/22_3.333_1.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:26Z
#EXTINF:3.333
201610130651/26_3.333_2.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:29Z
#EXTINF:3.334
201610130651/29_3.334_3.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:32Z
#EXTINF:3.333
201610130651/32_3.333_4.ts
#EXT-X-PROGRAM-DATE-TIME:2016-10-13T06:51:36Z
#EXTINF:3.333
201610130651/36_3.333_5.ts
#EXT-X-ENDLIST
To sum up, a kind of direct broadcast time-shift scheme based on hls agreements for being provided according to the present invention, by simple state modulator Come realize time shift review, the switching of direct playing and playback, no data storehouse is realized by distinctive position storage principle, improve time shift The efficiency that request is processed.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means to combine specific features, structure, material or spy that the embodiment or example are described Point is contained at least one embodiment of the present invention or example.In this manual, to the schematic representation of above-mentioned term not Necessarily refer to identical embodiment or example.And, the specific features of description, structure, material or feature can be any One or more embodiments or example in combine in an appropriate manner.Although the reality of the present invention has been shown and described above Apply example, it is to be understood that above-described embodiment is exemplary, it is impossible to be interpreted as limitation of the present invention, this area it is common Technical staff can enter within the scope of the invention in the case of the principle and objective without departing from the present invention to above-described embodiment Row change, modification, replacement and modification.

Claims (2)

1. a kind of direct broadcast time-shift scheme based on hls agreements, it is characterised in that including monitoring modular, the first computing module, first Filtering module, memory module, the second filtering module, the second computing module and integration module,
The monitoring modular is used to record the change of live source,
It is the peculiar title of time-shifted service that first computing module is used for the section name translation of live generation, and described first Computing module is used to for presently described live source to make unique mark,
First filtering module is used to filter the time point belonging to the section, and will cut described in the same period Piece is made unified storage and is processed,
The memory module is used for the section after first computing module and first filtering module are processed File and make caching process,
Second filtering module is used to filter time shifting request parameter and checking parameter validity,
Second computing module is used to calculate the slice position of required time shift for the time parameter of request,
The module of integrating is used to update the section path for getting.
2. a kind of direct broadcast time-shift scheme based on hls agreements according to claim 1, it is characterised in that the monitoring mould Block monitors the m3u8 files of the live source and judges whether to generate new ts sections, when the ts sections for generating new are then considered as The change of the live source is simultaneously recorded.
CN201611271879.9A 2016-12-30 2016-12-30 Live broadcast time shifting scheme based on hls protocol Pending CN106657123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611271879.9A CN106657123A (en) 2016-12-30 2016-12-30 Live broadcast time shifting scheme based on hls protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611271879.9A CN106657123A (en) 2016-12-30 2016-12-30 Live broadcast time shifting scheme based on hls protocol

Publications (1)

Publication Number Publication Date
CN106657123A true CN106657123A (en) 2017-05-10

Family

ID=58838286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611271879.9A Pending CN106657123A (en) 2016-12-30 2016-12-30 Live broadcast time shifting scheme based on hls protocol

Country Status (1)

Country Link
CN (1) CN106657123A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413443A (en) * 2017-08-16 2019-03-01 中国移动通信有限公司研究院 A kind of implementation method and device of time-shifting function
CN110881146A (en) * 2019-09-12 2020-03-13 北京阳光云视科技有限公司 Time shifting system based on slice mode
CN114173145A (en) * 2021-12-08 2022-03-11 四川启睿克科技有限公司 HLS protocol-based dynamic code rate low-delay live broadcast method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104506967A (en) * 2015-01-05 2015-04-08 百视通网络电视技术发展有限责任公司 Real-time conversion method and system from UDP (User Datagram Protocol) live streaming to HLS (Http Live Streaming)
CN105208465A (en) * 2015-09-23 2015-12-30 青岛海信传媒网络技术有限公司 Method for inserting inter-cut program into live program and server
CN105282627A (en) * 2014-07-22 2016-01-27 中兴通讯股份有限公司 Method for acquiring a live video clip and server
CN105979404A (en) * 2015-12-01 2016-09-28 乐视致新电子科技(天津)有限公司 Streaming media processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282627A (en) * 2014-07-22 2016-01-27 中兴通讯股份有限公司 Method for acquiring a live video clip and server
CN104506967A (en) * 2015-01-05 2015-04-08 百视通网络电视技术发展有限责任公司 Real-time conversion method and system from UDP (User Datagram Protocol) live streaming to HLS (Http Live Streaming)
CN105208465A (en) * 2015-09-23 2015-12-30 青岛海信传媒网络技术有限公司 Method for inserting inter-cut program into live program and server
CN105979404A (en) * 2015-12-01 2016-09-28 乐视致新电子科技(天津)有限公司 Streaming media processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗淑贞等: "基于HLS协议的流媒体直播系统的研究和改进", 《郑州大学学报(工学版)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413443A (en) * 2017-08-16 2019-03-01 中国移动通信有限公司研究院 A kind of implementation method and device of time-shifting function
CN109413443B (en) * 2017-08-16 2021-03-16 中国移动通信有限公司研究院 Method and device for realizing time shifting function
CN110881146A (en) * 2019-09-12 2020-03-13 北京阳光云视科技有限公司 Time shifting system based on slice mode
CN114173145A (en) * 2021-12-08 2022-03-11 四川启睿克科技有限公司 HLS protocol-based dynamic code rate low-delay live broadcast method

Similar Documents

Publication Publication Date Title
US9584847B2 (en) Rendering content for personal over-the-top network video recorder
CN102231860B (en) Live time shift data storage method
CN103324696B (en) A kind of data log collection and statistical analysis system and method
CN109729371B (en) Live broadcast time shifting system and method based on HLS protocol multilevel management
CN104221391B (en) The video distribution of peer auxiliary
CN106657123A (en) Live broadcast time shifting scheme based on hls protocol
CN101668194B (en) Method and device for inserting and playing advertisement based on content fragmentation
CN103517157B (en) Realize the method and system that HLS channel time-shifting is play
US20160227258A1 (en) Method for playing back live video and device
CN106454493B (en) Currently playing TV program information querying method and smart television
CN105989048B (en) Data record processing method, device and system
CN103164525B (en) WEB application dissemination method and device
CN103916718A (en) Method and system for playing video based on video clip
CN102497542A (en) Video positioning playback system and method thereof
CN104410879B (en) Time shift implementation method and device, server
CN109542330A (en) Date storage method, data query method and device
RU2008126176A (en) SYSTEM AND METHOD FOR ISSUE OF REMINDERS OF IP-TV SERVICES (IPTV)
CN106658054A (en) Video advertisement request link optimization method and apparatus
CN109698965A (en) A kind of audio video synchronization playback method, device, equipment and computer storage medium
CN107801051A (en) Virtual sliced sheet information transferring method and device, video server
CN104243209A (en) IP address content provider label coverage statistics method
CN105357544A (en) HLS-based multimedia file processing method and server
CN107229620A (en) The storage method and device of a kind of video data
CN103780644A (en) File synchronization method
CN103220587A (en) Method and device for obtaining time shifting contents

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310000 E, 16 floor, A block, Paradise software garden, 3 West Gate Road, Xihu District, Hangzhou, Zhejiang.

Applicant after: Hangzhou Dang Hong Polytron Technologies Inc

Address before: 310000 E, 16 floor, A block, Paradise software garden, 3 West Gate Road, Xihu District, Hangzhou, Zhejiang.

Applicant before: HANGZHOU DANGHONG TECHNOLOGY CO., LTD.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170510