anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
2.08k stars 199 forks source link

Error: bad track: 'jpeg' #76

Closed broeks-m closed 2 years ago

broeks-m commented 3 years ago

Hello, I'm trying to recover some MOV files from a canon eos d7 dslr camera. But so for no succes:(. I'm no sure what the issue is, it might be that the files are to badly damaged. When I run untrunc i get the following output:

Reading: untrunc/reference.MOV
Opening: untrunc/reference.MOV
Not an Audio nor Video track.
Repair: untrunc/error.mov
Track 0 codec: jpeg
Track 1 codec: sowt
Sowt is just raw data, no way to guess length (unless reliably detecting the other codec start).
Track 2 codec: 
Found 0 packets.

Saving to: untrunc/error.mov_fixed.mp4
Track 0 (jpeg): duration: 0 timescale: 24000
Adjusting track duration to movie timescale: New duration: 0 timescale: 24000.
Track 1 (sowt): duration: 0 timescale: 48000
Adjusting track duration to movie timescale: New duration: 0 timescale: 24000.
Track 2 (): duration: 0 timescale: 24000
Adjusting track duration to movie timescale: New duration: 0 timescale: 24000.
Movie duration: 0 timescale: 24000

It seems to me that the reference file is bad, however this file works fine in for example VLC. But I'm not sure what might be the issue. These are the files: Reference: https://drive.google.com/file/d/1i1JiJhmU5emKXizhwBfBP2Mc2vP6W4s6/view?usp=sharing Error: https://drive.google.com/file/d/1a4jaB_abCXLqrg_KA5k3NfEr1vtP8Bih/view?usp=sharing

anthwlock commented 3 years ago

Hey,

The output you posted is not from this version/fork of untrunc. But I tried your samples anyway, and it fails with: Error: bad track: 'jpeg' I will look into it once I have enough time, perhaps in the next week or so.

tdp4 commented 3 years ago

I also have this problem. The files were generated from Pinnacle's MultiCam Capture and the software hung on shutdown. I have a good sample and a bad sample (43gb [24gb and 17gb respectively] in total that I can link to, they are uploading now).

~/src/untrunc-s $ ./untrunc -v Source\ 3-2.mov Source\ 4-2.mov
Info: version '8024f0c' using ffmpeg '4.2.4-1ubuntu0.1'
Info: reading Source 3-2.mov
Info: parsing healthy moov atom ...
ftyp_ = 'qt  '
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Source 3-2.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    creation_time   : 2020-12-09T20:15:19.000000Z
  Duration: 00:41:22.27, start: 0.000000, bitrate: 80968 kb/s
    Stream #0:0(eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj422p(pc, bt470bg/unknown/unknown), 1920x1080, 80837 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc (default)
    Metadata:
      creation_time   : 2020-12-09T20:15:19.000000Z
      handler_name    : AVID Video Handler
      encoder         : mjpeg
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2020-12-09T20:15:19.000000Z
      handler_name    : AVID Audio Handler
assuming constant duration of 512 for 'jpeg' (x74468)
assuming constant duration of 1024 for 'mp4a' (x106904)

Info: unknown track 'jpeg' found -> fallback to dynamic stats
created dummy track 'free'
removed dummy track 'free'
order ( 100): (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 36) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (1, 3) (0, 35)
first_failed: 8 of 100
order: (1, 3)
isTrackOrderEnough: 0  (sz=0)
genPatternPerm of: mp4a
0 mp4a -1 0
1 jpeg 2.23593 7
genPatternPerm of: jpeg
0 mp4a 0 1
1 jpeg 2.23593 7
has_zero_transitions_: 0
Error: bad track: 'jpeg'

I have 10 other videos from the same software that work fine from the same set.

Files: https://drive.google.com/drive/folders/1Q-VazuN_8JtKFNgtYya6_kE7cxOs_IBL?usp=sharing

anthwlock commented 2 years ago

Support added in 4a2e4a6dad015f2a7495329bf42c44c8b05425b4, tested with @tdp4's files