System and method for repairing information video file

By generating erasure codes during video transmission and packaging them into MP4 video files in FMP4 format, the problem of insufficient reliability of small video content in the prior art is solved, and effective repair of lost or corruption of video file data is achieved. Improves the reliability of storing data.

CN119450100APending Publication Date: 2025-02-14DEEP BLUE PERCEPTION (HANGZHOU) IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411410015.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

Although the FMP4 format of MP4 in the prior art reduces the risk of corruption of the overall file during video transmission, the reliability of small clips of video content has not been improved, making it difficult to effectively repair when data is lost or damaged.

Method used

A system with repair information video files was designed, and independent video frame group data was generated through the video frame group module, and the repair information generation module was used to generate erasure codes, combined with the FMP4 packaging module to package it into the FMP4 video file in the FMP4 format, and finally it was The file repair module repairs data when data is lost or corrupted.

Benefits of technology

By generating an erasure code through multiple FMP4 video shards and packaging it into an MP4 file, it is possible to use the erasure code to restore the corrupted data when some data is lost or damaged in the video file, thereby improving the reliability of MP4's FMP4 format storage data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450100A_ABST
    Figure CN119450100A_ABST
Patent Text Reader

Abstract

The invention relates to the field of video information restoration, in particular to a system and method for a video file with restoration information, and the system comprises a video frame group module, a restoration information generation module, an FMP4 packaging module and a file restoration module, and sequentially comprises the following steps: 1, generating independent video frame group data through the video frame group module; 2, generating erasure codes through a repair information generation module; 3, generating an MP4 video file in an FMP4 format through an FMP4 packaging module; and 4, repairing the MP4 video file in the FMP4 format, which needs to be repaired, through a file repairing module. According to the method and the device, the erasure codes are generated through the video fragments of the FMP4 and are packaged into the MP4 file, and when part of data of the MP4 is lost or damaged, the damaged data of the MP4 are recovered by utilizing the erasure codes, so that the reliability of the FMP4 format storage data of the MP4 is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video information repair, in particular to a system and method for video files with repair information. Background Art

[0002] At present, when transmitting videos, MP4 in the existing technology introduces the FMP4 format, and the video content is transmitted and played in the form of small fragments to reduce the possibility of power failure damaging the entire file. However, the reliability of the small fragments of video content itself has not been guaranteed or improved. Therefore, it is very necessary to propose a system and method for video files with repair information. Summary of the invention

[0003] The object of the present invention is to provide a system and method for video files with repair information to improve the reliability of data stored in the FMP4 format of MP4 to solve the existing technical defects and unattainable technical requirements.

[0004] To achieve the above object, the present invention provides the following technical solution: a system for video files with repair information, comprising:

[0005] Video frame group module: used for the video frame group module to generate independent video frame group data, and then send the independent video frame group data to the repair information generation module and the FMP4 packaging module;

[0006] Repair information generation module: used to receive independent video frame group data sent by the video frame group module, generate erasure codes according to the independent video frame group data, and send the erasure codes to the FMP4 packaging module;

[0007] FMP4 packaging module: used to receive the independent video frame group data sent by the video frame group module and the erasure code sent by the repair information generation module, and generate an MP4 video file in FMP4 format according to the independent video frame group data and the erasure code, and then send the MP4 video file in FMP4 format that needs to be repaired to the file repair module;

[0008] File repair module: used for receiving the MP4 video file in FMP4 format that needs to be repaired and sent by the FMP4 packaging module, and repairing the MP4 video file in FMP4 format.

[0009] The present application is to repair the file through the file repair module when the file in the FMP4 packaging module is partially damaged or lost during the transmission or storage process. That is, it can be understood that before being input into the file repair module, the file in the FMP4 packaging module has undergone a storage or transmission process. When data loss occurs in this process, the file repair module receives the file to be repaired and repairs it.

[0010] A method of a system with repair information video file, comprising the following steps:

[0011] 1. Generate independent video frame group data through the video frame group module

[0012] 1.1. The video frame group module decodes the video source image to obtain multiple independent video frame groups;

[0013] 1.2. The video frame group module sends the obtained independent video frame group data to the repair information generation module and the FMP4 packaging module;

[0014] 2. Generate erasure codes through the repair information generation module

[0015] 2.1. The repair information generation module receives the independent video frame group data sent by the video frame group module;

[0016] 2.2. The repair information generation module generates a repair group according to the independent video frame group data;

