如何在 Linux 中检查 avi 文件的完整性并自动修复它?

如何在 Linux 中检查 avi 文件的完整性并自动修复它?

我有一个 avi 文件并尝试按照建议检查它这里。但过了一会儿,我只得到了一个分段错误,没有任何其他信息!

如何修复/修复此 avi 文件?使用 观看此文件mplayer正常,使用ffmpegkdenlive观看则会导致错误!

系统:Ubuntu 13.10 文件大小:4.2 GB

添加:

这是运行命令时的部分输出(开始和结束)(完整输出约为 1 MB 的文本!)

ffmpeg -v error -i file.avi -f null -

Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press ctrl-c to stop encoding
[dvvideo @ 0x21f39c0] AC EOB marker is absent pos=64
    Last message repeated 1 times
.....
(These kind of lines repeat over and over and over. I really do not see a point providing them all. There are no build information. Interlaced in the output are lines like:
frame=  124 fps=  0 q=0.0 size=      -0kB time=4.00 bitrate=  -0.0kbits/s
)
....
    Last message repeated 3 times
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=69
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=65
    Last message repeated 1 times
    [dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=71
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=75
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=64
    Last message repeated 2 times
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=70
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=71
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=67
[dvvideo @ 0x1fad9c0] AC EOB marker is absent pos=65
Segmentation fault (core dumped)

答案1

尝试使用mencoder(的编码部分mplayer),如下所示:

mencoder -idx problemfile.avi -ovc copy -oac copy -o reindexedfile.avi

(通过http://www.kahunaburger.com/2010/01/30/fixing-an-avi-index-with-mencoder/

答案2

力量指数

mencoder -forceidx input.avi -o output.avi -oac copy -ovc copy  

全部复制

mencoder -ovc copy -oac copy input.file -o output.file  

另请参阅https://stackoverflow.com/questions/894903/how-can-i-validate-a-video-file-from-a-script

相关内容