CN105451073A - MP4 video source transmission method and apparatus - Google Patents

MP4 video source transmission method and apparatus Download PDF

Info

Publication number
CN105451073A
CN105451073A CN201510782746.7A CN201510782746A CN105451073A CN 105451073 A CN105451073 A CN 105451073A CN 201510782746 A CN201510782746 A CN 201510782746A CN 105451073 A CN105451073 A CN 105451073A
Authority
CN
China
Prior art keywords
video source
atom
frame
sample
mdat
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.)
Granted
Application number
CN201510782746.7A
Other languages
Chinese (zh)
Other versions
CN105451073B (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
Shenzhen TCL Digital 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 Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201510782746.7A priority Critical patent/CN105451073B/en
Publication of CN105451073A publication Critical patent/CN105451073A/en
Priority to PCT/CN2016/084811 priority patent/WO2017084310A1/en
Application granted granted Critical
Publication of CN105451073B publication Critical patent/CN105451073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4405Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4408Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video stream encryption, e.g. re-encrypting a decrypted video stream for redistribution in a home network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/85406Content authoring involving a specific file format, e.g. MP4 format

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses an MP4 video source transmission method including acquiring the MP4 video source in a network transmission flow and respectively extracting the moov atom and the mdat atom in the MP4 video source; splitting the mdat atom to obtain a plurality of mdat atoms; combining the moov atom with each mdat atom to obtain a plurality of combination pairs and combining the plurality of combination pairs to obtain a new MP4 video source; and transmitting the new MP4 video source. The invention further discloses an MP4 video source transmission apparatus. The MP4 video source transmission method and apparatus improve the transmission efficiency of the MP4 video source and can stably and efficiently transmit the MP4 video source.

Description

The transfer approach of MP4 video source and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of transfer approach and device of MP4 video source.
Background technology
Along with computer, digital media technology, audio frequency and video technology constantly improve, network audio-video transmission technology is more and more important.The rise of stream media technology, increasing user selects to obtain the broadcasting that video carries out Internet video Streaming Media from network.The broadcasting of Internet video Streaming Media is mainly based on the broadcasting of MP4 Container Format, for MP4 video source, the Document encapsulation form of MP4 video source defines based on QuickTime Container Format, it is a kind of very open container, and it is primarily of ftyp atom, moov atom, mdat atom composition.Wherein, ftyp atom is as the mark of MP4 video source form and some information comprised about file, moov atom contains the metadata data message of media, and mdat atom contains the data transmitting MP4 file, and the composition of these data is made up of different sample.
At present, it is combination unified for these three kinds of atoms play that traditional MP4 video source is play, and namely in MP4 video source file is play, first resolves ftyp atom, then resolves moov atom, finally plays the sample in mdat atom.And in the transport process of MP4 video source file, the size of file is unfixed transmission.Play if carry out this locality, under file downloaded and leave local path in, therefore can not lose the metadata data message that comprises in moov atom and miss the information of some files.If but the broadcasting of MP4 video source file is the broadcasting of Internet video Streaming Media, because the metadata data message comprised in the moov atom of network is relevant with the transmission speed of download of network, and the size of data that network transmits is unfixed.Therefore, when unstable networks or web download break down, moov atom will be lost, the media data of the sample thereupon in mdat atom also will be lost, thus make the information of moov atom and mdat atom in transport process inconsistent, cause mdat atom to resolve, playback error.Greatly reduce the transmission efficiency to MP4 video source, if the MP4 video source proceeding network is play, by appearance card in broadcasting, can not smoothness play.
Summary of the invention
Main purpose of the present invention is the transfer approach and the device that provide a kind of MP4 video source, is intended to improve the transmission efficiency to MP4 video source.
For achieving the above object, the invention provides a kind of transfer approach of MP4 video source, comprising:
Obtain the MP4 video source in Internet Transmission stream, and the moov atom extracted respectively in described MP4 video source and mdat atom;
Described mdat atom being carried out fractionation obtains multiple from mdat atom;
By described moov atom, to obtain multiple combination right with carrying out combination from mdat atom described in each respectively, and described multiple combination is obtained new MP4 video source to combination;
Described new MP4 video source is transmitted.
Preferably, describedly described mdat atom is carried out fractionation and obtains multiplely comprising from mdat atom:
Obtain the position of all I frames in described mdat atom;
Using the diverse location of described I frame as fractionation point, fractionation is carried out to described mdat atom and obtains multiple from mdat atom.
Preferably, described mdat atom comprises multiple sample, and described by described moov atom, to obtain multiple combination right with carrying out combination from mdat atom described in each respectively, and described multiple combination is obtained new MP4 video source to combination comprises:
Obtain the number of each sample from mdat atom after splitting;
With the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between described moov atom and described first I frame and second I frame is combined, continue with the position of described second I frame as benchmark, the sample of corresponding number between described moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of described moov atom and all sample;
Coding/decoding information according to described first I frame arranges crucial bit-identify, using the mark as the MP4 video source after restructuring.
Preferably, described moov atom and different sample carry out composite type and are expressed as:
m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t ) ;
Wherein, moov represents a moov atom, k represents a kth I frame, T is the number of sample between two I frames, sample (k) (t) represents the number of the kth T that I frame is a corresponding sample, t is the natural number being incremented to T from 1, the number from mdat atom that X obtains after representing fractionation;
X=M/N;
Wherein, M represents the sum of the sample in MP4 video source, and N represents the sum of I frame in MP4 video source.
Preferably, described described new MP4 video source is transmitted before comprise:
The transmission size of the MP4 video source after restructuring is set to the MTU size of communication interface.
In addition, for achieving the above object, present invention also offers a kind of conveyer of MP4 video source, comprising:
Information extraction modules, for obtaining the MP4 video source in Internet Transmission stream, and the moov atom extracted respectively in described MP4 video source and mdat atom;
Splitting module, obtaining multiple from mdat atom for described mdat atom being carried out fractionation;
Recombination module, for obtain multiple combination right with carrying out combination from mdat atom described in each respectively by described moov atom, and obtains new MP4 video source by described multiple combination to combination;
Delivery module, for transmitting described new MP4 video source.
Preferably, described fractionation module comprises:
Position acquisition unit, for obtaining the position of all I frames in described mdat atom;
Split cells, for using the diverse location of described I frame as fractionation point, fractionation is carried out to described mdat atom and obtains multiple from mdat atom.
Preferably, described mdat atom comprises multiple sample, and described recombination module comprises:
Number acquiring unit, for obtaining the number splitting rear each sample from mdat atom;
Assembled unit, for with the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between described moov atom and described first I frame and second I frame is combined, continue with the position of described second I frame as benchmark, the sample of corresponding number between described moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of described moov atom and all sample;
Mark setting unit, for arranging crucial bit-identify according to the coding/decoding information of described first I frame, using the mark as the MP4 video source after restructuring.
Preferably, described moov atom and different sample carry out composite type and are expressed as:
m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t ) ;
Wherein, moov represents a moov atom, k represents a kth I frame, T is the number of sample between two I frames, sample (k) (t) represents the number of the kth T that I frame is a corresponding sample, t is the natural number being incremented to T from 1, the number from mdat atom that X obtains after representing fractionation;
X=M/N;
Wherein, M represents the sum of the sample in MP4 video source, and N represents the sum of I frame in MP4 video source.
Preferably, the conveyer of described MP4 video source also comprises:
Module is set, for the transmission size of the MP4 video source after restructuring being set to the MTU size of communication interface.
The embodiment of the present invention, by analyzing MP4 video source form, extracts the atom information such as moov atom in MP4 video source and mdat atom, and carries out fractionation to mdat atom and obtain multiple from mdat atom.Then moov atom is combined from mdat atom with each respectively, obtain the new MP4 video source after recombinating, newer MP4 video source is transmitted.Be reconstructed the atomic structure in MP4 video source and solve when unstable networks loses the moov atomic time, the information comprised in mdat atom also will be lost, and causes the atom information of moov atom and mdat inconsistent and problem that mdat atom cannot be resolved.Improve the transmission efficiency to MP4 video source, thus effective transmission MP4 video source can be stablized.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of transfer approach first embodiment of MP4 video source of the present invention;
Fig. 2 is the structure of traditional MP4 video source;
Fig. 3 is the structure of the MP4 video source after the present invention recombinates;
Fig. 4 is in the transfer approach of MP4 video source of the present invention, is carried out splitting by mdat atom obtaining multiple refinement schematic flow sheet from mdat atom;
Fig. 5 is in the transfer approach of MP4 video source of the present invention, and described moov atom is carried out combination with each from mdat atom respectively, and to obtain multiple combination right, and multiple combination is obtained the refinement schematic flow sheet of new MP4 video source to combination;
Fig. 6 is the structure of the MP4 video source after being reconstructed again after the present invention splits mdat atom;
Fig. 7 is the schematic flow sheet of transfer approach second embodiment of MP4 video source of the present invention;
Fig. 8 is the high-level schematic functional block diagram of conveyer first embodiment of MP4 video source of the present invention;
Fig. 9 is the refinement high-level schematic functional block diagram splitting module in the conveyer of MP4 video source of the present invention;
Figure 10 is the refinement high-level schematic functional block diagram of recombination module in the conveyer of MP4 video source of the present invention;
Figure 11 is the high-level schematic functional block diagram of conveyer second embodiment of MP4 video source of the present invention.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, transfer approach first embodiment of a kind of MP4 video source of the present invention is shown.The transfer approach of the MP4 video source of this embodiment comprises:
Step S10, the MP4 video source obtained in Internet Transmission stream, and the moov atom extracted respectively in described MP4 video source and mdat atom;
In the present embodiment, MP4 video source is primarily of compositions such as ftyp atom, moov atom, mdat atoms.The structure of traditional MP4 video source as shown in Figure 2.Wherein, ftyp atom, as the mark of MP4 video source form, contains the fileinfo about MP4 video source; Moov atom contains the metadata media information of MP4 video source; Mdat atom contains the file data transmitting MP4 video source, and this file data is made up of different sample, and sample represents that file stores base unit.
When the transmission of MP4 video source, first from Internet Transmission stream, obtain the fileinfo of MP4 video source, then to the extraction carrying out atom and the analysis of the MP4 video source obtained from network, the atom information such as moov atom in MP4 video source and mdat atom are namely extracted respectively.
Step S20, described mdat atom is carried out fractionation obtain multiple from mdat atom;
In the present embodiment, the mdat atom obtained said extracted carries out fractionation and obtains multiple from mdat atom, because this mdat atom comprises sample, therefore, after mdat atom is split, each obtaining can obtain comprising the sample of difference or same number from mdat atom, for follow-up moov atom with split after each sample comprised from mdat atom combine.
Step S30, by described moov atom, to obtain multiple combination right with carrying out combination from mdat atom described in each respectively, and described multiple combination is obtained new MP4 video source to combination;
According to the moov atom that said extracted obtains, and to mdat atom split obtain split after multiple from mdat atom, putting in order before splitting according to mdat atom, by moov atom successively with split after obtain eachly carry out combination from mdat atom to obtain multiple combination right, then multiple combination becomes new MP4 video source to restructuring in order.Obtain the structure of the new MP4 video source after recombinating as shown in Figure 3, wherein, header is header file, as the crucial bit-identify of MP4 video source after restructuring.
Step S40, described new MP4 video source to be transmitted.
After above-mentioned reconstruct obtains new MP4 video source, the new MP4 video source after this restructuring is carried out the transmission of Internet video.By resolving the MP4 video source in netcast, the atom information of MP4 video source in reconstructed network transmission, like this compared to traditional netcast MP4 video source, improve the fault-tolerance in Internet Transmission, in Internet Transmission, MP4 video source can not owing to lost moov atom, and the sample lost in mdat atom and failing effectively carries out the transmission of MP4 stream.Make in the transport process carrying out video, even if network occurs that unstable or web download speed reduces also can stablize the effective source file video transmitting MP4.
The embodiment of the present invention, by analyzing MP4 video source form, extracts the atom information such as moov atom in MP4 video source and mdat atom, and carries out fractionation to mdat atom and obtain multiple from mdat atom.Then by moov atom respectively with split after each carry out combination from mdat atom to obtain multiple combination right, multiple combination is obtained new MP4 video source to carrying out combination, newer MP4 video source is transmitted.Be reconstructed the atomic structure in MP4 video source and solve when unstable networks loses the moov atomic time, the information comprised in mdat atom also will be lost, and causes the atom information of moov atom and mdat inconsistent and problem that mdat atom cannot be resolved.Improve the transmission efficiency to MP4 video source, thus effective transmission MP4 video source can be stablized.
Further, as shown in Figure 4, based on above-described embodiment, in the present embodiment, above-mentioned steps S20 can comprise:
Step S21, obtain the position of all I frames in described mdat atom;
Step S22, using the diverse location of described I frame as fractionation point, fractionation is carried out to described mdat atom and obtains multiple from mdat atom.
For playing the problem that MP4 video source can lose the sample comprised in mdat atom when solving current unstable networks, in the present embodiment, the structure of the MP4 video source in transmitting network adjusts.By analyzing the form of MP4 video source, because the key frame I frame of MP4 video source leaves in mdat atom, and I frame does not rely on other frame, is the reference frame of decoding, therefore, this I frame can be split as fractionation point mdat atom.
First utilize key frame of video selection algorithm to obtain the positional information of all I frames in mdat atom, and obtain total number of I frame, total number of I frame is counted N number of, and obtains the sample number of MP4 video source, be counted as M.According to obtaining the diverse location of I frame as fractionation point, fractionation being carried out to mdat atom and obtains multiple from mdat atom.Then extract the coding/decoding information of first I frame, this coding/decoding information can comprise audio frequency and the Video parameter information of MP4 video source.Again coding/decoding information is reconfigured and become crucial bit-identify, be i.e. header header file, header header file can be set to 0x88, header header file size is 4byte, be understandable that, crucial bit-identify and large I thereof are arranged as the case may be and flexibly, do not limit the present invention.
Further, as shown in Figure 5, based on above-described embodiment, in the present embodiment, above-mentioned steps S30 can comprise:
The number of each sample from mdat atom after step S31, acquisition split;
Step S32, with the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between described moov atom and described first I frame and second I frame is combined, continue with the position of described second I frame as benchmark, the sample of corresponding number between described moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of described moov atom and all sample;
Step S33, crucial bit-identify is set according to the coding/decoding information of described first I frame, using the mark as the MP4 video source after restructuring.
Be that benchmark splits mdat atom for the above-mentioned diverse location according to I frame, and according to the sum M of the sample in obtained MP4 video source, and the total N of I frame, calculate the number X of the mdat atom split into, i.e. X=M/N.The number splitting rear each sample from mdat atom is obtained according to the positional information between two interval I frames, such as, if first I framing bit is set to 1, second I framing bit is set to 6, then the number splitting rear first sample comprised from mdat atom is 6.Then according to the order splitting sample in front mdat atom, moov atom is combined with the sample splitting rear each corresponding number from mdat atom respectively successively.Particularly, with the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between moov atom and first I frame and second I frame is combined, continue with the position of second I frame as benchmark, the sample of corresponding number between moov atom and second I frame and the 3rd I frame is combined, until complete the combination of moov atom and all sample.Such as, suppose that first I framing bit in MP4 video source is set to 1, second I framing bit is set to 6, then the number of the sample between first I frame and second I frame is 6, is set to benchmark with first I framing bit, moov atom and continuous print 6 sample is combined.If the 3rd I framing bit is set to 10, then the number of the sample between second I frame and the 3rd I frame is 5, is set to benchmark with second I framing bit, moov atom and continuous print 5 sample is combined.By that analogy, until complete the combination of sample and the moov atom split in rear all mdat atoms.
Because mdat atom is made up of multiple sample, according to the positional information of I frame, the moov atom of acquisition and each sample comprised from mdat atom after splitting into are combined, the expression of this combination can be:
m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t ) ;
This formula represents that moov atom and different sample combine, wherein, moov represents moov atom, k is a kth I frame, T is the number of sample between two I frames, sample (k) (t) represents the number of the kth T that I frame is a corresponding sample, combines successively by moov atom with the sample of corresponding number, and t is the natural number being incremented to T from 1.The number from mdat atom that X obtains after representing fractionation, can calculate according to above-mentioned formula X=M/N, wherein, M represents the sum of the sample in MP4 video source, and N represents the sum of I frame in MP4 video source.
To sum up can obtain:
m d a t ( k ) = m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t )
Mdat atom after restructuring in MP4 video source is:
m d a t = Σ k = 1 X m d a t ( k )
Then according to the coding/decoding information of first I frame, reconfigure and become the mark of crucial bit-identify as the MP4 video source after restructuring, recombinate by the combination of above-mentioned header header file from the moov atom obtained and different sample, the large I of header header file is set to 4bytes.Be illustrated in figure 6 the structure of the MP4 video source after being reconstructed again after mdat atom is split, wherein, header represents the crucial bit-identify of the rear MP4 video source of restructuring, chunk is the sub-atom information in mdat atom, the sub-atom of chunk is made up of multiple sample, chunk-1 represents first sub-atom of chunk, and the rest may be inferred, and chunk-n represents the sub-atom of the n-th chunk; Sam (1) represents first sample, the rest may be inferred, sam (n) represents the n-th sample, the sample comprised in obtain first mdat atom after mdat (1) represents moov atom and splits carries out combining and obtaining, the rest may be inferred, and the sample that the kth obtained after mdat (k) represents moov atom and splits comprises from mdat atom carries out combining and obtaining.
Further, as shown in Figure 7, based on above-described embodiment, propose the second embodiment of the transfer approach of MP4 video source of the present invention, can comprise before above-mentioned steps S40 in this embodiment:
Step S50, the transmission size of MP4 video source after restructuring is set to the MTU size of communication interface.
In order to solve in the transport process of traditional MP4 video source, the document backup size of MP4 video source is unfixed transmission, when unstable networks or web download break down, will obliterated data information, thus make to cause in transport process that the atom information in MP4 video source cannot be resolved and playback error obtains problem.In the present embodiment, the transmission size of the MP4 video source after restructuring is set to the size of the MTU relevant with communication interface, the large I of this MTU is set to 1MTU (MaximumTransmissionUnit).So not only can prevent the interference of communication interface in transmitting procedure, and solve the phenomenon that packet loss appears in Internet video MP4 video source, improve the fault-tolerance of the media file of MP4 video source, be more conducive to the broadcasting carrying out Internet video.
Accordingly, as shown in Figure 8, conveyer first embodiment of a kind of MP4 video source of the present invention is proposed.The conveyer of the MP4 video source of this embodiment comprises:
Information extraction modules 100, for obtaining the MP4 video source in Internet Transmission stream, and the moov atom extracted respectively in described MP4 video source and mdat atom;
In the present embodiment, MP4 video source is primarily of compositions such as ftyp atom, moov atom, mdat atoms.The structure of traditional MP4 video source as shown in Figure 2.Wherein, ftyp atom, as the mark of MP4 video source form, contains the fileinfo about MP4 video source; Moov atom contains the metadata media information of MP4 video source; Mdat atom contains the file data transmitting MP4 video source, and this file data is made up of different sample, and sample represents that file stores base unit.
When the transmission of MP4 video source, first information extraction modules 100 obtains the fileinfo of MP4 video source from Internet Transmission stream, then information extraction modules 100 is to the extraction carrying out atom of the MP4 video source obtained from network and analysis, namely extracts the atom information such as moov atom in MP4 video source and mdat atom respectively.
Splitting module 200, obtaining multiple from mdat atom for described mdat atom being carried out fractionation;
During in order to solve the broadcasting of MP4 video source, combination unified for these three kinds of atoms such as ftyp atom, moov atom and mdat atom is play, namely in MP4 video source is play, ftyp atom is first resolved, then moov atom is resolved, when finally playing the data message in mdat atom, when network exists unstable, then will lose the data message in moov atom and mdat atom, thus the inconsistent mdat of the causing atom of the information of moov atom and mdat atom cannot be resolved and the problem of playback error.
In the present embodiment, the mdat atom obtained by fractionation module 200 pairs of said extracted carries out fractionation and obtains multiple from mdat atom, because this mdat atom comprises sample, therefore, after mdat atom is split, each obtaining can obtain comprising the sample of difference or same number from mdat atom, for follow-up moov atom with split after each sample comprised from mdat atom combine.
Recombination module 300, for obtain multiple combination right with carrying out combination from mdat atom described in each respectively by described moov atom, and obtains new MP4 video source by described multiple combination to combination;
According to the moov atom that said extracted obtains, and to mdat atom split obtain split after multiple from mdat atom, putting in order before splitting according to mdat atom, by recombination module 300 by moov atom successively with each fractionation after obtain eachly carry out combination from mdat atom to obtain multiple combination right, then multiple combination becomes new MP4 video source to restructuring in order.Obtain the structure of the new MP4 video source after recombinating as shown in Figure 3, wherein, header is header file, as the crucial bit-identify of MP4 video source after restructuring.
Delivery module 400, for transmitting described new MP4 video source.
After above-mentioned reconstruct obtains new MP4 video source, the new MP4 video source after this restructuring is carried out the transmission of Internet video by delivery module 400.By resolving the MP4 video source in netcast, the atom information of MP4 video source in reconstructed network transmission, like this compared to traditional netcast MP4 video source, improve the fault-tolerance in Internet Transmission, in Internet Transmission, MP4 video source can not owing to lost moov atom, and the sample lost in mdat atom and failing effectively carries out the transmission of MP4 stream.Make in the transport process carrying out video, even if network occurs that unstable or web download speed reduces also can stablize the effective source file video transmitting MP4.
The embodiment of the present invention, by analyzing MP4 video source form, extracts the atom information such as moov atom in MP4 video source and mdat atom, and carries out fractionation to mdat atom and obtain multiple from mdat atom.Then by moov atom respectively with split after each carry out combination from mdat atom to obtain multiple combination right, multiple combination is obtained new MP4 video source to carrying out combination, newer MP4 video source is transmitted.Be reconstructed the atomic structure in MP4 video source and solve when unstable networks loses the moov atomic time, the information comprised in mdat atom also will be lost, and causes the atom information of moov atom and mdat inconsistent and problem that mdat atom cannot be resolved.Improve the transmission efficiency to MP4 video source, thus effective transmission MP4 video source can be stablized.
Further, as shown in Figure 9, based on above-described embodiment, in the present embodiment, above-mentioned fractionation module 200 can comprise:
Position acquisition unit 210, for obtaining the position of all I frames in described mdat atom;
Split cells 220, for using the diverse location of described I frame as fractionation point, fractionation is carried out to described mdat atom and obtains multiple from mdat atom.
For playing the problem that MP4 video source can lose the sample comprised in mdat atom when solving current unstable networks, in the present embodiment, the structure of the MP4 video source in transmitting network adjusts.By analyzing the form of MP4 video source, because the key frame I frame of MP4 video source leaves in mdat atom, and I frame does not rely on other frame, is the reference frame of decoding, therefore, this I frame can be split as fractionation point mdat atom.
First utilize key frame of video selection algorithm to obtain the positional information of all I frames in mdat atom by position acquisition unit 210, and obtain total number of I frame, total number of I frame is counted N number of, and obtains the sample number of MP4 video source, be counted as M.Split cells 220, according to obtaining the diverse location of I frame as fractionation point, carries out fractionation to mdat atom and obtains multiple from mdat atom.Then extract the coding/decoding information of first I frame, this coding/decoding information can comprise audio frequency and the Video parameter information of MP4 video source.Again coding/decoding information is reconfigured and become crucial bit-identify, be i.e. header header file, header header file can be set to 0x88, header header file size is 4byte, be understandable that, crucial bit-identify and large I thereof are arranged as the case may be and flexibly, do not limit the present invention.
Further, as shown in Figure 10, based on above-described embodiment, in the present embodiment, above-mentioned recombination module 300 can comprise:
Number acquiring unit 310, for obtaining the number splitting rear each sample from mdat atom;
Assembled unit 320, for with the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between described moov atom and described first I frame and second I frame is combined, continue with the position of described second I frame as benchmark, the sample of corresponding number between described moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of described moov atom and all sample;
Mark setting unit 330, for arranging crucial bit-identify according to the coding/decoding information of described first I frame, using the mark as the MP4 video source after restructuring.
Be that benchmark splits mdat atom for the above-mentioned diverse location according to I frame, and according to the sum M of the sample in obtained MP4 video source, and the total N of I frame, calculate the number X of the mdat atom split into, i.e. X=M/N.Number acquiring unit 310 obtains the number splitting rear each sample from mdat atom according to the positional information between two interval I frames, such as, if first I framing bit is set to 1, second I framing bit is set to 6, then the number splitting rear first sample comprised from mdat atom is 6.Then assembled unit 320 is according to the order splitting sample in front mdat atom, is combined successively respectively by moov atom with the sample splitting rear each corresponding number from mdat atom.Particularly, assembled unit 320 with the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between moov atom and first I frame and second I frame is combined, continue with the position of second I frame as benchmark, the sample of corresponding number between moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of moov atom and all sample.Such as, suppose that first I framing bit in MP4 video source is set to 1, second I framing bit is set to 6, then the number of the sample between first I frame and second I frame is 6, is set to benchmark with first I framing bit, moov atom and continuous print 6 sample is combined.If the 3rd I framing bit is set to 10, then the number of the sample between second I frame and the 3rd I frame is 5, is set to benchmark with second I framing bit, moov atom and continuous print 5 sample is combined.By that analogy, until complete the combination of sample and the moov atom split in rear all mdat atoms.
Because mdat atom is made up of multiple sample, according to the positional information of I frame, the moov atom of acquisition and each sample comprised from mdat atom after splitting into are combined, the expression of this combination can be:
m o o v + Σ k = 1 X Σ t = 0 T s a m p l e ( k ) ( t )
This formula represents that moov atom and different sample combine, wherein, moov represents moov atom, k is a kth I frame, T is the number of sample between two I frames, sample (k) (t) represents the number of the kth T that I frame is a corresponding sample, combines successively by moov atom with the sample of corresponding number, and t is the natural number being incremented to T from 1.The number from mdat atom that X obtains after representing fractionation, can calculate according to above-mentioned formula X=M/N, wherein, M represents the sum of the sample in MP4 video source, and N represents the sum of I frame in MP4 video source.
To sum up can obtain:
m d a t ( k ) = m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t )
Mdat atom after restructuring in MP4 video source is:
m d a t = Σ k = 1 X m d a t ( k )
Then by identifying setting unit 330 according to the coding/decoding information of first I frame, reconfigure and become the mark of crucial bit-identify as the MP4 video source after restructuring, recombinate by the combination of above-mentioned header header file from the moov atom obtained and different sample, the large I of header header file is set to 4bytes.Be illustrated in figure 6 the structure of the MP4 video source after being reconstructed again after mdat atom is split, wherein, header represents the crucial bit-identify of the rear MP4 video source of restructuring, chunk is the sub-atom information in mdat atom, the sub-atom of chunk is made up of multiple sample, chunk-1 represents first sub-atom of chunk, and the rest may be inferred, and chunk-n represents the sub-atom of the n-th chunk; Sam (1) represents first sample, the rest may be inferred, sam (n) represents the n-th sample, the sample comprised in obtain first mdat atom after mdat (1) represents moov atom and splits carries out combining and obtaining, the rest may be inferred, and the sample that the kth obtained after mdat (k) represents moov atom and splits comprises from mdat atom carries out combining and obtaining.
Further, as shown in figure 11, based on above-described embodiment, propose the second embodiment of the conveyer of MP4 video source of the present invention, in this embodiment, the conveyer of above-mentioned MP4 video source also comprises:
Module 500 is set, for the transmission size of the MP4 video source after restructuring being set to the MTU size of communication interface.
In order to solve in the transport process of traditional MP4 video source, the document backup size of MP4 video source is unfixed transmission, when unstable networks or web download break down, will obliterated data information, thus make to cause in transport process that the atom information in MP4 video source cannot be resolved and playback error obtains problem.In the present embodiment, arrange the size that the transmission size of the MP4 video source after restructuring is set to the MTU relevant with communication interface by module 500, the large I of this MTU is set to 1MTU (MaximumTransmissionUnit).So not only can prevent the interference of communication interface in transmitting procedure, and solve the phenomenon that packet loss appears in Internet video MP4 video source, improve the fault-tolerance of the media file of MP4 video source, be more conducive to the broadcasting carrying out Internet video.
These are only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (10)

1. a transfer approach for MP4 video source, is characterized in that, the transfer approach of described MP4 video source comprises the following steps:
Obtain the MP4 video source in Internet Transmission stream, and the moov atom extracted respectively in described MP4 video source and mdat atom;
Described mdat atom being carried out fractionation obtains multiple from mdat atom;
By described moov atom, to obtain multiple combination right with carrying out combination from mdat atom described in each respectively, and described multiple combination is obtained new MP4 video source to combination;
Described new MP4 video source is transmitted.
2. the transfer approach of MP4 video source as claimed in claim 1, is characterized in that, describedly described mdat atom is carried out fractionation and obtains multiplely comprising from mdat atom:
Obtain the position of all I frames in described mdat atom;
Using the diverse location of described I frame as fractionation point, fractionation is carried out to described mdat atom and obtains multiple from mdat atom.
3. the transfer approach of MP4 video source as claimed in claim 2, it is characterized in that, described mdat atom comprises multiple sample, described by described moov atom, to obtain multiple combination right with carrying out combination from mdat atom described in each respectively, and described multiple combination is obtained new MP4 video source to combination comprise:
Obtain the number of each sample from mdat atom after splitting;
With the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between described moov atom and described first I frame and second I frame is combined, continue with the position of described second I frame as benchmark, the sample of corresponding number between described moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of described moov atom and all sample;
Coding/decoding information according to described first I frame arranges crucial bit-identify, using the mark as described new MP4 video source.
4. the transfer approach of MP4 video source as claimed in claim 3, it is characterized in that, described moov atom and different sample carry out composite type and are expressed as:
m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t ) ;
Wherein, moov represents a moov atom, k represents a kth I frame, T is the number of sample between two I frames, sample (k) (t) represents the number of the kth T that I frame is a corresponding sample, t is the natural number being incremented to T from 1, the number from mdat atom that X obtains after representing fractionation;
X=M/N;
Wherein, M represents the sum of the sample in MP4 video source, and N represents the sum of I frame in MP4 video source.
5. the transfer approach of MP4 video source as claimed in claim 1, is characterized in that, described described new MP4 video source is transmitted before comprise:
The transmission size of described new MP4 video source is set to the MTU size of communication interface.
6. a conveyer for MP4 video source, is characterized in that, the conveyer of described MP4 video source comprises:
Information extraction modules, for obtaining the MP4 video source in Internet Transmission stream, and the moov atom extracted respectively in described MP4 video source and mdat atom;
Splitting module, obtaining multiple from mdat atom for described mdat atom being carried out fractionation;
Recombination module, for obtain multiple combination right with carrying out combination from mdat atom described in each respectively by described moov atom, and obtains new MP4 video source by described multiple combination to combination;
Delivery module, for transmitting described new MP4 video source.
7. the conveyer of MP4 video source as claimed in claim 6, it is characterized in that, described fractionation module comprises:
Position acquisition unit, for obtaining the position of all I frames in described mdat atom;
Split cells, for using the diverse location of described I frame as fractionation point, fractionation is carried out to described mdat atom and obtains multiple from mdat atom.
8. the conveyer of MP4 video source as claimed in claim 7, it is characterized in that, described mdat atom comprises multiple sample, and described recombination module comprises:
Number acquiring unit, for obtaining the number splitting rear each sample from mdat atom;
Assembled unit, for with the position of the I frame of first in MP4 video source for benchmark, the sample of corresponding number between described moov atom and described first I frame and second I frame is combined, continue with the position of described second I frame as benchmark, the sample of corresponding number between described moov atom and described second I frame and the 3rd I frame is combined, until complete the combination of described moov atom and all sample;
Mark setting unit, for arranging crucial bit-identify according to the coding/decoding information of described first I frame, using the mark as the MP4 video source after restructuring.
9. the conveyer of MP4 video source as claimed in claim 8, it is characterized in that, described moov atom and different sample carry out composite type and are expressed as:
m o o v + Σ k = 1 X Σ t = 1 T s a m p l e ( k ) ( t ) ;
Wherein, moov represents a moov atom, k represents a kth I frame, T is the number of sample between two I frames, sample (k) (t) represents the number of the kth T that I frame is a corresponding sample, t is the natural number being incremented to T from 1, the number from mdat atom that X obtains after representing fractionation;
X=M/N;
Wherein, M represents the sum of the sample in MP4 video source, and N represents the sum of I frame in MP4 video source.
10. the conveyer of MP4 video source as claimed in claim 6, it is characterized in that, the conveyer of described MP4 video source also comprises:
Module is set, for the transmission size of the MP4 video source after restructuring being set to the MTU size of communication interface.
CN201510782746.7A 2015-11-16 2015-11-16 The transfer approach and device of MP4 video sources Active CN105451073B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510782746.7A CN105451073B (en) 2015-11-16 2015-11-16 The transfer approach and device of MP4 video sources
PCT/CN2016/084811 WO2017084310A1 (en) 2015-11-16 2016-06-03 Method and device for transmitting mp4 video source

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510782746.7A CN105451073B (en) 2015-11-16 2015-11-16 The transfer approach and device of MP4 video sources

