CN112040239A - A kind of file repair method and device based on AVI format file structure - Google Patents

A kind of file repair method and device based on AVI format file structure Download PDF

Info

Publication number
CN112040239A
CN112040239A CN202010960632.8A CN202010960632A CN112040239A CN 112040239 A CN112040239 A CN 112040239A CN 202010960632 A CN202010960632 A CN 202010960632A CN 112040239 A CN112040239 A CN 112040239A
Authority
CN
China
Prior art keywords
file
avi
repair
source code
damaged
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
Application number
CN202010960632.8A
Other languages
Chinese (zh)
Other versions
CN112040239B (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.)
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
Original Assignee
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
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 Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd, State Grid Corp of China SGCC filed Critical Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
Priority to CN202010960632.8A priority Critical patent/CN112040239B/en
Publication of CN112040239A publication Critical patent/CN112040239A/en
Application granted granted Critical
Publication of CN112040239B publication Critical patent/CN112040239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/85406Content authoring involving a specific file format, e.g. MP4 format

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

本发明公开了一种基于AVI格式文件结构的文件修复方法及装置,方法包括以下步骤:确定损坏文件的编码类型;根据损坏文件的编码类型,制作同编码类型的源码AVI文件;修改源码AVI文件代码,生成源码修复文件;将源码修复文件和损坏视频文件合并,得到新的AVI修复文件;使用播放器打开AVI修复文件,确定原始输入尺寸、分辨率、比特率、帧率信息;将AVI修复文件进行转码操作,填入尺寸、分辨率、比特率、帧率信息,输出新的AVI文件,完成AVI文件修复。可基于AVI格式文件底层文件16进制代码格式,对受损AVI格式文件进行修复,根据文件大小不同,破坏方式的不同,可有效的修复、引导受损AVI格式文件,使文件内重要视频信息得以恢复。

Figure 202010960632

The invention discloses a file repairing method and device based on an AVI format file structure. The method comprises the following steps: determining the encoding type of the damaged file; producing a source code AVI file of the same encoding type according to the encoding type of the damaged file; modifying the source code AVI file code, generate the source code repair file; merge the source code repair file and the damaged video file to get a new AVI repair file; use the player to open the AVI repair file, determine the original input size, resolution, bit rate, frame rate information; repair the AVI The file is transcoded, fill in the size, resolution, bit rate, frame rate information, output a new AVI file, and complete the AVI file repair. It can repair damaged AVI format files based on the hexadecimal code format of the underlying files of AVI format files. According to different file sizes and different damage methods, it can effectively repair and guide damaged AVI format files, so that the important video information in the file can be repaired. be restored.

Figure 202010960632

Description

一种基于AVI格式文件结构的文件修复方法及装置A kind of file repair method and device based on AVI format file structure

技术领域technical field

本发明涉及一种基于AVI格式文件结构的文件修复方法及装置。The invention relates to a file repairing method and device based on the AVI format file structure.

背景技术Background technique

AVI格式视频文件,是一种目前应用范围较为广泛的视频格式文件,该文件格式英文全称为Audio Video Interleaved,即音频视频交错格式,是将语音和影像同步组合在一起的文件格式。目前该格式文件主要应用于视频拍摄、影视编辑、司法取证等领域,主要作为图形电子证据、影视媒体母带素材、日常生活纪念等应用方式在计算机存储介质内保存。AVI format video file is a widely used video format file. The full English name of the file format is Audio Video Interleaved, which is an audio and video interleaved format. It is a file format that combines voice and video synchronously. At present, this format file is mainly used in video shooting, film and television editing, judicial forensics and other fields.

