CN101212476A - Method of generating ISO media file from RTP packets in stream media technique - Google Patents

Method of generating ISO media file from RTP packets in stream media technique Download PDF

Info

Publication number
CN101212476A
CN101212476A CNA2006101722655A CN200610172265A CN101212476A CN 101212476 A CN101212476 A CN 101212476A CN A2006101722655 A CNA2006101722655 A CN A2006101722655A CN 200610172265 A CN200610172265 A CN 200610172265A CN 101212476 A CN101212476 A CN 101212476A
Authority
CN
China
Prior art keywords
sample
media
rtp
fluidisation
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CNA2006101722655A
Other languages
Chinese (zh)
Inventor
王志英
阮亚平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CNA2006101722655A priority Critical patent/CN101212476A/en
Publication of CN101212476A publication Critical patent/CN101212476A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method for processing an ISO media document according to a RTP packet of a streaming media technology, which comprises the following steps: boundary of a fluidization sample is determined; sampling data of a virtual media sample is generated; serial numbers of the virtual media sample is determined; data of the fluidization sample is generated; a media document is generated according to the format of the ISO media document; the generated media document is read by a streaming media server. Compared with the prior art, the method simplifies the processing flow so that the specific coding format can be unconcerned. The load data of an original RTP is basically preserved which can reappear truly the original RTP data. Besides, the method has a good expansibility and a good compatibility for coding format expanded afterwards.

Description