[0017] 2.3. The repair information generation module generates erasure codes for each repair group;

[0018] 2.4. The repair information generation module sends the generated erasure code to the FMP4 packaging module;

[0019] 3. Generate MP4 video files in FMP4 format through FMP4 packaging module

[0020] 3.1. The FMP4 packaging module receives the independent video frame group data sent by the video frame group receiving module and the erasure code sent by the repair information generation module;

[0021] 3.2. The FMP4 packaging module packages each independent video frame group data into an independent video content fragment consisting of a segmented moof metadata container and a segmented mdat data container in the FMP4 file;

[0022] 3.3. The FMP4 packaging module splits the erasure code into shards and packs each shard into an mreed erasure code container;

[0023] 3.4. The FMP4 packaging module modifies the format of the video clips composed of the containers in step 3.2 and step 3.3 to generate an MP4 video file in FMP4 format;

[0024] 3.5. The FMP4 packaging module sends the MP4 video file in FMP4 format that needs to be repaired to the file repair module;

[0025] 4. Use the file repair module to repair the MP4 video files in FMP4 format that need file repair

[0026] 4.1. The file repair module receives the MP4 video file in FMP4 format that needs to be repaired and sent by the FMP4 packaging module;

[0027] 4.2. The file repair module extracts the corresponding number of erasure codes from the mreed erasure code container according to the number of lost and damaged video frame groups;

[0028] 4.3. The file repair module extracts the recovery matrix from the Monamon matrix and calculates the inverse matrix according to the position of the lost and damaged video frame group and the position of the supplementary erasure code;

[0029] 4.4. The file repair module calculates the data obtained in step 4.2 and step 4.3 to obtain the complete data of the video frame group;

[0030] 4.5. The file repair module completes the missing part of the MP4 video file in the FMP4 format that needs to be repaired according to the obtained complete data of the video frame group, and completes the file repair.

[0031] In the present application, in step 4, the principle of completing the repair of the MP4 video file in FMP4 format that needs file repair through the file repair module is that the file repair module uses 5 redundancy of erasure code, each with 100 video frame groups, and the maximum allowable loss and damage of 5 video frame groups.

[0032] In step 4.5, the file repair module finally completes the lost and damaged data in the 100 video frame groups, and finally completes the file repair.

[0033] Preferably, in the step 1.1, the video frame group module performs H264 / H265 decoding on the video source image to obtain independent video frame groups, and the independent video frame groups are used as independent small fragments of video content in the FMP4 file, and contain a series of continuous frames, and the series of continuous frames includes an I frame, multiple P frames and B frames.

[0034] It should be further explained in the present application that the video frame group is the smallest unit that can be independently decoded.

[0035] The content in step 3.4 can be understood as follows: the FMP4 packaging module will be composed of step 3.2 and the "video fragment" in the video fragment composed of the containers in step 3.2 is composed of the moof metadata container, the mdat data container and the mreed erasure code container.

[0036] The mreed container is a custom container. If a player or other application encounters an unknown container type, it is required to skip the container. The mreed container will not affect the compatibility of MP4 files.

[0037] The MP4 video files in FMP4 format that need to be repaired in step 3.5 and step 4.1 refer to the MP4 video files in FMP4 format that have some data damaged and lost during the transmission and storage process.

[0038] Preferably, in step 2.2, the repair information generation module regards a group of 100 adjacent video frames as a repair group.

[0039] Preferably, in step 2.3, the process of generating the erasure code is:

[0040] 2.3.1: Set the erasure redundancy number to 5;

[0041] 2.3.2, the repair information generation module generates a 100*105 Vandermonde matrix;

[0042] 2.3.3. The repair information generation module extracts the data of a repair group of 100 video frames byte by byte and multiplies it by the 100*5 erasure code coefficient part of the Vandermonde matrix, and finally obtains 5 groups of erasure codes.

[0043] In the present application, it needs to be further explained that the erasure redundancy number of 5 means that a repair group of 100 video frames allows 5 of them to be erroneous at the same time.

[0044] The five groups of erasure codes finally obtained in step 2.3.3 are sent to the FMP4 packaging module as the erasure codes mentioned in step 2.4.

[0045] Preferably, in step 3.3, the content of splitting the erasure codes into fragments is as follows: the FMP4 packaging module splits the 5 groups of erasure codes of the last repair group of 100 video frame groups into 100 fragments.