但在日常生活工作中常常因为存储介质损坏,病毒破坏使文件遭受不可逆的损坏,恶意病毒常常会固定清零或加密头部固定范围内16进制代码,存储介质损坏时也会因为存储介质坏扇区、坏块的问题导致无法无法完整读取AVI格式文件头部重要扇区代码,从而使AVI格式文件完全无法打开,文件内重要视频信息无法识别、使用,且市面上常见AVI格式修复工具针对这一问题完全无效。However, in daily work, files are often irreversibly damaged due to damage to the storage medium and virus damage. Malicious viruses often clear or encrypt hexadecimal codes within a fixed range of the header. The problem of sectors and bad blocks makes it impossible to completely read the important sector codes in the header of the AVI format file, so that the AVI format file cannot be opened at all, and the important video information in the file cannot be recognized and used, and there are common AVI format repair tools on the market. Completely ineffective against this issue.

发明内容SUMMARY OF THE INVENTION

有鉴于现有技术的上述缺陷,本发明所要解决的技术问题是提供一种基于AVI格式文件结构的文件修复方法以及装置,根据文件大小不同,破坏方式的不同,可有效的修复、引导受损AVI格式文件,使文件内重要视频信息得以恢复。In view of the above-mentioned defects of the prior art, the technical problem to be solved by this invention is to provide a kind of file repair method and device based on AVI format file structure, according to different file sizes, different damage modes, can effectively repair, guide damaged AVI format file, so that the important video information in the file can be recovered.

为实现上述目的,本发明提供了一种基于AVI格式文件结构的文件修复方法,所述方法包括以下步骤:For achieving the above object, the invention provides a kind of file repair method based on AVI format file structure, described method may further comprise the steps:

确定损坏文件的编码类型;Determine the encoding type of the corrupted file;

根据损坏文件的编码类型,制作同编码类型的源码AVI文件;According to the encoding type of the damaged file, make a source AVI file of the same encoding type;

修改源码AVI文件代码,生成源码修复文件;Modify the source code of the AVI file to generate the source code repair file;

将源码修复文件和损坏视频文件合并,得到新的AVI修复文件;Merge the source code repair file and the damaged video file to get a new AVI repair file;

使用播放器打开AVI修复文件,确定原始输入尺寸、分辨率、比特率、帧率信息;Use the player to open the AVI repair file and determine the original input size, resolution, bit rate, frame rate information;

将AVI修复文件进行转码操作,填入尺寸、分辨率、比特率、帧率信息,输出新的AVI文件,完成AVI文件修复。Transcode the AVI repair file, fill in the size, resolution, bit rate, frame rate information, output a new AVI file, and complete the AVI file repair.

可选的,所述确定损坏文件的编码包括:使用WINHEX软件打开受损文件,通过文本搜索功能搜索预设编码类型确定受损文件编码类型。Optionally, the determining the encoding of the damaged file includes: using WINHEX software to open the damaged file, and searching for a preset encoding type through a text search function to determine the encoding type of the damaged file.

可选的,所述搜索预设类型包括WMV、MPG、XIVD、DVIX、AVC中的任意一种。Optionally, the preset search type includes any one of WMV, MPG, XIVD, DVIX, and AVC.

可选的,所述根据损坏文件的编码类型,制作同编码类型的源码AVI文件包括:按受损文件的编码类型制作一个长度为5秒相同编码的源码文件,然后跳转至源码文件末尾,向上寻找最后一个索引表的起始偏移地址,选定源码文件的第一个字节作为块的开始,生成新的文件,作为源码修复文件。Optionally, according to the coding type of the damaged file, producing a source code AVI file of the same coding type includes: according to the coding type of the damaged file, making a source code file with the same coding of 5 seconds in length, and then jumping to the end of the source code file, Look up the starting offset address of the last index table, select the first byte of the source code file as the start of the block, and generate a new file as the source code repair file.

可选的,所述将源码修复文件和损坏视频文件合并,包括:以源码修复文件为附加一,损坏视频文件为附加二,通过WINHEX进行附加一和附加二合并。Optionally, the merging of the source code repair file and the damaged video file includes: taking the source code repair file as the appendix 1 and the damaged video file as the appendix 2, and merging the appendix 1 and the appendix 2 through WINHEX.