Generate the method for ISO media file in the stream media technology according to the RTP bag
Technical field
The present invention relates to a kind of stream media technology, specifically, relate to the method that generates the ISO media file in a kind of stream media technology according to the RTP bag.
Background technology
In fixed network Streaming Media and mobile flow medium, needing streaming media server is the RTP packet that direct broadcast coder hands down standard compliant ISO media file format issue according to the certain strategy unloading, is provided with the back program request.A very crucial step of unloading media file is exactly to be recovered to original media data and fluidisation data to the load data of RTP.
General way is: for concrete coded format, according to its fluidisation standard definition, resolve the fluidisation information in the RTP load data, restore real media sample, generate corresponding fluidisation sample data then.The RTP load data is made up of fluidisation information and sampled data two parts.Wherein fluidisation information does not belong to the media sample data, so in the fluidisation sample data that directly is stored in media file, sampled data in the RTP load can comprise one or more media sample, the perhaps part of a media sample, these data should be kept in the data of media sample, no longer preserve these data in the fluidisation sample, but preserve the index that points to corresponding media sample according to the structure of document definition.
Because the coded format of support of the prior art is many, the fluidisation standard difference of every kind of coding, and the mode of fluidisation is more flexible, so the media sample original according to the recovery of RTP packet load data is more loaded down with trivial details, and being difficult to accomplish correctly to restore the problem of all media sample, also there is scaling concern in this in addition practice.
Summary of the invention
Technical problem solved by the invention provides the method that generates the ISO media file in a kind of stream media technology according to the RTP bag, do not rely on concrete coded format and fluidisation standard thereof, do not resolve the RTP load data, directly generate virtual media sample, and generate its corresponding fluidisation sample, and have good autgmentability, can the compatible with comparalive ease coded format that expands later on.
Technical scheme is as follows:
Generate the method for ISO media file in the stream media technology according to the RTP bag, step is as follows:
(1) determines the border of fluidisation sample;
(2) sampled data of generation virtual media sample;
(3) determine the sequence number of virtual media sample;
(4) data of generation fluidisation sample;
(5) regulation according to the ISO media file format generates media file;
(6) streaming media server reads the media file of generation.
Further, step (1) is specially: the border of determining current fluidisation sample according to the mark position in RTP packet header.
Further, in the step (1), described fluidisation sample comprises at least one RTP packet.
Further, in the step (1), the border of described fluidisation sample comprises time stamp.
Further, step (2) is specially: with all RTP load datas of comprising in described fluidisation sample sampled data as the virtual media sample.
Further, in the step (2), described RTP load data comprises fluidisation information and sampled data.
Further, step (3) is specially: with the unified numbering of media sample, obtain the sequence number of described virtual media sample.
Further, in the step (4), the data of described fluidisation sample comprise the inlet of RTP load data.
Further, step (6) is specially:
(61) read fluidisation rail index;
(62) data of fluidisation sample are read in the data field that indexes fluidisation rail correspondence according to the fluidisation rail, read the index of each RTP packet header and RTP load data;
(63) index according to the RTP load data reads corresponding media tracks index, calculates the Data Position and the length of corresponding media sample;
(64) read the data of media sample according to the media tracks index, generate complete RTP packet.
Utilize the inventive method, can not rely on concrete coded format and fluidisation standard thereof, do not resolve the RTP load data, directly generate virtual media sample, and generate its corresponding fluidisation sample, generate media file according to ISO media file format regulation.Media file after the unloading can offer general streaming media server service is provided, and it is identical that streaming media server reads RTP load data and the RTP load data before the unloading that the media file after the unloading sends.Compared with prior art, simplify handling process, can be indifferent to concrete coded format, preserved the load data of original RTP basically, can reproduce original RTP data truly.And this method has good autgmentability, the coded format of the later expansion of compatibility with comparalive ease.
Description of drawings
Fig. 1 is the fluidisation formal definition in " RFC3016 ";
Fig. 2 is the flow chart of the inventive method;
Fig. 3 is the recovery flow chart of media file fluidisation rail and media tracks;
Fig. 4 is to the definition of RTP load data in " RFC3640 ";
Fig. 5 is the recovery flow chart of media file fluidisation rail and media tracks;
Embodiment
The present invention can make things convenient for accurately the RTP data packet recovery is become media tracks and fluidisation rail data in the ISO media file, supports to play by streaming server.The ISO media file includes but not limited to: the base medium file format that defines among the ISO14496-12, the MP4 file format of ISO14496-14 definition, the AVC file format of ISO14496-15 definition, the 3GPP file format of 3GPP TS26.244 definition, the 3GPP2 file format of 3GPP2C.S0050-0 definition.
The core of technical solution of the present invention is that included all the RTP load datas (comprising fluidisation information and sampled data) of fluidisation sample are invented a media sample, and all entry datas of fluidisation sample are pointed to same virtual media sample data.Virtual media sample that this method generates and fluidisation sample are corresponding one by one, have identical sample sequence number and interval.
With reference to the accompanying drawings, the preferred embodiments of the present invention are described in detail.
With " RFC3016 " fluidisation standard the process that virtual sample generates is described.
With reference to shown in Figure 1, in " RFC3016 " fluidisation of MPEG4 video code model is stipulated.
The RTP packet is made of RTP head (RTP Header) and RTP load, and the RTP head is a standard RTPHeader structure; The RTP load is made up of MPEG4 VOP Header and VOP Data Fragment.
In conjunction with Fig. 2 and shown in Figure 3, generate one group of RTP packet according to the fluidisation form that defines.
Fluid mapper process is:
1, determines the border of fluidisation sample.
A fluidisation sample is included in several RTP packets, with the border of mark position 1 as the fluidisation sample.Consider the situation of Network Packet Loss, time stamp generation redirect also as the border of fluidisation sample.A fluidisation sample comprises n (n>=1) RTP packet.
According to the fluidisation sample that the mark position 1 in RTP packet header is determined when pre-treatment, this fluidisation sample comprises 3 RTP packets, and RTP packet sequence number is respectively 11,12 and 13.
2, generate the sampled data of virtual media sample.
The sampled data of all included in fluidisation sample RTP load datas being regarded as a virtual media sample.
The virtual media sample data that generates is:
Load 11+ load 12+ load 13, length is: L1+L2+L3
Be equal to real media sample: VOP Header+VOP fragment (1)+VOPfragment (2)+VOP fragment (3).
3, determine the sequence number of virtual media sample.
Media sample is unified numbers, and draws the sequence number of this virtual media sample, and adding up successively gets final product.The sequence number of supposing current virtual media sample is m.
4, generate the data of fluidisation sample.
The fluidisation sample has n inlet, and each inlet all exists with data structure 2 forms that define among the ISO 14496-12, promptly all is the sample data of pointing to corresponding media tracks.The different pieces of information section of each corresponding same virtual media sample that enters the mouth.
The fluidisation sample that generates has 3 RTP bags, and the RTP load data of each RTP bag has an inlet, is RTP load data inlet.
The 1st RTP load data inlet: from the data 0 of media sample (m), length is L1.
The 2nd RTP load data inlet: from the data L1 of media sample (m), length is L2.
The 3rd RTP load data inlet: from the data (L1+L2) of media sample (m), length is L3.
For the situation that this type of RTP load is made up of media data fully, the virtual media sample of generation is equal to real media sample fully, and the media file that generate this moment not only supports fluidisation to play, and also supports general this locality to play.
5, the regulation according to the ISO media file format generates media file.
The virtual media sample and the fluidisation sample that generate are formed media tracks and fluidisation rail respectively, and index, correct media file generated according to the ISO media file format.
In " RFC3640 " fluidisation of AAC audio coding form is stipulated.
As shown in Figure 4, the structure of the RTP of AAC audio frequency has been done definition.
The RTP packet is made of RTP head (RTP Header) and RTP load, and the RTP head is a standard RTPHeader structure; The RTP load is made up of a plurality of AUHeader and AU data.
In " RFC3640 " fluidisation of AAC audio coding form is stipulated.
As shown in Figure 5, the fluidisation form according to definition in the diagram generates one group of RTP packet.
Fluid mapper process is:
1, determines the border of fluidisation sample.
A fluidisation sample is included in several RTP packets, with the border of mark position 1 as the fluidisation sample.Consider the situation of Network Packet Loss, time stamp generation redirect also as the border of fluidisation sample.A fluidisation sample comprises n (n>=1) RTP packet.
According to the definite fluidisation sample when pre-treatment in the mark position in RTP packet header, this fluidisation sample comprises 3 RTP packets, and RTP packet sequence number is 21.
2, generate the sampled data of virtual media sample.
The sampled data of all included in fluidisation rail sample RTP load datas being regarded as a virtual media sample.The virtual media sample data that generates is: load 21, length is: L1.Comprising the data of fluidisation information and two true media sample AU1 and AU2.
3, determine the sequence number of virtual media sample.
The virtual media sample is unified numbers, and draws the sequence number of this virtual media sample, and adding up successively gets final product, and the sequence number of supposing current virtual media sample is m.
4, generate the data of fluidisation sample.
The fluidisation sample has n inlet, and each inlet all exists with data structure 2 forms that define among the ISO 14496-12, promptly all is the sample data of pointing to corresponding media tracks.The different pieces of information section of each corresponding same virtual media sample that enters the mouth.
The fluidisation sample that generates has 1 RTP bag, and the load data of RTP bag has only an inlet, is RTP load data inlet.
RTP load data inlet: from sequence number is the data 0 of the media sample of m, and length is L1.
Not exclusively be made up of media data for this type of RTP load, also comprise the situation of some fluidisation information, the virtual media sample of generation is not equal to real media sample, and the media file that generate this moment supports fluidisation to play.
5, the regulation according to the ISO media file format generates media file.
The virtual media sample and the fluidisation sample that generate are formed media tracks and fluidisation rail respectively, and index, correct media file generated according to the ISO media file format.
Way common in the prior art is: resolve AUHeaderLen and each AUHeader in the load, isolate included media sample number and sampled data in this RTP bag, restore media sample.The fluidisation sample that generates has 1 RTP packet, and the RTP load data of RTP bag has 3 inlets at least.
Wherein, inlet 1 is used to preserve fluidisation information, comprises AUHeaderLen and each AUHeader.This inlet has a plurality of, decides according to the length of fluidisation information, and each inlet can only be preserved 14 bytes at most.Inlet 2 data 0 from media sample (sequence number of AU1), length is the sampled data length of AU1.Inlet 3 data 0 from media sample (sequence number of AU2), length is the sampled data length of AU2.
If what adopt is the streaming mode that band interweaves, also need to cushion n RTP packet,, media sample is sorted according to the time stamp of RTP and the fluidisation information in the load, could finally determine the sequence number of media sample after the ordering, also could begin to generate corresponding fluidisation sample data.This shows,, adopt the method for being introduced among the present invention can reduce the complexity of realization greatly for this coded format.
6, streaming media server reads the media file of generation.
The order that reads media file is specific as follows:
(1) reads the index of fluidisation rail.
(2) read the fluidisation sample data according to the data field that indexes fluidisation rail correspondence, read the index of each RTP packet header and RTP load data.
(3) index according to the RTP load data reads corresponding media tracks index, draws the Data Position and the length of corresponding media sample.
(4) read the media sample data according to index, generate complete RTP packet.
Thus flow process as can be seen, server is indifferent to the media tracks data and what direct relation is real sampled data have, so the inventive method can keep original RTP data format well.

