ponchio / untrunc

Restore a damaged (truncated) mp4, m4v, mov, 3gp video. Provided you have a similar not broken video.
GNU General Public License v2.0
1.6k stars 225 forks source link

reserved bit set. Number of bands exceeds limit #90

Open chris30o0 opened 6 years ago

chris30o0 commented 6 years ago

Hi, I'm trying to gain access to a file which was presumably truncated by my dashcam. The file is 3.4GB which might be too large, however I'm not sure how to properly downsize it without losing any hope of regaining the video file. Also, I'm not sure if untrunc even fails on that file or already on the reference file. I should also mention that after running, I do get a 150kB file with a proper thumbnail (desired video). Here's the output I get:

$ ./untrunc ~/Downloads/AMBA0019.MOV ~/Downloads/AMBA0020.MOV 
Reading: /home/chris/Downloads/AMBA0019.MOV
Sample dependency flag atom found. I and P frames might need to recover that info.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2213200] unsupported color_parameter_type aclc
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/chris/Downloads/AMBA0019.MOV':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2017-12-08 19:51:43
  Duration: 00:03:43.93, start: 0.000000, bitrate: 11252 kb/s
    Stream #0:0(eng): Video: h264 (Main) [avc1 / 0x31637661]
      yuvj420p, pc, 1920x1080 [PAR 1:1 DAR 16:9], 10522 kb/s
      45 fps, 720k tbn (default)
    Metadata:
      creation_time   : 2017-12-08 19:51:43
      handler_name    : Ambarella AVC
      encoder         : Ambarella AVC encoder
    Stream #0:1(eng): Audio: aac (LC) [mp4a / 0x6134706D]
      48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      creation_time   : 2017-12-08 19:51:43
      handler_name    : Ambarella AAC
    Stream #0:2(eng): Subtitle: mov_text, 6 kb/s (default)
    Metadata:
      creation_time   : 2017-12-08 19:51:43
      handler_name    : Ambarella EXT
Track codec: mp4a
Failure because of NULL header
Track codec: avc1
avc1: Match with 0 header

Length: 6
Ref idc: 0
Nal type: 9
Partial length: 6

Length: 21
Ref idc: 0
Nal type: 6
Partial length: 27

Length: 18
Ref idc: 0
Nal type: 6
Partial length: 45

Length: 9
Ref idc: 0
Nal type: 6
Partial length: 54

Length: 143454
Ref idc: 1
Nal type: 5
First mb: 0
pic paramter set id: 0
Frame num: 0
field: 0
Idr pic: 3
Poc lsb: 0
Partial length: 143508

First byte expected 0
Track codec: mp4a
mp4a: Success because of large s value
Duration: 1024
Track codec: mp4a
mp4a: Success because of large s value
[aac @ 0x22200e0] Reserved bit set.
[aac @ 0x22200e0] Number of bands (50) exceeds limit (44).
Duration: 0

Invalid length. -1052488119. Wrong match in track: 0
Track codec: avc1
avc1: Match with 0 header

Buffer size exceeded
Track codec: 
Found 2 packets
Track duration: 1024 movie timescale: 720000 track timescale: 48000
Track duration: 16000 movie timescale: 720000 track timescale: 720000
Track duration: 0 movie timescale: 720000 track timescale: 720000
chris30o0 commented 6 years ago

Is this still maintained? I'm willing and capable to look through the code but I don't know where to start, let alone what exactly the cause for this error is.

suuuehgi commented 5 years ago

I have the same error

[aac @ 0x55bfcc004bc0] Number of bands (46) exceeds limit (43).
Duration: 0

Invalid length: -1052488119. Wrong match in track: 0.
Track 1 codec: avc1
avc1: No match because of NAL type: 31
Found 281 packets.

and assume that it will not be fixed in a foreseeable timespan.

In case anyone else runs into this, the only thing I found working was this Windows freeware, which manages to run under wine.

anthwlock commented 5 years ago

@suuuehgi could you please test my fork? I think i fixed this issue with this commit.

suuuehgi commented 5 years ago

@suuuehgi could you please test my fork? I think i fixed this issue with this commit.

Thank you very much for the effort! It fails in another fashion. I made a ticked regarding it.