Publications (2)

Publication Number Publication Date
CN105451073A true CN105451073A (en) 2016-03-30
CN105451073B CN105451073B (en) 2018-11-02

Family

ID=55560788

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510782746.7A Active CN105451073B (en) 2015-11-16 2015-11-16 The transfer approach and device of MP4 video sources

Country Status (2)

Country Link
CN (1) CN105451073B (en)
WO (1) WO2017084310A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017084310A1 (en) * 2015-11-16 2017-05-26 深圳Tcl数字技术有限公司 Method and device for transmitting mp4 video source
CN109936715A (en) * 2017-12-19 2019-06-25 华为技术有限公司 A kind of processing method and its relevant device of MP4 file
CN110740391A (en) * 2019-10-31 2020-01-31 四川效率源信息安全技术股份有限公司 method for repairing MP4 damaged files

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1515115A (en) * 2002-06-26 2004-07-21 松下电器产业株式会社 Multiplexing device and demultiplexing device
WO2006079368A1 (en) * 2005-01-25 2006-08-03 Nero Ag Method for preparing dvd-video formatted data, method for reconstructing dvd-video data and dvd-video data structure
CN101427571A (en) * 2002-12-04 2009-05-06 国际商业机器公司 Efficient means for creating mpeg-4 textual representation from mpeg-4 intermedia format
CN102123281A (en) * 2011-01-07 2011-07-13 中兴通讯股份有限公司 Fast forward and fast backward treatment method and device during video playing and mobile terminal
CN103069812A (en) * 2010-06-09 2013-04-24 三星电子株式会社 Method for providing fragment-based multimedia streaming service and device for same, and method for receiving fragment-based multimedia streaming service and device for same
CN103262556A (en) * 2010-11-02 2013-08-21 Lg电子株式会社 Method for transreceiving media content and device for transreceiving using same
WO2015107784A1 (en) * 2014-01-17 2015-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 number Priority date Publication date Assignee Title
JP4380533B2 (en) * 2004-12-24 2009-12-09 キヤノン株式会社 Multimedia data processing apparatus and method
KR101295377B1 (en) * 2007-03-07 2013-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-30 2010-07-08 삼성전자주식회사 Terminal and method for transmitting file
US9674027B2 (en) * 2010-04-19 2017-06-06 Lg Electronics Inc. Method for transmitting/receiving internet-based content and transmitter/receiver using same
KR101316579B1 (en) * 2012-01-17 2013-10-18 (주)피타소프트 Mp4 file configuring device and restoring device, mp4 file configuring method and restoring method
CN105451073B (en) * 2015-11-16 2018-11-02 深圳Tcl数字技术有限公司 The transfer approach and device of MP4 video sources

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1515115A (en) * 2002-06-26 2004-07-21 松下电器产业株式会社 Multiplexing device and demultiplexing device
CN101427571A (en) * 2002-12-04 2009-05-06 国际商业机器公司 Efficient means for creating mpeg-4 textual representation from mpeg-4 intermedia format
WO2006079368A1 (en) * 2005-01-25 2006-08-03 Nero Ag Method for preparing dvd-video formatted data, method for reconstructing dvd-video data and dvd-video data structure
CN103069812A (en) * 2010-06-09 2013-04-24 三星电子株式会社 Method for providing fragment-based multimedia streaming service and device for same, and method for receiving fragment-based multimedia streaming service and device for same
CN103262556A (en) * 2010-11-02 2013-08-21 Lg电子株式会社 Method for transreceiving media content and device for transreceiving using same
CN102123281A (en) * 2011-01-07 2011-07-13 中兴通讯股份有限公司 Fast forward and fast backward treatment method and device during video playing and mobile terminal
WO2015107784A1 (en) * 2014-01-17 2015-07-23 ソニー株式会社 Communication apparatus, communication data generation method, and communication data processing method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017084310A1 (en) * 2015-11-16 2017-05-26 深圳Tcl数字技术有限公司 Method and device for transmitting mp4 video source
CN109936715A (en) * 2017-12-19 2019-06-25 华为技术有限公司 A kind of processing method and its relevant device of MP4 file
WO2019120048A1 (en) * 2017-12-19 2019-06-27 华为技术有限公司 Mp4 file processing method and related device therefor
EP3713243A4 (en) * 2017-12-19 2020-09-23 Huawei Technologies Co., Ltd. Mp4 file processing method and related device therefor
US11100956B2 (en) 2017-12-19 2021-08-24 Huawei Technologies Co., Ltd. MP4 file processing method and related device
CN109936715B (en) * 2017-12-19 2021-09-03 华为技术有限公司 MP4 file processing method and related equipment thereof
CN110740391A (en) * 2019-10-31 2020-01-31 四川效率源信息安全技术股份有限公司 method for repairing MP4 damaged files
CN110740391B (en) * 2019-10-31 2021-10-26 四川效率源信息安全技术股份有限公司 Method for repairing MP4 damaged file

