AVI format with XVID encoder

"Shmuel Yossef" <[email protected]> Thu, 20 Apr 2006 20:16:37 +0300
Newsgroups gmane.comp.video.xvid.user
Message-ID <[email protected]>
Hi,
I'm experimenting with the XVID encoder, with the basic example given:
xvid_encraw.c
using MSVC v.6

I captured a video clip with help of GraphEdit to produce AVI output, as 
follows:
Video Capture Source (pin properties set to: 15fps, I420,640x480) --> AVI 
Mux --> File Writer.

This gives AVI output of the captured clip.
I could play this movie.avi using: Windows Media Player, as well as VLC 
Media Player.

When I tried using encoding with XVID, using debugger (or run), it would 
complete the 1st two conditions, BUT fail the third condition and exit with 
"return (-1)", as follows:

#ifdef XVID_AVI_INPUT
if (strcmp(ARG_INPUTFILE+(strlen(ARG_INPUTFILE)-3), "avs")==0 ||
    strcmp(ARG_INPUTFILE+(strlen(ARG_INPUTFILE)-3), "avi")==0 ||
		  ARG_INPUTTYPE==2)
{
.....

if (AVIStreamOpenFromFile(&avi_stream, ARG_INPUTFILE, streamtypeVIDEO, 0, 
OF_READ, NULL) != AVIERR_OK) { .... }

if(AVIStreamInfo(avi_stream, &avi_info, sizeof(AVISTREAMINFO)) != AVIERR_OK) 
{ ... }

BUT fail the following 3rd condition:
if (avi_info.fccHandler != MAKEFOURCC('Y', 'V', '1', '2')) {
    fprintf(stderr, "Unsupported input colorspace! Only YV12 is 
supported!\n");
    AVIStreamRelease(avi_stream);
    AVIFileExit();
    return (-1);
}

I don't know how to save the captured video clip from GraphEdit as "YV12". 
The only options I have are "I420" or "RGB 24" formats. And RGB 24 did the 
same thing as well. (Although it is I420 that interests me more)

Moreover, I could not "step into" the actual AVI code (of the 3rd condition 
which evaluated true) to see what's going on whilst debugging?

Can anyone advise here?

Thanks,
Shmuel

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/