有什么办法可以恢复损坏的mp4?

use*_*664 5 video mp4

我有一个 mp4 文件,它似乎以某种方式损坏了:

$ file HDV_1042.MP4
HDV_1042.MP4: data

$ mediainfo HDV_1042.MP4
General
Complete name                            : HDV_1042.MP4
File size                                : 1.72 GiB

$ ffprobe HDV_1042.MP4 
avprobe version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2007-2013 the Libav developers
  built on Apr  2 2013 17:02:36 with gcc 4.6.3
HDV_1042.MP4: Invalid data found when processing input

$ AtomicParsley HDV_1042.MP4 -T 1

AtomicParsley error: bad mpeg4 file (ftyp atom missing or alignment error).
Run Code Online (Sandbox Code Playgroud)

我尝试使用来自同一台相机的工作文件通过“untrunc”恢复它,但这不起作用:

$ ./untrunc HDV_1041.MP4 HDV_1042.MP4 Reading: HDV_1041.MP4
Composition time offset atom found. Out of order samples possible.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'HDV_1041.MP4':
  Metadata:
    major_brand     : avc1
    minor_version   : 0
    compatible_brands: avc1isom
    creation_time   : 1947-10-13 12:23:13
  Duration: 00:21:20.25, start: 0.000000, bitrate: 12131 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 1280x720, 11988 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 180k tbc
    Metadata:
      creation_time   : 1947-10-13 12:23:13
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s
    Metadata:
      creation_time   : 1947-10-13 12:23:13
Failed to parse atoms in truncated file
Run Code Online (Sandbox Code Playgroud)

也试过 ffmpeg/avconv 没有成功:

$ avconv -f h264 -i HDV_1042.MP4 -c:a copy -c:v copy HDV_1042.mp4 
avconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
  built on Apr  2 2013 17:02:36 with gcc 4.6.3
[h264 @ 0x1359ac0] non-existing PPS referenced
[h264 @ 0x1359ac0] non-existing PPS 0 referenced
[h264 @ 0x1359ac0] decode_slice_header error
[h264 @ 0x1359ac0] non-existing PPS 1 referenced
[h264 @ 0x1359ac0] decode_slice_header error
[h264 @ 0x1359ac0] no frame!
[h264 @ 0x134f9e0] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from 'HDV_1042.MP4':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264, 25 fps, 25 tbr, 1200k tbn, 2400k tbc
Output #0, mp4, to 'HDV_1042.mp4':
Output file #0 does not contain any stream
Run Code Online (Sandbox Code Playgroud)

以下是来自同一相机的工作文件示例:

$ mediainfo HDV_1041.MP4
General
Complete name                            : HDV_1041.MP4
Format                                   : MPEG-4
Format profile                           : JVT
Codec ID                                 : avc1
File size                                : 1.81 GiB
Duration                                 : 21mn 20s
Overall bit rate                         : 12.1 Mbps
Writing library                          : SEC 

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 21mn 20s
Bit rate mode                            : Variable
Bit rate                                 : 12.0 Mbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 59.940 fps
Minimum frame rate                       : 59.920 fps
Maximum frame rate                       : 59.960 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.217
Stream size                              : 1.79 GiB (99%)
Title                                    : HMX-H300
Language                                 : English

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 21mn 20s
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 19.5 MiB (1%)
Title                                    : HMX-H300
Language                                 : English
Run Code Online (Sandbox Code Playgroud)

小智 6

你可以试试这个:

对于需要恢复 MP4 AVC 的人来说,这里有一个替代方案: Mega Download

此实用程序可以从没有(或空)标头的未定版 MP4/MOV 文件中恢复 H.264/AVC 流。如果在录制过程中损坏摄像机等,您可能会得到未完成的文件。此实用程序已使用 GoPro 录制的文件进行了测试,但也可用于其他摄像机。

Usage:
  recover_mp4_to_h264 in_good_similar.mp4 --avcc
  recover_mp4_to_h264 in_corrupted.mp4 out_video.h264 [out_audio.aac | out_audio.wav | out_audio.mp3] [<recorder>]
  recover_mp4_to_h264 in_corrupted.mp4 out_video.h264 [--aac | --pcm | --mp3] [<recorder>]

Supported recorders:
  Default is Ambarella (used in GoPro, etc.)
  Specify --eos in case of Canon EOS
  Specify --apple in case of some Apple software encoder
  Specify --htc in case of HTC smartphone
  Specify --motorola in case of Motorola smartphone
  Specify --samsung in case of Samsung camcorder
Run Code Online (Sandbox Code Playgroud)

Step 1:使用之前任何一个好的分辨率和码率相同的文件,生成AVC配置记录;例如,

recover_mp4_to_h264.exe GOPR0346.MP4 --avcc
Run Code Online (Sandbox Code Playgroud)

注意:它将在当前目录中创建文件“avcc.hdr”。

步骤 2:从损坏的文件中恢复 H.264 流;例如,

recover_mp4_to_h264.exe GOPR0347.MP4 GOPR0347.h264 GOPR0347.aac
Run Code Online (Sandbox Code Playgroud)

注意:文件“avcc.hdr”必须存在。注意:--pcm如果要恢复佳能 EOS 写入的 MOV 文件,请指定或 WAV 文件名。

步骤 3:使用任何其他实用程序(例如 Yamb 或 FFmpeg)从 H.264 流 (GOPR0347.h264) 重新创建 MP4/MOV 文件。注意 MP4 不支持 PCM 声音;在这种情况下,您必须创建 MOV:

ffmpeg.exe -r 30 -i recovered.h264 -i recovered.wav -vcodec copy -acodec copy result.mov
Run Code Online (Sandbox Code Playgroud)


Nik*_*vic 1

我有视频修复工具 1.9.0.0,到目前为止我已经成功修复了大部分损坏的 MP4 文件。至少你可以尝试一下,因为试用版会修复一半的文件,这样你就可以看看它是否有效。缺点是它不是免费的,而且对于偶尔使用来说有点贵