Also Published As

Publication number Publication date
WO2017084310A1 (en) 2017-05-26
CN105451073B (en) 2018-11-02

Similar Documents

Publication Publication Date Title
CN103957469B (en) Based on the Internet video-on-demand method and system for turning encapsulation in real time
CN105594219B (en) Transmitting/reception processing device and method for broadcast singal
CN106031181A (en) Broadcast signal transmitting apparatus, broadcast signal receiving apparatus, broadcast signal transmitting method and broadcast signal receiving method
CN106233692B (en) Broadcast singal sending device, broadcast receiver, broadcast singal sending method and broadcast signal received method
CN101635848B (en) Method and device for editing video file
KR102014800B1 (en) A broadcast signal transmitting device, a broadcast signal receiving device, a broadcast signal transmitting method, and a broadcast signal receiving method
CN106105240B (en) The method for sending the device of broadcast singal and sending broadcast singal
CN104378234B (en) Across the data transmission processing method and system of data center
CN106233693A (en) Broadcast singal sends equipment, broadcasting signal receiving, broadcast singal sending method and broadcast signal received method
CN107113462A (en) Sending method, method of reseptance, dispensing device and reception device
CN105681827B (en) Poster generation method, system and the relevant apparatus of direct broadcast band
CN105814822A (en) Apparatus for transmitting broadcast signal, apparatus for receiving broadcast signal, method for transmitting broadcast signal and method for receiving broadcast signal
CN105934953B (en) Broadcast singal sending device, broadcasting signal receiving, broadcast singal sending method and broadcast signal received method
CN105828096B (en) Method and device for processing media stream file
CN104602105B (en) The player method and user equipment of video file
CN102882703A (en) Hyper text transfer protocol (HTTP)-analysis-based uniform resource locator (URL) automatically classifying and grading system and method
CN105812850A (en) Video file playing method and system thereof
CN105900359A (en) Broadcast signal transmission apparatus, broadcast signal reception apparatus, broadcast signal transmission method, and broadcast signal reception method
CN103648011B (en) A kind of audio-visual synchronization apparatus and method based on HLS protocol
CN106464834A (en) Broadcasting signal transmission device, broadcasting signal reception device, broadcasting signal transmission method, and broadcasting signal reception method
CN105451073A (en) MP4 video source transmission method and apparatus
CN107431830A (en) Broadcast singal sends equipment, broadcasting signal receiving, broadcast singal sending method and broadcast signal received method
CN106464944A (en) Broadcast signal transmission apparatus, broadcast signal reception apparatus, broadcast signal transmission method, and broadcast signal reception method
CN106134158A (en) Broadcast singal transmission equipment, broadcasting signal receiving, broadcast signal transmission method and broadcast signal received method
CN105409235A (en) File generation device and method, and content reproduction device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant