MPEG 4 (V1, V2) Encoder : Colors not saved properly
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
MPEG 4 (V1, V2) Encoder : Colors not saved properly

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Encoders
Author Message
Vittal Hegdekatte
Guest





Posted: Fri Dec 16, 2005 9:30 am    Post subject: MPEG 4 (V1, V2) Encoder : Colors not saved properly Reply with quote

Hello,

I am trying to create AVI files out of many bimap buffers using
AVIFileCreateStream /AVIMakeCompressedStream /AVIStreamSetFormat of Windows
Multimedia API.
While doing so I am using MPG4c32.dll codecfrom Microsfoft with version
4.1.00.3920 (latest I believe).

AVICOMPRESSOPTIONS aviCompressionOpts;
//Microsoft MPEG V2
aviCompressionOpts.fccHandler = 842297453;
aviCompressionOpts.dwBytesPerSecond = 3000;
aviCompressionOpts.dwFlags = AVICOMPRESSF_DATARATE;

and
BITMAPINFOHEADER myBmpInfoHdr;
myBmpInfoHdr.biSize = sizeof(BITMAPINFOHEADER) ;
myBmpInfoHdr.biWidth = 604 ;
myBmpInfoHdr.biHeight = 604 ;
myBmpInfoHdr.iPlanes = 1 ;
myBmpInfoHdr.iBitCount = (WORD) 24;
myBmpInfoHdr.biCompression = BI_RGB ;
myBmpInfoHdr.biSizeImage = 604 * 604 * 3

and appending the frame using
AVIStreamWrite(myCompressedAviStream, // stream pointer
myFrameNo, // time of this frame
1, // number to write
imagedata_in, // ptr to imageData (BYTE*)
myBmpInfoHdr->biSizeImage, //size of frame
AVIIF_KEYFRAME, // flags....
NULL,
NULL);

My observation is that resulting AVI file has random color loss ( example,
if I have yellow line in the original BITMAP (uncompressed) buffer, it
becomes gray, or Green line becomes looses its color here and there.

When I changed the Codec to Micorosft Video 1, or CinePack or TechSmith it
works fine.

I was just wondering whether any one has experienced the same problem and Is
it a bug from MPG4C32.dll ?

Thanks in advance.

Regards,
Vittal

Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> Encoders All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB