View Full Version : how to repair a truncated mp4 file.
shanghui
8th October 2006, 03:44
Recording on a mp4 movie recorder (Sony DSC-M2) was disrupted when the power cord was accidently pulled out of the unit. [Battery was still in the unit being charged while recording, was 10% full - im surprised the battery didn't take over when power was pulled] There is 500+mb worth of video recorded, but without the file being saved properly, i suspect there are missing headers/metadata within the mp4 file. Does anyone know how to recover the video?
The video was recorded in 640x480 30fps and was recording about over 40min of footage.
Have learnt not to record a single session onto one mp4 file, but should instead break up the recording to multiple clips.
Thanks.
bond
8th October 2006, 11:06
i would also suspect that the headers are missing, as when recording, they are written at the end of the file normally
run the mp4dump tool from mpeg4ip over the file and post the outcome here
romirova
11th February 2007, 01:38
Howdy
I pulled the same DSC / power move today. Were you able to repair your mp4 file?
romirova
11th February 2007, 23:42
Well, I managed to do this on my boys last basketball game of the season. Is there anyone out there with enough understanding of the Sony DSC-M1 MP4 format that could help? I throw myself on your mercy!
casper508
4th August 2007, 07:44
Hi
I registered on this forum just for this reason. I had a similar situation where the MP4 file i was recording on my smartphone was in the process of being saved when the battery died. The days I had to wait to post here made me look at all possibilities and some worked to some extent and some didn't.
First I copied some data from the middle of the corrupt file using a HEX EDITOR onto the video data(leaving the first 10k just to be sure) ontop of a working mp4 file generated from the same device. It worked the extent that video could be seen but the quality and frame rate was too poor to use it.
Then I ended up reading about the structure of ATOMS and how they are saved. This produced far better results.
What do you is copy everything between 'esds' and 'stts' of a working MP4 file and paste it right after the 'ftyp' on your corrupt MP4 file.
This made VLC recognize the file as a valid video file (no audio). This should give you enough to start off. I'll add more details on how we can extract the video on the corrupt mp4 file using mp4creator.exe
Cas
Stux
7th August 2007, 11:40
A similar question was asked on our forum.
http://forums.3ivx.com/index.php?showtopic=86104
Short answer, you can get the video back, but not the audio. Heh, just overlay a soundtrack ;)
Frederick
14th November 2007, 22:21
Hi
I registered on this forum just for this reason. I had a similar situation where the MP4 file i was recording on my smartphone was in the process of being saved when the battery died. The days I had to wait to post here made me look at all possibilities and some worked to some extent and some didn't.
First I copied some data from the middle of the corrupt file using a HEX EDITOR onto the video data(leaving the first 10k just to be sure) ontop of a working mp4 file generated from the same device. It worked the extent that video could be seen but the quality and frame rate was too poor to use it.
Then I ended up reading about the structure of ATOMS and how they are saved. This produced far better results.
What do you is copy everything between 'esds' and 'stts' of a working MP4 file and paste it right after the 'ftyp' on your corrupt MP4 file.
This made VLC recognize the file as a valid video file (no audio). This should give you enough to start off. I'll add more details on how we can extract the video on the corrupt mp4 file using mp4creator.exe
Cas
This seems encouraging, but being a tyro, I don't understand it. I have same problem - Sanyo Xati camera, battery flat, failed to complete 'registering' of last video file. Now cannot access any of the video files on that SD card. Would be grateful if someone could explain just how to recover at least the video elements. I see it's suggested pasting MP4 files onto corrupt files, but how to do this? Could someone kindly explain so I can undestand it?! Thanks
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.