Re: HOW TO CONSTRuCT XVID HEADER FROM INCOMPLETE XVIDWHEN ENCODER DETAILS ARE KNOWN

Christoph Lampert <[email protected]> Sun, 9 May 2004 13:45:58 +0200 (CEST)
Newsgroups gmane.comp.video.xvid.user
Message-ID <[email protected]>
On Sat, 8 May 2004, Tesla 13 wrote:

> 
> Hello Christoph,
> 
> >1) Don't SHOUT at the list.
> 
> Subject line only is in capitals to make it more legible.

No, they don't. They make the posting look like SPAM or SHOUTING, both 
of which I usually delete without reading. 
 
> >2) Don't ask the same thing again, just because you didn't like the first  answer.
> 
> First of all, I did not get any answers to first post and I am already very frustrated with these whole xvid problems. Second, more data is
> available now so the scope of the problem is somewhat changed even though the outcome desired is the same.

There was an answer by Bruno Harbulot on thursday, telling you that with 
Linux you have a chance of saving stuff using mplayer/mencoder. 
I would have given the same advice, because first, that program is very 
good playing broken files, and second, it has an specific option to skip 
e.g. the first 10MB of a file and try to start decoding from there. 
It may still fail, but it's worth a try. 

But since I assume, you only have Windows, I don't know of any tool that 
could do the same there. 

> >3) 10MB missing is much more than just XviD header, it's also the AVI
> >header and much more. Most likely, you can simply forget the idea get ever
> >revive that file, especially with VBR audio.
> 
> Thank you! It would have been great to hear this before spending
> countless hours on the issue throughout the entire week. At least you
> saved me now from spending countless hours more : )

Of course it would have been great, but how many answers you get always 
depends on what you ask. Your problem is in no way specific to XviD, and 
people have asked "I have a broken AVI file, what should I do?" a million 
time already, so only few people are willing to spend the time explaining 
again, what is already available by a google or archive search. 


> How about the video? Isn't it possible to salvage it at all?

Maybe, but it would involve some programming work, because I don't know of 
an existing tool that does that: 

Every frame of MPEG-4 starts with a unique ID, somethink like
(hex) 0x000001nn  which doesn't appear anywhere else in the MPEG-4
stream. So, by searching the data file just for these bytes sequences, and
hoping that the AVI/MP3 overhead doesn't contain them (or by removing AVI
chunk parts with some different trick), you could get back the
raw video data. The first frames won't be decodable, because the
first reference frame is missing, but starting with the first I-VOP,
things should work. 
The information about resolution you provided might be helpful to identify 
which 0x000001nn chunk really are video and which are AVI/MP3-noise. 

If you are willing to do something like that, or find somebody who will, I
can happily help you out with the details. 

Maybe for audio the same would be possible? I don't know. 

gruel