[0046] Preferably, in step 3.4, the content of the format modification is: the FMP4 packaging module finally modifies the FMP4 basic moov+(moof+mdat)*N format to moov+(moof+mdat+mreed)*N format.

[0047] Preferably, in step 4.2, extracting the corresponding number of erasure codes is as follows: the file repair module extracts the corresponding number of erasure codes from the mreed erasure code container of the next 100 video frame groups.

[0048] Preferably, in step 4.3, the inverse matrix is ​​calculated as follows: the file repair module extracts a 100*100 recovery matrix from the 100*105 Vandermonde matrix according to the positions of the lost and damaged 100*105 video frame groups and the positions where the erasure codes need to be supplemented, and calculates the inverse matrix of the 100*100 recovery matrix.

[0049] Preferably, in step 4.4, the content of the complete data of the video frame group is obtained as follows: the file repair module multiplies the inverse matrix by the mixed data of the normal video frame group and the supplemented erasure code to obtain the complete data of 100 video frame groups.

[0050] That is, the inverse matrix in the above content is multiplied by the mixed data, and the mixed data is composed of a normal video frame group and a supplementary erasure code.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. This application generates erasure codes through multiple FMP4 video fragments and packages them into MP4 files. When some data in MP4 is lost or damaged, the erasure codes are used to restore the damaged data of MP4, thereby improving the reliability of data storage in MP4 FMP4 format. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is the overall logic schematic diagram of the present invention;

[0054] In the figure: 1. Video frame group module; 2. Repair information generation module; 3. FMP4 packaging module; 4. File repair module. DETAILED DESCRIPTION

[0055] The following will be combined with the attached embodiment of the present invention Figure 1 , the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] See also Figure 1 , embodiments of the present invention:

[0057] Example:

[0058] like Figure 1 Shown: A system for video files with repair information, comprising:

[0059] Video frame group module 1: used for the video frame group module 1 to generate independent video frame group data, and then send the independent video frame group data to the repair information generation module 2 and the FMP4 packaging module 3;

[0060] Repair information generation module 2: used for receiving independent video frame group data sent by video frame group module 1, generating erasure codes according to the independent video frame group data, and sending the erasure codes to FMP4 packaging module 3;

[0061] FMP4 packaging module 3: used to receive the independent video frame group data sent by the video frame group module 1 and the erasure code sent by the repair information generation module 2, and generate a DE1MP4 video file in FMP4 format according to the independent video frame group data and the erasure code, and send the MP4 video file in FMP4 format to the file repair module 4;

[0062] File repair module 4: used for receiving the MP4 video file in FMP4 format that needs to be repaired and sent by FMP4 packaging module 3, and repairing the MP4 video file in FMP4 format.

[0063] A method of a system with repair information video file, comprising the following steps:

[0064] 1. Generate independent video frame group data through video frame group module 1

[0065] 1.1. The video frame group module 1 decodes the video source image to obtain multiple independent video frame groups;

[0066] Specifically, in the step 1.1, the video frame group module 1 performs H264 / H265 decoding on the video source image to obtain independent video frame groups, which are used as independent small fragments of video content in the FMP4 file and contain a series of continuous frames, and the series of continuous frames includes an I frame, multiple P frames and B frames.

[0067] 1.2. The video frame group module 1 sends the obtained video frame group data to the repair information generation module 2 and the FMP4 packaging module 3;

[0068] 2. Generate erasure codes through repair information generation module 2

[0069] 2.1. The repair information generation module 2 receives the independent video frame group data sent by the video frame group module 1;

[0070] 2.2, the repair information generation module 2 generates a repair group according to the independent video frame group data;

[0071] Specifically, in step 2.2, the repair information generating module 2 regards a group of 100 adjacent video frames as a repair group.

[0072] 2.3. Repair information generation module 2 generates erasure codes for each repair group;

[0073] In step 2.3, the process of generating the erasure code is as follows:

[0074] 2.3.1: Set the erasure redundancy number to 5;

[0075] 2.3.2, the repair information generation module 2 generates a 100*105 Vandermonde matrix;

[0076] 2.3.3. The repair information generation module 2 extracts the data of a repair group of 100 video frames byte by byte and multiplies it by the 100*5 erasure code coefficient part of the Vandermonde matrix, and finally obtains 5 groups of erasure codes.

[0077] 2.4. The repair information generation module 2 sends the generated erasure code to the FMP4 packaging module 3;

[0078] 3. Generate MP4 video files in FMP4 format through FMP4 packaging module 3

