Installing FFMPEG from the source in window platform is easy as you do for other window application. Here is the complete instructios how to build FFMPEG in windows. To install FFMPEG on windows you need to install third party MinGW and MSys library that is compatible with GCC. This library is required to build ffmpeg in windows and support shell to run commands.

Download MinGW and MSys

MinGW: MinGW Direct download link
MSys: MSys Direct download link
SF Link: Sourceforge MinGW MSys Package Download Page
FFMPEG: FFMPEG Download fully patched version

ffmpeg mingw msys compile build

Building FFMPEG

It is time to install ffmpeg. Extract downloaded ffmpeg archive in c: folder. If you have not downloaded yet please download now then run MSys.bat file from C:\msys\1.0\ folder. This location will be depend on you MinGW and MSys installation. In the command prompt run the following commands:

$ cd c:/ffmpeg-0.4.7

$ ./configure –extra-cflags=”-mno-cygwin -mms-bitfields” –extra-ldflags=”-Wl,–add-stdcall-alias” –enable-mingw32 –enable-shared –disable-a52 –disable-pp –disable-ffserver –disable-ffplay
$ make

Written by Bala Krishna

Bala Krishna is web developer and occasional blogger from Bhopal, MP, India. He like to share idea, issue he face while working with the code.

This article has 11 comments

  1. Ruby

    Hello sir, i was looking at how you did to install ffmpeg. it goes fine until the last point.

    $ gcc -mno-cygwin -mms-bitfields -Wall -g -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSE
    T_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o common.o common.c
    gcc.exe: common.c: No such file or directory
    gcc.exe: no input files

    when i type the above code it cannot find gcc and i have tested gcc in command is there.Can you please clear out my doubts.I am very new to programming.Have been tryng real hard to get ffmpeg installed since 24 hours already…
    Thank you!

  2. Ruby so sorry.silly me!! i didnt notice that what i typed at the end was infact displayed. Just to be sure can u please clear out my doubt whether the last step was indeed make.

    One more thing, how will i get to execute ffmpeg for conversions? most of the codes i came across through have used something like “c:/ffmpeg.exe” how will i knw the path to mine,since i don’t find it in my drive..

    A quick reply will be very appreciated.

  3. Visakumar

    Hi how do i verify the ffMPEG is created successfully? I am getting an error

    make[1]: *** [] Error 1
    make[1]: Leaving directory `/e/ffmpeg-047/libavcodec’
    make: *** [lib] Error 2

    and I dont see anywher ffMPEG.exe or .dll created. Can you please help.

    Thank you

  4. Santosh

    I have followed the steps you have mentioned. But on compilation i get an error as follows.

    liba52/a52.h: No such file or directory

    Could you please point to the location where i can find this file.

    Thanks in advance

  5. yogs

    hi i am converting audio file through ffmpeg.exe.

    i am facing the path problem if in path there is space then it is not able to read it.

    ex:- D:\Project\WebSites\audioduration2\videos\org video\a.wmv

    its showing error like that:

    FFmpeg version SVN-r10461, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: –enable-memalign-hack –enable-libamr-nb –enable-libamr-wb –enable-libfaac –enable-libgsm –enable-libmp3lame –enable-libogg –enable-libtheora –enable-libvorbis –enable-shared –disable-static –enable-liba52 –enable-libx264 –enable-libxvid –enable-libfaad –enable-swscaler –enable-gpl –enable-avisynth –cpu=i686 –enable-pthreads libavutil version: 49.5.0 libavcodec version: 51.43.0 libavformat version: 51.12.2 built on Sep 11 2007 01:30:32, gcc: 4.2.1-sjlj (mingw32-2) D:\Project\WebSites\audioduration2\videos\org: no such file or directory

  6. ramesh

    if i follow the steps to instal i got the following error

    *** 1. unable to allocate heap 0x10050000, heap_ch
    unk_size 268435456, pid 3452, Win32 error 0
    0 [main] sh 1388 sync_with_child: child 3452(0x314) died before initializa
    tion with status code 0x1
    1022 [main] sh 1388 sync_with_child: *** child state waiting for longjmp
    ./configure: fork: Resource temporarily unavailable

    does can any one help out wht is the problem

  7. Pulkit

    Going by screenshot in this post, i am getting the exactly same output, but when i try to ‘make’, its not working. Is it something to do with the error in first few lines?
    sdl-config: command not found

  8. Daniel

    I followed the steps in the article and it gives me an error:
    Unknown option “-extra-cflags=-mno-cygwin”.
    See ./configure –help for available options.

    What is it?