[Ffmpeg-devel] Re: FFMPEG on Windows

Martin Boehme boehme
Mon Aug 29 12:45:18 CEST 2005

Hi Falconetti,

> Thank you Martin for your help. I compiled and used ffmpeg on msvc at last.

Great to hear it's working for you now.

> Here is how I done it:
> Install Msys, MinGW. Put ffmpeg in Msys root directory. Cut and paste the
> commands from the vcvars32.bat into autoexec.bat. On NT systems alter the
> path,lib, include variable. Reboot. Open Msys shell. 
> Issue the following commands:
>    link
> if it has some output then the next is:
>  ./configure --enable-shared
>  make

On rereading the FFmpeg documentation (Section 6.3.1), most of this 
seems to be in it -- with the exception of copying the commands from 
vcvars32.bat into autoexec.bat (so link.exe is on the path). If desired, 
I'll submit a patch to the documentation that includes this information.

> If everything goes well start msvc. New project: Console application.
> Cut and paste the code from Martin Boehmes demo. In Project ->Settings-> Link
> put at the end avcodec.lib avformat.lib.
> Put all the h files from ffmpeg in your working directory (or alter the
> directory settings)

The second option is definitely preferred.

> Put avcodec.lib and avformat.lib in the compiler lib directory.
> If you put all the h files in your working directory then 
> write this at the start of the demo:
> #include "avcodec.h"
> #include "avformat.h"
> Start building and the compiler will cry for inttypes.h.
> Put this in common.h or write some preprocessor constants in Project->Settings
> #ifndef COMMON_H
> #define COMMON_H
> #define CONFIG_WIN32

Again, the second option (putting the preprocessor definition in Project 
/ Settings) is definitely preferred.

Thanks for the feedback -- can you give me some detailed information on 
where to set the various options in "Project / Settings"? Especially: 
Where to set the include and library path, and where to add the 
additional preprocessor definitions (does something along the lines of 
"-DEMULATE_INTTYPES" have to be added somewhere)? I'd like to add a 
short note about this to the documentation.

Also, do I understand correctly that both "CONFIG_WIN32" and 
"EMULATE_INTTYPES" have to be added to common.h, or is it just the latter?


Martin B?hme
Inst. f. Neuro- and Bioinformatics
Ratzeburger Allee 160, D-23538 Luebeck
Phone: +49 451 500 5514
Fax:   +49 451 500 5502
boehme at inb.uni-luebeck.de

More information about the ffmpeg-devel mailing list