[0079] 3.1, the FMP4 packaging module 3 receives the independent video frame group data sent by the video frame group receiving module 1 and the erasure code sent by the repair information generating module 2;

[0080] 3.2, the FMP4 packaging module 3 packages each independent video frame group data into an independent video content fragment consisting of a segmented moof metadata container and a segmented mdat data container in the FMP4 file;

[0081] 3.3, FMP4 packaging module 3 splits the erasure code into fragments, and packs each fragment into an mreed erasure code container;

[0082] In the step 3.3, the content of splitting the erasure code into fragments is as follows: the FMP4 packaging module 3 splits the 5 groups of erasure codes of the last repair group of 100 video frame groups into 100 fragments.

[0083] 3.4, the FMP4 packaging module 3 modifies the format of the video clips composed of the containers in step 3.2 and step 3.3 to generate an MP4 video file in FMP4 format;

[0084] Specifically, in step 3.4, the content of the format modification is: the FMP4 packaging module 3 finally modifies the FMP4 basic moov+(moof+mdat)*N format to moov+(moof+mdat+mreed)*N format.

[0085] 3.5. The FMP4 packaging module 3 sends the MP4 video file in FMP4 format that needs to be repaired to the file repair module 4;

[0086] 4. Use file repair module 4 to repair the MP4 video file in FMP4 format that needs file repair

[0087] 4.1. The file repair module 4 receives the MP4 video file in FMP4 format that needs to be repaired and sent by the FMP4 packaging module 3;

[0088] 4.2. The file repair module 4 extracts a corresponding number of erasure codes from the mreed erasure code container according to the number of lost and damaged video frame groups;

[0089] Specifically, in step 4.2, the content of extracting a corresponding number of erasure codes is as follows: the file repair module 4 extracts a corresponding number of erasure codes from the mreed erasure code container of the next 100 video frame groups.

[0090] 4.3. The file repair module 4 extracts the recovery matrix from the put Moanamon matrix according to the position of the lost and damaged video frame group and the position of the supplementary erasure code, and calculates the inverse matrix;

[0091] In step 4.3, the inverse matrix is ​​calculated as follows: the file repair module 4 extracts a 100*100 recovery matrix from the 100*105 Vandermonde matrix according to the positions of the lost and damaged 100*105 video frame groups and the positions where the erasure codes need to be supplemented, and calculates the inverse matrix of the 100*100 recovery matrix.

[0092] 4.4, the file repair module 4 calculates the data obtained in step 4.2 and step 4.3 to obtain the complete data of the video frame group;

[0093] In step 4.4, the content of the complete data of the video frame group is obtained as follows: the file repair module 4 multiplies the inverse matrix by the mixed data of the normal video frame group and the supplemented erasure code to obtain the complete data of 100 video frame groups.

[0094] 4.5. The file repair module 4 completes the missing part of the MP4 video file in the FMP4 format that needs to be repaired according to the obtained complete data of the video frame group, and completes the file repair.

[0095] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the attached claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved.

[0096] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that those skilled in the art can understand.

Claims

1. A system for video files with repair information, characterized in that: include: Video frame group module (1): used for the video frame group module (1) to generate independent video frame group data, and then send the independent video frame group data to the repair information generation module (2) and the FMP4 packaging module (3); A repair information generation module (2): used for receiving the independent video frame group data sent by the video frame group module (1), generating an erasure code according to the independent video frame group data, and sending the erasure code to the FMP4 packaging module (3); The FMP4 packaging module (3) is used to receive the independent video frame group data sent by the video frame group module (1) and the erasure code sent by the repair information generation module (2), and generate an MP4 video file in the FMP4 format according to the independent video frame group data and the erasure code, and then send the MP4 video file in the FMP4 format that needs to be repaired to the file repair module (4); The file repair module (4) is used to receive the MP4 video file in the FMP4 format that needs to be repaired and sent by the FMP4 packaging module (3), and repair the MP4 video file in the FMP4 format.

2. A method for a system with repair information video file, characterized in that it comprises the following steps:

1. Generate independent video frame group data through the video frame group module (1) 1.

1. The video frame group module (1) decodes the video source image to obtain multiple independent video frame groups; 1.

2. The video frame group module (1) sends the obtained independent video frame group data to the repair information generation module (2) and the FMP4 packaging module (3); 2. Generate erasure codes through the repair information generation module (2) 2.

1. The repair information generation module (2) receives the independent video frame group data sent by the video frame group module (1); 2.

