CN107864399B - Method and device for acquiring real-time poster from live stream - Google Patents

Method and device for acquiring real-time poster from live stream Download PDF

Info

Publication number
CN107864399B
CN107864399B CN201711145189.3A CN201711145189A CN107864399B CN 107864399 B CN107864399 B CN 107864399B CN 201711145189 A CN201711145189 A CN 201711145189A CN 107864399 B CN107864399 B CN 107864399B
Authority
CN
China
Prior art keywords
file
real
live stream
determining
poster
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
CN201711145189.3A
Other languages
Chinese (zh)
Other versions
CN107864399A (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.)
Shandong Inspur Ultra HD Video Industry Co Ltd
Original Assignee
Shandong Yunman Intelligent 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 Shandong Yunman Intelligent Technology Co ltd filed Critical Shandong Yunman Intelligent Technology Co ltd
Priority to CN201711145189.3A priority Critical patent/CN107864399B/en
Publication of CN107864399A publication Critical patent/CN107864399A/en
Application granted granted Critical
Publication of CN107864399B publication Critical patent/CN107864399B/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/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/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • 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/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4385Multiplex stream processing, e.g. multiplex stream decrypting
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • 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/643Communication protocols
    • 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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a method and a device for acquiring a real-time poster from a live stream, wherein the method comprises the following steps: acquiring an m3u8 file of a live stream from a live stream server; analyzing the m3u8 file to generate a ts file; determining a real-time poster file in the ts file; and processing the real-time poster file to generate a real-time poster. The scheme provided by the invention can reduce the load of the HLS live streaming server.

Description

