Hi,

I have been using the MainConcept SDK to create .h264 files and I need to mux them into an .avi file container.

I've looked through the msdn docs on how to use the AVIFile Win32 API to create the .avi files.

The problem is it's not very descriptive about how to use the API to do what I want to do. I've made avi's from bitmaps using code that I found online, but I cant seem to puzzle out how to wrap the 'avi container around my pre-existing .h264 file (if thats how you do it???)

There's not much point in including my code since at this stage it's not doing anything, I'm trying to figure out WHAT to do but I assume it's something like:

call AVIFileOpen to start the file
call AVIFileCreateStream with a AVISTREAMINFO object
call AVIMakeCompressedStream using mmioFOURCC ('H','2','6','4') in the AVICOMPRESSOPTIONS object
call AVIStreamSetFormat? I think?
then do I start calling AVIStreamWrite to add the frames from the .h264 file?

if I'm write then that leaves me with the problem of reading frames from the .h264 file.

or, is there a way to simply add the .avi headers (or whatever is required) to the .h264 file so that it is 'contained' by the avi?


can someone please point me in the right direction? Is there an online tutorial or example that I cant find? (I've looked but had trouble wading through it all, nobody seems to be doing what I need)

I apologize in advance for my lack of knowledge in this area, I'm probably making newbie mistakes all over the place

thanks very much for any help!
Cheers,
Eddie