2. The repair information generation module (2) generates a repair group according to the independent video frame group data; 2.

3. The repair information generation module (2) generates erasure codes for each repair group; 2.

4. The repair information generation module (2) sends the generated erasure code to the FMP4 packaging module (3); 3. Generate MP4 video files in FMP4 format through FMP4 packaging module (3) 3.1, the FMP4 packaging module (3) receives the independent video frame group data sent by the video frame group receiving module (1) and the erasure code sent by the repair information generating module (2); 3.2, the FMP4 packaging module (3) packages each independent video frame group data into an independent video content fragment consisting of a segmented moof metadata container and a segmented mdat data container in the FMP4 file; 3.

3. FMP4 packaging module (3) splits the erasure code into fragments and packages each fragment into an mreed erasure code container; 3.4, the FMP4 packaging module (3) modifies the format of the video clips composed of the containers in step 3.2 and step 3.3 to generate an MP4 video file in FMP4 format; 3.

5. The FMP4 packaging module (3) sends the MP4 video file in FMP4 format that needs to be repaired to the file repair module (4); 4. Use the file repair module (4) to repair the MP4 video file in FMP4 format that needs file repair 4.

1. The file repair module (4) receives the MP4 video file in FMP4 format that needs to be repaired and is sent by the FMP4 packaging module (3); 4.

2. The file repair module (4) extracts a corresponding number of erasure codes from the mreed erasure code container according to the number of lost and damaged video frame groups; 4.

3. The file repair module (4) extracts a recovery matrix from the Vandermonde matrix and calculates an inverse matrix according to the positions of the lost and damaged video frame groups and the positions where the erasure codes need to be supplemented; 4.4, the file repair module (4) calculates the data obtained in step 4.2 and step 4.3 to obtain the complete data of the video frame group; 4.

5. The file repair module (4) completes the missing part of the MP4 video file in the FMP4 format that needs to be repaired according to the obtained complete data of the video frame group, and completes the file repair.

3. The method of a system for video files with repair information according to claim 2 is characterized in that in the step 1.1, the video frame group module (1) performs H264 / H265 decoding on the video source image to obtain independent video frame groups, and the independent video frame groups are used as independent video content fragments in the FMP4 file, and contain a series of continuous frames, and the series of continuous frames include an I frame, multiple P frames and B frames.

4. The method of a system for video files with repair information according to claim 2, characterized in that: In the step 2.2, the repair information generating module (2) takes a group of 100 adjacent video frames as a repair group.

5. The method of a system for video files with repair information according to claim 2, characterized in that: In step 2.3, the process of generating the erasure code is as follows: 2.3.1: Set the erasure redundancy number to 5; 2.3.2, the repair information generation module (2) generates a 100*105 Vandermonde matrix; 2.3.

3. The repair information generation module (2) extracts the data of a repair group of 100 video frames byte by byte and multiplies it by the 100*5 erasure code coefficient part of the Vandermonde matrix, and finally obtains 5 groups of erasure codes.

6. The method of a system for video files with repair information according to claim 2, characterized in that: In the step 3.3, the contents of splitting the erasure codes into fragments are as follows: the FMP4 packaging module (3) splits the 5 groups of erasure codes of the last repair group of 100 video frames into 100 fragments.

7. The method of a system for video files with repair information according to claim 2, characterized in that: In step 3.4, the content of the format modification is: the FMP4 packaging module (3) finally modifies the FMP4 basic moov+(moof+mdat)*N format into moov+(moof+mdat+mreed)*N format.

8. The method of a system for video files with repair information according to claim 2, characterized in that: In the step 4.2, the content of extracting the corresponding number of erasure codes is as follows: the file repair module (4) extracts the corresponding number of erasure codes from the mreed erasure code container of the next 100 video frame groups.

9. The method of a system for video files with repair information according to claim 2, characterized in that: In step 4.3, the inverse matrix is ​​calculated as follows: the file repair module (4) extracts a 100*100 recovery matrix from the 100*105 Vandermonde matrix according to the positions of the lost and damaged 100*105 video frame groups and the positions where the erasure codes need to be supplemented, and calculates the inverse matrix of the 100*100 recovery matrix.

10. The method of a system for video files with repair information according to claim 2, characterized in that: In step 4.4, the content of the complete data of the video frame group is obtained as follows: the file repair module (4) multiplies the inverse matrix by the mixed data of the normal video frame group and the supplemented erasure code to obtain the complete data of 100 video frame groups.