Corrupt (not closed container mp4) mp4 - how to fix

marcinzm wrote on 6/12/2022, 4:55 AM

Hello,

 

I was waiting 1 day and 11 hours to finish my rendering, but unfortunately 13 minutes before the end, Windows blue screen occurred. Not ended video file is corrupted (not properly closed video file). Video size is 17 GB.

Do you know some tools (not online ones) which can fix such corrupted video files and let me play it. I will render the last 13 minutes. I don't want to wait one more 35 hours to render the file.

PLEASE HELP ME :(

Regards

Marcin

 

If you are bored, drink water, you will want to pee. -> Albert Einstein - my idol!

I am 42. I have been creating videos since 2009 (the date when my first daughter was born in). My first video software was Pinnacle, next one was Sony Vegas 8 (I am not sure if remember it correctly). I am also a developer and wedding movie operator and editor. For example: I have created an Android app which let me control Vegas Pro rendering progress level on Android smartphone. I created it for fun, because I also love programming. I also created my own plugin for Audio To Text feature specified usage from Vegas Pro 19. I created proxy creation plugin which uses multiple GPU threads (maximum 3) to create proxy files for Vegas Pro. I also written many others plugin/softwares which enhance my video editing, also wedding editing.

Camera/video camera: Sony FX3, Sony A7 III, Sony FDR AX 100, Canon 5D Mark III, GoPro Hero Black 7,8,9,10

Lenses for Sony: Tamron 28-75mm F/2.8 Di III , Sony 24mm gm 1.4 FE, Sony 20 mm G FE 1.8

Lenses for Canon: Canon EF 24-70 mm F/2.8 L USM, Canon 70-200 f/2.8 L

Drone: DJI Mavic 3 & DJI Phantom 4 Pro v2.0

 

Editing: Vegas Pro 20 (365) with a lot of third party plugins, also my own plugins written in C#

 

PC:

CPU: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz   3.31 GHz

RAM: 128 GB

GPU: Nvidia RTX 2080 TI

storage: 4 SSD drives (including two M.2 flash drives) and two HDD drives

Windows system: 10 Home edition

Comments

Musicvid wrote on 6/12/2022, 1:26 PM

I'm afraid you are asking for a lot. You could try VideoRedo, a paid solution.

Former user wrote on 6/12/2022, 6:15 PM

@marcinzm Try this https://github.com/anthwlock/untrunc/releases/tag/latest

It is a newer version then I used, but assuming no bugs in the build should work for you

The reference file it requires is an encode identical format of your corrupt encode, however it was successful

marcinzm wrote on 6/13/2022, 3:07 AM

@Former user Thank you for your post. I tried this GUI tool, but...

- video was repaired, but contains errror. The video is slowed down, but the original video wasn't in slow motion. 25p frames was slowed down.

- but good thing is that the video is playbackable

I got the following logs using untrunc:

Info: parsing healthy moov atom ... 

Info: reading mdat from truncated file ...
Info: using 64-bit offsets for the broken file
[aac @ 000000000c6dd340] Multiple frames in a packet.

[aac @ 000000000c6dd340] Number of bands (34) exceeds limit (22).

[aac @ 000000000c6dd340] Reserved bit set.

[aac @ 000000000c6dd340] Number of bands (41) exceeds limit (27).

[aac @ 000000000c6dd340] Prediction is not allowed in AAC-LC.

Error: unable to find correct codec -> premature end (~100%)
       try '-s' to skip unknown sequences

Info: Found 292931 packets ( mp4a: 141740 hev1: 151191 )
Tip: Audio and video seem to have different durations (0.5).
     If audio and video are not in sync, give `-sv` a try. See `--help`
Info: Duration of mp4a: 50min 23s 786ms  (3023786 ms)
Info: Duration of hev1: 1h 40min 47s 640ms  (6047640 ms)
Info: saving D:\!!!_YouTube_upload\_media_file_extractor_ffmpeg_input\bad.mp4_fixed.mp4
          
2 warnings were hidden!

done!

Is it possible to fix the video by changing settings using this tool?

 

Thank you.

 

Last changed by marcinzm on 6/13/2022, 3:07 AM, changed a total of 1 times.

If you are bored, drink water, you will want to pee. -> Albert Einstein - my idol!

I am 42. I have been creating videos since 2009 (the date when my first daughter was born in). My first video software was Pinnacle, next one was Sony Vegas 8 (I am not sure if remember it correctly). I am also a developer and wedding movie operator and editor. For example: I have created an Android app which let me control Vegas Pro rendering progress level on Android smartphone. I created it for fun, because I also love programming. I also created my own plugin for Audio To Text feature specified usage from Vegas Pro 19. I created proxy creation plugin which uses multiple GPU threads (maximum 3) to create proxy files for Vegas Pro. I also written many others plugin/softwares which enhance my video editing, also wedding editing.

Camera/video camera: Sony FX3, Sony A7 III, Sony FDR AX 100, Canon 5D Mark III, GoPro Hero Black 7,8,9,10

Lenses for Sony: Tamron 28-75mm F/2.8 Di III , Sony 24mm gm 1.4 FE, Sony 20 mm G FE 1.8

Lenses for Canon: Canon EF 24-70 mm F/2.8 L USM, Canon 70-200 f/2.8 L

Drone: DJI Mavic 3 & DJI Phantom 4 Pro v2.0

 

Editing: Vegas Pro 20 (365) with a lot of third party plugins, also my own plugins written in C#

 

PC:

CPU: Intel(R) Core(TM) i9-7900X CPU @ 3.30GHz   3.31 GHz

RAM: 128 GB

GPU: Nvidia RTX 2080 TI

storage: 4 SSD drives (including two M.2 flash drives) and two HDD drives

Windows system: 10 Home edition

Former user wrote on 6/13/2022, 5:43 PM

I have only used it a couple of times last year, and in my case it just worked, so not sure how you go about attempting to fix a problem result. Are all the video frames actually there, it's just playing in slow motion, are the frames duplicated?

If you were going to add it back to Vegas timeline, could play it at 2x speed, with another track with your original audio not sped up, and add the last part to the video and encode together, Presumably the extreme slow encode is to do with processing your original clips, and should encode much faster in this situation.. except it looks like you encoded HEVC, which Vegas processes very slowly would have been in a better situation with AVC as far as speed.

There are other tools like shutter encoder that could help, but I could only guess what to do, as I don't know what exactly is wrong with your file. I'd try rewrap, and conform for fast options that may help