Log in

View Full Version : AVI header Reconstuction?


greatguns
14th November 2005, 16:27
I have an AVI file which i downloaded using torrents, The problem is that the whole file got downloaded, except the first part of the files (i.e the header) and maybe some other frames.

Is there anyway i can rewrite the data in the inital part so the file may become useful?

Vdub does not recognise the file as an AVI file,so cant do anything about that.
i also tried hexediting and inserting the header taken from another similar AVI file(i.e in size, resolution and fps etc). even though then Vdub recognizes it, it is not able to recover the data.

is there any method so that the file may become useful? :thanks:
(btw i searched for similar problems could not find recent ones)

celtic_druid
14th November 2005, 16:42
Assuming the file is legal and available on ed2k, you could import it and finish it off.

greatguns
14th November 2005, 16:52
yea....its not like a movie or something.

its a rare file, and almost all sources missed the header. gonna try the emule thing.

but is there any other way i can fix this?

pest
14th November 2005, 18:13
There's a tool called DivXFix...rather old
it can recreate lost avi-indexes
but if the riff-header is lost, you're too

greatguns
15th November 2005, 05:43
hmm....yea tried that and a lot of other video fixer tools, same thing they dont recognize the file without the header.

i am guessing that if i paste a header of another file, and cutting the file till the next keyframe it would work.

but no idea how to identify a keyframe in hex code, if you have any idea about that it would be very helpful :thanks:

mediator
16th November 2005, 20:39
I don't think that there is a tool that actually does reconstruct the headers. But technically it should be perfectly possible since the information needed for the construction of the headers is (for the ISO-MPEG-4 case) normally included in the stream in regular intervals.
If you are really very keen on making the file work and have some experience in programming I suggest that you start writing your own program doing the job (it's not as difficult as it probably sounds, could probably be done within one day: open the broken avi files and scan for frame starts and vol headers, take a bit of xvid to parse vol header here..., use avi writing functions of vfw there..., and voilą ... done)

stephanV
16th November 2005, 20:46
It's probably a little more difficult than that, as you would need to reconstruct audio data too. With no format knowledge reconstruction of the header is impossible, if its MPEG4+MP3 you might be lucky.

Pookie
17th November 2005, 00:35
Try AVIMaster - Command line and quite good. A good tool to have for many purposes.

http://www.thozie.de/avimaster/

stephanV
17th November 2005, 09:43
That won't work either:

Recreates AVIs with new Indices and fully compliant structure even from damaged or corrupted AVIs or AVIs with missing parts (first 1 - 4 KBytes must be available)
(means: header must be avaialabe)

greatguns
24th November 2005, 20:50
I don't think that there is a tool that actually does reconstruct the headers. But technically it should be perfectly possible since the information needed for the construction of the headers is (for the ISO-MPEG-4 case) normally included in the stream in regular intervals.
If you are really very keen on making the file work and have some experience in programming I suggest that you start writing your own program doing the job (it's not as difficult as it probably sounds, could probably be done within one day: open the broken avi files and scan for frame starts and vol headers, take a bit of xvid to parse vol header here..., use avi writing functions of vfw there..., and voilą ... done)
for a single file i dont think we need any program, just need to figure out the right hex codes for the various frames and start of data indicators.

still couldnt fix it....maybe its just the file itself :(

iradic
25th November 2005, 00:04
http://www.wotsit.org/