CN106020733B - Continuous writing method of MXF file in Op atom format - Google Patents
Continuous writing method of MXF file in Op atom format Download PDFInfo
- Publication number
- CN106020733B CN106020733B CN201610376220.3A CN201610376220A CN106020733B CN 106020733 B CN106020733 B CN 106020733B CN 201610376220 A CN201610376220 A CN 201610376220A CN 106020733 B CN106020733 B CN 106020733B
- Authority
- CN
- China
- Prior art keywords
- file
- mxf
- audio
- mxf file
- complete
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Security & Cryptography (AREA)
- Television Signal Processing For Recording (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention discloses a method for continuously writing MXF files in Op atom format, which comprises the following steps: judging whether the MXF file is complete or not; if the MXF file is not complete, judging whether the header metadata of the MXF file is complete, and if the header metadata is not complete, rewriting the header metadata; acquiring the frame number of the written audio and video data by dividing the length of the written audio and video data in the file body package of the MXF file by the length of each frame of the audio and video data; continuously writing audio and video data, and recording the frame number of the written audio and video data; and writing the tail packet of the file. The incomplete MXF files are processed by the method of continuous writing, so that the processing time is greatly shortened and the workload is reduced compared with the rewriting operation of the incomplete MXF files.
Description
Technical Field
the invention relates to the technical field of MXF file continuous writing, in particular to an Op atom format MXF file continuous writing method.
Background
The MXF can process and pack audio and video of a plurality of tracks and database files at the same time, so that a complete MXF material content is more, and the file is larger. In the generation process of the MXF file, if the power failure or other conditions are met and the writing of the file is interrupted, the MXF file is rewritten from the beginning in the prior art, so that the defects in the following aspects are caused:
(1) When the MXF file is rewritten, firstly, the Header Metadata (Header Metadata) is rewritten, the Header Metadata contains the structure of the Metadata group describing the overall content of the main body and the single program segment, and the correct writing can be performed only by having a professional MXF file knowledge background, so that the writing can be completed by investing a great deal of energy;
(2) If the MXF file to be generated is very large, most of the file may be written in some cases when the writing is interrupted, and if the writing is started from the head, time and labor are wasted; moreover, the file is interrupted when being written to the tail part, only a small part of audio and video data needs to be written, then FPP (file tail package) and RIP (random index package) are written according to MXF standard, and a complete material for media exchange can be formed, and if the file is rewritten, the same complete file is rewritten, which is completely unnecessary;
(3) if the MXF file is rewritten, because the description information required for the difference between the encoding formats of different files is different, if a person who does not know the information required for decoding writes the description information of the audio/video data, the description parameters that have to be written may not be clear, and an error may be caused during rewriting.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provide the method for continuously writing the MXF files in the Op atom format, and compared with the rewriting operation of the incomplete MXF files, the method for continuously writing the incomplete MXF files has the advantages that the processing time is greatly shortened, and the workload is reduced.
the purpose of the invention is realized by the following technical scheme: the method for continuously writing the MXF file in the Op atom format comprises the following steps: judging whether the MXF file is complete or not; if the MXF file is not complete, judging whether the header metadata of the MXF file is complete, and if the header metadata is not complete, rewriting the header metadata; acquiring the frame number of the written audio and video data by dividing the length of the written audio and video data in the file body package of the MXF file by the length of each frame of the audio and video data; continuously writing audio and video data, and recording the frame number of the written audio and video data; and writing the tail packet of the file.
The write-resuming method further comprises the following steps: rewriting the item of the header metadata that requires rewriting of the time length parameter.
The method for judging whether the MXF file is complete comprises the following steps: and analyzing the offset of a tail packet in the head metadata and the time length of a video and audio data frame in the metadata, if the time lengths of the tail packet and the video and audio data frame are both 0, determining that the MXF file is incomplete, otherwise, determining that the MXF file is complete.
And if the header metadata is finished, recording the offset of the item needing to rewrite the time length parameter in the header metadata in the file.
The items in the header metadata that need to be rewritten with the duration parameter include video and audio sequences and actual source material.
the write-resuming method further comprises the following steps: and judging whether the tail part of the MXF file is written into a complete index table segment or not, and if not, writing the index table segment.
the invention has the beneficial effects that:
(1) reducing the workload of incomplete MXF file writing: when the incomplete MXF file is continuously written, the head metadata does not need to be rewritten, and the written part of audio-video data does not need to be rewritten again, so that the workload can be greatly reduced;
(2) Shortening the writing time of incomplete MXF files: the written audio and video data does not need to be written again, so that a large amount of time is saved, and especially when the first writing block of the file is close to the tail part, the interruption is caused, and compared with rewriting the file, the advantages of continuously writing the file are more obvious;
(3) Improving the operability of writing incomplete MXF files: because the rewriting of the head metadata is reduced, for the MXF file of which the tail part needs to be written with the video description information and the audio description information, only the head metadata information in the MXF file head needs to be parsed, and the MXF file is copied and written.
Drawings
Fig. 1 is a flowchart of a method for writing MXF files in Op atom format according to the present invention.
Detailed Description
the technical solutions of the present invention are further described in detail below with reference to the accompanying drawings, but the scope of the present invention is not limited to the following.
as shown in fig. 1, the MXF file continuous writing method in the Op atom format is based on the MXF standard packaging manner, and can greatly save the time for completely supplementing the file by analyzing the physical structure and the logical structure of the MXF file, and the operation is simple and feasible, and has wide applicability. The continuous writing method comprises the following steps:
Step one, judging whether the MXF file is complete: and analyzing the offset of a tail packet in the head metadata and the time length of a video and audio data frame in the metadata, if the time lengths of the tail packet and the video and audio data frame are both 0, determining that the MXF file is incomplete, otherwise, determining that the MXF file is complete.
Step two, if the MXF file is incomplete, judging whether the header metadata of the MXF file is completed, and if the header metadata is not completed, rewriting the header metadata; and if the header metadata is finished, recording the offset of the item needing to rewrite the time length parameter in the header metadata in the file. By recording the offset of the item of the time length parameter needing to be rewritten in the file, the subsequent rewriting time length is facilitated, the file position needing to be rewritten is directly positioned according to the recorded offset, the head metadata does not need to be analyzed again, and the time is saved.
And if the MXF file is complete, the MXF file does not need to be continuously written.
The items in the header metadata that need to be rewritten with the duration parameter include video and audio sequences and actual source material.
And thirdly, acquiring the frame number of the written audio and video data by dividing the length of the written audio and video data in the file body package of the MXF file by the length of each frame of audio and video data.
and step four, continuing to write in the data and recording the frame number of the written audio and video data.
And step five, writing the tail packet of the file.
The write-resuming method further comprises the following steps: and rewriting items needing to rewrite the time length parameters in the head metadata, positioning the video and audio sequence and the offset of the actual source material in the file obtained by the analysis in the foregoing, and rewriting the time length items in the video and audio sequence and the actual source material.
The write-resuming method further comprises the following steps: and judging whether the tail part of the MXF file is written into a complete index table segment or not, and if not, writing the index table segment.
The invention can simply and quickly realize the processing of incomplete MXF files, and the processed MXF files can be correctly played and transmitted. The incomplete MXF files are processed by the continuous writing method, so that the processing time is greatly shortened and the workload is reduced compared with the rewriting operation of the incomplete MXF files.
The foregoing is illustrative of the preferred embodiments of this invention, and it is to be understood that the invention is not limited to the precise form disclosed herein and that various other combinations, modifications, and environments may be resorted to, falling within the scope of the concept as disclosed herein, either as described above or as apparent to those skilled in the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (4)
- A method for continuing writing of an MXF file in Op atom format, characterized by: the method comprises the following steps:Judging whether the MXF file is complete or not;The method for judging whether the MXF file is complete comprises the following steps: analyzing the offset of a tail packet in the head metadata and the time length of a video and audio data frame in the metadata, if the time lengths of the tail packet and the video and audio data frame are both 0, considering that the MXF file is incomplete, otherwise, considering that the MXF file is complete;if the MXF file is not complete, judging whether the header metadata of the MXF file is complete, and if the header metadata is not complete, rewriting the header metadata;if the header metadata is finished, recording the offset of an item needing to rewrite the time length parameter in the header metadata in the file;Acquiring the frame number of the written audio and video data by dividing the length of the written audio and video data in the file body package of the MXF file by the length of each frame of the audio and video data;Continuously writing audio and video data, and recording the frame number of the written audio and video data;and writing the tail packet of the file.
- 2. the method for continuing writing of an MXF file in Op atom format according to claim 1, wherein: the write-resuming method further comprises the following steps: rewriting the item of the header metadata that requires rewriting of the time length parameter.
- 3. The method for continuing writing of the MXF file in the Op atom format according to claim 2, wherein: the items in the header metadata that need to be rewritten with the duration parameter include video and audio sequences and actual source material.
- 4. The method for continuing writing of an MXF file in Op atom format according to claim 1, wherein: the write-resuming method further comprises the following steps: and judging whether the tail part of the MXF file is written into a complete index table segment or not, and if not, writing the index table segment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610376220.3A CN106020733B (en) | 2016-05-31 | 2016-05-31 | Continuous writing method of MXF file in Op atom format |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610376220.3A CN106020733B (en) | 2016-05-31 | 2016-05-31 | Continuous writing method of MXF file in Op atom format |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106020733A CN106020733A (en) | 2016-10-12 |
CN106020733B true CN106020733B (en) | 2019-12-13 |
Family
ID=57091675
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610376220.3A Active CN106020733B (en) | 2016-05-31 | 2016-05-31 | Continuous writing method of MXF file in Op atom format |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106020733B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101179393A (en) * | 2006-12-14 | 2008-05-14 | 腾讯科技(深圳)有限公司 | Method and system for implementing document breakpoint transmission |
JP5317738B2 (en) * | 2009-02-04 | 2013-10-16 | キヤノン株式会社 | Recording device |
CN103701907A (en) * | 2013-12-27 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Processing method and system for continuing to transmit data in server |
CN104063447A (en) * | 2014-06-17 | 2014-09-24 | 惠州华阳通用电子有限公司 | Monitoring video file restoring method |
-
2016
- 2016-05-31 CN CN201610376220.3A patent/CN106020733B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101179393A (en) * | 2006-12-14 | 2008-05-14 | 腾讯科技(深圳)有限公司 | Method and system for implementing document breakpoint transmission |
JP5317738B2 (en) * | 2009-02-04 | 2013-10-16 | キヤノン株式会社 | Recording device |
CN103701907A (en) * | 2013-12-27 | 2014-04-02 | 乐视网信息技术(北京)股份有限公司 | Processing method and system for continuing to transmit data in server |
CN104063447A (en) * | 2014-06-17 | 2014-09-24 | 惠州华阳通用电子有限公司 | Monitoring video file restoring method |
Also Published As
Publication number | Publication date |
---|---|
CN106020733A (en) | 2016-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106055643B (en) | continuous writing method for MXF file writing interruption | |
CN111770360B (en) | Method and system for marking whole flow of video manuscript collection, editing and auditing | |
RU2010111391A (en) | SEGMENTED METADATA AND INDICES FOR STREAM MULTIMEDIA DATA | |
CN109508346B (en) | Cascade synchronous control method and system for DDL operation | |
CN106021565B (en) | continuous writing method of MXF files in Op1a and Op1b formats | |
JP2007518205A5 (en) | ||
JP2010539834A5 (en) | ||
PH12018502186A1 (en) | Method and apparatus for processing failure of cipher change of ciphertext in database | |
CN106021985A (en) | Genome data compression method | |
CN109511008B (en) | Method for supporting video and audio file content addition based on object storage | |
CN106020733B (en) | Continuous writing method of MXF file in Op atom format | |
JP2013528823A5 (en) | ||
CN107360163B (en) | Data playback method of teleoperation system | |
JP2007306257A5 (en) | ||
CN111143182B (en) | Analysis method, device and storage medium for process behavior | |
CN103210389B (en) | A kind for the treatment of method and apparatus of metadata | |
CN109271399A (en) | A kind of method of calibration of database write-in log consistency | |
TW200731224A (en) | Information processing device, information recording medium manufacturing device, information recording medium, methods thereof, and computer program | |
WO2021017281A1 (en) | Data processing method and system, computer device, and storage medium | |
CN109660576B (en) | User data real-time migration method, storage medium, electronic device and system | |
CN110971914B (en) | Method for dynamically saving video and audio decoding resources in time axis mode | |
CN112256634B (en) | Http-based low-memory large file analysis method | |
CN114205628B (en) | MP4 file coding method, device and system | |
CN104765736B (en) | Database leads storehouse method and device | |
CN107729566A (en) | A kind of index method for reconstructing for public transport vehicle-mounted hard disk audio/video data access |
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 |