Method and device for acquiring real-time poster from live stream
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for acquiring a real-time poster from a live stream.
Background
HLS (HTTP Live Streaming) is a dynamic rate adaptation technique. The audio and video service system is mainly used for audio and video services of a PC (personal computer) and an Apple terminal, and comprises an index file of m3u8, a TS (transport stream) media fragment file and a key encryption string file.
With more and more software supporting HLS live broadcast, the requirement of the user on live broadcast real-time performance is higher and higher. Because the content at each moment is different, the live content needs to be displayed in real time in order to facilitate the user to preview the content in the live stream in real time.
In the prior art, generally, an HLS live streaming server is used to download live screenshots of live streaming in advance, and then a user obtains the live screenshots through the HLS live streaming server.
However, this approach results in an excessive load on the HLS live streaming server.
Disclosure of Invention
The embodiment of the invention provides a method and a device for acquiring a real-time poster from a live stream, which can reduce the load of an HLS live stream server.
In a first aspect, an embodiment of the present invention provides a method for obtaining a real-time poster from a live stream, including:
acquiring an m3u8 file of a live stream from a live stream server;
analyzing the m3u8 file to generate a ts file;
determining a real-time poster file in the ts file;
and processing the real-time poster file to generate a real-time poster.
Preferably, the first and second electrodes are formed of a metal,
the ts file, comprising: three subfiles;
the determining a real-time poster file in the ts file comprises:
acquiring a standard size of a picture;
determining a code rate of the live stream;
determining a target subfile closest to the current moment in the three subfiles;
determining a target duration according to the standard size of the picture and the code rate of the live stream;
and extracting the real-time poster file from the target subfile according to the target duration.
In a second aspect, an embodiment of the present invention provides an apparatus for obtaining a real-time poster from a live stream, including:
the acquisition unit is used for acquiring an m3u8 file of the live stream from the live stream server;
the analyzing unit is used for analyzing the m3u8 file acquired by the acquiring unit to generate a ts file;
a determining unit configured to determine a real-time poster file in the ts file generated by the parsing unit;
and the processing unit is used for processing the real-time poster file determined by the determining unit to generate a real-time poster.
Preferably, the first and second electrodes are formed of a metal,
the ts file, comprising: three subfiles;
the determining unit is used for acquiring the standard size of the picture; determining a code rate of the live stream; determining a target subfile closest to the current moment in the three subfiles; determining a target duration according to the standard size of the picture and the code rate of the live stream; and extracting the real-time poster file from the target subfile according to the target duration.
In a third aspect, an embodiment of the present invention provides a readable medium, which includes an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes a method described in any one of the above embodiments.
In a fourth aspect, an embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instructions stored in the memory, so that the storage controller executes the method of any one of the above embodiments.
The embodiment of the invention provides a method and a device for acquiring a real-time poster from a live stream, wherein the method acquires an m3u8 file of the live stream from a live stream server, analyzes the m3u8 file, determines a real-time poster file according to a ts file obtained by analysis, processes the real-time poster file and generates the real-time poster. The method does not need the HLS live streaming server to download the live streaming real-time screenshot in advance, and can reduce the load of the HLS live streaming server.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow diagram of a method for obtaining a real-time poster from a live stream, according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a method for retrieving a real-time poster from a live stream according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for acquiring a real-time poster from a live stream according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for obtaining a real-time poster from a live stream, which may include the following steps:
step 101: acquiring an m3u8 file of a live stream from a live stream server;
step 102: analyzing the m3u8 file to generate a ts file;
step 103: determining a real-time poster file in the ts file;
step 104: and processing the real-time poster file to generate a real-time poster.
The method includes the steps of obtaining an m3u8 file of a live stream from a live stream server, analyzing the m3u8 file, determining a real-time poster file according to a ts file obtained through analysis, processing the real-time poster file, and generating a real-time poster. The method does not need the HLS live streaming server to download the live streaming real-time screenshot in advance, and can reduce the load of the HLS live streaming server.
In one embodiment of the present invention, in order to obtain a real-time poster file in a ts file, the ts file includes: three subfiles;
the determining a real-time poster file in the ts file comprises:
acquiring a standard size of a picture;
determining a code rate of the live stream;
determining a target subfile closest to the current moment in the three subfiles;
determining a target duration according to the standard size of the picture and the code rate of the live stream;
and extracting the real-time poster file from the target subfile according to the target duration.
The standard size of the picture is the size of the minimum volume picture, for example, if the minimum volume of one picture is 100K, the standard size of the picture is 100K. the ts file comprises three parts, and the embodiment of the invention extracts the real-time poster file from one subfile closest to the current moment and extracts from the head of the target subfile.
As shown in fig. 2, in the embodiment of the present invention, a ts file includes three subfiles, and a method for obtaining a real-time poster from a live stream is described in detail, where the method includes:
step 201: and acquiring an m3u8 file of the live stream from the live stream server.
Step 202: analyzing the m3u8 file to generate a ts file, wherein the ts file comprises: three subfiles.
Step 203: and acquiring the standard size of the picture.
Step 204: and determining the code rate of the live stream.
Step 205: and determining a target subfile closest to the current moment in the three subfiles.
Step 206: and determining the target duration according to the standard size of the picture and the code rate of the live stream.
Step 207: and extracting the real-time poster file from the target subfile according to the target duration.
Step 208: and processing the real-time poster file to generate a real-time poster.
As shown in fig. 3, an embodiment of the present invention provides an apparatus for obtaining a real-time poster from a live stream, including:
an obtaining unit 301, configured to obtain an m3u8 file of a live stream from a live stream server;
an analyzing unit 302, configured to analyze the m3u8 file acquired by the acquiring unit 301, and generate a ts file;
a determining unit 303, configured to determine a real-time poster file in the ts file generated by the parsing unit 302;
a processing unit 304, configured to process the real-time poster file determined by the determining unit 303, and generate a real-time poster.
In one embodiment of the present invention, the ts file includes: three subfiles;
the determining unit is used for acquiring the standard size of the picture; determining a code rate of the live stream; determining a target subfile closest to the current moment in the three subfiles; determining a target duration according to the standard size of the picture and the code rate of the live stream; and extracting the real-time poster file from the target subfile according to the target duration.
The embodiment of the invention provides a readable medium, which comprises an execution instruction, and when a processor of a storage controller executes the execution instruction, the storage controller executes the method of any one of the above embodiments.
An embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus;
the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instructions stored in the memory, so that the storage controller executes the method of any one of the above embodiments.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
In summary, the embodiments of the present invention have at least the following effects:
1. in the embodiment of the invention, the method acquires an m3u8 file of a live stream from a live stream server, analyzes the m3u8 file, determines a real-time poster file according to a ts file obtained by analysis, processes the real-time poster file, and generates a real-time poster. The method does not need the HLS live streaming server to download the live streaming real-time screenshot in advance, and can reduce the load of the HLS live streaming server.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other similar elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (4)

1. A method of obtaining a real-time poster from a live stream, comprising:
acquiring an m3u8 file of a live stream from a live stream server;
analyzing the m3u8 file to generate a ts file;
determining a real-time poster file in the ts file;
processing the real-time poster file to generate a real-time poster;
the ts file, comprising: three subfiles;
the determining a real-time poster file in the ts file comprises:
acquiring a standard size of a picture;
determining a code rate of the live stream;
determining a target subfile closest to the current moment in the three subfiles;
determining a target duration according to the standard size of the picture and the code rate of the live stream;
and extracting the real-time poster file from the target subfile according to the target duration.
2. An apparatus for obtaining a real-time poster from a live stream, comprising:
the acquisition unit is used for acquiring an m3u8 file of the live stream from the live stream server;
the analyzing unit is used for analyzing the m3u8 file acquired by the acquiring unit to generate a ts file;
a determining unit configured to determine a real-time poster file in the ts file generated by the parsing unit;
the processing unit is used for processing the real-time poster file determined by the determining unit to generate a real-time poster;
the ts file, comprising: three subfiles;
the determining unit is used for acquiring the standard size of the picture; determining a code rate of the live stream; determining a target subfile closest to the current moment in the three subfiles; determining a target duration according to the standard size of the picture and the code rate of the live stream; and extracting the real-time poster file from the target subfile according to the target duration.
3. A readable medium comprising executable instructions that, when executed by a processor of a storage controller, cause the storage controller to perform the method of claim 1.
4. A storage controller, comprising: a processor, a memory, and a bus;
the memory is used for storing execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the execution instructions stored by the memory to enable the storage controller to execute the method of claim 1.
CN201711145189.3A 2017-11-17 2017-11-17 Method and device for acquiring real-time poster from live stream Active CN107864399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711145189.3A CN107864399B (en) 2017-11-17 2017-11-17 Method and device for acquiring real-time poster from live stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711145189.3A CN107864399B (en) 2017-11-17 2017-11-17 Method and device for acquiring real-time poster from live stream

