14.6.  Encoding with the Video For Windows codec family

Video for Windows provides simple encoding by means of binary video codecs. You can encode with the following codecs (if you have more, please tell us!)

Note that support for this is very experimental and some codecs may not work correctly. Some codecs will only work in certain colorspaces, try -vf format=bgr24 and -vf format=yuy2 if a codec fails or gives wrong output.

14.6.1. Video for Windows supported codecs

Video codec file nameDescription (FourCC)md5sumComment
aslcodec_vfw.dllAlparysoft lossless codec vfw (ASLC)608af234a6ea4d90cdc7246af5f3f29a 
avimszh.dllAVImszh (MSZH)253118fe1eedea04a95ed6e5f4c28878needs -vf format
avizlib.dllAVIzlib (ZLIB)2f1cc76bbcf6d77d40d0e23392fa8eda 
huffyuv.dllHuffYUV (lossless) (HFYU)b74695b50230be4a6ef2c4293a58ac3b 
iccvid.dllCinepak Video (cvid)cb3b7ee47ba7dbb3d23d34e274895133 
icmw_32.dllMotion Wavelets (MWV1)c9618a8fc73ce219ba918e3e09e227f2 
jp2avi.dllImagePower MJPEG2000 (IPJ2)d860a11766da0d0ea064672c6833768b-vf flip
m3jp2k32.dllMorgan MJPEG2000 (MJ2C)f3c174edcbaef7cb947d6357cdfde7ff 
m3jpeg32.dllMorgan Motion JPEG Codec (MJPG)1cd13fff5960aa2aae43790242c323b1 
mpg4c32.dllMicrosoft MPEG-4 v1/v2b5791ea23f33010d37ab8314681f1256 
tsccvid.dllTechSmith Camtasia Screen Codec (TSCC)8230d8560c41d444f249802a2700d1d5shareware error on windows
vp31vfw.dllOn2 Open Source VP3 Codec (VP31)845f3590ea489e2e45e876ab107ee7d2 
vp4vfw.dllOn2 VP4 Personal Codec (VP40)fc5480a482ccc594c2898dcc4188b58f 
vp6vfw.dllOn2 VP6 Personal Codec (VP60)04d635a364243013898fd09484f913fb 
vp7vfw.dllOn2 VP7 Personal Codec (VP70)cb4cc3d4ea7c94a35f1d81c3d750bc8dwrong FourCC?
ViVD2.dllSoftMedia ViVD V2 codec VfW (GXVE)a7b4bf5cac630bb9262c3f80d8a773a1 
msulvc06.DLLMSU Lossless codec (MSUD)294bf9288f2f127bb86f00bfcc9ccdda Decodable by Window Media Player, not MPlayer (yet).
camcodec.dllCamStudio lossless video codec (CSCD)0efe97ce08bb0e40162ab15ef3b45615sf.net/projects/camstudio

The first column contains the codec names that should be passed after the codec parameter, like: -xvfwopts codec=divx.dll The FourCC code used by each codec is given in the parentheses.

An example to convert an ISO DVD trailer to a VP6 flash video file using compdata bitrate settings:

mencoder -dvd-device zeiram.iso dvd://7 -o trailer.flv \
-ovc vfw -xvfwopts codec=vp6vfw.dll:compdata=onepass.mcf -oac mp3lame \
-lameopts cbr:br=64 -af lavcresample=22050 -vf yadif,scale=320:240,flip \
-of lavf

14.6.2. Using vfw2menc to create a codec settings file.

To encode with the Video for Windows codecs, you will need to set bitrate and other options. This is known to work on x86 on both *NIX and Windows.

First you must build the vfw2menc program. It is located in the TOOLS subdirectory of the MPlayer source tree. To build on Linux, this can be done using Wine:

winegcc vfw2menc.c -o vfw2menc -lwinmm -lole32

To build on Windows in MinGW or Cygwin use:

gcc vfw2menc.c -o vfw2menc.exe -lwinmm -lole32

To build on MSVC you will need getopt. Getopt can be found in the original vfw2menc archive available at: The MPlayer on win32 project.

Below is an example with the VP6 codec.

vfw2menc -f VP62 -d vp6vfw.dll -s firstpass.mcf

This will open the VP6 codec dialog window. Repeat this step for the second pass and use -s secondpass.mcf.

Windows users can use -xvfwopts codec=vp6vfw.dll:compdata=dialog to have the codec dialog display before encoding starts.