View Full Version : xvid AVIs suddenly won't play
JimmyBarnes
7th June 2010, 06:44
Mainly it seems because their FourCC code is "xvid" rather than "XVID".
I can change "xvid" to XVID" easily enough, but why would these Xvid AVIs, which always used to play, suddenly refuse to play??? :confused:
Using Xvid 1.2.2
I have a hundreds (if not thousands) of these small AVIs so if someone can suggest something to try OTHER than changing "xvid" to "XVID", I'd be glad to hear it
OR
Is there a util which can change the FourCC code for a group of files, not just one file at a time?
TIA
JB
CWR03
8th June 2010, 01:48
I can change "xvid" to XVID" easily enough, but why would these Xvid AVIs, which always used to play, suddenly refuse to play???
Play on what exactly?
JimmyBarnes
8th June 2010, 02:05
Play on what exactly?
The normal players on which they have always played, Zoom Player or Media Player Classic.
BigDid
8th June 2010, 02:07
Hi,
If it plays on a SAP, you could verify if it is not a hardware problem..?
For fourCC changer, there is mpeg4 modifier but not sure if it can process multiple files:
http://forum.doom9.org/showthread.php?t=78050
Did
Edit: for software player have you changed the decoder codec recently? reminds me of the ffdshow discussion...
Jawor
8th June 2010, 02:09
Using Xvid 1.2.2
For playback on Windows you can use the ffdshow (http://ffdshow-tryout.sourceforge.net/) decoder - it supports lowercase "xvid" FourCC.
It should be possible to add support for lowercase FourCCs in the Xvid DirectShow decoder, but I think ffdshow is much better anyway.
MPC-HC's internal MPEG-4 ASP decoder also supports lowercase "xvid".
<EDIT>
I added support for lowercase FourCCs to the DirectShow decoder in my latest builds (http://jawormat.republika.pl/xvid.html). Nevertheless, I would recommend ffdshow ;)
</EDIT>
JimmyBarnes
10th June 2010, 11:16
It should be possible to add support for lowercase FourCCs in the Xvid DirectShow decoder
Can you suggest How?
When I look into C:\WINDOWS\system32\xvid.ax with a binary editor I find this sequence
xvid
XVID
divx
DIVX
dx50
DX50
mp4v
MP4V
as though it is meant to recognize xvid and XVID only it isn't... :confused:
Jawor
10th June 2010, 12:52
The following lines are responsible for FourCC support:
CXvidDecoder.h:
#define FOURCC_XVID mmioFOURCC('X','V','I','D')
#define FOURCC_xvid mmioFOURCC('x','v','i','d')
#define FOURCC_DIVX mmioFOURCC('D','I','V','X')
#define FOURCC_divx mmioFOURCC('d','i','v','x')
#define FOURCC_DX50 mmioFOURCC('D','X','5','0')
#define FOURCC_dx50 mmioFOURCC('d','x','5','0')
#define FOURCC_MP4V mmioFOURCC('M','P','4','V')
#define FOURCC_mp4v mmioFOURCC('m','p','4','v')
#define FOURCC_3IVX mmioFOURCC('3','I','V','X')
#define FOURCC_3ivx mmioFOURCC('3','i','v','x')
#define FOURCC_3IV0 mmioFOURCC('3','I','V','0')
#define FOURCC_3iv0 mmioFOURCC('3','i','v','0')
#define FOURCC_3IV1 mmioFOURCC('3','I','V','1')
#define FOURCC_3iv1 mmioFOURCC('3','i','v','1')
#define FOURCC_3IV2 mmioFOURCC('3','I','V','2')
#define FOURCC_3iv2 mmioFOURCC('3','i','v','2')
#define FOURCC_LMP4 mmioFOURCC('L','M','P','4')
#define FOURCC_lmp4 mmioFOURCC('l','m','p','4')
#define FOURCC_RMP4 mmioFOURCC('R','M','P','4')
#define FOURCC_rmp4 mmioFOURCC('r','m','p','4')
#define FOURCC_SMP4 mmioFOURCC('S','M','P','4')
#define FOURCC_smp4 mmioFOURCC('s','m','p','4')
#define FOURCC_HDX4 mmioFOURCC('H','D','X','4')
#define FOURCC_hdx4 mmioFOURCC('h','d','x','4')
CXvidDecoder.cpp:
switch(hdr->biCompression)
{
case FOURCC_mp4v :
case FOURCC_MP4V :
case FOURCC_lmp4 :
case FOURCC_LMP4 :
case FOURCC_rmp4 :
case FOURCC_RMP4 :
case FOURCC_smp4 :
case FOURCC_SMP4 :
case FOURCC_hdx4 :
case FOURCC_HDX4 :
if (!(g_config.supported_4cc & SUPPORT_MP4V)) {
CloseLib();
return VFW_E_TYPE_NOT_ACCEPTED;
}
break;
case FOURCC_divx :
case FOURCC_DIVX :
case FOURCC_dx50 :
case FOURCC_DX50 :
if (!(g_config.supported_4cc & SUPPORT_DIVX)) {
CloseLib();
return VFW_E_TYPE_NOT_ACCEPTED;
}
break;
case FOURCC_3ivx :
case FOURCC_3IVX :
case FOURCC_3iv0 :
case FOURCC_3IV0 :
case FOURCC_3iv1 :
case FOURCC_3IV1 :
case FOURCC_3iv2 :
case FOURCC_3IV2 :
if (!(g_config.supported_4cc & SUPPORT_3IVX)) {
CloseLib();
return VFW_E_TYPE_NOT_ACCEPTED;
}
case FOURCC_xvid :
case FOURCC_XVID :
break;
default :
DPRINTF("Unknown fourcc: 0x%08x (%c%c%c%c)",
hdr->biCompression,
(hdr->biCompression)&0xff,
(hdr->biCompression>>8)&0xff,
(hdr->biCompression>>16)&0xff,
(hdr->biCompression>>24)&0xff);
CloseLib();
return VFW_E_TYPE_NOT_ACCEPTED;
}
Full patches (and full source code, both vanilla and patched) are available on my site (http://jawormat.republika.pl/xvid.html).
My latest builds (08.06.2010) should play both lower- and uppercase "xvid/XVID" FourCCs (at least on my system they do ;) ).
BTW, I just noticed a "break" instruction might be missing in the "switch"... but that shouldn't affect the "xvid" FourCC.
<EDIT>
No, actually the "break" isn't missing... The intricacy of C/C++ "switch" syntax is being used here.
</EDIT>
JimmyBarnes
10th June 2010, 13:25
Full patches (and full source code, both vanilla and patched) are available on my site (http://jawormat.republika.pl/xvid.html).
Is there any way to modify the official Xvid-1.2.2-07062009 so it recognizes FourCC "xvid"? Just after that one teeny-weeny modification...
TIA
Jawor
10th June 2010, 16:01
Is there any way to modify the official Xvid-1.2.2-07062009 so it recognizes FourCC "xvid"? Just after that one teeny-weeny modification...
A patch for the 1.2.2 source code is simple:
diff -urNp xvidcore.orig/dshow/src/CXvidDecoder.cpp xvidcore/dshow/src/CXvidDecoder.cpp
--- xvidcore.orig/dshow/src/CXvidDecoder.cpp 2009-05-28 15:52:34 +0000
+++ xvidcore/dshow/src/CXvidDecoder.cpp 2010-06-10 14:52:54 +0000
@@ -475,6 +475,7 @@ HRESULT CXvidDecoder::CheckInputType(con
return VFW_E_TYPE_NOT_ACCEPTED;
}
case FOURCC_XVID :
+ case FOURCC_xvid :
break;
diff -urNp xvidcore.orig/dshow/src/CXvidDecoder.h xvidcore/dshow/src/CXvidDecoder.h
--- xvidcore.orig/dshow/src/CXvidDecoder.h 2008-11-26 10:11:31 +0000
+++ xvidcore/dshow/src/CXvidDecoder.h 2010-06-10 14:51:58 +0000
@@ -35,6 +35,7 @@
/* --- fourcc --- */
#define FOURCC_XVID mmioFOURCC('X','V','I','D')
+#define FOURCC_xvid mmioFOURCC('x','v','i','d')
#define FOURCC_DIVX mmioFOURCC('D','I','V','X')
#define FOURCC_DX50 mmioFOURCC('D','X','5','0')
#define FOURCC_MP4V mmioFOURCC('M','P','4','V')
But if you'd like to modify Koepi's binaries, you'd have to know the format of binary Windows libraries pretty well... ;)
What's wrong with using ffdshow... or my patched binaries? They won't give worse quality, my patches contain only some “additions” (mostly for VfW and DirectShow interfaces).
JimmyBarnes
12th June 2010, 01:51
But if you'd like to modify Koepi's binaries, you'd have to know the format of binary Windows libraries pretty well... ;)
Pretty sure this would be beyond me, but it might be child's play for you.
I don't suppose I could prevail on you to do the mod - it would be an additional version you could offer on your site for purists. You would, of course, have my eternal gratitude...
:devil:
Jawor
12th June 2010, 14:43
I don't know the DLL structure well enough. Besides, modifying someone else's binaries would be inappropriate... and pointless, since the source code is available.
But there's a simple solution - replace Koepi's xvid.ax file with mine (it's available in this ZIP file (http://jawormat.republika.pl/XviD_122.zip)). xvid.ax is the DirectShow decoder interface for the xvidcore.dll library. xvidvfw.dll is the VfW interface used for encoding.
JimmyBarnes
13th June 2010, 15:12
I don't know the DLL structure well enough. Besides, modifying someone else's binaries would be inappropriate... and pointless, since the source code is available.
But there's a simple solution - replace Koepi's xvid.ax file with mine (it's available in this ZIP file (http://jawormat.republika.pl/XviD_122.zip)). xvid.ax is the DirectShow decoder interface for the xvidcore.dll library. xvidvfw.dll is the VfW interface used for encoding.
Thanx.
Apart from xvid/XVID, what differences with the "official" Xvid 1.2.2 are there?
And what version do you call yours?
Jawor
14th June 2010, 15:47
Apart from xvid/XVID, what differences with the "official" Xvid 1.2.2 are there?
The only other difference in the DirectShow decoder is support for some additional MPEG-4 FourCCs (3IVX, 3IV0, 3IV1, 3IV2, HDX4, LMP4, RMP4, SMP4), both lower- and uppercase.
The VfW codec has:
- Dark Shikari's VAQ (replacing the old AQ in 1.2.2)
- the capability to disable “real” N-VOPs completely (Frame Drop Ratio = -1) for better compatibility with standalones
- a checkbox for enabling/disabling Closed GOV in the Unrestricted profile (in the official versions Closed GOV is always on)
- a separate checkbox for 4MV (in the official versions it's always activated with MSP>=5 and deactivated with MSP<=4)
- adjustable VBV parameters in the Unrestricted profile
- a maximum of 255 zones (the official version has 64)
- a checkbox that enables writing of DivX 5 user data in any profile (for better compatibility with standalone players)
- celtic_druid's MTK profiles (for MediaTek-based standalones)
- “DivX” profiles compatible with DivX-Certified standalones
- some GUI cosmetics (e.g. “VHQ for B-frames” is greyed out when B-frames are disabled)
- Isibaar's bugfix for the registry handle leak under Windows 2000 and XP
- support for decoding lowercase “xvid” FourCC through VfW
And what version do you call yours?
“1.2.2 patched” ;)
It's up to Xvid Solutions to change version numbers. My builds have a caption that says “Jawor's patched build” in the About window of the VfW codec.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.