BACKGROUND
With the increasing integration of mobile terminals is high, its information processing capacity is also growing stronger, than
If the terminal can provide a certain color resolution and color screens, cameras. Wireless Access
Technology, and allows the network to support data transmission bandwidth sufficient. In this condition, and
Streaming media-related applications appear very natural in the mobile terminal, such as multimedia short message business
Services, PS-domain video streaming services, video phone services, such as multimedia broadcast multicast service.
In streaming media applications, more and more businesses require multipoint transmission, than
Such as multimedia broadcast multicast service is a multipoint services. Multimedia broadcast multicast service types
Range of mobile TV business is one of them, the phone is able to customize the business directly receive TV,
Allows users to watch programs anytime, anywhere, so this kind of business is very attractive to users.
However, 3GPP protocol R99 and R4 versions are not available on the web hosting multipoint
Service approach. In the R6 version, UMTS network, access network and core network functions and have relatively
More than the increase, which can provide multipoint transmission bearer, specifically: beyond the new core network
BM-SC node, so that the node GGSN is connected, in order to provide multimedia broadcast multicast service and its
Controlled node of the BM-SC also enables the mobile terminal access control and billing management. By the
The BM-SC adds the node, GGSN, SGSN, RAN, and a mobile terminal user plane and control plane
Also increased corresponding functions, and to assist the BM-SC provides multipoint services. However, R6 version of the current
Not yet finalized, it is based on mature products R6 version of the protocol should also take a long time to market
Room. For this reason, only on the basis of R99 and R4 have commercial versions, one by one, for the use of point to point
Farmers for live streaming and on-demand services.
...
However, 3GPP protocol R99 and R4 versions are not available on the web hosting multipoint
Service approach. In the R6 version, UMTS network, access network and core network functions and have relatively
More than the increase, which can provide multipoint transmission bearer, specifically: beyond the new core network
BM-SC node, so that the node GGSN is connected, in order to provide multimedia broadcast multicast service and its
Controlled node of the BM-SC also enables the mobile terminal access control and billing management. By the
The BM-SC adds the node, GGSN, SGSN, RAN, and a mobile terminal user plane and control plane
Also increased corresponding functions, and to assist the BM-SC provides multipoint services. However, R6 version of the current
Not yet finalized, it is based on mature products R6 version of the protocol should also take a long time to market
Room. For this reason, only on the basis of R99 and R4 have commercial versions, one by one, for the use of point to point
Farmers for live streaming and on-demand services.
...
The streaming media server, including session management module 101, a storage module 102 and flow scheduling module
103, CP / SP streaming media streaming server upload data storage module 102, will be on
State action notification session management module 101. When the end-user request for a certain period of streaming media data, the
End-user session management module 101 will send a request to the session management module 101 will flow scheduling
Module 103 issued instructions. Thereafter, the flow control module 103 to obtain from the storage module 102 contains the corresponding flow
Media data source file and the source files into RTP packets, the next issue end users.
% E6% B5% 81% E8% B0% 83% E5% BA% A6% E6% A8% A1% E5% 9D% 97103% E5% B0% 81% E8% A3% 85RTP% E5% 8C% 85% E7 % 9A% 84% E8% BF% 87% E7% A8% 8B% E5% 85% B7% E4% BD% 93% E4% B8% BA% EF% BC% 9A% E9% A6% 96% E5% 85 % 88% EF% BC% 8C% E6% B5% 81% E8% B0% 83% E5% BA% A6% E6% A8% A1% E5% 9D% 97% E4% BB% 8E% E5% AD% 98 % E5% 82% A8% 0A% 20% 20% 20% 20% 20% 20% 20% 20% 20% 20% 20% 20% E6% A8% A1% E5% 9D% 97% E8% 8E% B7 % E5% BE% 97% E7% B4% A2% E5% BC% 95% E8% BD% A8% E9% 81% 93 (Hint% C2% A0Track)% E4% BF% A1% E6% 81% AF% E5% B9% B6% E8% A7% A3% E7% A0% 81% E3% 80% 82
Then, the flow scheduling module according Hint Track information Video Track or Audio Track
To find the corresponding sample (Sample), and in accordance with each Sample Packet RTP protocol encapsulated into
Sent. The Sample streaming media data source file is the basic unit of data that can be streaming video
Or audio streams.
In the data transmission process, workflow scheduling module per Gets a Sample, necessary for storage
One or more access module, the storage module disk controllers low throughput.
Furthermore, the prior art only after obtaining Hint Track information can find in the source file
Sample, thus greatly reducing the processing efficiency of the hardware, but Hint Track information data volume,
Hint Track will decode the information into the memory needs to occupy a lot of space.
In addition, the source file for the RTP packet encapsulated in the process, due to the different media type setting
Format different from each other, commonly used with ASF format, MOV format and MP4 format, so a
Specialized streaming server can only handle one media type, poor compatibility.
Seen from the above description, the current streaming media server processing efficiency is low, it will greatly enhance the activities mentioned
For the cost, making the streaming media service tariff is expensive, thus limiting mobile TV and other multimedia broadcast
The number of multicast service users, reducing its commercial value, business proposes a urgent need for the development of more efficient than
High transmission method and streaming servers.
SUMMARY OF THE INVENTION
In view of this, the main object of the present invention is to provide a streaming media server, and lowering the service
Is in the streaming media data transmission disk reads, improve processing efficiency of hardware.
Still another object of the present invention is to provide a method for streaming media delivery, that send streaming media data
Send more convenient and fast.
A further object of the present invention is to provide a method of streaming media data is stored, such that the same
HMF file to record any type of streaming media data to improve data storage compatibility.
To achieve the above object, the technical solution of the present invention is achieved in particular:
Streaming media server, including session management module, stream scheduling module and storage module, wherein
Session management modules are convection scheduling module and storage module control, the server also includes encapsulation
Loaded module;
The session management module receives streaming media content providers to upload instruction, the packet encapsulation mode
Block release format conversion notice;
Packet encapsulation module according to the notice from the storage module for content providers to upload the source file,
HMF format it into streaming data stored in the storage module;
Flow Scheduling module according to the end-user access to streaming media requests, in accordance with the settings file format HMF
Find a formula from the storage module to the corresponding streaming data to end users.
Transmission of streaming media, the method comprising the steps of:
Streaming media server receives streaming media content providers to upload instruction, for content providers
Upload source files, convert it into HMF format streaming media data storage;
When an end user requests access to send streaming media, streaming media server, the file according to the settings HMF
Set format, in itself to find the corresponding streaming data to the end user.
The source file includes indexing parameters and data content, format conversion method described in particular:
Streaming media server by parsing the source files determine their media types, according to the type of the source file corresponding fixed
Package format, the data from the source file for the contents of the file is saved as HMF body and the source file
Gets the index of the parameter is saved as the file header HMF through HMF HMF index file header file body.
The parameters are saved to the index file header HMF methods: advance HMF file header
Set objects and streaming media description describing the object, set the media describe the object domain and streaming media type mappings
Firing table fields, set the flow of the stream descriptor object identification field, media type field, bit rate domain, Mage bit
Mage home domain and the number of fields, the index of the obtained parameters are stored in the above description corresponds to the object domain.
Find and described in accordance with the HMF format streaming media data transmission method in particular:
First, streaming media server looks HMF files describe the object, and according to media description
The object mapping table recorded stream flow identifier notified HMF flow description and the correspondence between the object;
Then, according to the correspondence between the lookup flow description object, and derive the data bit stream
Configuration information, and then obtain the required position from the corresponding streaming media data transmission.
The HMF file header further settings file describing the object, used to record and play Mage size
Release time.
The HMF settings file header file header further describe the object, the object identifier for the record, the version
The identification, object size and the number of child objects.
The HMF header further settings: stream index table objects and expanded information objects;
The flow index table object is used for recording media formats and code rate, the extended information object for
At least one record the following contents: copyright information, Introduction, maintenance information and updates.
The index file header via HMF HMF file method body in particular:
Streaming media server generates HMF stream identification, flow identification and setting of the HMF source file CTV
Streams logo / audio stream identifier corresponding relationship;
Correspondence between the above described objects recorded in the media stream mapping table field, while the HMF stream
Identify records that describe the object in the corresponding stream flow identification field;
At least one source file of the video stream identifier / audio stream of data packets corresponding to the ID stored in the
HMF document body Mage basic unit, and in the description of the object Mage flow position recorded for each domain
Mage storage address field in the record number Mage Mage generated number.
The base unit comprises Mage Mage Mage head and body;
The Mage head record at least the following parameters: playing time, number of packets, each packet partial
Shift amount, the data packet length, time stamp, and key frame indicator.
The contents of the data packet encapsulation module file is saved as HMF body when said data content
One by one for each RTP data packet encapsulated;
It receives a request for streaming media, streaming media server directly in the body of the document flow HMF
Media data is sent to the end user.
Receiving the streaming media access request, the streaming media data transmission method specific to: Streaming
Server will find streaming media data encapsulated in RTP protocol to send to the end user.
ASF format the media type, or MP4 format, or MOV format.
Storage of streaming media data, the method comprising:
To be stored for each data stream is divided into at least one basic unit, the text stored in the HMF
Pieces of the body, and acquiring the characteristic parameters of streaming media data file header is saved as HMF by HMF
HMF index file header file body to form HMF files.
The HMF header includes at least one media descriptor object, set the media describe the object
Media Type field and stream mapping table field;
Description of each media object index at least one stream describe the object, the object is set bids flow description
Domain knowledge, media type field, Mage Mage position number fields and domains, each object is associated with each flow description
Streaming media data corresponding;
The characteristic parameters of the method for specifically: is to be stored for each of the streaming media data generated
The HMF should flow identification, and recorded in the streaming media data stream which describes the object stream identification field;
Each test included in the data stream Mage base unit number to be recorded in the Mage
Number of domains, and the basic unit of the Mage individually stored in memory address location domain Mage;
Determine the data to be stored streaming media types, and recorded media category describes the object in the stream
Type field, and then the same type of streaming media HMF describe the object identifier recorded in the same stream media
Body flow mapping table describes the object domain and in the media describe the object's media type field to save the media
Type.
The base unit comprises Mage Mage Mage head and body;
The Mage head record at least the following parameters: playing time, number of packets, each packet partial
Shift amount, the data packet length, time stamp, and key frame indicator.
The HMF header further includes a document describing the object, used to record and play Mage size
Release time.
The HMF header further includes a file header describing the object, the object identifier for the record, the version
The identification, object size and the number of child objects.
The HMF header further includes a flow index table objects and expanded information objects;
The flow index table object is used for recording media formats and code rate, the extended information object for
At least one record the following contents: copyright information, Introduction, maintenance information and updates.
Seen from the above technical solutions, the present invention is that streaming media server setup packet encapsulation module, designed
Door for a variety of media types of source files packaged as a unified HMF format, the HMF
Format to describe the index parameters and data streaming media data corresponding bundled package, making workflow scheduling
Module does not have to read through several disks from the storage module can be directly targeted to the desired streaming media data
The end-user distributed, thus improving the processing efficiency and hardware compatibility.
The present invention is a streaming data storage method can be in the same file in the recording of different media HMF
Type of streaming media data, thereby improving the compatibility of data storage, and the file format of the HMF
Streaming media type setting allows read and transfer data more easily and quickly.
Further, in the source file into HMF format files, you can base on the source file
The data unit directly RTP encapsulation, such as the source file is executed once for each Sample
RTP encapsulation, and then packaged Packet file saved to HMF body. Flow scheduling module in obtaining
The streaming media data, it can be sent directly to end users, so this method so focused stream scheduling module
In scheduling and streaming media data transmission, improved flow scheduling module execution speed, making the number of streaming media
According to transmit more convenient and faster.
Also, set HMF document body when the basic unit in its Mage simultaneously encapsulate multiple Packet.
Thus, the flow scheduling module performs a visit to the storage module, you can also get multiple Sample,
Thereby enhancing the storage module I / O port throughput.
Specific embodiments
The object of the present invention, the technical solutions and advantages more clearly understood with reference to accompanying drawings and the following
Examples of the present invention is described in further detail.
Figure 2 shows a streaming media server, the present invention composition, including session management module
(Session Management) 101, memory module 102, workflow scheduling module (Stream Scheduler)
103 and packet encapsulation module (Stream Packetization) 204.
The session management module 101 is a streaming media server management center, used to control flow scheduling module
Block 103 and packet encapsulation module 204, the module can be achieved using CPU.
The packet encapsulation module 204 according to the session management module 101 creates a packet encapsulation session, perform the phase
Corresponding data format conversion. For example, when a source file upload MP4 format, the session management module
To create a session, the session packet encapsulation module according to the information, the MP4 file into HMF
Format files are stored in the storage module 102. Wherein the packet is encapsulated during the format conversion module 204,
The source file for each Sample labeled as a Packet, and packaged in the same multiple Packet
Mage, the implementation of the basic unit to Mage HMF file format to read, each large Mage
Little is 512K/256K/128K/64K.
Said flow control module 103 reads from the storage module 102 HMF format streaming media data, and
Send it to the end user.
HMF HMF file formats include header (HMF Header) and HMF document body (HMF Body)
These two parts, in which the file header contains the file description, media description, flow description and other information, document body bag
Containing the actual streaming data, that voice content and / or video screen, etc. HMF document body to Mage
As the basic unit of storage, where the file read Mage smallest unit, the size of several tens to several hundreds of K
K. Different according to the code rate, a Mage may contain several milliseconds to several seconds of streaming media data.
HMF in the storage format files, header files and documents can be stored in the body in the same file,
You can also use the two files were stored. HMF file structure is a concrete example see Table I, which
Streaming media data Stream1 contains Mage1, Mage2, Mage3 and Mage4 four basic single
Million, are recorded for each basic unit has its own Mage Header and Mage body.
Explanation | File contents |
Header
|
Header Section
|
Stream1
|
Mage1
|
Mage Header
|
Mage body
|
|
Mage2
|
Mage Header
|
Mage body
|
|
Mage3
|
Mage Header
|
Mage body
|
|
Mage4
|
Mage Header
|
Mage body
|
Stream2
|
Mage5
|
Mage Header
|
Mage body
|
|
Mage6
|
Mage Header
|
Mage body
|
|
Mage7
|
Mage Header
|
Mage body
|
|
Mage8
|
Mage Header
|
Mage body
|
Stream3
|
Mage9
|
Mage Header
|
Mage body
|
|
Mage10
|
Mage Header
|
Mage body
|
|
Mage11
|
Mage Header
|
Mage body
|
|
Mage12
|
Mage Header
|
Mage body
|
|
Mage13
|
Mage Header
|
Mage body
|
Table I
In each of the HMF format file, HMF file header is used to store streaming media data descriptions letter
Interest, such as Mage size, playback duration, media types and stream ID and so on. In the end-user and streaming
The media server to establish a connection in the process, the server reads only HMF files one by one head,
Memory module can learn to save streaming media data.
In order to better meet the above requirements, the need to design a clear structure, easy to find, easy maintenance,
And good compatibility HMF file header format, making HMF file header can contain enough information
And is able to MMS, RTP / RTSP and other protocols compatible with the server to ensure smooth
HMF handle documents stored in itself.
Figure 3 shows a preferred embodiment of the present invention, the file header HMF in the logical structure of the
Structure, the file header is divided into file information, media information, and stream information these three, and in accordance with the tree
Structure to establish contact. Wherein the file information includes a file for each HMF global information, such as file
Size, creation date, and so on. HMF media information recorded in the file including some type of media, public
Of information, such as stream mapping table and so on. According to the media type, the media information is divided into ASF
Media information, MOV and MP4 media information Media information. The stream information is recorded in each
Specific information stream data, such as code rate, media format, the stream data file in the body of the HMF
Location.
...
Figure 3 shows a preferred embodiment of the present invention, the file header HMF in the logical structure of the
Structure, the file header is divided into file information, media information, and stream information these three, and in accordance with the tree
Structure to establish contact. Wherein the file information includes a file for each HMF global information, such as file
Size, creation date, and so on. HMF media information recorded in the file including some type of media, public
Of information, such as stream mapping table and so on. According to the media type, the media information is divided into ASF
Media information, MOV and MP4 media information Media information. The stream information is recorded in each
Specific information stream data, such as code rate, media format, the stream data file in the body of the HMF
Location.
...
In the specific implementation of the logical structure shown in Figure 3, the introduction of an object (Object) an overview of the existing
HMF document read as the basic structural units. The object refers to a structure having a number of common
According to the body, the data stored in the body for easy expansion to new data and operations, and expanded out of the object remains
The original data and operations. Wherein the expansion means back to the original data structure to add a new member.
If you change the contents of the original members, it can not be called extension.
In the specific implementation of the logical structure shown in Figure 3, the introduction of an object (Object) an overview of the existing
HMF document read as the basic structural units. The object refers to a structure having a number of common
According to the body, the data stored in the body for easy expansion to new data and operations, and expanded out of the object remains
The original data and operations. Wherein the expansion means back to the original data structure to add a new member.
If you change the contents of the original members, it can not be called extension....
The HMF file header consists of a number of different types of Object, each of the basic Object
Structure is the same, but different contents stored therein. Object of all types share a general
Structure, easy maintenance and management. Another in each Object to expand on the overall structure, with its own
Specific data structure stored information. Object of the overall structure as shown in Table II, as defined by
How byte field are using Intel format, low byte first, high byte.
Domain | Length (bytes) | Explanation |
Object ID
|
4
| Marked object type defined types are as follows:
"HMHD": HMF header object (HMF Header Object);
"HMFD": HMF document describes the object (HMF File Description Object);
"HMMD": media descriptor object (HMF Media Description Object);
"HMSD": stream Description Object (HMF Stream Description Object);
"STTB": stream index table object (Stream Table Object);
"INFO": extended information objects (Information). |
Version
|
4
| Object type version identification (all zeros for the basic version) |
Object Size
|
4
| Object size (in bytes)
Including Object_ID, Version, Object_Size and Object Data other domains |
Object Data
|
Variable
| Define the individual objects, the specific content based on the object type, that part of the
Length and format is variable. |
Table II
In Figure 3, the file header object (Header Object) is a container that contains the number of sub-
Elephant, namely documents describe the object (HMFD), media describe the object (HMMD), flow description for
Like (HMSD), flow index table object (STTB) and extended information objects (INFO). According to real
Actual setting, HMF header object may contain one or more HMMD, one or more HMSD,
And STTB and INFO are optional. HMF file header in memory, it can be shown in Figure 4
Each node in the tree isolated storage, all child objects in the file header in the storage location is arbitrary
, And in the file header when parsing HMF restored again between the sub-object tree, the following will
One by one for each type of tree nodes elaborate.
...
In Figure 3, the file header object (Header Object) is a container that contains the number of sub-
Elephant, namely documents describe the object (HMFD), media describe the object (HMMD), flow description for
Like (HMSD), flow index table object (STTB) and extended information objects (INFO). According to real
Actual setting, HMF header object may contain one or more HMMD, one or more HMSD,
And STTB and INFO are optional. HMF file header in memory, it can be shown in Figure 4
Each node in the tree isolated storage, all child objects in the file header in the storage location is arbitrary
, And in the file header when parsing HMF restored again between the sub-object tree, the following will
One by one for each type of tree nodes elaborate.
...
Domain | Length | Explanation |
Object ID
|
4B
|
“HMHD”
|
version
|
4B
| Version Identification |
Object Size
|
4B
| |
Sub_object_Number
|
4B
| Contains the number of sub-objects. If the domain is 0, indicating that the
This field is invalid, does not represent the number of sub-objects is 0. |
Data Field
|
Variable
| Child objects |
Table III
2, the document describing the object (HMFD), used to describe the global HMF file information, including the
File contains all of the media types and each type of public information stream data, each media category
The specific type of information or streaming data disposed in corresponding HMSD HMMD or not stored in the
HMFD in. HMFD each domain are defined in Table IV which Mage size (Mage size), broadcast
Playback time (Play Duration) essential parameters of the object.
Domain | Length | Explanation |
Object ID
|
4B
|
“HMFD”
|
Version
|
4B
| |
Object Size
|
4B
| |
Data File Size
|
8B
| Data size of media files |
Mage size
|
4B
| Mage size (in bytes, and set to an integer multiple of 64K) |
File Version
|
4B
| File Version |
Play Duration
|
8B
| Playing time, in milliseconds (ms) |
Creation Date
|
8B
| Created (yyyy-mm-dd: hh-mm-ss-00, bottom is empty) |
Modified Data
|
8B
| Modification time (yyyy-mm-dd: hh-mm-ss-00, bottom is empty) |
Table IV
3, the media description object (HMMD), the corresponding media type for recording and streaming description
Mapping table, the above information is extracted from the source file. HMMD defined in Table V. The "\ 0"
As an escape character, which means that a value of 0 ASCII characters. In all the parameters in Table V, subtype (Sub
Type) is essential parameter that the media according to the file type field to be set.
Domain | Length | Explanation |
Object ID
|
4B
|
“HMMD”
|
Version
|
4B
| |
Object Size
|
4B
| |
Sub Type
|
4B
| There are currently defined "ASF0", "MOV0" and "MP40".
If you need to support a new media type, that type can generate the corresponding
Description of the media object, and define the type identifier in this field. |
Data Section
|
Variable
| The data area, the specific content of the different media types vary. |
Table V
For different types of media, the Data Section field contents are different. Table 6 shows
ASF format Data Section is structured.
Domain | Length | Explanation |
Header Packet Size
|
4B
| The length of the next field |
Header Packet
|
Variable
| Needs to be sent to the end user Header Packet |
Stream Table Size
|
4B
| Stream mapping table length |
Stream Table Item1
|
4B
| |
Stream Table Item2
|
4B
| |
Stream Table Item...
|
4B
| |
Table 6
Table 6 in the Stream Table Item structure shown in Table VII of the video stream identifier (Video
Stream ID), the audio stream ID (Audio Stream ID) and HMF flow identifier (HMF Stream
ID) are essential parameters, HMF flow identification is by the packet encapsulation format conversion module
Automatically assigned.
Domain | Length | Explanation |
Video Stream ID
|
1B
| ASF file Video Stream ID |
Audio Stream ID
|
1B
| ASF files Audio Stream ID |
HMF Stream ID
|
2B
| HMF corresponding ID of the file |
Table 7
MOV format Data Section Header Packet domain structure is not its Stream Table
Item structure shown in Table VIII. Similarly, Table 8 lists the three parameters are essential. MP4
Format Data Section MOV format similar structure, not mentioned here.
Domain | Length | Explanation |
Video Track ID
|
1B
| MOV files in the Video Track ID |
Audio Track ID
|
1B
| MOV files in the Audio Track ID |
HMF Stream ID
|
2B
| HMF corresponding ID of the file |
Table 8
From the above Table 6 - Table 8 shows, in using the MMS protocol, need to pass before data transport stream
Over Header Packet domain send media description information to end-users, while the use of RTP / RTST Association
Proposed transfer MOV and MP4 files, you do not perform the above procedure.
Cause these differences because: using the MMS protocol, the number of streams is provided by the end user
According to the selection, and then provide the final decision by the server to which stream data, thus making the streaming media data
Before transmission, you need to first media description information to end users. In the RTP / RTST protocol,
Server can directly determine which way the stream data available to the end user, it eliminates the need for the media description information
Interaction.
In addition, both ASF format, MOV format or MP4 format stream mapping table should be set,
The flow mapping table are in order to achieve the source file video / audio stream ID to HMF flow ID mapping.
4, the flow description object (HMSD), for providing each specific description of the data streaming channel
Interest. As defined in the HMSD shown in Table 9, in which the Temporal Index is the domain record
Streaming media data at regular intervals (typically one second) key frame established by the position information, for
HMF file specified keyframes in body position. Table 9, the flow identification (Stream ID), media
Type (Media Type), code rate (Bit Rate), location information (Position) and Mage
Quantity (Mage Number) are essential parameters, where the flow identification and HMMD CMEC
Set the Stream ID correspond.
Domain | Length | Explanation |
Object ID
|
4B
|
“HMMD”
|
Version
|
4B
| |
Object Size
|
4B
| |
Stream ID
|
4B
| HMF documents in the body of the stream number and the low two bytes valid. Which compiled
No. 0 and 0xFFFF have a special meaning, it is usually the case is not used. |
Flags
|
4B
| |
Explanation |
Seekable
| | Whether to support drag position mask 0x 00 00 00 01 |
|
HaveVideo
| | Is there a video, the location mask 0x 00 00 00 02 |
|
HaveAudio
| | Whether there is audio, location mask 0x 00 00 00 04 |
Media Type
|
4B
| "ASF0", or "MOV0", or "MP40", which could be expanded definition of |
Bit Rate
|
4B
| Code rate (in units of bps) |
Position
|
8B
| The first location in the file Mage |
Stream Size
|
8B
| The size of the streaming media data, in particular to Mage Number × Mage
size, field value of 0 indicates that the field is invalid and does not indicate a length of 0. |
Mage Number
|
4B
| Number included Mage |
Session Data
| SDP data field |
Explanation |
Size
|
4B
| SDP data length (in bytes, not including itself 4B length) |
|
Data
|
Variable
| SDP data |
Temporal Index
| Index, used to quickly find key frame |
Explanation |
Size
|
4B
| Index data length (in bytes, not including itself 4B length) |
|
Item Size
|
4B
| The length of data items, usually 8B |
|
Interval
|
4B
| The time interval between two Item milliseconds |
|
Index Item 1
|
Item Size
| Index data items, the media type in different formats |
| |
Mage No.
|
4B
| Stream data in the first few Mage |
| |
Offset
|
4B
| Mage in the offset (i.e. the position relative to the first byte) |
| |
Reserved
| | If Item Size field value is less than 8, the domain does not exist |
|
Index Item 2
|
Item Size
| Index data items, the media type in different formats |
|
Index Item...
|
Item Size
| Ditto |
Table 9
5, the flow index table object (STTB, optional) are defined in Table X. The STTB for HMF
Provided in the body of the file for indexing a plurality of streams of data, so as to find the appropriate flow of data providers
Then, HMHD only set a STTB.
Domain | Length | Explanation |
Object ID
|
4B
|
“STTB”
|
Version
|
4B
| Reserved for expansion of use |
Object Size
|
4B
| |
Item Number
|
4B
| Number of entries |
Item 1
|
12B
| The first one index entry |
Item 2
|
12B
| The first two index entries |
Item...
|
12B
| No. ... in indexing |
TABLE
Wherein each index entry is structured as shown in Table 11:
Domain | Length | Explanation |
Bit Rate
|
4B
| Code rate |
Media Type
|
4B
| Media Type is "ASF0", or "MOV0", or "MP40" other |
Stream ID
|
4B
| Lower two bytes of valid |
Table 11
6, extended information objects (INFO, optional) are defined in Table XII used to store the INFO
HMF document describes some extensions, such as copyright information, Introduction, maintain and update information letter
Interest, etc., an HMF file header can be set 0 to multiple INFO.
Domain | Length | Explanation |
Object ID
|
4B
|
“INFO”
|
Version
|
4B
| |
Object Size
|
4B
| Reserved for expansion of use |
Sub Type
|
8B
| Subtypes are defined: "COPYRIGT" copyright information
Interest rates, "CONTENT" Introduction, etc. |
Data Field
|
Variable
| According to the specific subtype definition format |
Table 12
Seen from the above definition, is provided with an object as the basic structural unit HMF file header,
HMF has the entire file more regularity, scalability and compatibility, thereby increasing HMF Man
Pieces of the operation and maintenance efficiency.
Since HMF format can save different types of streaming media data, and these media types in transmission
Lose the use of different protocols, the server responds to the end user's process is also different.
When an end user requests an ASF file, the server first check to determine if a file header HMF
HMF document the existence of an ASF format HMMD. If not, inform the end user
The requested file does not exist, or the server will HMMD stored data is sent to the corresponding end streaming media
End users. When the end user choose to play a video stream and / or an audio stream, the server
HMMD flow set in the mapping table to find the corresponding HMF stream ID, flow ID via the HMF
The stream data from HMSD get more information, and according to the above information to locate the file body HMF
Obtain the exact location of streaming media data.
When an end user requests a MOV or MP4 files, streaming media server can be directly root
According to the Track mapping table HMMD locate HMSD, and enter the on-demand streaming media transmission process begins
Volume data.
In HMF HMF header file is saved after a body (HMF Body), if the file is made of
Dry media data stream, each stream data contains several Mage, Mage The size of each phase
Same, Mage stocked with a plurality of media data packets (Packet). In order to facilitate flow directly into the scheduling module
OK Packet distribution, Mage of each Packet is sent in advance in accordance with the format of the final set.
In a specific example of the present invention, each Mage Mage Header and also includes that Mage Body
Two parts.
1, Mage head (Mage Header). Different Mage Mage Header length in each
Are not the same, depending on actual need, Table 13 shows the Mage Header structures, including
Playback duration (Duration), the number of packets (Packet Number), offset (Offset), Packet
Length (Length), timestamp (Time Stamp) and key frame indication (Is KeyFrame), etc. will
To parameters.
Domain | Length (bytes) | Explanation |
Version
|
4
| Version number |
Mage Size
|
4
| Each Mage length must be an integer multiple of 16K |
Header Size
|
4
| In bytes |
Media Type
|
4
| Media type (reference HMF header fields defined) |
Protocol Type
|
4
| The transmission protocol used |
Duration
|
4
| Mage's Play Time |
Packet Number
|
4
| Packet number contained Mage |
Param Table
|
Packet
Number×12
| |
Explanation |
Offset
|
4
| Offset for indicating the location of Packet in Mage. |
|
Length
|
4
| Packet length, specifically for Sample length + RTP header length |
|
Time Stamp
|
4
| Timestamp indicating playback time |
|
Instruction
|
2
| Each Packet has two instruction bytes, where 0x0000 is empty instruction |
|
Flags
|
2
| There are two flag bytes per Packet |
|
Is KeyFrame
|
1bit
| Lowest bit mask 0x0001 |
Padding(Optional)
|
Variable
| According need to use 0 in the Header and fill some byte stream data between |
Table 13
Get a HMF in the initial packet in the file, the current scheduling module needs to HMF text
Piece for resolution. Thereafter, the flow scheduling module directly from the Mage header parsing out the next
packet position.
2, Mage body (Mage body). Streaming media data in packet units of sequence on the
Mage body, the position of each packet by the Mage header specified in the Packet index.
If a Mage body remaining bytes is not enough then place a complete Packet, places
0 padding, can not be separated with a Packet in the two Mage. Table 14 shows the
Mage body stored Packet structure.
Domain | Length | Explanation |
Packet 1
|
Variable
| First a media packets |
Packet 2
|
Variable
| The second media packets |
Packet 3
|
Variable
| The third media packets |
Packet...
|
Variable
| No. ... media packets |
Padding
|
Variable
| Remaining bytes (with zero padding) |
Table 14
HMF defined above-mentioned approach different media formats can be stored in the same file type
, By HMF file header for different type of media stream data indexing and management and therefore the
HMF format invention has sufficient openness and scalability, ease of maintenance, and the server
Streaming media data for the overhead is small.
According to the above definition, the streaming media data stored in the format in accordance with the method of HMF in particular: to be
Streaming media data is stored into each of the at least one base unit in the body of the file stored in the HMF,
And to obtain the characteristic parameters of streaming media data file header is saved as HMF through HMF file header
HMF index file body to form HMF files.
Wherein the characteristic parameter for a specific example as follows: the streaming media to be stored for each data generation
HMF into the corresponding flow identifier, and recorded in the streaming media data stream which describes the object bids
Knowledge domains;
Each test included in the data stream Mage base unit number to be recorded in the Mage
Number of domains, and the basic unit of the Mage individually stored in memory address location domain Mage;
Determine the data to be stored streaming media types, and recorded media category describes the object in the stream
Type field, and then the same type of streaming media HMF describe the object identifier recorded in the same stream media
Body flow mapping table describes the object domain and in the media describe the object's media type field to save the media
Type.
Based on Figure 2 of the streaming media server and a pre-set format HMF, the present invention is flowing media
The method of transmission body shown in Figure 5, comprises the following steps:
Step 501, the session management module notification packet encapsulation module initialization preset packet encapsulation queue
After performing packet encapsulation module initialization operation, return a successful response to the session management module.
Step 502, CP / SP will contain streaming media data source file to the memory module, to be
Session management module sends a request packet encapsulation.
Wherein, CP / SP uploaded source can be any type of media, such as ASF format,
MP4 format or MOV format. Said source files generally include two parts: the data content and index parameter
The number of the data refers to the actual content of multimedia voice, image and other data to the data packet as a basic
Unit, the index information to describe many parameters, such Hint Track information, etc. within the data used to provide
Yung-related information in order to locate the data content.
Step 503, the session management module receives the packet encapsulation request, the notification packet encapsulation module creation
Packet encapsulation session. Packet encapsulation module successfully create a session, return to a successful response to the session management module.
Step 504, the packet is encapsulated in its own packet encapsulation module finds the queue waiting to be processed packet encapsulation will
Words, and according to the instructions of the session from the memory module to obtain the CP / SP uploaded source file according to pre-
Set to convert HMF format stored on the memory module. Once a session is processed packet encapsulation
Albert, packet encapsulation module will automatically delete the session.
This step, the packet encapsulation module perform format conversion process in particular:
First, the packet encapsulation module according to the contents of the source file determines the type of the source media file, in accordance with
The package format to read the index parameters and data content.
Such as the source file to MP4 format, in accordance with the package format MP4 file into the source file
Line parsing. Other types of treatment in a similar way, it is not going to describe.
Then, the contents of the data packet encapsulation module individually encapsulated in RTP protocol Packet, will be the
Set HMF files referred Packet body Mage basic unit saved.
Finally, the packet encapsulation module according to the parameters extracted from the index file header HMF HMFD,
HMMD and HMSD other objects, and through the index file header HMF HMF file body.
For example, the pre-set in the file header HMF HMMD and HMSD, set the HMMD
Media Type field and stream mapping table field, set the HMSD flow identifier field, media type domains, code rate
Rate domain, Mage Mage quantity domains and domain location.
Performing format conversion, streaming media server generates HMF flow identifier, and set the HMF
Flow identifier in the source file of the video stream identification / audio stream identifier corresponding relationship; Then, the corresponding
Relationships recorded in the media stream mapping table describes the object domain, while the HMF flow identifier recorded in the corresponding
Stream flow describing the object identifier field; then at least one source file of the video stream identifier / audio stream
Identifies the corresponding data packet stored in the file body Mage HMF basic unit, and describe the flow
Position as the Mage Mage domain record each memory address, the number of domain records were born in Mage
Into a number of Mage.
Step 505, the session management module in the packet encapsulation session is completed, notify CP / SP streaming media data
Uploaded successfully.
In step 501 to 505, the queue manager via packet encapsulation packet encapsulation real conversation just a better
Current mode, you can not have to set the packet encapsulation queue, so the step 501 is optional.
Step 506, the session management module notifies the workflow scheduling module initialization stream scheduling queues, workflow scheduling model
After the initialization block returns a successful response.
Steps 507 to 508, the end-user demand requests sent to the session management module, session management module
Receipt of the request, the notification stream scheduling module creates a stream scheduling sessions stream scheduling module in the session
After creating a successful response returns to session management module by the session management module will affect the success of
Should be sent to the end user.
Step 509, the flow scheduling module obtained by retrieving the workflow scheduling queue scheduling sessions stream to be processed,
And according to the session from the memory module to obtain end-user requirements demand HMF file and send it to the final
End users.
Step 509, the flow scheduling module obtained by retrieving the workflow scheduling queue scheduling sessions stream to be processed,
And according to the session from the memory module to obtain end-user requirements demand HMF file and send it to the final
End users....
Step 509, the flow scheduling module obtained by retrieving the workflow scheduling queue scheduling sessions stream to be processed,
And according to the session from the memory module to obtain end-user requirements demand HMF file and send it to the final
End users....
If RTP encapsulation process is not performed at step 504, step 509, the streaming media service
Will look for to streaming media data encapsulated in RTP protocol sent to the end user, this process
The same as the prior art are not described here.
Similarly, in step 506 ~ 509, the flow through the flow control session scheduling queue manager is a more
Best way to achieve this, you can also set up the stream without the scheduling queue, so the step 506 is optional.
Further, according to the invention can simply streaming delivery method steps 501 to 505, about the source
Files from CP / SP sent to the streaming media server, and the source file format conversion. Further
Ground, you can also perform steps 506 ~ 509, the HMF format files from streaming media server to the end
End users.
Seen from the above embodiments, this invention and the streaming server transmission and storage methods
Can a variety of media types of source files packaged as a unified HMF format file and index parameters and
Streaming media data corresponding bundled package, making streaming media data can be sent directly to the next end-users from
And increase processing efficiency and hardware compatibility.