Publications (2)

Publication Number Publication Date
CN107864399A CN107864399A (en) 2018-03-30
CN107864399B true CN107864399B (en) 2020-05-05

Family

ID=61702118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711145189.3A Active CN107864399B (en) 2017-11-17 2017-11-17 Method and device for acquiring real-time poster from live stream

Country Status (1)

Country Link
CN (1) CN107864399B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539977A (en) * 2014-12-17 2015-04-22 广州酷狗计算机科技有限公司 Live broadcast previewing method and device
CN105916011A (en) * 2015-12-03 2016-08-31 乐视致新电子科技(天津)有限公司 Video real-time playing method and device
CN106412621A (en) * 2016-09-28 2017-02-15 广州华多网络科技有限公司 Video display method and device of network studio, control method and related equipment
CN106792150A (en) * 2016-12-20 2017-05-31 深圳市茁壮网络股份有限公司 A kind of poster generation method and device
CN107222484A (en) * 2017-06-12 2017-09-29 北京经纬中天信息技术有限公司 Support the stream media server system of multi-protocols input and output
WO2017176808A1 (en) * 2016-04-04 2017-10-12 Twitter, Inc. Live video classification and preview selection

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539977A (en) * 2014-12-17 2015-04-22 广州酷狗计算机科技有限公司 Live broadcast previewing method and device
CN105916011A (en) * 2015-12-03 2016-08-31 乐视致新电子科技(天津)有限公司 Video real-time playing method and device
WO2017176808A1 (en) * 2016-04-04 2017-10-12 Twitter, Inc. Live video classification and preview selection
CN106412621A (en) * 2016-09-28 2017-02-15 广州华多网络科技有限公司 Video display method and device of network studio, control method and related equipment
CN106792150A (en) * 2016-12-20 2017-05-31 深圳市茁壮网络股份有限公司 A kind of poster generation method and device
CN107222484A (en) * 2017-06-12 2017-09-29 北京经纬中天信息技术有限公司 Support the stream media server system of multi-protocols input and output

Also Published As

Publication number Publication date
CN107864399A (en) 2018-03-30

Similar Documents

Publication Publication Date Title
US11514112B2 (en) Scene aware searching
KR20210053825A (en) Method and apparatus for processing video
CN109857908B (en) Method and apparatus for matching videos
US8949123B2 (en) Display apparatus and voice conversion method thereof
CN110225398B (en) Multimedia object playing method, device and equipment and computer storage medium
CN103268207A (en) Web video occlusion: a method for rendering the videos watched over multiple windows
CN109255035B (en) Method and device for constructing knowledge graph
CN114449327B (en) Video clip sharing method and device, electronic equipment and readable storage medium
KR20180111981A (en) Edit real-time content with limited interaction
CN105550207B (en) Information popularization method and device
CN111277898A (en) Content pushing method and device
CN104080016B (en) The method and apparatus that audio/video information is shown are carried out in a kind of browser
CN111818279A (en) Subtitle generating method, display method and interaction method
CN106599637B (en) Method and device for inputting verification code on verification interface
CN107864399B (en) Method and device for acquiring real-time poster from live stream
CN110852801B (en) Information processing method, device and equipment
CN110555117B (en) Data processing method and device and electronic equipment
JP2019192294A (en) Information display method and apparatus
CN115691591A (en) Recording method and device, electronic equipment and storage medium
CN114140850A (en) Face recognition method and device and electronic equipment
CN114363664A (en) Method and device for generating video collection title
CN108882051B (en) Method and device for acquiring plug-in subtitle
JP2017517162A (en) Asset collection service by content capture
CN115373550B (en) Method, system and chip for obtaining interaction information
CN111460274B (en) Information processing method and device

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
TA01 Transfer of patent application right

Effective date of registration: 20200408

Address after: 250100 West District, North First Floor, S06 Building, 1036 Langchao Road, Jinan High-tech Zone, Shandong Province

Applicant after: SHANDONG YUNMAN INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 250100, Ji'nan province high tech Zone, Sun Village Branch Road, No. 2877, building, floor, building, on the first floor

Applicant before: SHANDONG INSPUR BUSINESS SYSTEM Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 250100 West District, North First Floor, S06 Building, 1036 Langchao Road, Jinan High-tech Zone, Shandong Province

Patentee after: Shandong Inspur Ultra HD Video Industry Co.,Ltd.

Address before: 250100 West District, North First Floor, S06 Building, 1036 Langchao Road, Jinan High-tech Zone, Shandong Province

Patentee before: SHANDONG YUNMAN INTELLIGENT TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder