[Ffmpeg-devel] Re: Please change fourcc tag from xvid to XVID in liabcodec/xvidff.c
Corey Hickey
bugfood-ml
Wed Jan 4 07:27:28 CET 2006
Humperdinck wrote:
> There is of course always a chance that something might be broken on my end, but
> the XP is fresh installed, the xvid codec is 1.1.0-beta2-04042005 and I am using
> media player classic to play the results encoded with ffmpeg that is compiled
> using mingw32 and msys1.0.
If you are using xvid for decoding, and it doesn't recognize "xvid" but
prefers "XVID", then that's an indication "XVID" is official and perhaps
ffmpeg's fourcc should be changed.
Can anyone confirm that? For what it's worth, mencoder's xvid encoder
uses "XVID".
> Now, whatever may be 'broken' on my side, the result of a recorded .mpg file
> encoded to xvid will _not_ play because the fourcc is in small letters. Change
> the fourcc and it plays fine. If I change the source code and recompile and
> encode again, the result plays fine.
You didn't quite provide enough evidence. If you had said from the start
that you were trying to decode it with the official xvid codec via
directshow and some other media player, that would have been more
helpful. Otherwise, a reasonable assumption would be that you're using
ffmpeg for decoding. Your wording kind of indicates that, as well....
Anyway, I just found the part in the xvid source that I think is
responsible:
xvidcore-1.1.0-beta2/dshow/src/CXvidDecoder.cpp:
------------------------------------------------------------------------
413 switch(hdr->biCompression)
414 {
415
416 case FOURCC_MP4V:
417 if (!(g_config.supported_4cc & SUPPORT_MP4V)) {
418 CloseLib();
419 return VFW_E_TYPE_NOT_ACCEPTED;
420 }
421 break;
422 case FOURCC_DIVX :
423 if (!(g_config.supported_4cc & SUPPORT_DIVX)) {
424 CloseLib();
425 return VFW_E_TYPE_NOT_ACCEPTED;
426 }
427 break;
428 case FOURCC_DX50 :
429 if (!(g_config.supported_4cc & SUPPORT_DX50)) {
430 CloseLib();
431 return VFW_E_TYPE_NOT_ACCEPTED;
432 }
433 case FOURCC_XVID :
434 break;
435
436
437 default :
438 DPRINTF("Unknown fourcc: 0x%08x (%c%c%c%c)",
439 hdr->biCompression,
440 (hdr->biCompression)&0xff,
441 (hdr->biCompression>>8)&0xff,
442 (hdr->biCompression>>16)&0xff,
443 (hdr->biCompression>>24)&0xff);
444 CloseLib();
445 return VFW_E_TYPE_NOT_ACCEPTED;
446 }
------------------------------------------------------------------------
That's evidence enough for me, but, then, it's not my call to make. :)
> I have no problem changing the source code myself. I was posting here with a
> feeble attempt to help the developers make their code more compatible for others
> that may encounter the same problem.
Sending a patch is usually considered more helpful, even for very small
changes like this.
-Corey
More information about the ffmpeg-devel
mailing list