Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Original instructions
- courtesy qyot27 from
- http://doom10.org/index.php?topic=1234.new;topicseen#new
- http://pastebin.com/7jRtWUXR
- and courtesy liquid217 from
- http://forum.videohelp.com/threads/331105-help-how-to-compile-latest-nightly-ffmpeg-for-win32-%28XP%29-with-mingw?p=2051519#post2051519
- 0. Create yourself a VM with XP in it. Within that, do the following.
- 1. Download and install XP PowerToys "Open Command Window Here" from
- http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx
- 2. Download an install 7zip from http://www.7-zip.org/
- 3. Download and install latest the Mingw automated installer from
- http://sourceforge.net/projects/mingw/
- You will need to check the "MSYS Basic System", and the "MinGW Developer Toolkit".
- 4.1 Download and extract the latest of following packages into C:\MinGW\msys\1.0\bin
- The utilities must be placed directly in this path, not a subdirectory of it.
- wget 1.11.4 http://users.ugent.be/~bpuype/cgi-bin/fetch.pl?dl=wget/wget.exe
- 7zip CLI http://www.7-zip.org/download.html -- note we want the CLI version
- 4.2 Download the latest Win32 exe UNRAR from http://www.rarlab.com/rar/unrarw32.exe
- Put it into the msys's bin directory (c:\mingw\msys\1.0\bin).
- 4.3 Download the latest Win32 exe yasm from
- http://www.tortall.net/projects/yasm/wiki/Download
- Rename it to yasm.exe, and put it in the msys's bin directory (c:\mingw\msys\1.0\bin).
- 4.4 Download the Win32 exe nasm from http://www.nasm.us
- The current version is http://www.nasm.us/pub/nasm/releasebuilds/2.09.04/win32/nasm-2.09.04-win32.zip
- Extract both nasm.exe and ndisasm.exe into the msys's bin directory (c:\mingw\msys\1.0\bin).
- 5. In Windows Explorer, show folders and navigate to c:\mingw\msys\1.0 (old instrictions said "C:\msys\1.0"),
- Right-click on the "1.0" in the folders pane, and choose the "Open Command Window Here" option.
- Type 'msys --norxvt' (without the quotes), and hit enter.
- On first load, it will create a directory for you with your name in the 'home' directory.
- For instance, c:\mingw\msys\1.0\home\qyot27 or c:\mingw\msys\1.0\home\myusername
- From here on out, I'll be using Unix-style directory naming when talking about the compiling process
- - c:\mingw\msys\1.0 is referred to as /, and the folders beneath it would be /bin, /home, /local, or so on).
- * other cmd tool ** Now, right-click on the Prompt's title bar and choose Properties.
- * other cmd tool ** Under the 'Edit Options' area, make sure that QuickEdit mode is checked, and then click OK.
- * other cmd tool ** When the Apply Properties dialog comes up, choose 'Save properties for future windows with same title'.
- 5.1 In Windows Explorer, show folders and navigate to c:\mingw\msys\1.0
- Right-click on the file msys.bat and drag it somewhere onto whitespace in that folder andrelease the right-click.
- Select "Create Shortrcut Here" from the pop-up context menu.
- Right-click on the new shortcut and rename it to get rid of the ".bat".
- Right-click on the new shortcut and choose "Properties".
- * add --norxvt to the Target, so that it looks like this C:\MinGW\msys\1.0\msys.bat --norxvt
- * ensure the "Start In" is set to C:\MinGW\msys\1.0
- Now you can copy this shortcut to wherever you want - desktop, quickstart bar etc - and use it to start msys.
- 6. There are a couple things you should compile and install first, though. The latest zlib and bzip2.
- (from time to time, check these version are the latest by checking the websites http://zlib.net and http://bzip.org)
- Assuming your username is "yourusername" then do the following...
- With the MSys prompt open, copy and paste the following commands and hit Enter after each line:
- cd /home/yourusername
- wget http://zlib.net/zlib-1.2.5.tar.gz
- tar -xzvf zlib-1.2.5.tar.gz
- cd zlib-1.2.5
- make -f win32/Makefile.gcc BINARY_PATH=/mingw/bin INCLUDE_PATH=/mingw/include LIBRARY_PATH=/mingw/lib install
- cd /home/yourusername
- wget http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz
- tar -xzvf bzip2-1.0.6.tar.gz
- cd bzip2-1.0.6
- make
- make install
- cp *.h /mingw/include
- cp *.a /mingw/lib
- exit
- 7. Download Git, which you'll need to download ffmpeg's source code. Download the installer from here:
- http://code.google.com/p/msysgit/
- Specifically as at 26 Jan 2011 :-
- http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.3.1-preview20101002.exe
- Launch the installer, and click Next until you get to selecting the components you want to install.
- Uncheck everything but Windows Explorer integration, and under that section, choose the 'Context menu entries' option.
- You can uncheck 'Git GUI Here' if you want, as you won't be using it.
- Just make sure that 'Git Bash Here' is checked.
- Now keep on clicking Next until the install finishes.
- 7.1 Now, you should be in Windows Explorer looking inside C:\msys\1.0\home\yourusername for the next bit.
- In the left pane of Windows Explorer, right click on the new 'yourusername' folder and choose Git Bash Here.
- 8. With the Git Bash window still open, type or copy-&-paste the following command and then hit Enter:
- git clone git://git.ffmpeg.org/ffmpeg.git
- 9. That will create a folder named ffmpeg and download FFmpeg's source code into it. Wait.
- When the download is finished, close the Git Bash window by typing in the command: exit
- 10. Open the MSys window like previously described
- (right-click, Open Command Prompt Here, 'msys --norxvt'), or even better - use the Shortcut you created earlier
- 12. Now that MSys' prompt is open, type or copy-&-paste the following commands - hit Enter after each one:
- cd ffmpeg
- ./configure --enable-gpl --enable-version3 --enable-postproc --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --extra-cflags="-U__STRICT_ANSI__"
- make
- make install
- exit
- Things to try
- ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --extra-cflags="-U__STRICT_ANSI__"
- (Special note for the above:
- IF you're going to be using the build on just ONE computer,
- Leave out --enable-runtime-cpudetect and add '-march=native' to the --extra-cflags option, like this: --extra-cflags="-march=native -U__STRICT_ANSI__"
- In other words to make it portable, DO NOT do this)
- 13. Generally speaking, the same steps apply to just about any type of software you can compile with GCC:
- A './configure' step
- A 'make' step
- A 'make install' step
- Yes, sometimes the actual steps differ, but the assumption is typically that the above three commands are the default.
- Before attempting this, though, make sure that there's actually a file in the source code's directory named 'configure'
- - if there isn't, that means it uses a different process, and there's usually files named INSTALL or README
- which you can refer to in order to see if they describe the build process for that piece of software.
- Also, whenever dealing with the ./configure step,
- it's usually possible to do './configure --help', which will list all the options you can give to ./configure.
- 14. The files/options specified by http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/readme/ffmpeg-r26400-swscale-r32676-README
- are
- Automated FFmpeg 32-bit Windows builds made by Ramiro Polla.
- FFmpeg revision: 26400
- SwScale revision: 32676
- Build date: Tue, 18 Jan 2011 04:05:32 -0200
- libswscale version: 0.12.0
- libavcodec version: 52.108.0
- libavcore version: 0.16.1
- libavdevice version: 52.2.3
- libavformat version: 52.93.0
- libavutil version: 50.36.0
- libavfilter version: 1.74.0
- FFmpeg configuration:
- --enable-gpl
- --enable-version3
- --enable-libgsm
- --enable-libvorbis
- --enable-libtheora
- --enable-libspeex
- --enable-libmp3lame
- --enable-libopenjpeg
- --enable-libschroedinger
- --enable-libopencore_amrwb
- --enable-libopencore_amrnb
- --enable-libvpx --disable-decoder=libvpx
- --arch=x86
- --enable-runtime-cpudetect
- --enable-libxvid
- --enable-libx264
- --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm'
- --target-os=mingw32
- --enable-avisynth
- --enable-w32threads
- --cross-prefix=i686-mingw32-
- --cc='ccache i686-mingw32-gcc'
- --enable-memalign-hack
- All source code used can be found at:
- http://ffmpeg.arrozcru.org/autobuilds
- Comments, suggestions, bug reports, compliments, donations, etc:
- http://ffmpeg.arrozcru.org/forum
- These builds are cross-compiled from an amd64 Ubuntu Jaunty system.
- The relevant development package versions from the main repository are:
- nasm 2.05.01-1
- yasm 0.7.1-0ubuntu2
- The cross-compilation packages are available from:
- http://apt.arrozcru.org
- The cross-development package versions from that repository are:
- mingw32-gcc-4.4 4.4.2-1
- mingw32-binutils 2.20-1
- mingw32-runtime 3.17-1
- mingw32-w32api 3.14-1
- The external libraries compiled into FFmpeg are:
- http://www.bzip.org
- mingw32-bzip2 1.0.5-1
- http://www.quut.com/gsm/
- mingw32-libgsm 1.0-pl13-2
- http://lame.sourceforge.net
- mingw32-libmp3lame 3.98.4-1
- http://code.entropywave.com/projects/orc/
- mingw32-liborc 0.4.5-1
- http://sourceforge.net/projects/opencore-amr
- mingw32-libopencore-amr 0.1.2-1
- http://www.openjpeg.org
- mingw32-libopenjpeg 1.3-1
- http://diracvideo.org
- mingw32-libschroedinger 1.0.9-2
- http://www.libsdl.org
- mingw32-libsdl 1.2.14-3
- http://www.xiph.org
- mingw32-libogg 1.2.2-1
- mingw32-libvorbis 1.3.2-1
- mingw32-libspeex 1.2rc1-1
- mingw32-libtheora 1.1.1-1
- http://www.videolan.org/developers/x264.html
- mingw32-libx264 1834-1
- http://www.polarssl.org
- mingw32-polarssl 0.13.1-1
- http://rtmpdump.mplayerhq.hu
- mingw32-librtmp 537-1
- http://www.xvid.org
- mingw32-libxvid 1.2.2-1
- http://www.webmproject.org
- mingw32-libvpx 0.9.5-1
- http://www.zlib.net
- mingw32-zlib 1.2.5-1
- The license for each library can be found in the licenses directory.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement