CN104902343B - A kind of method, server and the terminal of transmission and playing audio-video and message - Google Patents

A kind of method, server and the terminal of transmission and playing audio-video and message Download PDF

Info

Publication number
CN104902343B
CN104902343B CN201510276406.7A CN201510276406A CN104902343B CN 104902343 B CN104902343 B CN 104902343B CN 201510276406 A CN201510276406 A CN 201510276406A CN 104902343 B CN104902343 B CN 104902343B
Authority
CN
China
Prior art keywords
message
file
slice
index file
slice file
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
CN201510276406.7A
Other languages
Chinese (zh)
Other versions
CN104902343A (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.)
Beijing Vhall Time Technology Co Ltd
Original Assignee
Beijing Vhall Time 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 Beijing Vhall Time Technology Co Ltd filed Critical Beijing Vhall Time Technology Co Ltd
Priority to CN201510276406.7A priority Critical patent/CN104902343B/en
Publication of CN104902343A publication Critical patent/CN104902343A/en
Application granted granted Critical
Publication of CN104902343B publication Critical patent/CN104902343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/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/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
    • 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)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses method, server and the terminals of a kind of transmission and playing audio-video and message.Wherein, it transmits audio-video and the method for message includes:It obtains and M3U8 index file corresponding to multiple slice files that cutting obtains is carried out to current audio/video flow;It will be used to describe the content of message associated by the slice file, M3U8 index file be added to, to generate new M3U8 index file;After receiving terminal to the watching request of the current audio/video flow, new M3U8 index file is handed down to terminal, so that terminal can get the message of target slice file association before broadcasting is associated with the target slice file of message according to new M3U8 index file from the server.Technical solution provided in an embodiment of the present invention can be realized the synchronous transfer of audio-video and message, and terminal is played audio-video slice file synchronization associated by message and its.

Description