Claims (8)

1. wrap the method that generates the ISO media file according to RTP in a stream media technology, step is as follows:
(1) determines the border of fluidisation sample;
(2) sampled data of generation virtual media sample;
(3) determine the sequence number of virtual media sample;
(4) data of generation fluidisation sample;
(5) regulation according to the ISO media file format generates media file;
(6) streaming media server reads the media file of generation.
2. generate the method for ISO media file in the stream media technology according to claim 1 according to the RTP bag, it is characterized in that step (1) is specially: the border of determining current fluidisation sample according to the mark position in RTP packet header.
3. generate the method for ISO media file in the stream media technology according to claim 2 according to the RTP bag, it is characterized in that in the step (1), described fluidisation sample comprises at least one RTP packet.
4. generate the method for ISO media file in the stream media technology according to claim 1 according to the RTP bag, it is characterized in that in the step (1), the border of described fluidisation sample comprises time stamp.
5. generate the method for ISO media file in the stream media technology according to claim 1 according to RTP bag, it is characterized in that step (2) is specially: all RTP load datas of comprising in the described fluidisation sample sampled data as the virtual media sample.
6. generate the method for ISO media file in the stream media technology according to claim 1 according to the RTP bag, it is characterized in that step (3) is specially: media sample is unified numbers, and obtains the sequence number of described virtual media sample.
7. generate the method for ISO media file in the stream media technology according to claim 1 according to the RTP bag, it is characterized in that in the step (4), the data of described fluidisation sample comprise the inlet of RTP load data.
8. generate the method for ISO media file in the stream media technology according to claim 1 according to the RTP bag, it is characterized in that step (6) is specially:
(61) read fluidisation rail index;
(62) data of fluidisation sample are read in the data field that indexes fluidisation rail correspondence according to the fluidisation rail, read the index of each RTP packet header and RTP load data;
(63) index according to the RTP load data reads corresponding media tracks index, calculates the Data Position and the length of corresponding media sample;
(64) read the data of media sample according to the media tracks index, generate complete RTP packet.
CNA2006101722655A 2006-12-30 2006-12-30 Method of generating ISO media file from RTP packets in stream media technique Withdrawn CN101212476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006101722655A CN101212476A (en) 2006-12-30 2006-12-30 Method of generating ISO media file from RTP packets in stream media technique

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006101722655A CN101212476A (en) 2006-12-30 2006-12-30 Method of generating ISO media file from RTP packets in stream media technique

