A kind of adaptive flow media playing method and Play System thereof
Technical field
The present invention relates to stream media technology, particularly relate to a kind of adaptive flow media playing method and Play System thereof.
Background technology
Multimedia has become as requisite important component part in people's work and study, plays increasing effect in people work, learn and live.Multimedia has it to apply at numerous areas, for people's different demands to multimedia service in routine work, life, some standardization bodies are directed to different business demand in society and propose multiple audio/video encoding standard and different audio frequency and video encapsulation format.Such as, the H.263 standard proposed for visual telephone and video conference business;The Mpeg2 standard proposed for DVB, HDTV and DVD;For the mpeg 4 standard of streaming media service exploitation in network;And high video compression performance can be provided, the H.264 standard etc. of network friendliness.
But owing to various different terminals are the customization of different application scene, its decoding and display capabilities and residing network environment are had nothing in common with each other, the most general mobile terminal only supports MP4, the form of 3GP etc, a large amount of multimedia videos in internet all can not directly be play, therefore, mostly existing streaming media service scheme is to take, to same content of multimedia, to carry out off-line in advance for variety classes terminal and be transcoded into the static file of multiple format with adaptive different terminal;For different network environments, producing the static file actual download bandwidth with client detection oneself of different code check, the version of selected different code checks is to tackle the fluctuation of bandwidth;This method is required for consuming substantial amounts of transcoding server and storage resource, adds the cost of content supplier and video service provider.The most also occurring in that the mode using self adaptation real-time transcoding should be with the network environment to multiple terminal and change, this method Consumer's Experience has had large increase, but transcoding server and bandwidth cost are the highest.Actually, current various terminal such as home computer, Set Top Box and handheld device both provide main flow audio/video coding form as H.264, MPEG-4, AAC, the decoding support of MP3 etc., but encapsulation format and the host-host protocol owing to supporting is had nothing in common with each other, and often makes the player of terminal directly not play.
Summary of the invention
It is an object of the invention to provide a kind of adaptive flow media playing method of one for different terminals playing request and being suitable for different bandwidth and Play System thereof, its concrete technical scheme is as follows:
A kind of adaptive flow media playing method, plays step and includes
The adaptive identifying unit that is arranged on the network terminal receives playing request that the described network terminal sends and is transmitted to the real-time transcoding server being arranged on network;
Described real-time transcoding server obtains original media stream attribute information to be play from video source server;
Real-time transcoding server generates transcoding information converting to the original media stream attribute information being different from network terminal player plays form, and this transcoding information converting is sent to described adaptive identifying unit;Or described original media stream attribute information is sent to adaptive identifying unit by real-time transcoding server, adaptive identifying unit generate transcoding information converting;Or real-time transcoding server generates transcoding information converting according to original media stream attribute information, described transcoding information converting and original media stream attribute are sent to adaptive identifying unit, and adaptive identifying unit generates transcoding information converting according to described original media stream attribute information and merges the transcoding information converting of real-time transcoding server;
Transcoding information converting is sent to the network terminal by adaptive identifying unit;
The network terminal, according to transcoding information converting, selects to be suitable for code check, carries out Media Stream broadcasting by the player of this terminal.
The adaptive flow media playing method of described one is characterised by, described original media stream attribute information includes address, host-host protocol, encapsulation format, video size, code check, video length, the time of key frame and position.
The adaptive flow media playing method of described one is characterised by, the step that described real-time transcoding server generates transcoding information converting to described original media stream information includes:
Real-time transcoding server to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information converting according to described original media stream attribute information;
The real-time transcoding server described transcoding information converting of transmission, to adaptive identifying unit, the listing file of transmission two or more in this way, as required, sends after sending respectively or merging.
The adaptive flow media playing method of described one is characterised by, described real-time transcoding server is sent to the step of adaptive identifying unit generation transcoding information converting and includes:
Adaptive identifying unit to Media Stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information converting according to the original media stream attribute information obtained.
The adaptive flow media playing method of described one is characterised by, the step that described real-time transcoding server and adaptive identifying unit generate transcoding information converting jointly includes:
Real-time transcoding server according to the original media stream attribute information obtained, to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information converting;
Described original media stream attribute information and described transcoding information converting are sent to adaptive identifying unit by real-time transcoding server simultaneously;
Adaptive identifying unit to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information converting according to the original media stream attribute information obtained;
The described listing file generated by adaptive identifying unit and real-time transcoding server respectively is merged by adaptive identifying unit.
The adaptive flow media playing method of described one is characterised by, described adaptive identifying unit includes proxy server and transcoding module.
The adaptive flow media playing method of described one is characterised by, described adaptive identifying unit receives the playing request that sends of the described network terminal and the step that is transmitted to real-time transcoding server includes:
Described proxy server receives playing request and is transmitted to transcoding module;
Transcoding module detects from playing request and meets encapsulation format and the broadcasting attribute information of host-host protocol that the player of this playing request is supported, and this broadcasting attribute information is sent to proxy server;
Described broadcasting attribute information is sent to real-time transcoding server by proxy server.
The adaptive flow media playing method of described one is characterised by, described real-time transcoding server obtains the step of original media stream to be play and original media stream attribute information and includes:
Described real-time transcoding service obtains the beginning part fragment of original media stream to be play according to the host-host protocol in described broadcasting attribute information from video source server, or the video information interface supported by video source server is obtained.
The adaptive flow media playing method of described one is characterised by, described real-time transcoding server be sent to adaptive identifying list carry out unit transcoding shift step also include:
Described proxy server receives original media stream attribute information and this original media stream attribute information is sent to transcoding module;
Described transcoding module to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information according to the original media stream attribute information obtained;
This transcoding information converting is sent to proxy server by transcoding module;
The adaptive flow media playing method of described one is characterised by, the step that real-time transcoding server generates transcoding information converting jointly with adaptive identifying unit also includes:
Real-time transcoding server according to the original media stream information obtained, to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information converting, and this transcoding information converting is sent to proxy server;
Described original media stream attribute information and transcoding information converting are sent to proxy server by real-time transcoding server simultaneously;
Proxy server receives original media stream attribute information and this original media stream attribute information and transcoding information converting is sent to transcoding module;
Transcoding module according to original media attribute stream information, to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format, forms described transcoding information, this transcoding information converting is sent to proxy server;
The transcoding information sent by transcoding module and real-time transcoding server respectively is merged by proxy server.
The adaptive flow media playing method of described one is characterised by, network terminal player is that terminal carries player, or Opening Custom-built Media Player or third party's player.
Adaptive identifying unit in described a kind of adaptive stream media play system, including:
Proxy server, in order to receive playing request and to be transmitted to transcoding module, accepts the original media stream information of real-time transcoding server transmission and this original media stream information is sent to transcoding module;
With transcoding module, in order to detect encapsulation format and the host-host protocol that the player meeting this playing request in playing request is supported, and forward the player attribute information detected, accept the video information pre-cut sheets in original media stream information and generate the listing file of at least one corresponding broadcast format and generate the host-host protocol of correspondence, form described transcoding information converting, the transcoding receiving original media attribute converts and merges different transcoding information convertings, and forwards this transcoding information converting.
Described adaptive identifying unit is characterised by, described transcoding module includes
Player detector unit module, in order to detect the encapsulation format and host-host protocol that the player meeting this playing request supported from playing request, and the player attribute information that will detect;
Pre-cut sheets unit module, in order to the video information pre-cut sheets in original media stream information the listing file that generates at least one corresponding broadcast format;
Media stream transition unit module, in order to be converted to the Media Stream that terminal plays is supported by original media stream;
With combining unit module, in order to the listing file of two or more correspondence broadcast format difference code check is merged.
Real-time transcoding server in described a kind of adaptive stream media play system, including
Original media stream acquiring unit module, in order to obtain original media stream information to be play from acquisition module;
Pre-cut sheets unit module, in order to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format;
Media stream transition unit module, in order to be converted to the Media Stream that terminal plays is supported by original media stream;
With combining unit module, in order to the listing file of two or more correspondence broadcast format difference code check is merged.
A kind of adaptive stream media play system, including
Adaptive identifying unit, it is arranged on the network terminal, in order to receive playing request that the described network terminal sends and to be transmitted to real-time transcoding server, receive transcoding information and original media stream information that real-time transcoding server sends, the original media stream information received is generated transcoding information converting, merge different transcoding information, transcoding information converting is sent to the network terminal;
Real-time transcoding server, it is arranged on network, in order to be received from the playing request adapting to broadcast unit forwarding and to obtain original media stream information to be play, the original media stream information received is generated transcoding information converting, and transcoding information is sent to adaptive identifying unit, maybe the original media stream information of reception is sent to adaptive identifying unit;
Video source server, in order to provide Media Stream;
And the network terminal, in order to carry out streaming media playing according to described transcoding information converting by the player on this network terminal.
Described a kind of adaptive stream media play system is characterised by, including
Described adaptive identifying unit includes
Proxy server, in order to receive playing request and to be transmitted to transcoding module, receives the original media stream information of real-time transcoding server transmission and this original media stream information is sent to transcoding module;
With transcoding module, in order to detect the encapsulation format and host-host protocol that the player meeting this playing request supported from playing request, and the player attribute information detected is sent to proxy server, video information pre-cut sheets in the original media stream information send proxy server also generates the listing file of at least one corresponding broadcast format, form described transcoding information, and the transcoding information converting received and the transcoding information oneself generated are merged, this transcoding information is sent to proxy server.
A kind of adaptive stream media play system is characterised by, described transcoding module includes
Player detector unit module, in order to detect the encapsulation format and host-host protocol that the player meeting this playing request supported from playing request, and is sent to described proxy server by the player attribute information detected;
Pre-cut sheets unit module, in order to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format;
Media stream transition unit module, in order to be converted to the Media Stream that terminal plays is supported by original media stream;
With combining unit module, in order to the listing file of two or more correspondence broadcast format difference code check is merged.
A kind of adaptive stream media play system is characterised by, described real-time transcoding server includes:
Original media stream acquiring unit module, obtains original media stream information to be play in order to acquisition module;
Pre-cut sheets unit module, in order to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format;
With combining unit module, in order to the listing file of two or more correspondence broadcast format difference code check is merged.
A kind of machine readable media, on it, storage has instruction set, when instruction set is performed so that machine can perform the adaptive flow media playing method of above-mentioned one.
The application also sets up another kind of adaptive flow media playing method, plays step and includes
The playing request that the network terminal sends to the real-time transcoding server being arranged on network;
Described real-time transcoding server obtains original media stream attribute information to be play;
Real-time transcoding server generates transcoding information converting according to original media stream attribute information;
Transcoding information converting is sent to the player of the network terminal by real-time transcoding server;
The network terminal, according to transcoding information converting, is selected to be suitable for code check Media Stream, is played out by the player of this terminal.
The adaptive flow media playing method of described another kind is characterised by, described original media stream attribute information includes address, host-host protocol, encapsulation format, video size, code check, video length, the time of key frame and position.
The adaptive flow media playing method of described another kind is characterised by, described real-time transcoding server obtains the step of original media stream information to be play and includes:
Described real-time transcoding service obtains original media stream to be play according to described playing request from video source server, or the video information interface supported by video source server is obtained.
The adaptive flow media playing method of described another kind is characterised by, the step that described real-time transcoding server generates transcoding information converting to described original media stream information includes:
Real-time transcoding server, by the video information pre-cut sheets in the original media stream information of acquisition the listing file that generates at least one corresponding broadcast format, forms described transcoding information converting;
Real-time transcoding server sends described transcoding information converting to adaptive identifying unit, the listing file of transmission two or more in this way, transmission after merging.
The adaptive flow media playing method of described another kind is characterised by, described broadcasting step also includes:
Real-time transcoding server, according to the original media stream attribute information obtained, the listing file to original media stream pre-cut sheets and generating at least one corresponding broadcast format and corresponding host-host protocol, forms described transcoding information converting;
Described transcoding information converting is sent to the network terminal by real-time transcoding server;The network terminal, according to described transcoding information converting, selects to be suitable for code check, and the Media Stream being carried out the corresponding period by the player on this network terminal is play;
The network terminal is to the Media Stream of real-time transcoding server request a certain period;
Real-time transcoding server according to this request, obtains the Media Stream of a certain period to video source server, and is transmitted to the player plays of the network terminal, terminates until the Media Stream of described playing request is play.
The adaptive flow media playing method of described another kind is characterised by, network terminal player is that terminal carries player, or Opening Custom-built Media Player or third party's player.
Real-time transcoding server in the adaptive stream media play system of described another kind, including
Original media stream acquiring unit module, obtains original media stream information to be play in order to acquisition module;
Pre-cut sheets unit module, in order to the video information pre-cut sheets in original media stream information the listing file that generates at least one corresponding broadcast format;
With combining unit module, in order to the listing file of two or more correspondence broadcast format difference code check is merged.
The adaptive stream media play system of described another kind, including
Real-time transcoding server, is arranged on network, in order to receive the playing request of the network terminal and to obtain original media stream information to be play, the original media stream information received is generated transcoding information converting, and transcoding information is sent to the player of the network terminal;
Video source server, in order to provide Media Stream;
And the network terminal, in order to according to described transcoding information converting, select to be suitable for code check, carry out Media Stream broadcasting by the player on this network terminal.
The adaptive stream media play system of described another kind is characterised by, including
Original media stream acquiring unit module, obtains original media stream information to be play in order to acquisition module;
Pre-cut sheets unit module, in order to original media stream pre-cut sheets the listing file that generates at least one corresponding broadcast format;
Media stream transition unit module, in order to be converted to the Media Stream that terminal plays is supported by original media stream;
With combining unit module, in order to the listing file of two or more correspondence broadcast format difference code check is merged.
A kind of machine readable media, on it, storage has instruction set, when instruction set is performed so that machine can perform the adaptive flow media playing method of above-mentioned another kind.
The beneficial effects of the present invention is: meet terminal support and play the demand of the various Internet video of differing transmission protocols and different encapsulation format present in internet, turn avoid the problem carrying out unnecessary transcoding and storing the ample resources consumed, there is again bandwidth and the adaptive feature of terminal capability simultaneously, accomplish perfect Consumer's Experience.
Accompanying drawing explanation
Fig. 1 is the adaptive stream media play system according to one embodiment of the present of invention and the schematic diagram of playing flow.
Fig. 2 is the schematic diagram that Play System shown in Fig. 1 obtains the playing flow of original media stream at times.
Fig. 3 is the adaptive stream media play system according to an alternative embodiment of the invention and the schematic diagram of playing flow.
Detailed description of the invention
Below will with reference to the accompanying drawings and specific embodiment the present invention will be further described.
Embodiment 1
Comparison Fig. 1, this adaptive stream media play system includes real-time transcoding server 200, video source server 300 and Network Termination #1 00, and real-time transcoding server 200 is arranged on network, and the network terminal of the present embodiment is a Set Top Box.
Step when said system is play includes:
The playing request that 1.1 Network Termination #1s 00 send to the real-time transcoding server 200 being arranged on network;
1.2 real-time transcoding servers 200 obtain original media stream to be play and corresponding original media stream attribute information from video source server 300, and period real-time transcoding server 200 detects from playing request and meets the player attribute information that the player of this playing request is supported.
1.3 real-time transcoding servers 200 generate transcoding information converting to the original media stream attribute information (original media stream attribute information includes address, host-host protocol, encapsulation format, video size, code check, video length, the time of key frame and position) being different from network terminal player plays form;
1.4 real-time transcoding servers 200 are by the player of transcoding information converting and media stream to Network Termination #1 00;
1.5 Network Termination #1s 00 select to be suitable for code check Media Stream, according to transcoding information converting, carry out Media Stream broadcasting by the player of this terminal.
According to above-mentioned step, the conversion of real-time transcoding server transcoding is optimized further, is optimized for transcoding conversion at times, be summarized as following step:
A. the real-time transcoding server original media stream pre-cut sheets to obtaining generate the listing file of at least one corresponding broadcast format and corresponding host-host protocol, forms described transcoding information converting;
B. described transcoding information converting is sent to the network terminal by real-time transcoding server
C. the network terminal is according to described transcoding information converting, selects to be suitable for code check, and the Media Stream being carried out the corresponding period by the player on this network terminal is play;
D. the network terminal is to the Media Stream of real-time transcoding server request a certain period;
E. real-time transcoding server is according to this request, obtains the Media Stream of a certain period to video source server, and is transmitted to the player plays of the network terminal, terminates until the Media Stream of described playing request is play.
Embodiment 2
For the ease of the operation of system, in the real-time transcoding server 200 of above-described embodiment, preferably it is set to following software module: original media stream acquiring unit module, pre-cut sheets unit module, transport protocol conversion unit module and combining unit module.Original media stream acquiring unit module therein is for obtaining original media stream information to be play from video source server 300;Pre-cut sheets unit module, for the video information pre-cut sheets in original media stream information the listing file that generates at least one corresponding broadcast format;Media stream transition unit module, in order to convert original media stream, generates and meets the Media Stream that the player of playing request is supported;Merge module, for the listing file of the different code checks of two or more correspondence broadcast format is merged.
According to above-mentioned Optimization Steps and the modular system of optimization, the concrete course of work is shown in Fig. 2:
The player of 2.1 Network Termination #1s 00 sends to real-time transcoding server 200 and playshttp://www.example.com/a.flvPlaying request.
2.2 real-time transcoding servers 200 are by original media stream acquiring unit module, such as original media stream acquiring unit module obtains original media stream and the original media stream attribute information of correspondence by HTTP Range Request method to video source server, obtains also by the video information interface supported.The head of the permissible respective file of media flow attribute information obtained, such as, obtainhttp://www.example.com/a.flvBeginning fraction data, these data contain the information such as the address of original media stream, host-host protocol, encapsulation format, video size, code check, video length, the time of key frame and position in data.
2.3 video source servers 300, according to the file of this request, send the data of flv the beginning part to real-time transcoding server 200.
2.4 real-time transcoding servers 200 parse the time span of flv video from the header data of above-mentioned flv file, the player attribute information such as file size and key frame position, and carry out pre-cut sheets according to the information of this acquisition by pre-cut sheets unit module, and generate the listing file of the multi code Rate of Chinese character of correspondence, such as m3u8 listing file, and the fragment recording in m3u8 list the original flv file corresponding to each ts package file forms transcoding information converting.
2.5 real-time transcoding servers 200 are by the player of the media stream of above-mentioned transcoding information converting and corresponding section period to the network terminal.
Above-mentioned listing file can generate multiple as required, and real-time transcoding server 200 is sent on the player of Network Termination #1 00 after typically being merged by multiple listing files by combining unit module.
2.6 Network Termination #1s 00, according to m3u8 corresponding to bandwidth selection, ask ts therein to encapsulate fragment, and the Media Stream being carried out the corresponding period by the corresponding player in this terminal is play.
After 2.7 real-time transcoding servers 200 receive the request playing ts, inquiry ts encapsulates the information such as the address of corresponding original media stream.
2.8 real-time transcoding servers 200 ask the original media stream of this period according to the original video address inquired about to video source server 300.
2.9 video source servers 300 send the original media stream fragment of this period to real-time transcoding server 200.
The original media stream fragment real-time transcoding received is become ts to encapsulate fragment by 2.10 real-time transcoding servers 200.
The player that the ts encapsulation fragment that real-time transcoding is become by 2.11 real-time transcoding servers is sent on Network Termination #1 00 plays out
2.12 if any multiple fragments, by the process of repeatedly 2.6-2.11.
Embodiment 3
Comparison Fig. 3, the adaptive stream media play system of the present embodiment includes: adaptive identifying unit 501, real-time transcoding server 600, the player 502 of the network terminal and video source server 700.The network terminal of the present embodiment is a mobile phone, and system is arranged on internet.
Adaptive identifying unit 501 in system is arranged on the network terminal 500, in order to receive playing request that the described network terminal 500 sends and to be transmitted to real-time transcoding server 600, receive transcoding information and original media stream information that real-time transcoding server 600 sends, the original media stream attribute information received is generated transcoding information converting, merge different transcoding information, transcoding information converting is sent to network player at end 502.
Real-time transcoding server 600 in system is arranged on network, in order to be received from the playing request adapting to broadcast unit 501 forwarding and to obtain original media stream attribute information to be play from video source server 700, the media flow attribute information received is generated transcoding information converting, and transcoding information is sent to adaptive identifying unit 501, maybe the original media stream information of reception is sent to adaptive identifying unit 501.
Additionally, the network terminal 500 and video source server 700 in system are play and in order to provide Media Stream in order to Media Stream respectively.
The functional characteristic of above-mentioned adaptive identifying unit 501, real-time transcoding server 600, the player 502 of the network terminal and video source server 700 will will be explained in the following course of work one by one.
System shown in Figure 3 carries out the step of adaptive stream media broadcasting and includes:
1) playing request that the network terminal 500 sends, adaptive identifying unit receives this request, and the real-time transcoding server 600 being transmitted on network;
2) real-time transcoding server 600 obtains original media stream to be play and corresponding original media stream attribute information from video source server 700;
3) this real-time transcoding server 600 generates transcoding information converting to the original media stream attribute information being different from network terminal player 502 broadcast format, and transcoding information converting is sent to described adaptive identifying unit 501;Or described original media stream attribute information is sent to adaptive identifying unit 501 by real-time transcoding server 600, adaptive identifying unit 501 generate transcoding conversion;Or real-time transcoding server 600 generates transcoding information converting according to original media stream attribute information, described transcoding information converting and original media stream attribute are sent to adaptive identifying unit 501, and adaptive identifying unit 501 generates transcoding information converting according to described original media stream attribute information and merges the transcoding information converting of real-time transcoding server 600;
4) transcoding information converting is sent to the network terminal 500 by adaptive identifying unit 600, as adaptive identifying unit 501 exists the transcoding information converting of two or more difference code check, is sent on the network terminal 500 after merging;
5) player 502 of the network terminal is according to transcoding information converting, selects to be suitable for code check Media Stream and plays out.
According to above-mentioned steps, in conjunction with example, its concrete course of work as shown in Figure 3:
3.1 network terminals 500 send to be playhttp://www.example.com/a.flvPlaying request to local adaptive identifying unit 501.
3.2 adaptive identifying unit 501 detect from playing request and meet the encapsulation format that the player of this playing request is supported, and the inspection result that will differ from the player attribute of network terminal player plays form is sent to real-time transcoding server 600.
The information that 3.3 real-time transcoding servers 600 send according to adaptive identifying unit 501 obtains to video source serverhttp://www.example.com/a.flvBeginning fraction data, data contain the head of flv file, the attribute information of original media stream to be play.
3.4 video source servers, according to the flv file of request, send the data of flv the beginning part to real-time transcoding server 600.
3.5 real-time transcoding servers 600 parse the time span of flv video from the header data obtained, the information such as file size and key frame position, and carry out pre-cut sheets according to the media flow attribute information obtained, and generate the m3u8 listing file (listing file as required can be multiple) of the multi code Rate of Chinese character of correspondence, in record m3u8 list, the fragment of original flv file corresponding to each ts package file, forms transcoding information.
Real-time transcoding server 600 obtains original media stream information to video source server and obtains also by the video information interface supported.
Real-time transcoding server 600, after obtaining original media stream information, such as obtains from video source serverhttp://www.example.com/a.flvBeginning fraction data after, this original media stream attribute information can not be processed, be sent directly to adaptive identifying unit 501 and generate transcoding information converting.
The above-mentioned m3u8 of including list, the transcoding information of host-host protocol and original media stream are sent to adaptive identifying unit 501 by 3.6 real-time transcoding servers 600.Listing file the most multiple (at least two) in real-time transcoding server can send respectively, it is also possible to is sent to adaptive identifying unit 501 after merging.
3.7 adaptive identifying unit 501 according to received transcoding information butt joint receive original media stream carry out pre-cut sheets setting, generate this locality and turn the m3u8 list (http: // 127.0.0.1/a.m3u8) of encapsulation.Adaptive identifying unit 501 also can not carry out pre-cut sheets, generate the transcoding conversion that this locality turns the list of encapsulation, and transcoding conversion all completed by real-time transcoding server 600.
All listing files merging that 3.8 adaptive identifying unit 501 will receive, the multiple m3u8 listing files merging such as by the most locally generated multiple m3u8 listing files merging or all sent by real-time transcoding server 600 or all m3u8 listing files that part is locally generated, part is sent by adaptive identifying unit 501 merge.
3.9 adaptive identifying unit 501 will merge after m3u8 playlist to the network terminal 500.
3.10 network terminals according to m3u8 corresponding to bandwidth selection, if request be real-time transcoding server m3u8 in ts encapsulate fragment, the then process of the 2.6-2.11 in playing process similar embodiment 2.
The m3u8 that 3.11 network terminals foundation bandwidth selections are corresponding, asks the ts in the m3u8 of adaptive identifying unit therein to encapsulate fragment, and the Media Stream being carried out the corresponding period by the corresponding player in this terminal is play.
After 3.12 adaptive identifying unit 501 receive the request playing ts, inquiry ts encapsulates the information such as the address of corresponding original media stream.
3.13 adaptive identifying unit 501 ask the original media stream of this period according to the original video address inquired about to video source server 700.
3.14 video source servers 700 send the original media stream fragment of this period to adaptive identifying unit 501.
The original media stream fragment real-time transcoding received is become ts to encapsulate fragment by 3.15 adaptive identifying unit 501.
The player 502 that the ts encapsulation fragment that real-time transcoding is become by 3.16 adaptive identifying unit 501 is sent on the network terminal 500 plays out
The adaptive identifying unit 501 in the present invention is understood by above-mentioned example, it is to receive playing request and obtain original media stream to be play from original media streaming server, original media stream attribute information is generated transcoding information converting, and transcoding information is sent to adaptive identifying unit, maybe the original media stream information of reception is sent to adaptive identifying unit.According to the function completed above, adaptive identifying unit 501 can be optimized for proxy server and transcoding module two parts.And transcoding module can optimal design-aside can be following software module according to its function completed: player detector unit module, pre-cut sheets unit module, media stream transition unit module unit module and combining unit module, it is thus possible to preferably data classification is processed.Player detector unit module, in order to detect the encapsulation format and host-host protocol that the player meeting this playing request supported from playing request, and the player attribute information that will detect;Pre-cut sheets unit module, in order to the video information pre-cut sheets in original media stream information the listing file that generates at least one corresponding broadcast format;Media stream transition unit module, in order to be converted to the Media Stream that terminal plays is supported by original media stream;Combining unit module, in order to merge the listing file of two or more correspondence broadcast format difference code check.
Real-time transcoding server 600 role is: is received from and adapts to the playing request of broadcast unit forwarding and obtain original media stream information to be play from video source server, the original media stream information received is generated transcoding information converting, and transcoding information converting is sent to adaptive identifying unit, maybe the original media stream information of reception is sent to adaptive identifying unit.Similarly according to the function of real-time transcoding server, optimal design-aside is following software module: original media stream acquiring unit module, pre-cut sheets unit mould, media stream transition unit module and combining unit module.Original media stream acquiring unit module, in order to obtain original media stream information to be play from video source server acquisition module, and pre-cut sheets unit module, media stream transition unit module are identical with the corresponding unit module of above-mentioned transcoding module with combining unit module.
Optimization design according to above-mentioned adaptive identifying unit 501 and real-time transcoding server 600, the particular procedures that some of above-described embodiment corresponding step generations are corresponding:
Such as, adaptive identifying unit 501 receives the playing request that the described network terminal 500 sends and the step being transmitted to real-time transcoding server 700 is: in adaptive identifying unit 501, proxy server receives playing request and is forwarded from adapting in broadcast unit 501 to transcoding module;Detector unit module in transcoding module detects and meets encapsulation format and the broadcasting attribute information of host-host protocol that the player of this playing request is supported, and this broadcasting attribute information is sent to proxy server;Described broadcasting attribute information is sent to real-time transcoding server 600 by proxy server.
Next, real-time transcoding server 600 from the step of the attribute information that video source server 700 obtains original media stream to be play and correspondence is: the information that real-time transcoding server 600 sends according to proxy server, uses HTTP range request method to obtain to video source server by video source server acquisition module on ithttp://www.example.com/a.flvBeginning fraction data, the video information interface the most also can supported by video source server is obtained.The original media stream obtained and the attribute information of correspondence are sent to proxy server.
Then, the attribute information of the original media stream of acquisition is sent to the proxy server in adaptive identifying unit 501 by real-time transcoding server 600, the attribute information of original media stream is transmitted to transcoding module by proxy server, pre-cut sheets unit module in transcoding module is to original media stream pre-cut sheets and generates the listing file of at least one corresponding broadcast format and the host-host protocol of correspondence, forming described transcoding information converting, proxy server receives original media stream information and this original media stream information is sent to transcoding module.
The attribute information of original media stream also can be transmitted to real-time transcoding server 600 and generate transcoding information converting by proxy server, its step includes: the video information in the original media stream information of acquisition is carried out pre-cut sheets by pre-cut sheets unit module and generates the listing file of at least one corresponding broadcast format by real-time transcoding server 600, forms described transcoding information converting;Real-time transcoding server 600 sends transcoding information converting to adaptive identifying unit, and the listing file of transmission two or more in this way as required, is sent to proxy server after sending respectively or being merged by combining unit module.
The attribute information of original media stream also can be turned the transcoding module being respectively issued in real-time transcoding server 600 and adaptive identifying unit and generate transcoding information converting respectively by proxy server, and its step includes:
Real-time transcoding server 600 is by pre-cut sheets unit module therein, by the original media pre-cut sheets of acquisition the listing file that generates at least one corresponding broadcast format, form described transcoding information converting, and this transcoding information converting and original media stream attribute information are sent to proxy server.Simultaneously, transcoding module by pre-cut sheets unit module therein to the Media Stream pre-cut sheets in original media stream information the listing file that generates at least one corresponding broadcast format, described transcoding information converting is generated by media stream transition unit module, and the listing file sent by transcoding module and real-time transcoding server respectively is merged, the transcoding information converting comprising the listing file after merging is sent to the network terminal through proxy server.
The player of above-described embodiment network terminal can be that terminal carries player, it is also possible to is the Opening Custom-built Media Player player that such as coordinates this system customization, or third party's player, such as vlc, mx player etc..
Herein described disclosed method can be embodied directly in hardware, the processor software module performed or the set of the two.Software module is storable in computer-readable recording medium.
Although This application describes the more specific embodiments of the present invention, but those of ordinary skill in the art can designing the deformation of some the technical program on the basis of the technical scheme provided of the present invention.
Such as, the transcoding module in the application can carry out different Software Module Design as required, can redesign and is: parameter setting module, in order to arrange the form and agreement needing transcoding;Audio/video flow separation module, is used for carrying out source media stream decapsulating the audio stream obtaining separating and video flowing.The most such as, encapsulation format involved in the present invention is not limited to the encapsulation of TS form, it is also possible to be flv, mp4, webm or self-defining audio frequency and video encapsulation format.Playlist form is also not limited to above-described embodiment, can be form or any self-defining illustrative playlists such as asx, xml, ism, sdp, smil, f4f.Therefore, the protection domain of application is not limited to above-described embodiment.