A kind of method, server and the terminal of transmission and playing audio-video and message
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of sides of transmission and playing audio-video and message Method, server and terminal.
Background technique
HLS (HTTP Live Streaming, hypertext transfer protocol real-time streams) is Apple Inc.'s realization based on HTTP Streaming media transmission protocol, it can be achieved that Streaming Media live streaming and program request, predominantly iOS (Iphone Operation System, Apple Macintosh operating system) terminal offer audio-video is broadcast live and demand scheme.
Relative to common live streaming media agreement, the maximum difference of direct seeding technique based on HLS protocol is:Live streaming visitor What family end was got is not a complete data flow.In HLS protocol, it is several that continuous Media Stream, which can be split, originally A TS (Transport Stream, transport stream) is sliced file, and accordingly generates a M3U8 index file (namely playlist File), these TS slice file and M3U8 index file constitute HLS Media Stream, are stored in server.Correspondingly, iOS is whole Holding (such as IPhone, Ipad, Itouch, Mac) first with HTTP, (HyperText Transfer Protocol, hypertext pass Defeated agreement) from server acquisition M3U8 index file, the resource address information provided later according to obtained M3U8 index file, It obtains corresponding TS slice file to play out, and then realizes the broadcasting of streaming media.
In practical application, to meet user's particular demands, generally requires terminal and cut certain part in playing Media Stream When piece, message associated with the partial slice file that synchronously Play Server issues.But in the prior art, by In message in the transmission mode of server and terminal room, it is different from the transmission mode of audio/video flow, along with by network environment Influence, thus terminal play be sliced file when, might not receive that server issues disappears with the slice file association Breath, thus cause message with its associated by slice file asynchronous play the phenomenon that happen occasionally, seriously affected the straight of user Broadcast experience.
Summary of the invention
The embodiment of the present invention provides method, server and the terminal of a kind of transmission and playing audio-video and message, to realize The synchronous transfer of audio-video and message plays terminal by audio-video slice file synchronization associated by message and its.
On the one hand, the embodiment of the invention provides a kind of method, this method is applied to server, including:
It obtains and M3U8 index file corresponding to multiple slice files that cutting obtains is carried out to current audio/video flow;
It will be used to describe the content of message associated by the slice file, the M3U8 index file be added to, with life The M3U8 index file of Cheng Xin;
After receiving terminal to the watching request of the current audio/video flow, the new M3U8 index file is issued To the terminal, so that the terminal is before playing and being associated with the target slice file of message, it can be according to the new M3U8 Index file gets the message of the target slice file association from the server.
On the other hand, the embodiment of the invention also provides a kind of method of playing audio-video and message, this method is applied to Terminal, including:
The watching request to audio/video flow is initiated to server;
The M3U8 index file that the server is returned according to the watching request is received, wherein the M3U8 index file Including:The duration information and resource address information of multiple slice files that cutting obtains are carried out to the audio/video flow, and, it uses In the content for describing message associated by the slice file;
According to the M3U8 index file, this target slice file to be played and the target slice file are obtained Associated message;
The target slice file and message synchronization that will acquire play.
In another aspect, the embodiment of the invention also provides a kind of server, which includes:
Index file acquiring unit is right for obtaining the multiple slice files institute obtained to the progress cutting of current audio/video flow The M3U8 index file answered;
Index file updating unit is added to for that will be used to describe the content of message associated by the slice file The M3U8 index file, to generate new M3U8 index file;
Index file issuance unit, for after receiving terminal to the watching request of the current audio/video flow, by institute It states new M3U8 index file and is handed down to the terminal, so that the terminal is playing the target slice file for being associated with message Before, the message of the target slice file association can be got from the server according to the new M3U8 index file.
In another aspect, the embodiment of the invention also provides a kind of terminal, which includes:
Watching request initiates unit, for initiating the watching request to audio/video flow to server;
Index file receiving unit, the M3U8 index text returned for receiving the server according to the watching request Part, wherein the M3U8 index file includes:The when long letter for multiple slice files that cutting obtains is carried out to the audio/video flow Breath and resource address information, and, for describing the content of message associated by the slice file;
File and message retrieval unit, for obtaining this target slice to be played according to the M3U8 index file The message of file and the target slice file association;
File and message broadcast unit, target slice file and message synchronization for will acquire play.
Technical solution provided in an embodiment of the present invention improves traditional HLS protocol, and message is added to sound view In the M3U8 index file of frequency stream, allow server by message and audio/video flow synchronous transfer to terminal, and then can protect Card message and the audio-video associated by it are sliced file and are played simultaneously.
Detailed description of the invention
Fig. 1 is the method flow schematic diagram of a kind of transmission audio-video and message that the embodiment of the present invention one provides;
Fig. 2 is the flow diagram of the method for a kind of playing audio-video provided by Embodiment 2 of the present invention and message;
Fig. 3 is a kind of structural schematic diagram for server that the embodiment of the present invention three provides;
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides;
Fig. 5 is the flow diagram of the method for a kind of processing audio-video that the embodiment of the present invention five provides and message;
Fig. 6 is that the network architecture that the method for a kind of processing audio-video that the embodiment of the present invention five provides and message is applicable in is shown It is intended to.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although operations (or step) are described as the processing of sequence by flow chart, Many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be pacified again Row.The processing can be terminated when its operations are completed, it is also possible to have the additional step being not included in attached drawing.Institute Stating processing can correspond to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is the method flow schematic diagram of a kind of transmission audio-video and message that the embodiment of the present invention one provides.This implementation Example be applicable to include terminal and server the network architecture.Wherein, the terminal is to play to need with audio-video and message The iOS device asked, for example, IPhone, Ipad, Itouch or Mac, the equipment are usually held by audio-video viewing side;Institute Stating server is that the physical equipment of audio-video service is provided for terminal.Method provided in this embodiment can be by the above-mentioned network architecture In server execute.Referring to Fig. 1, the method for transmission audio-video and message provided in this embodiment specifically comprises the following steps S110-S130。
Step S110, it obtains and M3U8 index corresponding to multiple slice files that cutting obtains is carried out to current audio/video flow File.
Wherein, M3U8 index file include it is multiple slice files information (including:Duration information and resource address information). The duration information of any one slice file, for describing the playing duration of the slice file when playing out;Resource address Information is used to describe the storage path of the slice file on the server, usually URL (Uniform Resource Locator, uniform resource locator).In M3U8 index file, the duration information of any one slice file is recorded in " # EXTINF:" at position between label and " comma ", " comma " is a newline below, later immediately following the resource of slice file Address information.
For example, the partial content of the M3U8 index file of an audio/video flow based on HLS protocol can be described as:
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:6
#EXT-X-TARGETDURATION:10
#EXTINF:3.1,
http://live.example.com/1.ts
#EXTINF:4.2,
http://live.example.com/2.ts
#EXTINF:5,
http://live.example.com/3.ts
It in this example embodiment, altogether include the duration information and resource address information of three slice files.Each slice file Information is with " #EXTINF:" label conduct beginning identifier.These three slice files duration informations be respectively:3.1,4.2 With 5, resource address information is respectively:http://live.example.com/1.ts,http://live.example.com/ 2.ts and http://live.example.com/3.ts.
Step S120, it will be used to describe the content of message associated by slice file, M3U8 index file be added to, with life The M3U8 index file of Cheng Xin.
It step S130, will be under new M3U8 index file after receiving terminal to the watching request of current audio/video flow Issue terminal.
Terminal, can be according to new M3U8 index file from server before playing and being associated with the target slice file of message Get the message of target slice file association.
To meet user's particular demands, it will usually corresponding by file association is sliced some or all of in current audio/video flow Message.For example, to promote the viewing experience of user, it can be to some slices for the audio/video flow that speech scene is recorded File is associated with the message such as the speech draft of vote interface or PPT format so that terminal play be sliced file while, together Step plays to message associated by user and the slice file.However, traditional HLS protocol be only applicable to M3U8 index file with It is sliced the transmission of file, does not support the transmission of other any kind of message datas.So the usual way of the prior art is to adopt With other transmission modes, terminal will be handed down to message associated by slice file.Due to the conveyer of message and audio/video flow System is different, so easily leading to the generation of following phenomenon:Terminal does not receive what server issued also when playing slice file With the message of the slice file association.
In view of this, the present embodiment improves traditional HLS protocol, so that the agreement is in transmission audio-video fluxion According to while, also in synchronous transfer and the associated message data of audio/video flow.Specific way is to modify traditional audio/video flow M3U8 index file, associated message is carried in the M3U8 index file.
Preferably, it will be used to describe the content of message associated by slice file, be added to M3U8 index file, to generate New M3U8 index file, including:
It will be used to describe the content of message associated by slice file, be added at the following position of M3U8 index file: It is sliced behind the duration information of file, before resource address information.
In the present embodiment, the content for describing message associated by slice file can be message itself, Huo Zhewei The character string of message repository location for identification.If message capacity is very big, the content is preferably used for identification message and deposits The character string that storage space is set.On the contrary, if message capacity is smaller, the content is preferably message itself, because can make in this way Terminal is obtained when getting the M3U8 index file after addition operation, message is directly obtained, without passing through identifier again Server is accessed to obtain message.
Specifically, can will be used to describe the slice for the information of a slice file in M3U8 index file The content of the message of file association is added in " #EXTINF:" at " comma " subsequent position after label, and with newline End identifier as the content.In this way, the corresponding character string in next line position is the resource address letter of the slice file Breath.
For example, in original M3U8 index file, the information of some slice file is:
#EXTINF:3.1,
http://live.example.com/1.ts
If the message of the slice file association is following character string:
[{“json”:{“time”:44.65,“name”:“flipover”,“type”:“event”,“parameters”: {“file”:23 534.00,“page”:1.00}},“time”:4.1}]
Then, in the new M3U8 index file of generation, the information update of the slice file is:
#EXTINF:3.1,[{“json”:{“time”:44.65,“name”:“flipover”,“type”:“event”, “par ameters”:{“file”:23534.00,“page”:1.00}},“time”:4.1}]
http://live.example.com/1.ts
The addition manner that above-mentioned preferable example provides, is advantageous in that:Without making larger improvement to terminal, solved in terminal Analyse one slice file information when, as long as read behind the duration information of the slice file with the word before resource address information Symbol string, is the content for describing message associated by the slice file;Also, even if not making corresponding improvement to terminal, Terminal will not report an error when parsing new M3U8 index file, only can obtain and play slice file.
Certainly, it should be appreciated by those skilled in the art that also M3U8 index file can be made to take by other addition manners With associated message.For example, by be used to describe message content add behind resource address information, using newline as End identifier, and separated between message and resource address information with preset unique identifier (for example, comma).Terminal exists After obtaining new M3U8 index file, when carrying out the information parsing of a slice file, as long as identifying unique identifier, read The character string behind the identifier before newline is taken, is the content for describing message associated by the slice file.
Alternatively, associated message is not implanted into the information of each slice file of M3U8 index file, but it is independent A mapping table is created, which is stored in M3U8 index file in the form of character string.The mapping table is for describing Incidence relation between the resource address information of each slice file and the content for describing each message.Terminal is obtaining newly M3U8 index file after, by reading mapping table, obtain message with this slice file association to be played.
Technical solution provided in this embodiment, improves traditional HLS protocol, and message is added to audio/video flow M3U8 index file in, allow server to be based on HTTP for message and audio/video flow synchronous transfer to terminal, Jin Erke With guarantee message with its associated by audio-video slice file be played simultaneously.
Based on the above technical solution, the content for describing message associated by slice file is message itself; Message be binary form message or for include newline character string forms message;
In the content that will be used to describe message associated by slice file, it is added to before M3U8 index file, further includes:
Message is encoded using preset coding mode, to convert the message to not include the character string for having newline The message of form.
Preferably, preset coding mode is base64 coding.
Embodiment two
Fig. 2 is the flow diagram of the method for a kind of playing audio-video provided by Embodiment 2 of the present invention and message.The party Method be still applicable to include terminal and server the network architecture.The executing subject of method provided in this embodiment is eventually End, what this method can be provided with above-described embodiment one executes with the transmission audio-video of server execution and the method for message. Referring to fig. 2, the method for playing audio-video provided in this embodiment and message specifically comprises the following steps S210-S240.
Step S210, the watching request to audio/video flow is initiated to server.
Step S220, the M3U8 index file that server is returned according to watching request is received.
Wherein, the M3U8 index file includes:The duration for multiple slice files that cutting obtains is carried out to audio/video flow Information and resource address information, and, for describing the content of message associated by slice file.The content is message itself Or the character string for message repository location for identification.
Step S230, according to M3U8 index file, this target slice file to be played and target slice text are obtained The associated message of part.
Step S240, the target slice file and message synchronization that will acquire play.
Preferably, it is located at for describing the content of message associated by slice file:It is sliced behind the duration information of file, Before resource address information;
According to M3U8 index file, disappearing for this target slice file to be played and target slice file association is obtained Breath, including:
M3U8 index file is parsed, the duration information of this target slice file to be played is successively obtained, uses The content and resource address information of the message associated by description target slice file;
Obtained resource address information is parsed according to this, obtains target slice file from server;
The obtained content is parsed according to this, obtains message associated by target slice file.
Specifically, if the content that parsing obtains is the character string of message repository location for identification, on server The character string is reported, to indicate that server according to the pre-stored corresponding message of the string searching, and is handed down to terminal.
It in the present embodiment, is server to the addition manner of the content for describing message associated by slice file It has made an appointment with terminal.Terminal is when parsing M3U8 index file, as long as according to the addition side to have made an appointment Formula reads the content for describing to be sliced message associated by file at corresponding point of addition.
Technical solution provided in this embodiment, improves traditional HLS protocol, and message is added to audio/video flow M3U8 index file in, terminal is synchronized and receives message and audio/video flow, and then can guarantee message and its institute Associated audio-video slice file is played simultaneously.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for server that the embodiment of the present invention three provides.Referring to Fig. 3, the tool of the server Body structure includes:
Index file acquiring unit 310 carries out multiple slice files that cutting obtains to current audio/video flow for obtaining Corresponding M3U8 index file;
Index file updating unit 320, for that will be used to describe the content of message associated by the slice file, addition To the M3U8 index file, to generate new M3U8 index file;
Index file issuance unit 330, for inciting somebody to action after receiving terminal to the watching request of the current audio/video flow The new M3U8 index file is handed down to the terminal, so that the terminal is playing the target slice file for being associated with message Before, the message of the target slice file association can be got from the server according to the new M3U8 index file.
Illustratively, the index file updating unit 320, is specifically used for:
It will be used to describe the content of message associated by the slice file, be added to the as follows of the M3U8 index file At position:Behind the duration information of the slice file, before resource address information.
Illustratively, the content is described message itself or the character for the message repository location for identification String.
Illustratively, the content is the message itself;The message be binary form message or for comprising There is the message of the character string forms of newline;
The server further includes:
Message converting unit 300, for that will be used to describe slice file institute in the index file updating unit 320 The content of associated message is added to before the M3U8 index file, is carried out using preset coding mode to the message Coding, to convert the message to the message for not including the character string forms for having newline.
The playing audio-video provided by any embodiment of the invention executed by server and message can be performed in the said goods Method, have the corresponding functional module of execution method and beneficial effect.
Example IV
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.Referring to fig. 4, the specific knot of the terminal Structure includes:
Watching request initiates unit 410, for initiating the watching request to audio/video flow to server;
Index file receiving unit 420, the M3U8 index returned for receiving the server according to the watching request File, wherein the M3U8 index file includes:The duration for multiple slice files that cutting obtains is carried out to the audio/video flow Information and resource address information, and, for describing the content of message associated by the slice file;
File and message retrieval unit 430, for obtaining this target to be played and cutting according to the M3U8 index file The message of piece file and the target slice file association;
File and message broadcast unit 440, target slice file and message synchronization for will acquire play.
Illustratively, it is located at for describing the content of message associated by the slice file:It is described slice file when Behind long message, before resource address information;
The file and message retrieval unit 430, are specifically used for:
The M3U8 index file is parsed, the when long letter of this target slice file to be played is successively obtained Breath, content and resource address information for describing message associated by the target slice file;
The obtained resource address information is parsed according to this, obtains the target slice file from the server;
The obtained content is parsed according to this, obtains message associated by the target slice file.
The playing audio-video provided by any embodiment of the invention executed by terminal and message can be performed in the said goods Method has the corresponding functional module of execution method and beneficial effect.
Embodiment five
Fig. 5 is the flow diagram of the method for a kind of processing audio-video that the embodiment of the present invention five provides and message.This reality A kind of preferred embodiment can be provided based on above-mentioned all embodiments by applying example.The embodiment is applicable to as shown in FIG. 6 In the network architecture.Referring to Fig. 6, which includes:The video camera 601 of audio/video flow and message is acquired, cutter device is encoded 602, server 603, the iOS terminal such as desktop computer 604 or smart phone 605.It is based between iOS terminal and server 603 HTTP carries out data communication.
Referring to Fig. 5, the method for processing audio-video and message provided in this embodiment specifically comprises the following steps:
Step S510, collected audio/video flow is sent to coding cutter device by video camera.
Step S520, coding cutter device is processed the audio/video flow received, to obtain multiple slice texts Part and corresponding M3U8 index file.
Wherein, working process process specifically includes:The audio/video flow received is encoded and encapsulated, TS text is generated Part, and TS file is cut by multiple continuous, regular length TS small documents (namely slice file) using slice tool, together Shi Shengcheng M3U8 index file corresponding with multiple slice files.
Step S530, coding cutter device obtain with message associated by slice file, and by the message and multiple slices File and corresponding M3U8 index file are transmitted to server and are stored.
Step S540, for being associated with the slice file of message, server adds message associated by the slice file To M3U8 index file, to generate new M3U8 index file.
Wherein, it is arbitrarily sliced point of addition of the message in M3U8 index file associated by file, is:The slice file Corresponding " #EXTINF:" at " comma " subsequent position after label, and using newline as the end of identification of the message Symbol.
In the present embodiment, if message is the message of binary form or the character string forms to include newline Message;
It will be used to describe message associated by slice file, and be added to before M3U8 index file, further include:
Server encodes the message using preset coding mode, which, which is converted to, not include line feed The message of the character string forms of symbol.
Step S550, iOS terminal to server initiates the watching request to the audio/video flow.
Step S560, server issues the new M3U8 index file and gives iOS terminal.
Step S570, iOS terminal parses the new M3U8 index file, successively obtains this mesh to be played Duration information, associated message and the resource address information of mark slice file.
Step S580, the resource address information that iOS terminal is obtained according to parsing obtains target slice file from server.
The message synchronization that the target slice file and parsing that step 590, iOS terminal will acquire obtain plays.
Using technical solution provided in this embodiment, allow HLS protocol while transmitting audio/video flow data, The message data associated by synchronous transfer audio/video flow so that terminal can by message with its associated by audio-video cut Piece file synchronization plays.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (8)