Publications (1)

Publication Number Publication Date
CN101212476A true CN101212476A (en) 2008-07-02

Family

ID=39612143

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006101722655A Withdrawn CN101212476A (en) 2006-12-30 2006-12-30 Method of generating ISO media file from RTP packets in stream media technique

Country Status (1)

Country Link
CN (1) CN101212476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878804A (en) * 2011-09-06 2017-06-20 高通股份有限公司 Transmitted as a stream through the network of coded video data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878804A (en) * 2011-09-06 2017-06-20 高通股份有限公司 Transmitted as a stream through the network of coded video data
CN106878804B (en) * 2011-09-06 2019-10-18 高通股份有限公司 Method and apparatus and non-transitory computer readable medium for the network stream transmission through coded video data

Similar Documents

Publication Publication Date Title
CN101243675B (en) For the transfer mechanism of dynamic rich-media scene
CN1764974B (en) Storage medium storing multimedia data, and method and apparatus for reproducing multimedia data
CN101283351B (en) Method and apparatus for media data transmission
JP5851470B2 (en) Generate and communicate notifications of multimedia content compliance
CN101675435B (en) Media stream recording into a reception hint track of a multimedia container file
KR101418951B1 (en) Method and system for multimedia messaging service (mms) to video adaptation
CN105556982A (en) Method, device, and computer program for encapsulating partitioned timed media data using sub-track feature
CN1985321A (en) Storage medium storing multimedia data, and method and apparatus for reproducing the multimedia data
CN109889542B (en) Method and apparatus for receiving media data in a broadcast network
US7555009B2 (en) Data processing method and apparatus, and data distribution method and information processing apparatus
JP6530748B2 (en) Packet transmission and reception method in multimedia communication system
CN102163201A (en) Multimedia file segmentation method, device thereof and code converter
US8718131B2 (en) Method and apparatus for generating and processing packet in MPEG-2 transport stream
CN101222480B (en) Method for generating ISO media file according to RTP package and reading method thereof
CN108141615A (en) MPEG transports frame synchronization
CN101212476A (en) Method of generating ISO media file from RTP packets in stream media technique
CN103269450A (en) Multimedia system for Android smart television set
CN106664444A (en) Method and device for receiving media packets in multimedia system
CN101171819B (en) Methods and apparatus for providing power efficient time management for mobile media
US8787613B2 (en) Forensic mark insertion apparatus and method
CN101212475A (en) Method for processing ISO media file
CN102118633B (en) Method, device and system for playing video files
CN103647970A (en) Audio and video synchronization method and system for distributed transcoding
CN101247519A (en) Data storage method and device
JP4756848B2 (en) Data distribution method and information processing apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C04 Withdrawal of patent application after publication (patent law 2001)
WW01 Invention patent application withdrawn after publication