可选的,通过WINHEX进行附加一和附加二合并前还包括以下步骤:通过WINHEX将源码修复文件与受损视频文件的总字节数减去8,转换为16进制倒序填入0X04至0X07地址。Optionally, before merging the additional 1 and the additional 2 through WINHEX, the following steps are also included: through WINHEX, subtract 8 from the total number of bytes of the source repair file and the damaged video file, convert it to hexadecimal and fill in 0X04 to 0X07 in reverse order address.

可选的,所述使用播放器打开AVI修复文件,确定原始输入尺寸、分辨率、比特率、帧率信息包括:用POTPLAYER软件打开合并后的AVI修复文件,打开文件属性菜单观测视频尺寸变化,确定视频原始尺寸、分辨率、比特率、帧率信息。Optionally, the use of the player to open the AVI repair file, and determining the original input size, resolution, bit rate, and frame rate information include: using the POTPLAYER software to open the merged AVI repair file, and opening the file properties menu to observe video size changes, Determine the video original size, resolution, bit rate, frame rate information.

可选的,将AVI修复文件进行转码操作,填入尺寸、分辨率、帧率信息,输出新的AVI文件,包括:通过FormatFactory将AVI修复文件进行AVI转AVI转码操作,配置成观测到的原始尺寸、分辨率、比特率、帧率信息,输出新的AVI文件。Optionally, perform the transcoding operation on the AVI repaired file, fill in the size, resolution, and frame rate information, and output a new AVI file, including: performing the AVI to AVI transcoding operation on the AVI repaired file through FormatFactory, and configuring it to observe The original size, resolution, bit rate, frame rate information, output a new AVI file.

可选的,所述完成AVI文件修复包括:将新的AVI文件导入PR、AE、VEGAS或者其他视频编辑软件,剪辑掉视频样本文件的帧,完成AVI文件修复。Optionally, the completion of the AVI file restoration includes: importing the new AVI file into PR, AE, VEGAS or other video editing software, editing out the frames of the video sample file, and completing the AVI file restoration.

为实现上述目的,本发明还提供一种基于AVI格式文件结构的文件修复装置,包括:For achieving the above object, the present invention also provides a kind of file repairing device based on AVI format file structure, comprising:

编码类型确定模块,用于确定损坏文件的编码类型;The encoding type determination module is used to determine the encoding type of the damaged file;

源码文件制作模块,用于制作同编码类型的源码AVI文件;The source code file making module is used to make source code AVI files of the same encoding type;

源码修复文件制作模块,用于修改源码AVI文件,生成新的源码修复文件;The source code repair file production module is used to modify the source code AVI file and generate a new source code repair file;

合并模块,用于将源码修复文件和损坏视频文件合并,得到新的AVI修复文件;The merge module is used to merge the source code repair file and the damaged video file to obtain a new AVI repair file;

转码模块,用于将AVI修复文件进行转码操作,完成AVI文件修复。The transcoding module is used to transcode the AVI repair file to complete the AVI file repair.

由于采用了上述技术方案,本发明具有如下的优点:本发明方法建立的基于AVI格式文件结构的文件修复方法,可基于AVI格式文件底层文件16进制代码格式,对受损AVI格式文件进行修复,根据文件大小不同,破坏方式的不同,可有效的修复、引导受损AVI格式文件,使文件内重要视频信息得以恢复。Owing to adopting the above-mentioned technical scheme, the present invention has the following advantages: the file restoration method based on the AVI format file structure established by the method of the present invention can repair the damaged AVI format file based on the hexadecimal code format of the underlying file of the AVI format file. , according to different file sizes and different ways of damage, it can effectively repair and guide damaged AVI format files, so that important video information in the file can be restored.

附图说明Description of drawings

图1是本发明第一实施例基于AVI格式文件结构的文件修复方法的流程图;Fig. 1 is the flow chart of the file repair method based on AVI format file structure in the first embodiment of the present invention;