1. a kind of method for transmitting audio-video and message, is applied to server, which is characterized in that including:
It obtains and M3U8 index file corresponding to multiple slice files that cutting obtains is carried out to current audio/video flow;
It will be used to describe the content of message associated by the slice file, be added to the following position of the M3U8 index file Place:Behind the duration information of the slice file, before resource address information, and it is located in same section with the duration information, To generate new M3U8 index file, wherein synchronous while message associated by the slice file is that slice file plays Play to message associated by user and the slice file;The content is described message itself or disappears to be described for identification Cease the character string of storage location;
After receiving terminal to the watching request of the current audio/video flow, the new M3U8 index file is handed down to institute State terminal so that the terminal play be associated with the target slice file of message before, can be according to the new M3U8 index File gets the message of the target slice file association from the server.
2. the method according to claim 1, wherein the content is the message itself;The message is two The message of binary form or for include newline character string forms message;
In the content that will be used to describe message associated by the slice file, it is added to before the M3U8 index file, also Including:
The message is encoded using preset coding mode, to convert the message to not include the word for having newline Accord with the message of string form.
3. a kind of method of playing audio-video and message is applied to terminal, which is characterized in that including:
The watching request to audio/video flow is initiated to server;
The M3U8 index file that the server is returned according to the watching request is received, wherein the M3U8 index file packet It includes:The duration information and resource address information of multiple slice files that cutting obtains are carried out to the audio/video flow, and, it is used for The content for describing message associated by the slice file, wherein the content is located at:After the duration information of the slice file Face before resource address information, and is located in same section with the duration information, and message associated by the slice file is cuts While piece file plays, it is played simultaneously to message associated by user and the slice file;The content is the message sheet Body or character string for the message repository location for identification;
According to the M3U8 index file, this target slice file to be played and the target slice file association are obtained Message;
The target slice file and message synchronization that will acquire play.
4. according to the method described in claim 3, it is characterized in that, it is to be played to obtain this according to the M3U8 index file Target slice file and the target slice file association message, including:
The M3U8 index file is parsed, the duration information of this target slice file to be played is successively obtained, uses In the content and resource address information that describe message associated by the target slice file;
The obtained resource address information is parsed according to this, obtains the target slice file from the server;
The obtained content is parsed according to this, obtains message associated by the target slice file.
5. a kind of server, which is characterized in that including:
Index file acquiring unit carries out corresponding to multiple slice files that cutting obtains current audio/video flow for obtaining M3U8 index file;
Index file updating unit is added to described for that will be used to describe the content of message associated by the slice file At the following position of M3U8 index file:It is described slice file duration information behind, before resource address information, and with it is described Duration information is located in same section, to generate new M3U8 index file, wherein message associated by the slice file is to cut While piece file plays, it is played simultaneously to message associated by user and the slice file;The content is the message sheet Body or character string for the message repository location for identification;
Index file issuance unit will be described new for after receiving terminal to the watching request of the current audio/video flow M3U8 index file be handed down to the terminal so that the terminal play be associated with the target slice file of message before, energy The enough message for getting the target slice file association from the server according to the new M3U8 index file.
6. server according to claim 5, which is characterized in that the content is the message itself;The message is The message of binary form or for include newline character string forms message;
The server further includes:
Message converting unit, for will be used to describe message associated by the slice file in the index file updating unit Content, be added to before the M3U8 index file, the message encoded using preset coding mode, by institute It states message and is converted to the message for not including the character string forms for having newline.
7. a kind of terminal, which is characterized in that including:
Watching request initiates unit, for initiating the watching request to audio/video flow to server;
Index file receiving unit, the M3U8 index file returned for receiving the server according to the watching request, Described in M3U8 index file include:The duration information and money of multiple slice files that cutting obtains are carried out to the audio/video flow Source address information, and, for describing the content of message associated by the slice file, wherein the content is located at:It is described It is sliced behind the duration information of file, before resource address information, and is located in same section with the duration information, the slice While message associated by file is that slice file plays, it is played simultaneously to message associated by user and the slice file; The content is described message itself or the character string for the message repository location for identification;
File and message retrieval unit, for obtaining this target slice file to be played according to the M3U8 index file And the message of the target slice file association;
File and message broadcast unit, target slice file and message synchronization for will acquire play.
8. terminal according to claim 7, which is characterized in that the file and message retrieval unit are specifically used for:
The M3U8 index file is parsed, the duration information of this target slice file to be played is successively obtained, uses In the content and resource address information that describe message associated by the target slice file;
The obtained resource address information is parsed according to this, obtains the target slice file from the server;
The obtained content is parsed according to this, obtains message associated by the target slice file.
CN201510276406.7A 2015-05-26 2015-05-26 A kind of method, server and the terminal of transmission and playing audio-video and message Active CN104902343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510276406.7A CN104902343B (en) 2015-05-26 2015-05-26 A kind of method, server and the terminal of transmission and playing audio-video and message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510276406.7A CN104902343B (en) 2015-05-26 2015-05-26 A kind of method, server and the terminal of transmission and playing audio-video and message

