On Sun, 18 Mar 2007 08:38:08 +0100
Andrea Giuliano <[EMAIL PROTECTED]> wrote:

> I also would like any hint or link about the general issue, I mean "how 
> lavrec builds its own output file and how it makes them real AVI file 
> only when it closes them".

AVI files are files containing data contained in the RIFF container format 
(which in turn is a ripoff of IFF, just with different endianness and chunk 
naming authority).

Lavrec, or rather avilib, create a file with an empty RIFF header, which is 
filled in when the file is closed. Why, I do not know, but that's the way it's 
done. Thus, if lavrec crashes, there'll be a file without RIFF header, a lot of 
RIFF data and no index chunk, as the index is written last, too.

http://en.wikipedia.org/wiki/RIFF gives some background, and 
http://en.wikipedia.org/wiki/Audio_Video_Interleave gives a little more 
in-depth information. 

http://msdn2.microsoft.com/en-us/library/ms779636.aspx (linked to fromn the 
latter) explains the really gory parts of RIFF, and with this information, in 
combination with head, cat, a good text editor and a certain amount of 
creativity, you should be able to transplant a header from one of the working 
files. With any luck, you should be able to feed this file to mencoder, using 
-oac copy -ovc copy, and recreating the index with -forceindex, giving you a 
working file.

I've done it once, but I'm not sure it was worth the effort.

/Sam

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to