CN106021565B - continuous writing method of MXF files in Op1a and Op1b formats - Google Patents

continuous writing method of MXF files in Op1a and Op1b formats Download PDF

Info

Publication number
CN106021565B
CN106021565B CN201610376225.6A CN201610376225A CN106021565B CN 106021565 B CN106021565 B CN 106021565B CN 201610376225 A CN201610376225 A CN 201610376225A CN 106021565 B CN106021565 B CN 106021565B
Authority
CN
China
Prior art keywords
mxf
file
complete
writing
header metadata
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610376225.6A
Other languages
Chinese (zh)
Other versions
CN106021565A (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.)
Chengdu Sobey Digital Technology Co Ltd
Original Assignee
Chengdu Sobey Digital 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 Chengdu Sobey Digital Technology Co Ltd filed Critical Chengdu Sobey Digital Technology Co Ltd
Priority to CN201610376225.6A priority Critical patent/CN106021565B/en
Publication of CN106021565A publication Critical patent/CN106021565A/en
Application granted granted Critical
Publication of CN106021565B publication Critical patent/CN106021565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/41Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for continuously writing MXF files in Op1a and Op1b formats, 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; searching the last file body packet containing the complete index table segment in the MXF files, and analyzing the file body packet to obtain the number of written audio/video frames; continuously writing audio and video data, filling a new index table segment, and recording index information of the audio and video data; writing a file tail packet; rewriting the item of the header metadata that requires rewriting of the time length parameter. 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

Continuous writing method of MXF files in Op1a and Op1b formats
Technical Field
the invention relates to the technical field of MXF file continuous writing, in particular to a continuous writing method of MXF files in Op1a and Op1b formats.
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 provides a method for continuously writing MXF files in Op1a and Op1b formats, wherein incomplete MXF files are processed by the method for continuously writing, the processing time is greatly shortened compared with the rewriting operation of the incomplete MXF files, and the workload is reduced.
the purpose of the invention is realized by the following technical scheme: the method for continuing writing the MXF files in the Op1a and Op1b formats 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; searching the last file body packet containing the complete index table segment in the MXF files, and analyzing the file body packet to obtain the number of written audio/video frames; continuously writing audio and video data, filling a new index table segment, and recording index information of the 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 reading the data at the tail end of the MXF file for analysis, judging whether the MXF file has a random index packet, if the MXF file has the random index packet, considering the MXF file to be complete, otherwise, considering the MXF file to be incomplete.
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 complete index table segment and the random index packet are written.
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 shows a method for rewriting MXF files in Op1a and Op1b formats in 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 method for continuing writing of MXF files in Op1a and Op1b formats includes the following steps:
Step one, judging whether the MXF file is complete: and reading the data at the tail end of the MXF file for analysis, judging whether the MXF file has a random index packet, if the MXF file has the random index packet, considering the MXF file to be complete, otherwise, considering the MXF file to be incomplete.
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.
analyzing all file body packets (BPP) in the MXF files, searching the last file body packet containing an integral Index Table Segment (Index Table Segment) in the MXF files, and acquiring the written audio and video frame number by analyzing the file body packets.
And step four, continuously writing the audio and video data, filling a new index table segment, and recording the index information of the 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 complete index table segment and the random index packet need to be written according to the specific format of the file, and writing the index table segment and the random index packet into the MXF file in which the complete index table segment and the random index packet need to be written.
The invention can simply and rapidly realize the processing of incomplete MXF files by analyzing the physical structure and the logical structure of the MXF files based on the MXF standard packaging mode, 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)

  1. a method for resuming writing of MXF files in Op1a and Op1b formats, characterized in that: 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: reading the data at the tail end of the MXF file for analysis, judging whether the MXF file has a random index packet, if the MXF file has the random index packet, considering the MXF file to be complete, otherwise, considering the MXF file to be incomplete;
    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;
    searching the last file body packet containing the complete index table segment in the MXF files, and analyzing the file body packet to obtain the number of written audio/video frames;
    continuously writing audio and video data, filling a new index table segment, and recording index information of the audio and video data;
    And writing the tail packet of the file.
  2. 2. The method for continuing writing of the MXF files in Op1a and Op1b format of 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. 3. The method for continuing writing of the MXF files in the Op1a and Op1b formats, as claimed in 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. 4. The method for continuing writing of the MXF files in Op1a and Op1b format of claim 1, wherein: the write-resuming method further comprises the following steps: and judging whether the complete index table segment and the random index packet are written.
