rob86 2 Report post Posted October 3, 2009 I know what DivX and XVid are basically, since I use them to encode videos, but what has me confused is that I read DivX and XVid are both MPEG4 and when I use ffmpeg or mencoder to convert, I'm apparently supposed to use mpeg4 and just give it a "DivX" or "Xvid" tag when I want to encode in DivX or XVid. I thought there was something special about DivX/XVid to make it so popular, but is it just generic mpeg4 encoding with a fancy (fourcc) name? Share this post Link to post Share on other sites
rayzoredge 2 Report post Posted October 3, 2009 I actually looked into this purely to see what compression codec offers the best compression and the best quality. (Now that's two words you didn't think you'd see in the same sentence.)I believe it's in the way that xvid and DivX calculate how to compress video data. One of them does a contiguous "blob" method in order to remove slightly-redundant data and the other... well, I can't remember. I do remember concluding that xvid is the better of the two by a slight margin, but then again, I was aiming to compress 700ishX300ish video and retain quality to stream to an Xbox 360. YMMV. Share this post Link to post Share on other sites
rvalkass 5 Report post Posted October 3, 2009 The main difference is that DivX is a proprietary codec, developed by DivX Inc. I think initially it was reverse engineered from a Microsoft codec, then rebuilt from scratch to avoid getting sued and has evolved from there. However, as a proprietary codec, people have to pay to use it, have no access to the source code and very little control over what they can do with it.Xvid is an open-source codec released under the GNU GPL. It originated from DivX. The DivX project was forked into an open-source version known as OpenDivX (but released under a restrictive licence), which was then pulled just before the release of a new commercial version of DivX. The last released version of OpenDivX was then used to create Xvid, again with all the code being rewritten to avoid legal issues, and to allow it to be released under the GPL.Files encoded with Xvid can be played back with DivX-compatible players and devices. However, as Xvid supports more features you need to be careful not to use the advanced features of Xvid if you want the files to remain compatible. Share this post Link to post Share on other sites
mahesh2k 0 Report post Posted October 3, 2009 Divx is commercial codec. And though being commercial it makes decoder available for the public use. This is to allow media players to give playback option to the divx files. Divx encoder is commercial product. And if you want to encode files in divx format, you've to purchase the product.Xvid is free and is available in GPL license. Xvid allows both encoding and decoding of the file for free. You can make use of it for commercial as well as for free projects. As xvid is free and opensource. Files with xvid encoding can be played by players that supports divx codec. Also one thing to add here is, almost every media player these days support both these formats. Some may require you to download the codec and use it for playback. Share this post Link to post Share on other sites
rob86 2 Report post Posted October 3, 2009 (edited) So let's say I was using the ffmpeg or mencoder apps to encode a video. On one of their webpages (can't remember which one) a FAQ said that if you want to encode in XVid or DivX you should just use the generic Mpeg4 codecs. I wonder why? Maybe their generic Mpeg4 is really XVid with a more generic name since it's an open source codec. I don't know, I'm just wondering what to use with these apps. There is a libxvid codec, but it doesn't seem to work for me while mpeg 4 does, and the webpage tells me to use mpeg4 anyway. 3.11 How do I encode Xvid or DivX video with ffmpeg?Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4 standard (note that there are many other coding formats that use this same standard). Thus, use '-vcodec mpeg4' to encode in these formats. The default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will force the fourcc 'xvid' to be stored as the video fourcc rather than the default. Edited October 3, 2009 by rob86 (see edit history) Share this post Link to post Share on other sites
rob86 2 Report post Posted October 3, 2009 3.11 How do I encode Xvid or DivX video with ffmpeg?Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4 standard (note that there are many other coding formats that use this same standard). Thus, use '-vcodec mpeg4' to encode in these formats. The default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will force the fourcc 'xvid' to be stored as the video fourcc rather than the default. Share this post Link to post Share on other sites