Publications (2)

Publication Number Publication Date
CN104902343A CN104902343A (en) 2015-09-09
CN104902343B true CN104902343B (en) 2018-11-23

Family

ID=54034693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510276406.7A Active CN104902343B (en) 2015-05-26 2015-05-26 A kind of method, server and the terminal of transmission and playing audio-video and message

Country Status (1)

Country Link
CN (1) CN104902343B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105578263A (en) * 2015-12-28 2016-05-11 山东泰信电子股份有限公司 Method for playing and transmitting live programme, intelligent playing equipment and live telecasting equipment
CN105872856A (en) * 2016-03-21 2016-08-17 乐视云计算有限公司 Method and system for distributing stream media files
CN106454418A (en) * 2016-10-11 2017-02-22 山东浪潮商用系统有限公司 Method and device for playing non-HLS (Http Live Streaming) media file
CN108271040B (en) * 2016-12-30 2021-02-23 华为技术有限公司 Method and device for playing video
CN108462566A (en) * 2017-02-20 2018-08-28 沪江教育科技(上海)股份有限公司 A kind of multimedia file encryption method and system
CN106993236B (en) * 2017-04-01 2019-07-23 青岛海信电器股份有限公司 A kind of video broadcasting method and terminal
CN107317817B (en) * 2017-07-05 2021-03-16 广州华多网络科技有限公司 Method for generating index file, method for identifying speaking state of user and terminal
CN108235064A (en) * 2017-12-05 2018-06-29 广州高清视信数码科技股份有限公司 HLS stream media live broadcasting methods and system
CN110138716B (en) * 2018-02-09 2020-11-27 网宿科技股份有限公司 Key providing method, video playing method, server and client
WO2020034330A1 (en) * 2018-09-28 2020-02-20 Zte Corporation Video encoding and decoding methods and apparatus
CN111064989A (en) * 2018-10-17 2020-04-24 国广融合(北京)传媒科技发展有限公司 Data stream processing method and device, computing equipment and storage medium
CN109729371B (en) * 2018-12-21 2021-06-01 中电福富信息科技有限公司 Live broadcast time shifting system and method based on HLS protocol multilevel management

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103826159A (en) * 2013-12-04 2014-05-28 Tcl集团股份有限公司 M3U8 format video local offline play method and terminal
CN104243430A (en) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 Streaming media playing method and device
CN104320679A (en) * 2014-10-11 2015-01-28 中兴通讯股份有限公司 Method for obtaining user information based on HLS protocol and server
CN104506493A (en) * 2014-12-04 2015-04-08 武汉市烽视威科技有限公司 HLS content source returning and caching realization method
CN104602046A (en) * 2013-11-01 2015-05-06 中国移动通信集团公司 HLS protocol based information publishing method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8949206B2 (en) * 2012-10-04 2015-02-03 Ericsson Television Inc. System and method for creating multiple versions of a descriptor file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104243430A (en) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 Streaming media playing method and device
CN104602046A (en) * 2013-11-01 2015-05-06 中国移动通信集团公司 HLS protocol based information publishing method, device and system
CN103826159A (en) * 2013-12-04 2014-05-28 Tcl集团股份有限公司 M3U8 format video local offline play method and terminal
CN104320679A (en) * 2014-10-11 2015-01-28 中兴通讯股份有限公司 Method for obtaining user information based on HLS protocol and server
CN104506493A (en) * 2014-12-04 2015-04-08 武汉市烽视威科技有限公司 HLS content source returning and caching realization method