图2a及图2b是本发明第一实施例基于AVI格式文件结构的文件修复方法步骤2的示意图;2a and 2b are schematic diagrams of step 2 of the file repair method based on the AVI format file structure according to the first embodiment of the present invention;

图3是本发明第一实施例基于AVI格式文件结构的文件修复方法步骤3的示意图;3 is a schematic diagram of step 3 of a file repair method based on an AVI format file structure according to the first embodiment of the present invention;

图4是本发明第一实施例基于AVI格式文件结构的文件修复方法步骤4的示意图;4 is a schematic diagram of step 4 of the file repair method based on the AVI format file structure according to the first embodiment of the present invention;

图5及图6是本发明第一实施例基于AVI格式文件结构的文件修复方法步骤5的示意图;5 and 6 are schematic diagrams of step 5 of the file repair method based on the AVI format file structure according to the first embodiment of the present invention;

图7是本发明第一实施例基于AVI格式文件结构的文件修复方法步骤6的示意图。7 is a schematic diagram of step 6 of the file repair method based on the AVI format file structure according to the first embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明作进一步说明:Below in conjunction with accompanying drawing and embodiment, the present invention will be further described:

实施例一:Example 1:

如图1所示,一种基于AVI格式文件结构的文件修复方法,所述方法包括以下步骤:As shown in Figure 1, a kind of file repair method based on AVI format file structure, described method may further comprise the steps:

步骤1:确定损坏文件的编码类型;Step 1: Determine the encoding type of the corrupted file;

步骤2:根据损坏文件的编码类型,制作同编码类型的源码AVI文件;Step 2: According to the encoding type of the damaged file, make a source AVI file of the same encoding type;

步骤3:修改源码AVI文件代码,生成源码修复文件;Step 3: Modify the source code AVI file code to generate the source code repair file;

步骤4:将源码修复文件和损坏视频文件合并,得到新的AVI修复文件;Step 4: Merge the source code repair file and the damaged video file to get a new AVI repair file;

步骤5:使用播放器打开AVI修复文件,确定原始输入尺寸、分辨率、比特率、帧率信息;Step 5: Use the player to open the AVI repair file, and determine the original input size, resolution, bit rate, and frame rate information;

步骤6:将AVI修复文件进行转码操作,填入尺寸、分辨率、比特率、帧率信息,输出新的AVI文件,完成AVI文件修复。Step 6: Transcode the AVI repair file, fill in the size, resolution, bit rate, frame rate information, output a new AVI file, and complete the AVI file repair.

具体的,步骤1中,所述确定损坏文件的编码包括:使用WINHEX软件打开受损文件,通过文本搜索功能搜索“WMV”、“MPG”、“XIVD”、“DVIX”、“AVC”等字符确定受损文件编码类型。作为本发明的其他优选实施例,搜索的字符不限于本发明所列出的“WMV”、“MPG”、“XIVD”、“DVIX”、“AVC”,还可以是搜索其他视频文件格式的字符。Specifically, in step 1, determining the code of the damaged file includes: using WINHEX software to open the damaged file, and searching for characters such as "WMV", "MPG", "XIVD", "DVIX", "AVC" through the text search function Determine the corrupt file encoding type. As other preferred embodiments of the present invention, the searched characters are not limited to "WMV", "MPG", "XIVD", "DVIX", and "AVC" listed in the present invention, and may also be searched for characters in other video file formats .

因为AVI格式文件损坏可能由病毒造成,部分病毒会将文件头部固定范围清零,需要使用WINHEX软件将清零范文内的代码随机化写入一次。Because the damage of AVI format files may be caused by viruses, some viruses will clear the fixed range of the file header, and you need to use WINHEX software to randomly write the code in the clearing template once.