CN201610376225.6A 2016-05-31 2016-05-31 continuous writing method of MXF files in Op1a and Op1b formats Active CN106021565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610376225.6A CN106021565B (en) 2016-05-31 2016-05-31 continuous writing method of MXF files in Op1a and Op1b formats

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610376225.6A CN106021565B (en) 2016-05-31 2016-05-31 continuous writing method of MXF files in Op1a and Op1b formats

Publications (2)

Publication Number Publication Date
CN106021565A CN106021565A (en) 2016-10-12
CN106021565B true CN106021565B (en) 2019-12-13

Family

ID=57091737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610376225.6A Active CN106021565B (en) 2016-05-31 2016-05-31 continuous writing method of MXF files in Op1a and Op1b formats

Country Status (1)

Country Link
CN (1) CN106021565B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920553B (en) * 2018-06-19 2020-10-30 西安电子科技大学 Data recording method for airborne multi-sensor platform
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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286927A (en) * 2008-05-08 2008-10-15 蒋一 Method for realizing P2P stream media system based on node interconnection optimization
JP2010183247A (en) * 2009-02-04 2010-08-19 Canon Inc Recording device
CN103701907A (en) * 2013-12-27 2014-04-02 乐视网信息技术(北京)股份有限公司 Processing method and system for continuing to transmit data in server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286927A (en) * 2008-05-08 2008-10-15 蒋一 Method for realizing P2P stream media system based on node interconnection optimization
JP2010183247A (en) * 2009-02-04 2010-08-19 Canon Inc Recording device
CN103701907A (en) * 2013-12-27 2014-04-02 乐视网信息技术(北京)股份有限公司 Processing method and system for continuing to transmit data in server

Also Published As

Publication number Publication date
CN106021565A (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN106055643B (en) continuous writing method for MXF file writing interruption
WO2018076952A1 (en) Method and apparatus for storage and playback positioning of video file
CN104333796B (en) Image recording/reproducing device and file management method
US10446188B2 (en) Method and apparatus for low latency non-linear media editing using file-based inserts into finalized digital multimedia files
CN106021565B (en) continuous writing method of MXF files in Op1a and Op1b formats
JP2010539834A5 (en)
CN111770360B (en) Method and system for marking whole flow of video manuscript collection, editing and auditing
CN111581404A (en) Method and system for marking image-text manuscript through whole process based on block chain technology
CN109511008B (en) Method for supporting video and audio file content addition based on object storage
CN106231413B (en) A kind of automatic division processing method of audio, video data based on intelligent terminal and system
CN105530534B (en) A kind of method and apparatus of video clipping
CN106020733B (en) Continuous writing method of MXF file in Op atom format
CN101448094B (en) Method for rapidly importing media material
JP2007306258A5 (en)
US20070166014A1 (en) Method and system of reducing data storage consumption when storing and using DVD data streams
JP2007306257A5 (en)
WO2017084310A1 (en) Method and device for transmitting mp4 video source
KR101051063B1 (en) Video recording and playback device, video recording method, video playback method and video recording playback method
CN113507625B (en) Self-adaptive video restoration method
NO20024640D0 (en) Multimedia file format
CN102231847B (en) Direct and accurate frame positioning method supporting stream media files
CN116933143B (en) Flight parameter data classification method
JP5148676B2 (en) Video data processing apparatus and video data processing method
CN110971914B (en) Method for dynamically saving video and audio decoding resources in time axis mode
CN104765736B (en) Database leads storehouse method and device

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