Log in

View Full Version : Fixing truncated MP4 file


vlada
19th August 2006, 11:17
Hi,
a friend of mine asked me to help him with fixing a truncated (uncomplete) MP4 file. I suggested some tools, but none of them worked. The file seems to be valid according to MediaInfo, but all players refuse to play this file.

MP4Box is complayning that the file is truncated and won't demux it. Do you have any idea what else could I try?

Btw. I tried to search for "MP4 fix" on these forums, but I got no results. I also got no results when searching for MP4. I think I read somewhere there is a limitation to at least 4 characters for a searched term. Is this the reason why I got no results? If yes, then WTF should I enter as a search?

bond
19th August 2006, 14:36
open the file in a hexeditor and check whether the "moov" and "mdat" atom is there

SeeMoreDigital
19th August 2006, 15:10
open the file in a hexeditor and check whether the "moov" and "mdat" atom is thereHi Bond,

Which HexEditor do you use?

bond
19th August 2006, 15:16
the one in virtualdub is useable for this for example

vlada
22nd August 2006, 05:50
Thank you for replies, I finally got a piece of the MP4 file. It starts with this text:
ftyp3gp4  3gp4mp41 Ęudta |pvmm 1 5 . 0 7 . 2 0 0 6 2 1 : 5 2 S o n y E r i c s s o n P 9 1 0 i

What should I be looking for in a hexa editor? How do I recognize a MOOV and MDAT atom?

You can find a shrot sample here (http://www.uschovna.cz/en/withdraw1.php/Uschovna44e9abd415cf832/1/66EJ0001.mp4) (400 kB).

Btw. I suggest you to try PSPad (http://www.pspad.com/) editor.

Drachir
22nd August 2006, 07:00
In your sample the metadata moov box/atom is missing.
If you open your sample you will see the mdat box/atom with the elementary streams.

http://img246.imageshack.us/img246/9672/66ej0001bn2.th.png (http://img246.imageshack.us/my.php?image=66ej0001bn2.png)

Video seems to be MPEG 4 part 2 ( 00 00 01 6b ).

But I don't know an easy tool to fix your file.

mediator
22nd August 2006, 07:55
as the moov seems to be missing, then the decoder configuration would also be missing. It would need to be recreated. Also, not having the framing information (where do decodable units start and stop?) is makes recreation of the original file difficult. This means there is little hope to fix the file automatically (of course, it still should be possible, but most likely by investing considerable amount of time in manual work)