进一步的,步骤2和步骤3中,所述根据损坏文件的编码类型,制作同编码类型的源码AVI文件,包括:按受损文件的编码类型制作一个长度为5秒相同编码的源码文件,然后跳转至源码文件末尾,向上寻找最后一个索引表的起始偏移地址,选定偏移地址0X00作为块的开始,即选定源码文件的第一个字节作为块的开始,具体参见图2a,选定相同编码的源码文件最后一个索引表前一个字节作为块的结束,具体参见图2b,生成新的文件,作为源码修复文件。Further, in step 2 and step 3, according to the encoding type of the damaged file, making the source code AVI file of the same encoding type, including: making a source code file with the same encoding of 5 seconds in length according to the encoding type of the damaged file, and then Jump to the end of the source code file, look up the starting offset address of the last index table, and select the offset address 0X00 as the start of the block, that is, select the first byte of the source code file as the start of the block, see figure for details 2a, select the byte before the last index table of the source code file with the same encoding as the end of the block, see Figure 2b for details, and generate a new file as the source code repair file.

结合图3所示,通过WINHEX进行附加一和附加二合并前还包括以下步骤:Combined with Figure 3, the following steps are also included before the additional 1 and 2 merging are performed through WINHEX:

通过WINHEX将源码修复文件与受损视频文件的总字节数减去8,转换为16进制倒序填入0X04至0X07地址。Use WINHEX to subtract 8 from the total bytes of the source repair file and the damaged video file, convert it to hexadecimal and fill in the addresses from 0X04 to 0X07 in reverse order.

结合图4所示,所述将源码修复文件和损坏视频文件合并,包括:以源码修复文件为附加一,损坏视频文件为附加二,通过WINHEX进行附加一和附加二合并,得到所述新的AVI修复文件。As shown in FIG. 4 , the merging of the source code repair file and the damaged video file includes: taking the source code repair file as the additional one, the damaged video file as the additional second, and merging the additional one and the second one through WINHEX to obtain the new AVI repair files.

结合图5及图6所示,所述使用播放器打开AVI修复文件,确定原始输入尺寸、分辨率、比特率、帧率信息具体包括:用POTPLAYER软件打开合并后的新的AVI修复文件,打开文件属性菜单观测视频尺寸变化,确定视频原始尺寸、分辨率、比特率、帧率等信息。Shown in conjunction with Figure 5 and Figure 6, the described use player to open the AVI repair file, determine the original input size, resolution, bit rate, frame rate information specifically include: open the merged new AVI repair file with POTPLAYER software, open The file properties menu observes the video size change, and determines the video original size, resolution, bit rate, frame rate and other information.

将AVI修复文件进行转码操作,填入尺寸、分辨率、帧率信息,输出新的AVI文件,包括:通过FormatFactory将AVI修复文件进行AVI转AVI转码操作,配置成观测到的原始尺寸、分辨率、比特率、帧率信息,输出新的AVI文件。当播放帧率与源帧率相差不大时,可以直接使用原帧率。Transcode the AVI repaired file, fill in the size, resolution, frame rate information, and output a new AVI file, including: transcoding the AVI repaired file from AVI to AVI through FormatFactory, and configure it to the observed original size, Resolution, bit rate, frame rate information, output new AVI file. When the playback frame rate is not much different from the source frame rate, the original frame rate can be used directly.

结合图7所示,所述完成AVI文件修复包括:将新的AVI文件导入PR、AE、VEGAS或者其他视频编辑软件,剪辑掉视频样本文件的帧,完成AVI文件修复。As shown in FIG. 7 , the completion of the AVI file restoration includes: importing the new AVI file into PR, AE, VEGAS or other video editing software, editing the frames of the video sample file, and completing the AVI file restoration.

综上所述,本发明方法建立的基于AVI格式文件结构的文件修复方法,可基于AVI格式文件底层文件16进制代码格式,对受损AVI格式文件进行修复,根据文件大小不同,破坏方式的不同,可有效的修复、引导受损AVI格式文件,使文件内重要视频信息得以恢复。To sum up, the file repair method based on the AVI format file structure established by the method of the present invention can repair the damaged AVI format file based on the hexadecimal code format of the underlying file of the AVI format file. Different, it can effectively repair and guide damaged AVI format files, so that the important video information in the file can be recovered.

实施例二:Embodiment 2:

本发明第二实施例提供一种基于AVI格式文件结构的文件修复装置,包括:The second embodiment of the present invention provides a file restoration device based on the AVI format file structure, comprising:

编码类型确定模块,用于确定损坏文件的编码类型;编码类型确定模块使用WINHEX软件打开受损文件,通过文本搜索功能搜索“WMV”、“MPG”、“XIVD”、“DVIX”、“AVC”等字符确定受损文件编码类型。The encoding type determination module is used to determine the encoding type of the damaged file; the encoding type determination module uses the WINHEX software to open the damaged file, and searches for "WMV", "MPG", "XIVD", "DVIX", "AVC" through the text search function and other characters to determine the corrupted file encoding type.

源码文件制作模块,用于制作同编码类型的源码AVI文件;源码文件制作模块按受损文件的编码类型制作一个长度为5秒相同编码的源码文件,然后跳转至源码文件末尾,向上寻找最后一个索引表的起始偏移地址,选定偏移地址0作为块的开始,生成新的文件,作为源码修复文件。The source code file creation module is used to create the source AVI file of the same encoding type; the source file creation module creates a source code file with the same encoding of 5 seconds in length according to the encoding type of the damaged file, and then jumps to the end of the source code file, looking up for the last The starting offset address of an index table, the offset address 0 is selected as the beginning of the block, and a new file is generated as the source code repair file.

源码修复文件制作模块,用于修改源码AVI文件,生成新的源码修复文件;按受损文件的编码类型制作一个长度为5秒相同编码的源码文件,然后跳转至源码文件末尾,向上寻找最后一个索引表的起始偏移地址,选定偏移地址0作为块的开始,生成新的文件,作为源码修复文件。The source code repair file creation module is used to modify the source code AVI file and generate a new source code repair file; according to the encoding type of the damaged file, create a source code file with the same encoding with a length of 5 seconds, then jump to the end of the source code file, and look up for the last The starting offset address of an index table, the offset address 0 is selected as the beginning of the block, and a new file is generated as the source code repair file.

合并模块,用于将源码修复文件和损坏视频文件合并,得到新的AVI修复文件;合并模块以源码修复文件为附加一,损坏视频文件为附加二,通过WINHEX进行附加一和附加二合并,得到所述新的AVI修复文件。The merge module is used to merge the source code repair file and the damaged video file to obtain a new AVI repair file; the merge module takes the source code repair file as the add-on 1 and the damaged video file as the add-on 2, and merges the add-on one and the add-on two through WINHEX, and obtains The new AVI repair file.

转码模块,用于将AVI修复文件进行转码操作,完成AVI文件修复。将AVI修复文件进行转码操作,填入尺寸、分辨率、帧率信息,输出新的AVI文件;将新的AVI文件导入PR、AE、VEGAS或者其他视频编辑软件,剪辑掉视频样本文件的帧,完成AVI文件修复。The transcoding module is used to transcode the AVI repair file to complete the AVI file repair. Transcode the AVI repaired file, fill in the size, resolution, frame rate information, and output a new AVI file; import the new AVI file into PR, AE, VEGAS or other video editing software, and trim the frames of the video sample file , complete the AVI file repair.

以上详细描述了本发明的较佳具体实施例。应当理解,本领域的普通技术人员无需创造性劳动就可以根据本发明的构思做出诸多修改和变化。因此,凡本技术领域中技术人员依本发明的构思在现有技术的基础上通过逻辑分析、推理或者有限的实验可以得到的技术方案,皆应在由权利要求书所确定的保护范围内。The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and changes according to the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art through logical analysis, reasoning or limited experiments on the basis of the prior art according to the concept of the present invention shall fall within the protection scope determined by the claims.

Claims (10)

1. A file repair method based on an AVI format file structure is characterized by comprising the following steps:
determining the coding type of the damaged file;
according to the coding type of the damaged file, making a source code AVI file with the same coding type;
modifying the AVI file code of the source code to generate a source code repair file;
merging the source code repair file and the damaged video file to obtain a new AVI repair file;
opening an AVI repair file by using a player, and determining the information of the original input size, resolution, bit rate and frame rate;
and transcoding the AVI repair file, filling size, resolution, bit rate and frame rate information, outputting a new AVI file, and completing AVI file repair.
2. The AVI format file structure-based file repair method of claim 1, wherein the determining the encoding of the corrupted file comprises: and (4) opening the damaged file by using WINHEX software, and searching a preset coding type through a text search function to determine the coding type of the damaged file.
3. The file repair method according to claim 2, wherein the search preset type includes any one of WMV, MPG, XIVD, DVIX, AVC.
4. The method of claim 1, wherein the preparing a source code AVI file of the same encoding type according to the encoding type of the damaged file comprises: and manufacturing a source code file with the same code length of 5 seconds according to the coding type of the damaged file, selecting the first byte of the source code file as the start of a block, then jumping to the tail of the source code file, upwards searching for the initial offset address of the last index table, and generating a new file as a source code repair file.
5. The AVI format file structure-based file repair method of claim 1, wherein the merging the source code repair file and the corrupted video file comprises: and adding a first file and a second file by using the source code repair file and the damaged video file, and combining the first file and the second file by using WINHEX.
6. A file repair method based on AVI format file structure as claimed in claim 5, further comprising the following steps before performing the additional one and additional two mergers by WINHEX: the total byte number of the source code repair file and the damaged video file is subtracted by 8 through WINHEX, and the files are converted into 16-system reverse order to fill in the addresses from 0X04 to 0X 07.
7. The AVI format file structure-based file repair method of claim 1, wherein the opening an AVI repair file using a player, the determining original input size, resolution, bit rate, frame rate information comprising: and opening the combined AVI repair file by using POTPLAYER software, opening a file attribute menu to observe the size change of the video, and determining the original size, resolution, bit rate and frame rate information of the video.
8. The method of claim 7, wherein transcoding the AVI repair file to fill in size, resolution, and frame rate information and output a new AVI file comprises: and carrying out AVI-to-AVI transcoding operation on the AVI repair file through the FormatFactory, configuring the AVI repair file into the observed original size, resolution, bit rate and frame rate information, and outputting a new AVI file.
9. The AVI format file structure-based file repair method of claim 7, wherein the completing the AVI file repair includes: and importing the new AVI file into PR, AE, VEGAS or other video editing software, clipping frames of the video sample file, and completing AVI file repair.
10. A file repair device based on AVI format file structure is characterized in that: comprises that
The coding type determining module is used for determining the coding type of the damaged file;
the source code file manufacturing module is used for manufacturing source code AVI files with the same coding type;
the source code repair file manufacturing module is used for modifying the source code AVI file and generating a new source code repair file;
the merging module is used for merging the source code repair file and the damaged video file to obtain a new AVI repair file;
and the transcoding module is used for transcoding the AVI repair file to complete AVI file repair.
CN202010960632.8A 2020-09-14 2020-09-14 File repair method and device based on AVI format file structure Active CN112040239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010960632.8A CN112040239B (en) 2020-09-14 2020-09-14 File repair method and device based on AVI format file structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010960632.8A CN112040239B (en) 2020-09-14 2020-09-14 File repair method and device based on AVI format file structure

Publications (2)

Publication Number Publication Date
CN112040239A true CN112040239A (en) 2020-12-04
CN112040239B CN112040239B (en) 2022-07-26

Family

ID=73589820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010960632.8A Active CN112040239B (en) 2020-09-14 2020-09-14 File repair method and device based on AVI format file structure

Country Status (1)

Country Link
CN (1) CN112040239B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334350A (en) * 2022-07-25 2022-11-11 广东跃昉科技有限公司 Method and device for repairing file, terminal equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110097058A1 (en) * 2009-10-23 2011-04-28 Vivotek Inc. Method of processing audio-video data
CN102724551A (en) * 2012-06-13 2012-10-10 天脉聚源(北京)传媒科技有限公司 Video encoding system and video encoding method
US20130254611A1 (en) * 2012-03-23 2013-09-26 Qualcomm Incorporated Recovering data in multimedia file segments
CN105631335A (en) * 2015-12-25 2016-06-01 北京奇虎科技有限公司 Dynamic decompression method, device and apparatus
CN107896343A (en) * 2017-11-29 2018-04-10 天津聚飞创新科技有限公司 The restorative procedure and device of MP4 files
CN110740391A (en) * 2019-10-31 2020-01-31 四川效率源信息安全技术股份有限公司 method for repairing MP4 damaged files
CN111028135A (en) * 2019-12-10 2020-04-17 国网重庆市电力公司电力科学研究院 An image file repair method
CN111294647A (en) * 2018-12-10 2020-06-16 中国移动通信集团有限公司 A video processing method, device and device, and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110097058A1 (en) * 2009-10-23 2011-04-28 Vivotek Inc. Method of processing audio-video data
US20130254611A1 (en) * 2012-03-23 2013-09-26 Qualcomm Incorporated Recovering data in multimedia file segments
CN102724551A (en) * 2012-06-13 2012-10-10 天脉聚源(北京)传媒科技有限公司 Video encoding system and video encoding method
CN105631335A (en) * 2015-12-25 2016-06-01 北京奇虎科技有限公司 Dynamic decompression method, device and apparatus
CN107896343A (en) * 2017-11-29 2018-04-10 天津聚飞创新科技有限公司 The restorative procedure and device of MP4 files
CN111294647A (en) * 2018-12-10 2020-06-16 中国移动通信集团有限公司 A video processing method, device and device, and storage medium
CN110740391A (en) * 2019-10-31 2020-01-31 四川效率源信息安全技术股份有限公司 method for repairing MP4 damaged files
CN111028135A (en) * 2019-12-10 2020-04-17 国网重庆市电力公司电力科学研究院 An image file repair method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
强振平: "深度学习图像修复方法综述", 《中国图象图形学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115334350A (en) * 2022-07-25 2022-11-11 广东跃昉科技有限公司 Method and device for repairing file, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN112040239B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN112584061B (en) Multimedia universal template generation method, electronic equipment and storage medium
US7574655B2 (en) System and method for encapsulation of representative sample of media object
JP2008518315A (en) How to annotate a timeline file
US9645985B2 (en) Systems and methods for customizing text in media content
JP2010519806A (en) Method for generating a data stream and identifying a position in the data stream
CN103324513B (en) Program annotation method and apparatus
KR100366760B1 (en) A method of combining multi media files
JP2007012112A (en) Data recording device and method thereof, program, and recording medium
CN108184079A (en) The merging method and device of a kind of multimedia file
CN112040239B (en) File repair method and device based on AVI format file structure
US7337297B2 (en) Method and apparatus for recording data with pseudo-merge
CN114638232A (en) Method and device for converting text into video, electronic equipment and storage medium
JP2012085264A (en) Video file generating device and video file generating method
Park et al. Advanced forensic procedure for the authentication of audio recordings generated by voice memos application of iOS14
JP2006074391A (en) File recording method and recorder
Casey et al. Design tradeoffs for developing fragmented video carving tools
CN112188246B (en) Video cloud storage method
CN111966973A (en) Copyright protection method and system based on picture pixel value steganography
US20240244299A1 (en) Content providing method and apparatus, and content playback method
US11204954B2 (en) Editable media file format
JP2007519068A (en) Computer-based calculation method and computer system for generating a semantic description using conversion technology
JP2004363825A (en) Recording and reproducing device, recording and reproducing method, and recording medium and program therefor
Chernyshev Library for Remote Copying of Video File Fragments
CN102354517B (en) Data recording method and device for virtual merging
CN111444195B (en) Method, device and equipment for clearing indexes in block chain type account book

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