Hello monkeyiq, Monday, October 15, 2001, 10:23:26 AM, you wrote:
m> Hi, m> I can generate avi files using avifile, but they come out without m> an index. The -idx to mplayer works ok for making them, but I'd like m> to write them into the stream when I create it. >>From videoencoder.h m> * Create encoder object. Optionally m> * set quality and key-frame frequency. Call Start(). m> * Call QueryOutputSize() to identify maximum possible m> * size of compressed frame. Allocate buffer of this size. m> * Pass it as 'dest' in calls to EncodeFrame(). At the end m> * call Stop(). Do not forget to delete the object. m> My code looks something like this: m> IAviVideoWriteStream* OVideoStream; m> CImage* OImage; m> IAviWriteFile* OFile; m> OFile = CreateIAviWriteFile(OutputAVIFilename.c_str()); m> OVideoStream = OFile->AddVideoStream( m> OutputCodecID, &OBitmapInfo, m> (int) (1000000 / IVideoFrameRate)); m> OVideoStream->SetQuality( 5000 ); m> OVideoStream->SetKeyFrame(1); m> OVideoStream->Start(); m> while [frames] m> OVideoStream->AddFrame( OImage ); m> VideoStream->Stop(); m> delete OVideoStream; m> delete OFile; m> But I dont get any index? Any clues as to how to get m> avifile to brew off the index? This would be very nice m> in a 'copy' like tool that could take an existing avi m> and make an indexed avi from it. which I might add to m> a tool of mine. Index is added when you call 'delete OFile'. Unless it was broken in CVS version during latest stl->avm conversions. -- Best regards, Eugene mailto:[EMAIL PROTECTED] _______________________________________________ Avifile mailing list [EMAIL PROTECTED] http://prak.org/mailman/listinfo/avifile