Also Published As

Publication number Publication date
CN104902343A (en) 2015-09-09

Similar Documents

Publication Publication Date Title
CN104902343B (en) A kind of method, server and the terminal of transmission and playing audio-video and message
JP6425720B2 (en) Method and apparatus for content delivery
US9584837B2 (en) Receiving device and method of controlling the same, distribution device and distribution method, program, and distribution system
CN104125516B (en) Media file reception, media file sending method and apparatus and system
US20170140190A1 (en) Multimedia service pushing method and system based on two-dimensional code
US20160134900A1 (en) Streaming media processing method, apparatus, and system
CN105828096B (en) Method and device for processing media stream file
CN1696923A (en) Networked, multimedia synchronous composed storage and issuance system, and method for implementing the system
US20200221161A1 (en) Reception apparatus, transmission apparatus, and data processing method
CN103763637A (en) Stream media broadcasting method and system
CN108156478A (en) Mp4 formatted files turn the video on-demand system and method for hls forms
CN104125229A (en) Streaming media playing method and streaming media playing device
US11540028B2 (en) Information presenting method, terminal device, server and system
CN107659538A (en) A kind of method and apparatus of Video processing
EP3007450B1 (en) Transmission device, transmission method, receiving device, and receiving method
CN106658150B (en) Method and device for realizing review processing
CN113923502B (en) Live video playing method and device
CN106303754A (en) A kind of audio data play method and device
CN106331763A (en) Method of playing slicing media files seamlessly and device of realizing the method
CA2944985C (en) Receiver, transmitter, data communication method, and data processing method
CN109587517A (en) A kind of playback method and device, server and storage medium of multimedia file
CN112350986B (en) Shaping method and system for audio and video network transmission fragmentation
CN104104575A (en) Communication method and system for IM (instant messaging) group
CN107547917B (en) Channel playing and processing method and device and channel processing system
CN106454547B (en) real-time caption broadcasting method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Liu Pidong

Inventor after: Li Xiongbing

Inventor after: Hao Fuzhuang

Inventor before: Liu Pidong

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant