MTS视频文件删除后恢复分段损坏
视频文件损坏,录像器材是是索尼摄像机,视频格式为MTS, 误删除了,删除后没有二次破坏数据操作,既没有拍新的视频,也没有存入过其它文件,但是恢复出来的视频却是断断续续的,一个20分钟内容恢复后却是20多段小文件,文件头尾时有出现其它日期的内容画面。
碎片组合修复技术解决MTS视频文件问题
这一个问题属于技术难度较高的,通过代码检查可以推断出这是由于平常久未格式化磁盘造成的数据碎片。要解决这一问题,必须要对MTS视频结构有非常深入的研究,MTS视频结构和MOV或MP4的封装是不同的,经测试和对比,通过MOV或MP4视频文件的修复思路行不通。通过对MTS的文件信息(附在文件后面)查询,发现MTS并不是MPEG编码格式。因此得根据MTS的编码特征来处理帧与帧的连接和组合,从而解决问题。以下为MTS视频文件信息,供参考修复:
Video | |
ID | 4113 (0x1011) |
Menu ID | 1 (0x1) |
Format | AVC |
Format/Info | Advanced Video Codec |
Format profile | High@L4 |
Format settings | CABAC / 2 Ref Frames |
Format settings, CABAC | Yes |
Format settings, Reference frames | 2 frames |
Format settings, GOP | M=3, N=12 |
Codec ID | 27 |
Duration | 19 s 120 ms |
Bit rate mode | Variable |
Bit rate | 21.3 Mb/s |
Maximum bit rate | 21.6 Mb/s |
Width | 1 920 pixels |
Height | 1 080 pixels |
Display aspect ratio | 16 |
Frame rate | 25.000 FPS |
Color space | YUV |
Chroma subsampling | 4 |
Bit depth | 8 bits |
Scan type | Interlaced |
Scan type, store method | Separated fields |
Scan order | Top Field First |
Bits/(Pixel*Frame) | 0.41 |
Stream size | 48.4 MiB (89%) |
Audio | |
ID | 4352 (0x1100) |
Menu ID | 1 (0x1) |
Format | PCM |
Format settings | Big / Signed |
Muxing mode | Blu-ray |
Codec ID | 128 |
Duration | 19 s 195 ms |
Bit rate mode | Constant |
Bit rate | 1 536 kb/s |
Channel(s) | 2 channels |
Channel layout | L R |
Sampling rate | 48.0 kHz |
Bit depth | 16 bits |
Delay relative to video | -80 ms |
Stream size | 3.51 MiB (6%) |