untrunc icon indicating copy to clipboard operation
untrunc copied to clipboard

Only 6MB of video from 670MB file has been recovered

Open lapsio opened this issue 3 years ago • 6 comments

I have video from car dashcam that got cut around 4 minutes. Unfortunately untrunc produced file with only 6MB which is just first few seconds.

Here's output from untrunc:

    Reading: /home/lapsio/20180101_000516_A.MP4
    Repair: /home/lapsio/20180101_004010_A.MP4
    Mdat not found!
    Backtracked enough!

    Trying a different approach to locate mdat start
    Repair: /home/lapsio/20180101_004010_A.MP4
    Backtracked enough!
    Found 141 packets.
    Found 61 chunks for avc1
    Found 80 chunks for mp4a
    Saving to: /home/lapsio/20180101_004010_A_fixed.mp4

lapsio avatar Oct 16 '21 19:10 lapsio

I can't really tell what's the reason for finding only 141 packets, might be corrupted, might be a bug in my code. You can send me the files to [email protected] and I will have a look at it...

ponchio avatar Oct 17 '21 11:10 ponchio

i just recovered my file.

first i gave the untrunc correct example file with the length of 10 seconds and broken file with 2 minute length.

my resulting fixed file was 14 seconds. the resulting file size also was small.

then i just repeated the same again. the resulting file size became apprx the same as the source file size. still, mplayer was not able to play it after same 14 seconds.

i tried VLC, it has a setting to 'always' 'fix damaged or incemplete file', it played the file till the end, and i was able to convert the file to the playable file with vlc.

then i thought - what if my example file was too short?

i gave the untrunc the example file that is longer than the broken file, and this time the fixed file is correct and can be played with mplayer. (:

norayr avatar Nov 18 '21 21:11 norayr

In many videos some track is saved with additional information (gps, video recovery stuff, etc), but these might be very sparse in the file and a short example might lack an example of these (usually proprietary) tracks.

On Thu, Nov 18, 2021 at 10:49 PM Norayr Chilingarian < @.***> wrote:

i just recovered my file.

first i gave the untrunc correct example file with the length of 10 seconds and broken file with 2 minute length.

my resulting fixed file was 14 seconds. the resulting file size also was small.

then i just repeated the same again. the resulting file size became apprx the same as the source file size. still, mplayer was not able to play it after same 14 seconds.

i tried VLC, it has a setting to 'always' 'fix damaged or incemplete file', it played the file till the end, and i was able to convert the file to the playable file with vlc.

then i thought - what if my example file was too short?

i gave the untrunc the example file that is longer than the broken file, and this time the fixed file is correct and can be played with mplayer. (:

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ponchio/untrunc/issues/234#issuecomment-973299845, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUDV2553MY4MDQYDEHYDXLUMVYF3ANCNFSM5GD6VGPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ponchio avatar Nov 18 '21 23:11 ponchio

I was trying to launch with -d but gives

Reading: ok.mp4
Repair: corrupt.mp4
Mdat not found!
Processed: 61%
Backtracked enough!
Status 1, var: 0
Status 1, var: 0
Status 2, var: 0
Floating point exception: 8

Running just ./untrunc -v ok.mp4 corrupt.mp4 it prints

Reading: ok.mp4
Repair: corrupt.mp4
Mdat not found!
Processed: 61%
Backtracked enough!
Found 1503 packets.
Found 444 chunks for hev1
Found 1059 chunks for mp4a
Saving to: corrupt_fixed.mp4

Based on the previous comments I trying providing a longer file as reference, but the output (screen and _fixed) is the same, i.e. a (much) shorter fixed file.

Thanks

rosario-lombardo avatar Apr 25 '22 16:04 rosario-lombardo

If you can share the files with me I can have a look and see if something more can be recovered.

On Mon, Apr 25, 2022 at 6:28 PM rosario-lombardo @.***> wrote:

I was trying to launch with -d but gives

Reading: ok.mp4 Repair: corrupt.mp4 Mdat not found! Processed: 61% Backtracked enough! Status 1, var: 0 Status 1, var: 0 Status 2, var: 0 Floating point exception: 8

Running just ./untrunc -d ok.mp4 corrupt.mp4 it prints

Reading: ok.mp4 Repair: corrupt.mp4 Mdat not found! Processed: 61% Backtracked enough! Found 1503 packets. Found 444 chunks for hev1 Found 1059 chunks for mp4a Saving to: corrupt_fixed.mp4

Based on the previous comments I trying providing a longer file as reference, but the output (screen and _fixed) is the same, i.e. a (much) shorter fixed file.

Thanks

— Reply to this email directly, view it on GitHub https://github.com/ponchio/untrunc/issues/234#issuecomment-1108788021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUDV2ZR3ENXAB5XQI4S66TVG3BZLANCNFSM5GD6VGPA . You are receiving this because you commented.Message ID: @.***>

ponchio avatar Apr 25 '22 16:04 ponchio

Hello, I'm having a similar issue, with that one too : https://github.com/ponchio/untrunc/issues/239 A 2.5GB screenrecord not finished (the software crashed), and the result is 700KB of valid files, only.

Is there anything I can try to debug what's failing ?

lapineige avatar Dec 20 '22 00:12 lapineige