CN110996172A - Method for quickly synthesizing 4K MXF file - Google Patents
Method for quickly synthesizing 4K MXF file Download PDFInfo
- Publication number
- CN110996172A CN110996172A CN201911305180.3A CN201911305180A CN110996172A CN 110996172 A CN110996172 A CN 110996172A CN 201911305180 A CN201911305180 A CN 201911305180A CN 110996172 A CN110996172 A CN 110996172A
- Authority
- CN
- China
- Prior art keywords
- slice
- file
- size
- last
- header
- 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
- 238000000034 method Methods 0.000 title claims abstract description 29
- 230000002194 synthesizing effect Effects 0.000 title claims abstract description 8
- 238000005192 partition Methods 0.000 claims abstract description 11
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000015572 biosynthetic process Effects 0.000 description 11
- 238000003786 synthesis reaction Methods 0.000 description 11
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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/4402—Processing 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 reformatting operations of video signals for household redistribution, storage or real-time display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for quickly synthesizing a 4K MXF file. The method specifically comprises the following steps: (1) firstly, judging whether the generated format is CBE, if so, continuing the next step, otherwise, exiting; (2) acquiring the duration of the current slice and the corresponding slice number, and calculating the number of EUs of the current slice; (2a) if the slice is S-first, directly writing into a Header Partition Pack and a Header MetaData, and simultaneously writing the EU of the first slice into a File Body; (2b) if the current slice number is S-middle, calculating the position of the corresponding slice in the target File according to the current slice number, and directly writing the slice into the File Body; (2c) if the current slice number is S _ last, the position of the last slice is calculated according to the current slice number, and the last slice is directly written into the File Body and the Footer Partition Pack is directly written at the same time. The invention has the beneficial effects that: the storage requirement is reduced, and the transcoding efficiency is greatly improved.
Description
Technical Field
The invention relates to the technical field related to video processing, in particular to a method for quickly synthesizing a 4K MXF file.
Background
With the development of video compression technology, 4K file formats are more and more common, and corresponding file bit rates are gradually increased. In order to increase the file transcoding speed, the hardware of the client is gradually upgraded, the storage system, the local area network bandwidth, the transcoder capacity are increased, and the like, and then the client is matched with the cluster to perform slice transcoding. However, in the conventional cluster slice transcoding, each slice is saved in a temporary file, and then is sequentially synthesized into a target file through each temporary file. As the code rate is larger and larger, the defects of the method are more and more obvious, the required storage is larger and the bottleneck of transcoding is limited to the final sequential synthesis. Mxf (material Exchange format) is a professional audio/video media file format, and has been widely used in media production, editing, publishing, storage and other links in the video industry.
There is a common form in mxf (material Exchange format): CBE (constant Bytesper element), i.e. the size of the elements contained in each EU (Eidt Uint, as shown in FIG. 2) is fixed. For example, video is AVC Intra (each frame is a key frame in H264), DNxHD/DNxHR, and audio is AES3 (PCM). The above format is also the format most commonly exhibited by 4K files in MXF. Due to the fact that AVC Intra, DNxHD/DNxHR encoding complexity is relatively low, encoding speed is fast, and the last transcoding bottleneck is in the last synthesis in the cluster slice transcoding process.
Disclosure of Invention
The invention provides a method for rapidly synthesizing a 4K MXF file, which aims to overcome the defects in the prior art and improve transcoding efficiency.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for quickly synthesizing 4K MXF files divides an object file into three parts, namely: the first slice S-first comprises the first slice contents of the File Header and the File Body; an intermediate slice S-middle containing all other slice contents of the FileBody except the first and last slices; the last slice, S-last, contains the last slice of FileBody and File Foote; the method specifically comprises the following steps:
(1) firstly, judging whether the generated format is CBE, if so, continuing the next step, otherwise, exiting;
(2) acquiring the duration of the current slice and the corresponding slice number, and calculating the number of EUs of the current slice;
(2a) if the slice is S-first, directly writing into a Header Partition Pack and a Header MetaData, and simultaneously writing the EU of the first slice into a File Body;
(2b) if the current slice number is S-middle, calculating the position of the corresponding slice in the target File according to the current slice number, and directly writing the slice into the File Body;
(2c) if the current slice number is S _ last, the position of the last slice is calculated according to the current slice number, and the last slice is directly written into the File Body and the Footer Partition Pack is directly written at the same time.
The intermediate slice in the invention is a set of a plurality of slices, a plurality of slices can be generated simultaneously in the synthesis process, and special treatment needs to be carried out on the first slice and the last slice. CBE/EU is defined by MXF specification, and CBE means that the size of elements (audio and video and the like) is fixed and invariable in the same time length. EU is the basic unit constituting MXF data (as shown in fig. 2), and is typically the duration of one frame Video (e.g., 40ms for 25 fps); if each element in the EU is CBE, the length of the EU is fixed, i.e., CBE. The invention provides a mechanism aiming at the MXF CBE format, a temporary file is not required to be generated in the cluster slice transcoding process, each slice is directly written on a final target file, the storage requirement is reduced, and the transcoding efficiency is greatly improved.
Preferably, in step (2a), an indeterminate field corresponding to the indeterminate field in the Header MetaData is directly skip, which is responsible for writing by S-last.
Preferably, in step (2b), the position of the corresponding slice in the target file is calculated as follows: calculating the size of each EU, and then calculating the initial position of the current slice according to the current slice number; the method comprises the following specific steps:
EU size=Video EU size+Audio EU size
slice position ═ Header size + (slice number-1) × (slice length 25 × EU size)
Wherein: video EU size and Audio EU size are obtained from the specification of the corresponding format, and Header size is Header Partition Pack size + Header MetaData size + Index Table size.
Preferably, in step (2c), the uncertain field in the headermatadata is updated according to the slice number and the last slice duration.
Preferably, the operations of step (2a), step (2b) and step (2c) are performed concurrently, each slice can be performed simultaneously in the composition process, the slices are relatively independent, since the number of slices can be determined when the slice starts, when the composition of one slice is completed, a notification is sent, when the composition of all slices is completed, the composition is completed, and the slices do not need to be saved in a temporary file, so as to ensure the maximum transcoding and composition efficiency.
The invention has the beneficial effects that: in the cluster slice transcoding process, temporary files do not need to be generated, each slice is directly written to a final target file, the storage requirement is reduced, and the transcoding efficiency is greatly improved.
Drawings
Fig. 1 is a structural diagram of an MXF of the present invention;
FIG. 2 is a structural view of EU of the present invention.
Detailed Description
The invention is further described with reference to the following figures and detailed description.
In the embodiment shown in fig. 1 and 2, a method for rapidly synthesizing a 4K MXF file divides an object file into three parts, namely: the first slice S-first comprises the first slice contents of the File Header and the File Body; an intermediate slice S-middle containing all other slice contents of the File Body except the first and last slice; the last slice, S-last, contains the last slice of the File Body and the File Foote; the method specifically comprises the following steps:
(1) firstly, judging whether the generated format is CBE, if so, continuing the next step, otherwise, exiting;
(2) acquiring the duration of the current slice and the corresponding slice number, and calculating the number of EUs of the current slice; the slicing time length and the slicing number are determined when encoding is carried out, namely, a source file needs to be sliced when encoding is started, and the upper layer is provided with a control module which can know the time length and the sequence number of each slice (if the time length of each slice is different, the slice number is replaced by the starting time stamp of the slice). Different input sources, server configurations and the like can configure different time lengths.
(2a) If the slice is S-first, directly writing into a Header Partition Pack and a Header MetaData, and simultaneously writing the EU of the first slice into a File Body; directly skip corresponding to an uncertain field in the Header MetaData, such as a field about duration, wherein the uncertain field is written by S-last;
(2b) if the current slice number is S-middle, calculating the position of the corresponding slice in the target File according to the current slice number, and directly writing the slice into the File Body; the position of the corresponding slice in the target file is calculated as follows (taking the same duration of each slice, and 40ms for each EU as an example): calculating the size of each EU, and then calculating the initial position of the current slice according to the current slice number; the method comprises the following specific steps:
EU size=Video EU size+Audio EU size
video EU: for example, DNxHD (120M, 1080P, 25fps, Compression ID 1235) has a frame size of 917504 bytes;
audio EU: PCM (48000hz, 1channel, 16bits, 40ms) has a frame size of 1920 bytes;
slice position ═ Header size + (slice number-1) × (slice length 25 × EU size)
Wherein: video EU size and Audio EU size are obtained from the specification of the corresponding format, and Header size is Header Partition Pack size + Header MetaData size + Index Table size.
Referring to fig. 1, the Header Partition Pack, the Header MetaData, and the Index Table are defined, and are essential for describing MXF information. However, for MXF of CBE, these defined sizes can be calculated in advance, and part of the information needs to be updated last.
(2c) If the current slice number is S _ last, calculating the position of the last slice according to the current slice number, directly writing the position into the File Body, and simultaneously directly writing the Footer Partition Pack; and updating uncertain fields in the Header MetaData according to the slice number and the last slice duration, including the duration and some position information.
Wherein: the middle slice is a set of multiple slices, multiple slices are generated simultaneously in the synthesis process, and special processing needs to be performed on the first slice and the last slice. CBE/EU is defined by MXF specification, and CBE means that the size of elements (audio and video and the like) is fixed and invariable in the same time length. EU is the basic unit constituting MXF data (as shown in fig. 2), and is typically the duration of one frame Video (e.g., 40ms for 25 fps); if each element in the EU is CBE, the length of the EU is fixed, i.e., CBE.
The operations of the step (2a), the step (2b) and the step (2c) are performed concurrently, each slice can be performed simultaneously and is relatively independent in the synthesis process, since the number of slices can be determined when the slice synthesis is completed, a notification is sent when the synthesis of one slice is completed, when the synthesis of all slices is completed, the synthesis is completed, and the slices do not need to be stored in a temporary file, so that the maximum transcoding synthesis efficiency is ensured. Theoretically, the more fragments a cluster transcodes, the faster the synthesis. The invention provides a mechanism aiming at the MXF CBE format, a temporary file is not required to be generated in the cluster slice transcoding process, each slice is directly written on a final target file, the storage requirement is reduced, and the transcoding efficiency is greatly improved.
Claims (5)
1. A method for quickly synthesizing 4K MXF files is characterized in that an object file is divided into three parts, namely: the first slice S-first comprises the first slice contents of the File Header and the File Body; an intermediate slice S-middle containing all other slice contents of the File Body except the first and last slice; the last slice, S-last, contains the last slice of File Body and FileFoote; the method specifically comprises the following steps:
(1) firstly, judging whether the generated format is CBE, if so, continuing the next step, otherwise, exiting;
(2) acquiring the duration of the current slice and the corresponding slice number, and calculating the number of EUs of the current slice;
(2a) if the slice is S-first, directly writing into a Header Partition Pack and a Header MetaData, and simultaneously writing the EU of the first slice into a File Body;
(2b) if the current slice number is S-middle, calculating the position of the corresponding slice in the target File according to the current slice number, and directly writing the slice into the File Body;
(2c) if the current slice number is S _ last, the position of the last slice is calculated according to the current slice number, and the last slice is directly written into the File Body and the Footer Partition Pack is directly written at the same time.
2. The method as claimed in claim 1, wherein in step (2a), there is an indeterminate field directly skip in the Header MetaData, and the indeterminate field is written by S-last.
3. The method for rapidly composing a 4K MXF file as claimed in claim 1, wherein in the step (2b), the position of the corresponding slice in the object file is calculated by: calculating the size of each EU, and then calculating the initial position of the current slice according to the current slice number; the method comprises the following specific steps:
EU size=Video EU size+Audio EU size
slice position ═ Header size + (slice number-1) × (slice length 25 × EU size)
Wherein: video EU size and Audio EU size are obtained from the specifications of the corresponding formats, and Header size is HeaderPartition Pack size + Header MetaData size + Index Table size.
4. The method as claimed in claim 2, wherein in the step (2c), the uncertain field in the Header MetaData is updated according to the slice number and the last slice duration.
5. The method for rapidly composing the 4K MXF file as claimed in claim 1, 2, 3 or 4, wherein the operations of step (2a), step (2b) and step (2c) are performed concurrently, each slice can be performed simultaneously and independently during the composition process, since the number of slices can be determined at the beginning, when the composition of one slice is completed, a notification is sent, when the composition of all slices is completed, the composition is completed, and the slice does not need to be saved in a temporary file, thereby ensuring the maximum transcoding composition efficiency.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911305180.3A CN110996172B (en) | 2019-12-17 | 2019-12-17 | Method for quickly synthesizing 4K MXF file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911305180.3A CN110996172B (en) | 2019-12-17 | 2019-12-17 | Method for quickly synthesizing 4K MXF file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110996172A true CN110996172A (en) | 2020-04-10 |
CN110996172B CN110996172B (en) | 2022-01-11 |
Family
ID=70094948
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911305180.3A Active CN110996172B (en) | 2019-12-17 | 2019-12-17 | Method for quickly synthesizing 4K MXF file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110996172B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112584256A (en) * | 2020-12-10 | 2021-03-30 | 杭州当虹科技股份有限公司 | Method for directly writing TS file after transcoding based on NAS storage fragment |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070206676A1 (en) * | 2006-03-01 | 2007-09-06 | Tatsuji Yamazaki | Data processing apparatus, data processing method, data processing program, data structure, recording medium, reproducing apparatus, reproducing method, and reproducing program |
JP2011217246A (en) * | 2010-04-01 | 2011-10-27 | Mitsubishi Electric Corp | Apparatus for transmission of video/voice data |
CN103200204A (en) * | 2012-01-04 | 2013-07-10 | 中兴通讯股份有限公司 | Distributed transcoding system and method based on cloud storage |
WO2013123360A1 (en) * | 2012-02-16 | 2013-08-22 | Brightcove, Inc. | System and method for dynamic file availability during encoding |
CN104378665A (en) * | 2014-11-24 | 2015-02-25 | 深圳市天威视讯股份有限公司 | Distributed transcoding system and method based on digital television |
CN104469396A (en) * | 2014-12-24 | 2015-03-25 | 北京中科大洋信息技术有限公司 | Distributed transcoding system and method |
CN104602125A (en) * | 2013-10-30 | 2015-05-06 | 中国科学院声学研究所 | Packaging and encryption method based on MXF (Material Exchange Format) audio and video media files |
CN106055643A (en) * | 2016-05-31 | 2016-10-26 | 成都索贝数码科技股份有限公司 | Continuous writing method for writing interrupt of MXF files |
CN108848384A (en) * | 2018-06-19 | 2018-11-20 | 复旦大学 | A kind of efficient parallel code-transferring method towards multi-core 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 |
-
2019
- 2019-12-17 CN CN201911305180.3A patent/CN110996172B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070206676A1 (en) * | 2006-03-01 | 2007-09-06 | Tatsuji Yamazaki | Data processing apparatus, data processing method, data processing program, data structure, recording medium, reproducing apparatus, reproducing method, and reproducing program |
CN101042914A (en) * | 2006-03-01 | 2007-09-26 | 索尼株式会社 | Data processing apparatus, data structure and reproducing apparatus, reproducing method |
JP2011217246A (en) * | 2010-04-01 | 2011-10-27 | Mitsubishi Electric Corp | Apparatus for transmission of video/voice data |
CN103200204A (en) * | 2012-01-04 | 2013-07-10 | 中兴通讯股份有限公司 | Distributed transcoding system and method based on cloud storage |
WO2013123360A1 (en) * | 2012-02-16 | 2013-08-22 | Brightcove, Inc. | System and method for dynamic file availability during encoding |
US20130219074A1 (en) * | 2012-02-16 | 2013-08-22 | Brightcove, Inc. | System and method for dynamic file availability during encoding |
CN104602125A (en) * | 2013-10-30 | 2015-05-06 | 中国科学院声学研究所 | Packaging and encryption method based on MXF (Material Exchange Format) audio and video media files |
CN104378665A (en) * | 2014-11-24 | 2015-02-25 | 深圳市天威视讯股份有限公司 | Distributed transcoding system and method based on digital television |
CN104469396A (en) * | 2014-12-24 | 2015-03-25 | 北京中科大洋信息技术有限公司 | Distributed transcoding system and method |
CN106055643A (en) * | 2016-05-31 | 2016-10-26 | 成都索贝数码科技股份有限公司 | Continuous writing method for writing interrupt of MXF files |
CN108848384A (en) * | 2018-06-19 | 2018-11-20 | 复旦大学 | A kind of efficient parallel code-transferring method towards multi-core 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 |
Non-Patent Citations (3)
Title |
---|
JIM WILKINSON: "MPEG2 Long GOP Mapping for MXF File Storage Applications", 《147TH SMPTE TECHNICAL CONFERENCE AND EXHIBITION》 * |
翁超: "数字音视频码流的分割及合并技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
赵中伟等: "MXF素材文件交换格式深入研究", 《现代电影技术》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112584256A (en) * | 2020-12-10 | 2021-03-30 | 杭州当虹科技股份有限公司 | Method for directly writing TS file after transcoding based on NAS storage fragment |
Also Published As
Publication number | Publication date |
---|---|
CN110996172B (en) | 2022-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4598627B2 (en) | Content editing apparatus and playback apparatus thereof | |
CA2858654C (en) | Media service and method for delivery of stored media | |
JP2009522939A5 (en) | ||
CN1516184A (en) | Processing method of multi-media data | |
US11303942B2 (en) | System and method for handling video data | |
CN104244023A (en) | Video cloud editing system and method | |
US20200411021A1 (en) | Information processing apparatus and information processing method | |
CN110996172B (en) | Method for quickly synthesizing 4K MXF file | |
WO2020089618A1 (en) | Methods, apparatuses, computer programs and computer-readable media for scalable image coding | |
CN113271467B (en) | Ultra-high-definition video layered coding and decoding method supporting efficient editing | |
CN103905843B (en) | Distributed audio/video processing device and method for continuous frame-I circumvention | |
CN106375778B (en) | Method for transmitting three-dimensional audio program code stream conforming to digital movie specification | |
CN112437325A (en) | 8KSDI signal generator implementation method | |
WO2023176419A1 (en) | Information processing device and method | |
CN102811380A (en) | Demultiplexing method and demultiplexing device for audio and video data in multimedia files | |
CN114710629B (en) | Device for realizing ultrahigh-definition video format conversion and image-text superposition | |
CN112672166B (en) | Multi-code stream decoding acceleration system and method for video decoder | |
US9070403B2 (en) | Processing of scalable compressed video data formats for nonlinear video editing systems | |
US10567852B2 (en) | Transmission device, transmission method, reception device, reception method, and program | |
WO2004088984A1 (en) | Video data storage and retrieval system and method with resolution conversion | |
CN109246377B (en) | Video data storage method, video data reading method and video data storage equipment | |
EP2810446B1 (en) | Methods and systems for providing file data for a media file | |
US10594758B2 (en) | Latency reduction by sending audio and metadata ahead of time | |
US20030074669A1 (en) | Data transmitting method and apparatus, and data receiving method and apparatus | |
US8953038B2 (en) | Distributed video surveillance storage cost reduction using statistical multiplexing principle |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |