Movatterモバイル変換


[0]ホーム

URL:


CN105451073B - The transfer approach and device of MP4 video sources - Google Patents

The transfer approach and device of MP4 video sources
Download PDF

Info

Publication number
CN105451073B
CN105451073BCN201510782746.7ACN201510782746ACN105451073BCN 105451073 BCN105451073 BCN 105451073BCN 201510782746 ACN201510782746 ACN 201510782746ACN 105451073 BCN105451073 BCN 105451073B
Authority
CN
China
Prior art keywords
atoms
video sources
mdat
sample
moov
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510782746.7A
Other languages
Chinese (zh)
Other versions
CN105451073A (en
Inventor
王甜甜
付品军
黄阿云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co LtdfiledCriticalShenzhen TCL New Technology Co Ltd
Priority to CN201510782746.7ApriorityCriticalpatent/CN105451073B/en
Publication of CN105451073ApublicationCriticalpatent/CN105451073A/en
Priority to PCT/CN2016/084811prioritypatent/WO2017084310A1/en
Application grantedgrantedCritical
Publication of CN105451073BpublicationCriticalpatent/CN105451073B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of transfer approach of MP4 video sources, including:The MP4 video sources in network transmission stream are obtained, and extract moov atoms and mdat atoms in the MP4 video sources respectively;The mdat atoms are split to obtain multiple from mdat atoms;By the moov atoms respectively with it is each it is described from mdat atoms be combined to obtain it is multiple combine pair, and the multiple combination is obtained into new MP4 video sources to combination;The new MP4 video sources are transmitted.The invention also discloses a kind of transmission devices of MP4 video sources.The present invention improves the transmission efficiency to MP4 video sources, so as to stablize effective transmission MP4 video sources.

Description

The transfer approach and device of MP4 video sources
Technical field
The present invention relates to field of communication technology more particularly to a kind of transfer approach and device of MP4 video sources.
Background technology
As computer, digital media technology, audio frequency and video technology constantly improve, network audio-video transmission technology is increasinglyIt is important.The rise of stream media technology, more and more users' selection obtain video and carry out broadcasting for Internet video Streaming Media from networkIt puts.The broadcasting of Internet video Streaming Media is mainly based upon the broadcasting of MP4 Container Formats, by taking MP4 video sources as an example, MP4 video sourcesDocument encapsulation format defined based on QuickTime Container Formats, it is a kind of very open container, mainly byFtyp atoms, moov atoms, mdat atoms composition.Wherein, ftyp atoms as MP4 video source formats mark and include aboutSome information of file, moov atoms contain the metadata data informations of media, and mdat atoms contain transmission MP4 filesData, the composition of the data is made of different sample.
Currently, traditional MP4 video sources broadcasting is to play out the unified combination of these three atoms, i.e., in MP4 videosSource file first parses ftyp atoms in playing, and then parses moov atoms, finally plays the sample in mdat atoms.AndIn the transmit process of MP4 video source files, the size of file is unfixed transmission.If carrying out local broadcasting, due to fileIt is stored under local path through downloading, therefore the metadata data informations for including in moov atoms will not be lost and miss oneThe information of a little files.But if the broadcasting of MP4 video source files is the broadcasting of Internet video Streaming Media, since the moov of network is formerThe metadata data informations for including in son are related with the transmission speed of download of network, and the size of data of transmission of network is notIt is fixed.Therefore, when unstable networks or network, which are downloaded, to break down, it will moov atoms are lost, therewith in mdat atomsThe media data of sample will also lose so that moov atoms and the information of mdat atoms differ in transmit processIt causes, causes mdat atoms that can not parse, playback error.The transmission efficiency to MP4 video sources is greatly reduced, if continuing netThe MP4 video sources of network play, and will occur interim card in broadcasting, cannot smoothness play out.
Invention content
The main purpose of the present invention is to provide a kind of transfer approach and device of MP4 video sources, it is intended to which raising regards MP4The transmission efficiency of frequency source.
To achieve the above object, the present invention provides a kind of transfer approach of MP4 video sources, including:
The MP4 video sources in network transmission stream are obtained, and extract moov atoms and mdat in the MP4 video sources respectivelyAtom;
The mdat atoms are split to obtain multiple from mdat atoms;
By the moov atoms respectively with it is each it is described from mdat atoms be combined to obtain it is multiple combine pair, and will be describedMultiple combinations obtain new MP4 video sources to combination;
The new MP4 video sources are transmitted.
Preferably, it is described the mdat atoms are split to obtain multiple include from mdat atoms:
Obtain the position of all I frames in the mdat atoms;
Using the different location of the I frames as split point, the mdat atoms are split to obtain multiple from mdat originalsSon.
Preferably, the mdat atoms include multiple sample, it is described by the moov atoms respectively with it is each it is described fromMdat atoms are combined to obtain multiple combinations pair, and the multiple combination is obtained new MP4 video sources to combination and includes:
Obtain split after each from mdat atoms sample number;
On the basis of the position of first I frame in MP4 video sources, by the moov atoms and first I frame withAnd the sample of corresponding number is combined between second I frame, is continued on the basis of the position of second I frame, by instituteThe sample for stating corresponding number between moov atoms and second I frame and third I frames is combined, until completing instituteState the combination of moov atoms and all sample;
Crucial bit identification is set according to the coding/decoding information of first I frame, using as the MP4 video sources after recombinationMark.
Preferably, the moov atoms and different sample are combined formula and are expressed as:
Wherein, moov indicates that a moov atom, k indicate that k-th of I frame, T are the number of sample between two I frames,Sample (k) (t) indicates that the number of the corresponding T sample of k-th of I frame, t are the natural number for being incremented to T from 1, and X indicates to splitThe number of the slave mdat atoms obtained afterwards;
X=M/N;
Wherein, M indicates that the sum of the sample in MP4 video sources, N indicate the sum of I frames in MP4 video sources.
Preferably, described be transmitted the new MP4 video sources includes before:
The transmission of MP4 video sources after recombination is dimensioned to the maximum transmission unit size of communication interface.
In addition, to achieve the above object, the present invention also provides a kind of transmission devices of MP4 video sources, including:
Information extraction modules for obtaining the MP4 video sources in network transmission stream, and extract the MP4 video sources respectivelyIn moov atoms and mdat atoms;
Module is split, it is multiple from mdat atoms for being split to obtain the mdat atoms;
Recombination module, for the moov atoms described to be combined from mdat atoms to obtain multiple groups with each respectivelyConjunction pair, and the multiple combination is obtained into new MP4 video sources to combination;
Delivery module, for the new MP4 video sources to be transmitted.
Preferably, the fractionation module includes:
Position acquisition unit, the position for obtaining all I frames in the mdat atoms;
Split cells, for using the different location of the I frames as split point, being split to obtain to the mdat atomsIt is multiple from mdat atoms.
Preferably, the mdat atoms include multiple sample, and the recombination module includes:
Number acquiring unit, for obtains fractionation after each from mdat atoms sample number;
Assembled unit is used on the basis of the position of first I frame in MP4 video sources, by the moov atoms and instituteThe sample for stating corresponding number between first I frame and second I frame is combined, and is continued with the position of second I frameIt is set to benchmark, the sample of corresponding number between the moov atoms and second I frame and third I frames is subjected to groupIt closes, until completing the combination of the moov atoms and all sample;
Setting unit is identified, for crucial bit identification to be arranged according to the coding/decoding information of first I frame, using as weightThe mark of MP4 video sources after group.
Preferably, the moov atoms and different sample are combined formula and are expressed as:
Wherein, moov indicates that a moov atom, k indicate that k-th of I frame, T are the number of sample between two I frames,Sample (k) (t) indicates that the number of the corresponding T sample of k-th of I frame, t are the natural number for being incremented to T from 1, and X indicates to splitThe number of the slave mdat atoms obtained afterwards;
X=M/N;
Wherein, M indicates that the sum of the sample in MP4 video sources, N indicate the sum of I frames in MP4 video sources.
Preferably, the transmission device of the MP4 video sources further includes:
Setup module, the maximum transmitted list for the transmission of the MP4 video sources after recombination to be dimensioned to communication interfaceFirst size.
The embodiment of the present invention by analyzing MP4 video source formats, extract moov atoms in MP4 video sources andThe atom informations such as mdat atoms, and mdat atoms are split to obtain multiple from mdat atoms.Then moov atoms are distinguishedIt is combined from mdat atoms with each, the new MP4 video sources after being recombinated, then new MP4 video sources is transmitted.It is rightAtomic structure in MP4 video sources, which is reconstructed, to be solved when unstable networks lose the moov atomic time, includes in mdat atomsInformation will also lose, cause the atom information of moov atoms and mdat inconsistent and the problem of mdat atoms can not parse.The transmission efficiency to MP4 video sources is improved, so as to stablize effective transmission MP4 video sources.
Description of the drawings
Fig. 1 is the flow diagram of the transfer approach first embodiment of MP4 video sources of the present invention;
Fig. 2 is the structure of traditional MP4 video sources;
Fig. 3 is the structure of the MP4 video sources after present invention recombination;
Fig. 4 is to be split to obtain by mdat atoms multiple from mdat atoms in the transfer approach of MP4 video sources of the present inventionRefinement flow diagram;
Fig. 5 be MP4 video sources of the present invention transfer approach in, by the moov atoms respectively with it is each from mdat atoms intoRow combination obtains multiple combinations pair, and multiple combinations are obtained the refinement flow diagram of new MP4 video sources to combination;
Fig. 6 is the structure of the MP4 video sources after being reconstructed again after the present invention splits mdat atoms;
Fig. 7 is the flow diagram of the transfer approach second embodiment of MP4 video sources of the present invention;
Fig. 8 is the high-level schematic functional block diagram of the transmission device first embodiment of MP4 video sources of the present invention;
Fig. 9 be MP4 video sources of the present invention transmission device in fractionation module refinement high-level schematic functional block diagram;
Figure 10 be MP4 video sources of the present invention transmission device in recombination module refinement high-level schematic functional block diagram;
Figure 11 is the high-level schematic functional block diagram of the transmission device second embodiment of MP4 video sources of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Figure 1, showing a kind of transfer approach first embodiment of MP4 video sources of the present invention.The MP4 of the embodimentThe transfer approach of video source includes:
Step S10, the MP4 video sources in network transmission stream are obtained, and extract the originals of the moov in the MP4 video sources respectivelySon and mdat atoms;
In the present embodiment, MP4 video sources are mainly made of ftyp atoms, moov atoms, mdat atoms etc..Traditional MP4The structure of video source is as shown in Figure 2.Wherein, mark of the ftyp atoms as MP4 video source formats is contained about MP4 videosThe fileinfo in source;Moov atoms contain the metadata media informations of MP4 video sources;Mdat atoms contain transmission MP4The file data of video source, this document data are made of different sample, and sample indicates that file stores base unit.
In the transmission of MP4 video sources, the fileinfo of MP4 video sources is obtained first from network transmission stream, it is then rightThe moov atoms in MP4 video sources are extracted in the extraction and analysis of the progress atom of the MP4 video sources obtained from network respectivelyAnd the atom informations such as mdat atoms.
Step S20, the mdat atoms are split to obtain multiple from mdat atoms;
In the present embodiment, the mdat atoms that said extracted obtains are split to obtain it is multiple from mdat atoms, due to thisMdat atoms include sample, and therefore, after being split to mdat atoms, what is obtained each can be included from mdat atomsDifferent or same number sample, for follow-up moov atoms with split after each included from mdat atomsSample is combined.
Step S30, by the moov atoms respectively with it is each it is described from mdat atoms be combined to obtain it is multiple combine pair,And the multiple combination is obtained into new MP4 video sources to combination;
The moov atoms obtained according to said extracted, and after being split to mdat atoms it is multiple fromMdat atoms, putting in order before being split according to mdat atoms, by moov atoms successively with each of obtained after fractionation from mdatAtom is combined to obtain multiple combinations pair, and then multiple combinations are to recombinating in order as new MP4 video sources.After obtaining recombinationNew MP4 video sources structure it is as shown in Figure 3, wherein header is header file, the crucial position as MP4 video sources after recombinationMark.
Step S40, the new MP4 video sources are transmitted.
After above-mentioned reconstruct obtains new MP4 video sources, the new MP4 video sources after the recombination are carried out to the transmission of Internet video.By being parsed to the MP4 video sources in netcast, the atom information of MP4 video sources, such phase in reconstructed network transmissionThan in traditional netcast MP4 video sources, improving the fault-tolerance in network transmission, MP4 video sources are not in network transmissionIt can fail effectively to carry out the transmission of MP4 streams due to the sample being lost in moov atoms, and loss mdat atoms.MakeIt obtains in the transmit process for carrying out video, occurs to stablize unstable or network speed of download reduces even if network effectiveTransmit the source file video of MP4.
The embodiment of the present invention by analyzing MP4 video source formats, extract moov atoms in MP4 video sources andThe atom informations such as mdat atoms, and mdat atoms are split to obtain multiple from mdat atoms.Then moov atoms are distinguishedWith after fractionation it is each from mdat atoms be combined to obtain it is multiple combine pair, by multiple combinations to being combined to obtain new MP4Video source, then new MP4 video sources are transmitted.Atomic structure in MP4 video sources is reconstructed solve when network notStablize and lose the moov atomic time, the information for including in mdat atoms will also lose, and the atom of moov atoms and mdat is caused to be believedCease the problem of inconsistent and mdat atoms can not parse.The transmission efficiency to MP4 video sources is improved, it is effective so as to stablizeTransmission MP4 video sources.
Further, as shown in figure 4, being based on above-described embodiment, in the present embodiment, above-mentioned steps S20 may include:
Step S21, the position of all I frames in the mdat atoms is obtained;
Step S22, using the different location of the I frames as split point, the mdat atoms are split to obtain multipleFrom mdat atoms.
MP4 video sources are played when to solve current unstable networks can lose asking for the sample for including in mdat atomsIt inscribes, in the present embodiment, the structure of the MP4 video sources in transmission of network is adjusted.Pass through the format progress to MP4 video sourcesAnalysis, since the key frame I frames of MP4 video sources are stored in mdat atoms, and I frames do not depend on other frames, are decoded benchmarkTherefore frame can split mdat atoms using the I frames as split point.
The location information of all I frames in mdat atoms is obtained first with key frame of video selection algorithm, and obtains I framesTotal number, the total number of I frames is calculated as to sample number that be N number of, and obtaining MP4 video sources, is counted as M.According to obtaining IThe different location of frame is split to obtain multiple from mdat atoms as split point to mdat atoms.Then first I frame is extractedCoding/decoding information, which may include the audio and Video parameter information of MP4 video sources.Again by coding/decoding information weightCombination nova becomes crucial bit identification, i.e. header header files, can set header header files to 0x88, header header files are bigSmall is 4byte, it is to be understood that crucial bit identification and its size can be arranged as the case may be and flexibly, not limit thisInvention.
Further, as shown in figure 5, being based on above-described embodiment, in the present embodiment, above-mentioned steps S30 may include:
Step S31, obtain split after each from mdat atoms sample number;
Step S32, on the basis of the position of first I frame in MP4 video sources, by the moov atoms and described firstThe sample of corresponding number is combined between a I frames and second I frame, is continued using the position of second I frame as baseThe sample of corresponding number between the moov atoms and second I frame and third I frames is combined, directly by standardTo the combination for completing the moov atoms and all sample;
Step S33, crucial bit identification is arranged according to the coding/decoding information of first I frame, using as the MP4 after recombinationThe mark of video source.
For fractionation mdat atoms on the basis of the above-mentioned different location according to I frames, and according in obtained MP4 video sourcesSample sum M and I frames total N, the number X of the mdat atoms split into, i.e. X=M/N is calculated.According toTwo interval I frames between location informations obtain split after each from mdat atoms sample number, if for example, firstI framing bits are set to 1, and second I framing bit is set to 6, then the number of first sample included in the mdat atoms is after splitting6.Then according to the sequence of sample in mdat atoms before fractionation, by moov atoms respectively successively with after fractionation each from mdat originalsThe sample of corresponding number is combined in son.It specifically, will on the basis of the position of first I frame in MP4 video sourcesThe sample of corresponding number is combined between moov atoms and first I frame and second I frame, is continued with second I framePosition on the basis of, the sample of corresponding number between moov atoms and second I frame and third I frames is combined,Until completing the combination of moov atoms and all sample.For example, it is assumed that first I framing bit in MP4 video sources is set to 1,Two I framing bits are set to 6, then the number of the sample between first I frame and second I frame is 6, is set to first I framing bitMoov atoms and continuous 6 sample are combined by benchmark.If third I framing bits are set to 10, second I frame andThe number of sample between three I frames is 5, on the basis of second I frame position, by moov atoms and 5 continuousSample is combined.And so on, until completing the combination of the sample and moov atoms after splitting in all mdat atoms.
Since mdat atoms are made of multiple sample, according to the location information of I frames, by the moov atoms of acquisition with tear openEach sample for being included from mdat atoms after being divided into is combined, and the expression of the combination can be:
The formula indicates that moov atoms and different sample are combined, wherein moov indicates moov atoms, and k is kthA I frames, T are the number of sample between two I frames, and sample (k) (t) indicates the number of the corresponding T sample of k-th of I frameMoov atoms are combined with the sample of corresponding number by mesh successively, t is the natural number for being incremented to T from 1.X indicates to splitThe number of the slave mdat atoms obtained afterwards can be calculated according to above-mentioned formula X=M/N, wherein M is indicated in MP4 video sourcesThe sum of sample, N indicate the sum of I frames in MP4 video sources.
It can to sum up obtain:
Mdat atoms after recombination in MP4 video sources are:
Then it according to the coding/decoding information of first I frame, reconfigures and is regarded as the MP4 after recombination as crucial bit identificationThe mark of frequency source recombinates above-mentioned header header files from obtained moov atoms and the combination of different sample,The size of header header files may be configured as 4bytes.The MP4 being illustrated in figure 6 after being reconstructed again after being split to mdat atomsThe structure of video source, wherein header indicates that the crucial bit identification of MP4 video sources after recombination, chunk are the son in mdat atomsAtom information, the sub- atoms of chunk are made of multiple sample, and chunk-1 indicates first sub- atom of chunk, and so on,Chunk-n indicates the sub- atoms of n-th of chunk;Sam (1) indicates first sample, and so on, sam (n) is indicated n-thSample, mdat (1) indicate that moov atoms are carried out with sample included in first obtained the mdat atoms after fractionationIt combines and obtains, and so on, mdat (k) indicates that moov atoms are wrapped with k-th obtained after splitting from mdat atomsThe sample contained, which is combined, to be obtained.
Further, as shown in fig. 7, being based on above-described embodiment, it is proposed that the of the transfer approach of MP4 video sources of the present inventionTwo embodiments may include before above-mentioned steps S40 in the embodiment:
Step S50, maximum transmission unit that the transmission of MP4 video sources after recombination is dimensioned to communication interface is bigIt is small.
In order to solve in the transmit process of traditional MP4 video sources, the file transmission size of MP4 video sources is to be not fixedTransmission, when unstable networks or network, which are downloaded, to break down, it will data information is lost, so that being led in transmit processAtom information in cause MP4 video sources can not parse and playback error obtains problem.In the present embodiment, by the MP4 videos after recombinationThe transmission in source is dimensioned to the size of maximum transmission unit related with communication interface, and the size of the maximum transmission unit can be setIt is set to 1MTU (Maximum Transmission Unit).It not only can prevent the dry of in transmission process communication interfaceIt disturbs, and solves Internet video MP4 video sources and the phenomenon that packet loss occur, improve the fault-tolerant of the media file of MP4 video sourcesProperty, it is more advantageous to the broadcasting for carrying out Internet video.
Accordingly, as shown in figure 8, proposing a kind of transmission device first embodiment of MP4 video sources of the present invention.The embodimentThe transmission devices of MP4 video sources include:
Information extraction modules 100 for obtaining the MP4 video sources in network transmission stream, and extract the MP4 videos respectivelyMoov atoms in source and mdat atoms;
In the present embodiment, MP4 video sources are mainly made of ftyp atoms, moov atoms, mdat atoms etc..Traditional MP4The structure of video source is as shown in Figure 2.Wherein, mark of the ftyp atoms as MP4 video source formats is contained about MP4 videosThe fileinfo in source;Moov atoms contain the metadata media informations of MP4 video sources;Mdat atoms contain transmission MP4The file data of video source, this document data are made of different sample, and sample indicates that file stores base unit.
In the transmission of MP4 video sources, information extraction modules 100 obtain MP4 video sources from network transmission stream firstFileinfo, then extraction and analysis of the information extraction modules 100 to the progress atom of the MP4 video sources obtained from network,The atom informations such as moov atoms and the mdat atoms in MP4 video sources are extracted respectively.
Module 200 is split, it is multiple from mdat atoms for being split to obtain the mdat atoms;
It is when being played to solve MP4 video sources, these three atoms such as ftyp atoms, moov atoms and mdat atoms are unifiedCombination play out, i.e., MP4 video sources broadcasting in first parse ftyp atoms, then parse moov atoms, finally playWhen data information in mdat atoms, when network is there are unstable, then the data in moov atoms and mdat atoms will be lostInformation, cause to which the information of moov atoms and mdat atoms is inconsistent mdat atoms can not parse and the problem of playback error.
In the present embodiment, by fractionation module 200 to the mdat atoms that said extracted obtains split to obtain it is multiple fromMdat atoms, since the mdat atoms include sample, after being split to mdat atoms, obtain it is each fromMdat atoms can obtain the sample comprising different or same number, for follow-up moov atoms with split after it is each fromThe sample that mdat atoms are included is combined.
Recombination module 300, for by the moov atoms respectively with it is each it is described from mdat atoms be combined to obtain it is moreA combination pair, and the multiple combination is obtained into new MP4 video sources to combination;
The moov atoms obtained according to said extracted, and after being split to mdat atoms it is multiple fromMdat atoms, according to mdat atoms split before putting in order, by recombination module 300 by moov atoms successively with after each fractionationIt each of obtains being combined to obtain multiple combinations pair from mdat atoms, then multiple combinations are to recombinating in order as new MP4Video source.The structure of new MP4 video sources after being recombinated is as shown in Figure 3, wherein header is header file, after recombinationThe crucial bit identification of MP4 video sources.
Delivery module 400, for the new MP4 video sources to be transmitted.
After above-mentioned reconstruct obtains new MP4 video sources, the new MP4 video sources after the recombination are carried out network by delivery module 400The transmission of video.By being parsed to the MP4 video sources in netcast, the atom of MP4 video sources in reconstructed network transmissionInformation improves the fault-tolerance in network transmission, in network transmission in this way compared to traditional netcast MP4 video sourcesMP4 video sources will not fail effectively to carry out MP4 due to the sample being lost in moov atoms, and loss mdat atomsThe transmission of stream.So that in the transmit process for carrying out video, unstable or network speed of download occur even if network reducesThe source file video of effective transmission MP4 can be stablized.
The embodiment of the present invention by analyzing MP4 video source formats, extract moov atoms in MP4 video sources andThe atom informations such as mdat atoms, and mdat atoms are split to obtain multiple from mdat atoms.Then moov atoms are distinguishedWith after fractionation it is each from mdat atoms be combined to obtain it is multiple combine pair, by multiple combinations to being combined to obtain new MP4Video source, then new MP4 video sources are transmitted.Atomic structure in MP4 video sources is reconstructed solve when network notStablize and lose the moov atomic time, the information for including in mdat atoms will also lose, and the atom of moov atoms and mdat is caused to be believedCease the problem of inconsistent and mdat atoms can not parse.The transmission efficiency to MP4 video sources is improved, it is effective so as to stablizeTransmission MP4 video sources.
Further, as shown in figure 9, being based on above-described embodiment, in the present embodiment, above-mentioned fractionation module 200 may include:
Position acquisition unit 210, the position for obtaining all I frames in the mdat atoms;
Split cells 220, for using the different location of the I frames as split point, being split to the mdat atomsIt obtains multiple from mdat atoms.
MP4 video sources are played when to solve current unstable networks can lose asking for the sample for including in mdat atomsIt inscribes, in the present embodiment, the structure of the MP4 video sources in transmission of network is adjusted.Pass through the format progress to MP4 video sourcesAnalysis, since the key frame I frames of MP4 video sources are stored in mdat atoms, and I frames do not depend on other frames, are decoded benchmarkTherefore frame can split mdat atoms using the I frames as split point.
Obtain the position of all I frames in mdat atoms using key frame of video selection algorithm by position acquisition unit 210 firstConfidence ceases, and obtains the total number of I frames, and the total number of I frames is calculated as to sample number that be N number of, and obtaining MP4 video sources,It is counted as M.Split cells 220, as split point, is split to obtain more according to the different location for obtaining I frames to mdat atomsIt is a from mdat atoms.Then the coding/decoding information of first I frame is extracted, which may include the audio of MP4 video sourcesAnd Video parameter information.Coding/decoding information is reconfigured as crucial bit identification, i.e. header header files again, it can be by headerHeader file is set as 0x88, and header header file sizes are 4byte, it is to be understood that crucial bit identification and its size can rootsFlexibly it is arranged according to concrete condition, does not limit the present invention.
Further, as shown in Figure 10, it is based on above-described embodiment, in the present embodiment, above-mentioned recombination module 300 may include:
Number acquiring unit 310, for obtains fractionation after each from mdat atoms sample number;
Assembled unit 320, on the basis of the position of first I frame in MP4 video sources, by the moov atoms withThe sample of corresponding number is combined between first I frame and second I frame, is continued with second I frameOn the basis of position, the sample of corresponding number between the moov atoms and second I frame and third I frames is carried outCombination, until completing the combination of the moov atoms and all sample;
Setting unit 330 is identified, for crucial bit identification to be arranged according to the coding/decoding information of first I frame, to makeFor the mark of the MP4 video sources after recombination.
For fractionation mdat atoms on the basis of the above-mentioned different location according to I frames, and according in obtained MP4 video sourcesSample sum M and I frames total N, the number X of the mdat atoms split into, i.e. X=M/N is calculated.NumberAcquiring unit 310 according to two interval I frames between location information obtain split after each from mdat atoms sampleNumber, if for example, first I framing bit is set to 1, second I framing bit is set to 6, then split after first included in mdat atomsSample number be 6.Then assembled unit 320 is according to the sequence of sample in mdat atoms before fractionation, by moov atomsRespectively successively with each the sample of corresponding number is combined from mdat atoms after fractionation.Specifically, assembled unit 320 withIt, will be corresponding between moov atoms and first I frame and second I frame on the basis of the position of first I frame in MP4 video sourcesThe sample of number is combined, and is continued on the basis of the position of second I frame, by moov atoms and second I frame withAnd the sample of corresponding number is combined between third I frames, until completing the combination of moov atoms and all sample.ExampleSuch as, it is assumed that first I framing bit in MP4 video sources is set to 1, and second I framing bit is set to 6, then first I frame and second I frameBetween sample number be 6, on the basis of first I frame position, moov atoms and continuous 6 sample are subjected to groupIt closes.If third I framing bits are set to 10, the number of the sample between second I frame and third I frames is 5, with second IOn the basis of frame position, moov atoms and continuous 5 sample are combined.And so on, until completing to own after splittingThe combination of sample and moov atoms in mdat atoms.
Since mdat atoms are made of multiple sample, according to the location information of I frames, by the moov atoms of acquisition with tear openEach sample for being included from mdat atoms after being divided into is combined, and the expression of the combination can be:
The formula indicates that moov atoms and different sample are combined, wherein moov indicates moov atoms, and k is kthA I frames, T are the number of sample between two I frames, and sample (k) (t) indicates the number of the corresponding T sample of k-th of I frameMoov atoms are combined with the sample of corresponding number by mesh successively, t is the natural number for being incremented to T from 1.X indicates to splitThe number of the slave mdat atoms obtained afterwards can be calculated according to above-mentioned formula X=M/N, wherein M is indicated in MP4 video sourcesThe sum of sample, N indicate the sum of I frames in MP4 video sources.
It can to sum up obtain:
Mdat atoms after recombination in MP4 video sources are:
Then it by mark setting unit 330 according to the coding/decoding information of first I frame, reconfigures as crucial bit identificationAs the mark of the MP4 video sources after recombination, i.e., by above-mentioned header header files and obtained moov atoms with it is differentThe combination of sample is recombinated, and the size of header header files may be configured as 4bytes.It is illustrated in figure 6 and mdat atoms is torn openThe structure of MP4 video sources after being reconstructed again after point, wherein header indicates the crucial bit identification of MP4 video sources after recombination,Chunk is the sub- atom information in mdat atoms, and the sub- atoms of chunk are made of multiple sample, and chunk-1 indicates firstThe sub- atoms of chunk, and so on, chunk-n indicates the sub- atoms of n-th of chunk;Sam (1) indicates first sample, according to thisAnalogize, sam (n) indicates that n-th of sample, mdat (1) indicate moov atoms and first obtained the mdat atoms after fractionationIncluded in sample be combined and obtain, and so on, mdat (k) indicate moov atoms and split after the obtainedThe k sample included in the mdat atoms, which is combined, to be obtained.
Further, as shown in figure 11, it is based on above-described embodiment, it is proposed that the transmission device of MP4 video sources of the present inventionSecond embodiment, the transmission device of above-mentioned MP4 video sources further includes in the embodiment:
Setup module 500, the maximum transmitted for the transmission of the MP4 video sources after recombination to be dimensioned to communication interfaceCell size.
In order to solve in the transmit process of traditional MP4 video sources, the file transmission size of MP4 video sources is to be not fixedTransmission, when unstable networks or network, which are downloaded, to break down, it will data information is lost, so that being led in transmit processAtom information in cause MP4 video sources can not parse and playback error obtains problem.In the present embodiment, setup module 500 will recombinateThe transmission of MP4 video sources afterwards is dimensioned to the size of maximum transmission unit related with communication interface, the maximum transmitted listThe size of member may be configured as 1MTU (Maximum Transmission Unit).It not only can prevent in transmission processThe interference of communication interface, and solve Internet video MP4 video sources and the phenomenon that packet loss occur, improve the matchmaker of MP4 video sourcesThe fault-tolerance of body file is more advantageous to the broadcasting for carrying out Internet video.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hairEquivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skillsArt field, is included within the scope of the present invention.

Claims (8)

By the moov atoms respectively with it is each it is described from mdat atoms be combined to obtain it is multiple combine pair, and will be the multipleCombination obtains new MP4 video sources to combination;Wherein, the mdat atoms include multiple sample, described by the moov atomsRespectively with it is each it is described from mdat atoms be combined to obtain it is multiple combine pair, and the multiple combination obtains combination newMP4 video sources include:Obtain split after each from mdat atoms sample number;With first I frame in MP4 video sourcesPosition on the basis of, by the sample of corresponding number between the moov atoms and first I frame and second I frame intoRow combination, continues on the basis of the position of second I frame, by the moov atoms and second I frame and thirdThe sample of corresponding number is combined between a I frames, until completing the combination of the moov atoms and all sample;According toThe crucial bit identification of coding/decoding information setting of first I frame, using the mark as the new MP4 video sources;
Recombination module, for the moov atoms described to be combined from mdat atoms to obtain multiple combinations with each respectivelyIt is right, and the multiple combination is obtained into new MP4 video sources to combination;Wherein, the mdat atoms include multiple sample, describedRecombination module includes:Number acquiring unit, for obtains fractionation after each from mdat atoms sample number;Combination is singleMember, on the basis of the position of first I frame in MP4 video sources, by the moov atoms and first I frame andThe sample of corresponding number is combined between second I frame, is continued on the basis of the position of second I frame, will be describedThe sample of corresponding number is combined between moov atoms and second I frame and third I frames, until described in completingThe combination of moov atoms and all sample;
CN201510782746.7A2015-11-162015-11-16The transfer approach and device of MP4 video sourcesActiveCN105451073B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201510782746.7ACN105451073B (en)2015-11-162015-11-16The transfer approach and device of MP4 video sources
PCT/CN2016/084811WO2017084310A1 (en)2015-11-162016-06-03Method and device for transmitting mp4 video source

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510782746.7ACN105451073B (en)2015-11-162015-11-16The transfer approach and device of MP4 video sources

Publications (2)

Publication NumberPublication Date
CN105451073A CN105451073A (en)2016-03-30
CN105451073Btrue CN105451073B (en)2018-11-02

Family

ID=55560788

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510782746.7AActiveCN105451073B (en)2015-11-162015-11-16The transfer approach and device of MP4 video sources

Country Status (2)

CountryLink
CN (1)CN105451073B (en)
WO (1)WO2017084310A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105451073B (en)*2015-11-162018-11-02深圳Tcl数字技术有限公司The transfer approach and device of MP4 video sources
CN109936715B (en)*2017-12-192021-09-03华为技术有限公司MP4 file processing method and related equipment thereof
CN110740391B (en)*2019-10-312021-10-26四川效率源信息安全技术股份有限公司Method for repairing MP4 damaged file

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1515115A (en)*2002-06-262004-07-21���µ�����ҵ��ʽ���� Multiplexing device and inverse multiplexing device
WO2006079368A1 (en)*2005-01-252006-08-03Nero AgMethod for preparing dvd-video formatted data, method for reconstructing dvd-video data and dvd-video data structure
CN101427571A (en)*2002-12-042009-05-06国际商业机器公司Efficient means for creating mpeg-4 textual representation from mpeg-4 intermedia format
CN102123281A (en)*2011-01-072011-07-13中兴通讯股份有限公司Fast forward and fast backward treatment method and device during video playing and mobile terminal
CN103069812A (en)*2010-06-092013-04-24三星电子株式会社 Method and device for providing segment-based multimedia streaming service, method and device for receiving segment-based multimedia streaming service
CN103262556A (en)*2010-11-022013-08-21Lg电子株式会社 Method for sending and receiving media content and device for sending and receiving using the method
WO2015107784A1 (en)*2014-01-172015-07-23ソニー株式会社Communication apparatus, communication data generation method, and communication data processing method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP4380533B2 (en)*2004-12-242009-12-09キヤノン株式会社 Multimedia data processing apparatus and method
KR101295377B1 (en)*2007-03-072013-08-08엘지전자 주식회사Method for constructing of file format and apparatus and method for processing broadcast signal with file which has file format
KR20100078700A (en)*2008-12-302010-07-08삼성전자주식회사Terminal and method for transmitting file
KR101789633B1 (en)*2010-04-192017-10-25엘지전자 주식회사Apparatus and method for transmitting and receiving contents based on internet
KR101316579B1 (en)*2012-01-172013-10-18(주)피타소프트Mp4 file configuring device and restoring device, mp4 file configuring method and restoring method
CN105451073B (en)*2015-11-162018-11-02深圳Tcl数字技术有限公司The transfer approach and device of MP4 video sources

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1515115A (en)*2002-06-262004-07-21���µ�����ҵ��ʽ���� Multiplexing device and inverse multiplexing device
CN101427571A (en)*2002-12-042009-05-06国际商业机器公司Efficient means for creating mpeg-4 textual representation from mpeg-4 intermedia format
WO2006079368A1 (en)*2005-01-252006-08-03Nero AgMethod for preparing dvd-video formatted data, method for reconstructing dvd-video data and dvd-video data structure
CN103069812A (en)*2010-06-092013-04-24三星电子株式会社 Method and device for providing segment-based multimedia streaming service, method and device for receiving segment-based multimedia streaming service
CN103262556A (en)*2010-11-022013-08-21Lg电子株式会社 Method for sending and receiving media content and device for sending and receiving using the method
CN102123281A (en)*2011-01-072011-07-13中兴通讯股份有限公司Fast forward and fast backward treatment method and device during video playing and mobile terminal
WO2015107784A1 (en)*2014-01-172015-07-23ソニー株式会社Communication apparatus, communication data generation method, and communication data processing method

Also Published As

Publication numberPublication date
WO2017084310A1 (en)2017-05-26
CN105451073A (en)2016-03-30

Similar Documents

PublicationPublication DateTitle
US11178436B2 (en)Broadcast signal transmission device, broadcast signal reception device, broadcast signal transmission method, and broadcast signal reception method
Ameigeiras et al.Analysis and modelling of YouTube traffic
US8510375B2 (en)Apparatus and methods for time mapping media segments in streaming media files
CN104885473B (en) Live Timing Method for Dynamic Adaptive Streaming (DASH) over HTTP
CN105594219B (en)Transmitting/reception processing device and method for broadcast singal
CN109088887A (en)A kind of decoded method and device of Streaming Media
CN107210828A (en)Broadcast singal dispensing device, broadcast receiver, broadcast singal sending method and broadcast signal received method
CN108293153A (en)Select the next-generation audio data for the coding being used for transmission
CN106685942A (en)Video live and replaying system and video live and replaying method
CN110099288A (en)Handle continuous multicycle content
TW200908652A (en)Apparatus and method for storing and reading a file having a media data container and a metadata container
CN104602105B (en)The player method and user equipment of video file
CN109982154A (en)Method, equipment and the storage medium of image for reproduction space region
CN105409235B (en)File creating apparatus and method and content reproduction apparatus and method
CN105828096B (en) Method and device for processing media stream file
CN110266985A (en)Reproducting method, content transmission method, transcriber, content transmission device
CN105934953A (en)Broadcast signal tranmission device, broadcast signal reception device, broadcast signal tranmission method, and broadcast signal reception method
US20150106730A1 (en)Framework for screen content sharing system with generalized screen descriptions
CN105451073B (en)The transfer approach and device of MP4 video sources
US10873495B2 (en)Apparatus and method for transmitting or receiving broadcast signal
CN103648011B (en)A kind of audio-visual synchronization apparatus and method based on HLS protocol
CN106105239B (en)Sending device, sending method, receiving device, method of reseptance and program
JPWO2017195668A1 (en) Reception device and data processing method
CN108141640A (en)Information processing equipment and information processing method
US11350183B2 (en)Signal transmitting device, signal receiving device, signal transmitting method, and signal receiving method

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp