Log in

View Full Version : AVIStreamSetFormat() returns "internal error" when using XVID CODEC


CaKiwi
27th April 2006, 20:52
I am working on an application which creates an AVI file and a call to the function AVIStreamSetFormat() returns "internal error" when the XVID CODEC is used. The same application works without error on another system and other CODECs such as CVID amd MSVC also work correctly. Does anyone have any thoughts on why this might be? Suggestions on how to go about debugging this problem would also be appreciated. Is there any logging or debugging code that can be turned on for XVID? I used XVID-1.1.0-30122005.exe to install XVID.

Thanks in advance

CaKiwi

CaKiwi
3rd May 2006, 16:02
This is still and issue for me. Do I have to set the opts.lpParms field before I call AVIMakeCompressedStream()?

Any help would be greatly appreciated.

Teegedeck
3rd May 2006, 19:58
If you can't find an answer in these documents (http://www.xvid.org/modules.php?op=modload&name=Sections&file=index&req=listarticles&secid=1) and nobody on this forum can offer help, either, please turn to the XviD developers mailing list (http://list.xvid.org/mailman/listinfo/xvid-devel). Or try the XviD IRC channel (can't remember its name).

squid_80
3rd May 2006, 23:30
What are the other members of the BITMAPINFOHEADER set to?

CaKiwi
5th May 2006, 16:47
Thanks for the replies.

Teegedeck, I have looked at the documents you mentioned but could not find what I need. I also posted this question in the developers forum but have not received a useful response. I will try the XviD developers mailing list.

squid_80, this is what is in the BITMAPINFOHEADER structure

biSize 40
biWidth 780
biHeight 592
biPlanes 1
biBitCount 24
biCompression 0
biSizeImage 1385280
biXPelsPerMeter 0
biYPelsPerMeter 0
biClrUsed 0
biClrImportant 0

Thanks again.

CaKiwi

CaKiwi
5th May 2006, 17:23
In case it is useful to someone, here is what is in 2 other structures

AVISTREAMINFO
fccType 1935960438
fccHandler 0
dwFlags 0
dwCaps 0
wPriority 0
wLanguage 0
dwScale 1
dwRate 50
dwStart 0
dwLength 0
dwInitialFrames 0
dwSuggestedBufferSize 1385280
dwQuality 0
dwSampleSize 0
+ rcFrame {top=0 bottom=592 left=0 right=780}
dwEditCount 0
dwFormatChangeCount 0
+ szName 0x0debf494 ""

AVICOMPRESSOPTIONS
fccType 1935960438
fccHandler 1145656920
dwKeyFrameEvery 1000
dwQuality 10000
dwBytesPerSecond 0
dwFlags 14
lpFormat 0x00000000
cbFormat 0
lpParms 0x00000000
cbParms 0
dwInterleaveEvery 1

worlds6440
27th November 2006, 11:10
I'm not sure if you are still working on it, but I have also come accross this error (or something very similar at least).

I sorted it by ensuring the X and Y sizes of the AVI are multiples of 2. Its a real pain that the XVID codec now enforces this, but it can be dealt with.