CN106055643A - Continuous writing method for writing interrupt of MXF files - Google Patents
Continuous writing method for writing interrupt of MXF files Download PDFInfo
- Publication number
- CN106055643A CN106055643A CN201610376221.8A CN201610376221A CN106055643A CN 106055643 A CN106055643 A CN 106055643A CN 201610376221 A CN201610376221 A CN 201610376221A CN 106055643 A CN106055643 A CN 106055643A
- Authority
- CN
- China
- Prior art keywords
- file
- mxf file
- mxf
- write
- audio
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Television Signal Processing For Recording (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention discloses a continuous writing method for write-in interrupt of MXF files. The continuous writing method comprises the following steps: judging whether an MXF file is complete or not; if the MXF file is incomplete, judging whether head metadata of the MXF file is finished or not; if the head metadata is not finished, rewriting the head metadata; obtaining frame number of written audio/video data; writing in new audio/video data; writing a file tail package; judging whether a complete index table segment and a random index package are written or not according to the format of the MXF file; and rewriting items, the time length parameters of which need to be rewritten, in the head metadata. According to the continuous writing method disclosed in the invention, the incomplete MXF files are processed; and compared with the rewriting operation of the incomplete MXF files, the continuous writing method has the effects of greatly shortening the processing time and decreasing the workload.
Description
Technical field
The present invention relates to MXF file and continue technical field, particularly relate to the side of continuing that the write of a kind of MXF file is interrupted
Method.
Background technology
MXF can process audio frequency and video and the database file of a plurality of track of packing simultaneously, so a complete MXF material
Content is more, and file is bigger.During the generation of MXF file, if running into power-off or other situations, in file write
Having no progeny, prior art is all from the beginning to re-write MXF file, the shortcoming that so certainly will have the following aspects:
(1) when rewriteeing MXF file, it is necessary first to re-write Header Metadata(head metadata), head metadata bag
The overall content of description main body and the structure of the metadata group of single program fragment are contained, it is desirable to have the MXF document knowledge of specialty
Background could write correctly, it is therefore desirable to puts into great effort and just can complete;
(2) if needing the MXF file generated very big, write there may come a time when that major part write by file, if at this moment when interrupting
Start anew write again, will certainly waste time and energy,;And, file has been written to interrupt close to during afterbody, at this moment only need to write again
Fraction audio, video data, then writes FPP(tail of file bag according still further to MXF standard) and RIP(random index bag), Ji Nengcheng
It is a complete material being available for exchange of media, if it is identical complete nearly equivalent to having write one again to rewrite this class file
File, this is completely unnecessary;
(3) if rewriteeing MXF file, owing to the description information needed for the difference of different file coding format is different, if being ignorant of solving
The people of code information needed is when writing video/audio and describing information, it is possible to the unclear characterising parameter that have to write, weight
Mistake it is likely to result in when writing.
Summary of the invention
It is an object of the invention to overcome the deficiencies in the prior art, it is provided that what the write of a kind of MXF file was interrupted continues method,
By the method continued, imperfect MXF file is processed, the rewrite operation of phase comparison imperfect MXF file, be greatly shortened
Process time, decrease workload.
It is an object of the invention to be achieved through the following technical solutions: the method for continuing that the write of MXF file is interrupted, bag
Include: judge that MXF file is the most complete;If described MXF file is imperfect, then whether judge the head metadata of described MXF file
Complete, if described head metadata is not fully complete, then rewrite described head metadata;Obtain written into the frame of audio, video data
Number;Write new audio, video data;Write tail of file bag.
Described method of continuing also includes, it is judged that the form of MXF file: if described MXF file is the first form, then judge institute
State MXF tail of file the need of writing complete index table segment and random index bag;If described MXF file is the second form,
Then judge that described MXF tail of file is the need of writing complete index table segment.
Described method of continuing also includes: rewrite the item needing to rewrite duration parameters in head metadata.
Judge that the method that MXF file is the most complete is: if described MXF file is the first form, then read described MXF file
The data at end be analyzed, it is judged that whether described MXF file exists random index bag, if described MXF file exists random
Index bag, then it is assumed that described MXF file is complete, otherwise it is assumed that described MXF file is imperfect;If described MXF file is the second lattice
Formula, then resolve the duration of video/audio frame in the side-play amount of afterbody bag in head metadata and metadata, if described afterbody bag
It is all 0 with the duration of video/audio frame, then it is assumed that described MXF file is imperfect, otherwise it is assumed that described MXF file is complete.
If described head metadata completes, then record head metadata needs to rewrite the item of duration parameters hereof
Side-play amount.
Described head metadata need the item rewriting duration parameters include video and audio sequence and actual source material.
Obtain written into the mode of frame number of audio, video data be: judge the form of MXF file: if MXF file is the
One form, then find last file body bag comprising complete index table segment in MXF file, by resolving described file body bag
Obtain written into the frame number of audio, video data;If MXF file is the second form, then by the file body bag of described MXF file
In written into audio, video data length divided by the length of every frame audio, video data obtain written into the frame of audio, video data
Number.
The method writing new audio, video data is: judge the form of MXF file: if MXF file is the first form, then continue
Continue into audio, video data, and fill new index table segment, the index information of video-audio frequency data;If MXF file is second
Form, then continue to write to audio, video data, and record the frame number of write audio, video data.
Described first form is Op1a form or Op1b form, and described second form is Op atom form.
The invention has the beneficial effects as follows:
(1) workload of imperfect MXF file write is reduced: when incomplete MXF file is continued, it is not necessary to re-write head
Metadata, and the part audio, video data having been written into avoids the need for rewriteeing one time again, it is possible to greatly reduce workload;
(2) shorten the time of imperfect MXF file write: written into audio, video data need not re-write, save big
Amount time, especially file write-in block for the first time interrupts close to the when of afterbody, continues this class file and compares this class file of rewriting,
Advantage is more apparent from;
(3) operability of the write of incomplete MXF file is improved: because decreasing re-writing of head metadata, right
Need to write video presentation information and the MXF file of audio description information in afterbody, it is only necessary to resolve the head in MXF top of file
Portion's metadata information, replicates and writes.
Accompanying drawing explanation
Fig. 1 is the flow chart of the method for continuing that the write of MXF file is interrupted in the present invention.
Detailed description of the invention
Technical scheme is described in further detail below in conjunction with the accompanying drawings, but protection scope of the present invention is not limited to
The following stated.
As it is shown in figure 1, the write of MXF file interrupt continue method, tie by resolving the physical arrangement of MXF file and logic
Structure, analyzes the type of imperfect MXF file, then continues different types of file according to its structure, it is possible to significantly
Save file and supplement the complete time, and operation is simple and feasible, has wide applicability.Described method of continuing includes following
Step:
Step one, judge that MXF file is the most complete.
Judge that the method that MXF file is the most complete is: if described MXF file is Op1a form or Op1b form, then read
The data at the end of described MXF file are analyzed, it is judged that whether described MXF file exists random index bag, if described MXF is civilian
There is random index bag in part, then it is assumed that described MXF file is complete, otherwise it is assumed that described MXF file is imperfect;If described MXF is civilian
Part is Op atom form, then resolve the duration of video/audio frame in the side-play amount of afterbody bag in head metadata and metadata,
If described afterbody bag and video/audio frame time the most a length of 0, then it is assumed that described MXF file is imperfect, otherwise it is assumed that described MXF
File is complete.
If step 2 described MXF file is imperfect, then judge whether the head metadata of described MXF file completes, if institute
State head metadata to be not fully complete, then rewrite described head metadata;If described head metadata completes, then record head metadata
The middle item side-play amount hereof needing to rewrite duration parameters.Need to rewrite the item of duration parameters hereof by record
Side-play amount, when facilitating follow-up rewriting duration, directly navigates to need the document location of rewrite data, nothing according to the side-play amount of record
Need to again resolve head metadata, save the time.
If described MXF file is complete, then illustrate that described MXF file is without continuing.
Described head metadata need the item rewriting duration parameters include video/audio and actual source material.
Step 3, obtain written into the frame number of audio, video data.Obtain written into the side of frame number of audio, video data
Formula is: judge the form of MXF file: if MXF file is Op1a form or Op1b form, then find last in MXF file
Comprise the complete file body bag indexing table segment, by resolve described file body bag obtain written into the frame number of audio, video data;
If MXF file is Op atom form, then by the file body bag of described MXF file written into the length of audio, video data
Divided by the length of every frame audio, video data obtain written into the frame number of audio, video data.
Step 4, write new audio, video data.The method writing new audio, video data is: judge the lattice of MXF file
Formula: if MXF file is Op1a form or Op1b form, then continue to write to audio, video data, and fill new index table segment, record
The index information of audio, video data;If MXF file is Op atom form, then continues to write to audio, video data, and record write sound
The frame number of video data.
Step 5, write tail of file bag.
Described method of continuing also includes, it is judged that the form of MXF file: if described MXF file is Op1a form or Op1b lattice
Formula, then judge whether to need to write complete index table segment and random index bag, for needs write complete index table segment and with
The MXF file of machine index bag, then be indexed table segment and the write of random index bag;If described MXF file is Op atom lattice
Formula, then judge whether described MXF tail of file writes complete index table segment, completely indexes table segment if not writing, then carry out rope
Draw the write of table segment.
Described method of continuing also includes: rewrite the item needing to rewrite duration parameters in head metadata, by resolving above
The video and audio sequence and the actual source material side-play amount hereof that obtain position, and rewrite video and audio sequence and actual source element
Time advantage in material.
The present invention can simply, quickly realize the process to imperfect MXF file, and the MXF file after process can be just
Really play and transmission.By the method continued, imperfect MXF file is processed, the rewriting of phase comparison imperfect MXF file
Operation, substantially reduces the process time, decreases workload.
The above is only the preferred embodiment of the present invention, it should be understood that the present invention is not limited to described herein
Form, is not to be taken as the eliminating to other embodiments, and can be used for other combinations various, amendment and environment, and can be at this
In the described contemplated scope of literary composition, it is modified by above-mentioned teaching or the technology of association area or knowledge.And those skilled in the art are entered
The change of row and change, the most all should be at the protection domains of claims of the present invention without departing from the spirit and scope of the present invention
In.
Claims (9)
- What the write of 1.MXF file was interrupted continues method, it is characterised in that: including:Judge that MXF file is the most complete;If described MXF file is imperfect, then judge whether the head metadata of described MXF file completes, if described head unit number According to being not fully complete, then rewrite described head metadata;Obtain written into the frame number of audio, video data;Write new audio, video data;Write tail of file bag.
- What MXF file the most according to claim 1 write was interrupted continues method, it is characterised in that continue method described in: also Including, it is judged that the form of MXF file:If described MXF file is the first form, then judge described MXF tail of file the need of the complete index table segment of write and Random index bag;If described MXF file is the second form, then judge that described MXF tail of file is the need of writing complete index table segment.
- What MXF file the most according to claim 1 write was interrupted continues method, it is characterised in that continue method described in: also Including: rewrite the item needing to rewrite duration parameters in head metadata.
- What MXF file the most according to claim 1 write was interrupted continues method, it is characterised in that: whether judge MXF file Complete method is:If described MXF file is the first form, then the data at the end reading described MXF file are analyzed, it is judged that described MXF Whether file exists random index bag, if described MXF file exists random index bag, then it is assumed that described MXF file is complete, otherwise Think that described MXF file is imperfect;If described MXF file is the second form, then resolve video and audio in the side-play amount of afterbody bag in head metadata and metadata The duration of Frame, if the duration of described afterbody bag and video/audio frame is all 0, then it is assumed that described MXF file is imperfect, no Then think that described MXF file is complete.
- What MXF file the most according to claim 1 write was interrupted continues method, it is characterised in that: if described head unit number According to completing, then record head metadata needs to rewrite the item side-play amount hereof of duration parameters.
- 6. continue method according to what the MXF file write described in claim 3 or 5 was interrupted, it is characterised in that: described head unit number Video and audio sequence and actual source material is included according to the middle item needing to rewrite duration parameters.
- MXF file the most according to claim 1 write interrupt continue method, it is characterised in that: obtain written into sound The mode of the frame number of video data is:Judge the form of MXF file:If MXF file is the first form, then find last file body bag comprising complete index table segment in MXF file, logical Cross resolve described file body bag obtain written into the frame number of audio, video data;If MXF file is the second form, then by the file body bag of described MXF file written into the length of audio, video data Divided by the length of every frame audio, video data obtain written into the frame number of audio, video data.
- What MXF file the most according to claim 1 write was interrupted continues method, it is characterised in that: write new audio frequency and video The method of data is:Judge the form of MXF file:If MXF file is the first form, then continues to write to audio, video data, and fill new index table segment, record audio frequency and video number According to index information;If MXF file is the second form, then continues to write to audio, video data, and record the frame number of write audio, video data.
- 9. write according to the MXF file described in claim 2 or 4 or 7 or 8 interrupt continue method, it is characterised in that: described the One form is Op1a form or Op1b form, and described second form is Op atom form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610376221.8A CN106055643B (en) | 2016-05-31 | 2016-05-31 | continuous writing method for MXF file writing interruption |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610376221.8A CN106055643B (en) | 2016-05-31 | 2016-05-31 | continuous writing method for MXF file writing interruption |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106055643A true CN106055643A (en) | 2016-10-26 |
CN106055643B CN106055643B (en) | 2019-12-13 |
Family
ID=57171762
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610376221.8A Active CN106055643B (en) | 2016-05-31 | 2016-05-31 | continuous writing method for MXF file writing interruption |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106055643B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107506309A (en) * | 2017-06-30 | 2017-12-22 | 深圳市硅格半导体股份有限公司 | Terminal and data write-in method for flash memory and computer-readable recording medium |
CN109495752A (en) * | 2018-11-07 | 2019-03-19 | 成都索贝数码科技股份有限公司 | A method of MXF file is combined into based on object storage fragment transcoding/synthesis sudden strain of a muscle |
CN110996172A (en) * | 2019-12-17 | 2020-04-10 | 杭州当虹科技股份有限公司 | Method for quickly synthesizing 4K MXF file |
CN114374875A (en) * | 2021-12-31 | 2022-04-19 | 浙江大华技术股份有限公司 | MP4 file recording method and device and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002021845A1 (en) * | 2000-09-06 | 2002-03-14 | Sony United Kingdom Limited | Combining video material and data |
CN101169795A (en) * | 2006-10-24 | 2008-04-30 | 索尼英国有限公司 | Information processing apparatus, information processing method, program and program recording medium |
CN102801754A (en) * | 2011-05-24 | 2012-11-28 | 英业达集团(天津)电子技术有限公司 | Method and system for breakpoint transmission |
CN103701907A (en) * | 2013-12-27 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Processing method and system for continuing to transmit data in server |
-
2016
- 2016-05-31 CN CN201610376221.8A patent/CN106055643B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002021845A1 (en) * | 2000-09-06 | 2002-03-14 | Sony United Kingdom Limited | Combining video material and data |
CN101169795A (en) * | 2006-10-24 | 2008-04-30 | 索尼英国有限公司 | Information processing apparatus, information processing method, program and program recording medium |
CN102801754A (en) * | 2011-05-24 | 2012-11-28 | 英业达集团(天津)电子技术有限公司 | Method and system for breakpoint transmission |
CN103701907A (en) * | 2013-12-27 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Processing method and system for continuing to transmit data in server |
Non-Patent Citations (1)
Title |
---|
黄钰,李建国,黄元: "MXF格式浅析", 《视听界(广播电视技术)》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107506309A (en) * | 2017-06-30 | 2017-12-22 | 深圳市硅格半导体股份有限公司 | Terminal and data write-in method for flash memory and computer-readable recording medium |
CN107506309B (en) * | 2017-06-30 | 2020-05-19 | 深圳市硅格半导体有限公司 | Terminal, flash memory data writing method and computer readable storage medium |
CN109495752A (en) * | 2018-11-07 | 2019-03-19 | 成都索贝数码科技股份有限公司 | A method of MXF file is combined into based on object storage fragment transcoding/synthesis sudden strain of a muscle |
CN110996172A (en) * | 2019-12-17 | 2020-04-10 | 杭州当虹科技股份有限公司 | Method for quickly synthesizing 4K MXF file |
CN110996172B (en) * | 2019-12-17 | 2022-01-11 | 杭州当虹科技股份有限公司 | Method for quickly synthesizing 4K MXF file |
CN114374875A (en) * | 2021-12-31 | 2022-04-19 | 浙江大华技术股份有限公司 | MP4 file recording method and device and readable storage medium |
CN114374875B (en) * | 2021-12-31 | 2024-05-28 | 浙江大华技术股份有限公司 | MP4 file recording method, device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106055643B (en) | 2019-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055643A (en) | Continuous writing method for writing interrupt of MXF files | |
CN103440201B (en) | Dynamically stain analytical equipment and the application in file format resolving inversely thereof | |
US10061693B2 (en) | Method of generating secondary index and apparatus for storing secondary index | |
CN103713972B (en) | A kind of incremental backup system and method | |
CN104537037A (en) | Method and device for processing database logs | |
CN103077241A (en) | Method for loading data in parallel after splitting files | |
CN104699714A (en) | Method and device for transferring files of book edition format into files of EPUB format | |
WO2023277819A3 (en) | Data processing method, system, device, computer program product, and storage function | |
CN105302488A (en) | Data writing method and system for storage system | |
CN106021565A (en) | Method for continuing writing MXF files in Op1a format and Op1b format | |
CN101859301A (en) | Method for recording electronic book reading stop position automatically | |
CN103294658B (en) | A kind of document storage method and device | |
CN107797883A (en) | A kind of backup of memory database, restoration methods and device | |
CN104866388A (en) | Data processing method and device | |
CN109511008A (en) | A method of it is stored based on object and supports that video and audio file content is additional | |
CN117874002A (en) | Method and system for heterogeneous data migration | |
CN105653466A (en) | Data storage device and flash memory control method | |
CN110798730A (en) | MP4 file recording and repairing method | |
CN111610936A (en) | Object storage platform, object aggregation method and device and server | |
CN103440193A (en) | Method for quickly recording selected information | |
CN106020733A (en) | Method for continuing writing MXF file in Op atom format | |
CN103210389B (en) | A kind for the treatment of method and apparatus of metadata | |
CN108256003A (en) | A kind of method that union operation efficiencies are improved according to analysis Data duplication rate | |
CN110750375B (en) | Embedded equipment and abnormal information processing method thereof | |
CN104063252B (en) | Program burn writing with watchdog circuit and read-back approach based on dsp chip |
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 |