Preface: I am an 80's vintage programmer as yet who knows nix about gits or gcc or how to download or set them up.
I used to download "latest patched" 32bit static Windows builds of ffmpeg from http://ffmpeg.arrozcru.org/autobuilds/ which had a lot of codec libraries included in the build, but that site no longer does nightly builds
Is there a simpleton's step by step guide (or advice here) for howto download and install each of the required tools (for me, it will be in a pre-built XP VirtualPC VM) ... and then download each of the dependent sources and then build a "latest ffmpeg" regularly - a la the autobuilds site's 32 bit static builds ?
I have reviewed a few online quides however they assume a working knowledge of gits and gcc and configure and what the required s/w is and where to get it and how to use it, what libraries exist which and where to find/build them, etc. I have no dev tools, apart from the free M$ express ones I am in need of a "beginner's leg up".
Advice appreciated, examples even better Has got to be of use to more than me, in the end...
PS if it helps identifying dependencies, the build configuration is identified http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/readme/ffmpeg-r26400-swscale-r32676-README
PPS had also posted this query over at doom10 however no response as yet.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 33
Thread
-
-
I haven't done a build of ffmpeg for several years, but the same logic should be the same. If you haven't already, go and download mingw/msys. The automated mingw installer *should* give you msys and everything else you need to build. Once you have msys up, CD to your sourcecode, and run (one at a time)...
./configure
make
With any luck, you should have some exes created. If I get a chance in the next few days, I will see if I can build it myself. Looks like I will need to now, if arrozru.org won't be offering any more builds.
Edit: I just downloaded the 20101030 version of the mingw automated installer, and you will need to check the "MSYS Basic System", and the "MinGW Developer Toolkit". -
BTW, besides installing msys/mingw, I also needed to go get yasm, which is available here:
http://www.tortall.net/projects/yasm/wiki/Download
I downloaded the Win32 exe, renamed it to yasm.exe, and put it in my msys's bin directory (c:\mingw\msys\1.0\bin). I downloaded an older snapshot of the svn, unzipped it, and put it in msys's home directory (c:\mingw\msys\1.0\home\<myusername>\)
I had to run the configure script with the memalign hack, like so:
./configure --enable-memalign-hack
after it built the configure/build files, I ran:
make
I tried compiling the latest checkout of ffmpeg, and it errored out on me. I know the project is in a rough state with the "takeover", so this may not be a good time to try to compile.
http://www.h-online.com/open/news/item/Development-of-FFmpeg-under-new-management-1172919.html -
Thanks ! There seems to be a some information missing eg how and where to re-download the ffmpeg source ...
Over here http://doom10.org/index.php?topic=1234.msg6068#msg6068 qyot27 posted some more instructions. Maybe if I combine the two sets of instructions (although I'm still unsure about how/where to d/l the nightly ffmpeg branch vs the released version).
And then once I'm confident that works then have a look at http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/readme/ffmpeg-r26400-swscale-r32676-README to somehow download/include the external libraries ...Last edited by hydra3333; 26th Jan 2011 at 04:41.
-
Using your hints and instructions from qyot27, some more questions here http://doom10.org/index.php?topic=1234.msg6080#msg6080.
Draft #0.2 of newbie instructions based on that here http://pastebin.com/WDuYsf1C
The questions were :-
It throws a very large number of compilation warnings (and in fact seems to have frozen after this line "CC libavcodec/ljpegenc.o" (I admit I did use --enable-nonfree, I wonder if that killed it)
So, a few questions -
1. I don't know what the result is from
git clone git://git.ffmpeg.org/ffmpeg.git
Specifically, whether it's copying an approved release or the latest patched version or what. How can I tell ?
2. If I repeat the GIT command, I suppose it copies the source over the top of what was there before ?
3. I recall arrozcru having a "static" build which is the result I prefer. Is that what is being produced ?
4. This http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/readme/ffmpeg-r26400-swscale-r32676-README mentions "external libraries compiled into FFmpeg". How would I go about integrating them into ffmpeg, or is it already a part of the configure command ? eg to include libx264. -
1) and 2)When you run the git command, it takes a snapshot of the current source for ffmpeg. So, everything that is logged here:
http://git.ffmpeg.org/?p=ffmpeg.git
would end up in the snapshot. Everytime you rerun the git command, it re-syncs that source.
Keep in mind that a snapshot like this will be really unstable, especially now. The other guys tended to move very slowly, (eg: make sure everything works). Like I said, last night's snapshot didn't compile. Who knows though, today it may.
3) According to ./configure --help, ffmpeg will build statically.
4)When you run the ./configure command, do "--enable-libx264" or whatever you want to compile. Using the "--enable-gpl" will enable a bunch of codecs, but I can't recall at the moment what they are. -
Ok, I have confirmed myself that the following steps will build ffmpeg for you. I haven't tested the built ffmpeg.exe, but at least it did build.
Code:1)MinGW/Msys installation Visit http://sourceforge.net/projects/mingw/files/ and download the Automated MinGW installer. (be sure to select "MSYS Basic System" and "MinGW Developer Toolkit" when installing) 2)Get Yasm Visit http://www.tortall.net/projects/yasm/wiki/Download and download the Win32 .exe build. Rename it to yasm.exe and put it in Msys's bin directory. (normally C:\mingw\msys\1.0\bin) 3)Grab (git) the ffmpeg src Visit http://code.google.com/p/msysgit/ and download the MsysGit portable installation. Extract the contents and run the git-cmd.bat file. from there, run: git clone git://git.ffmpeg.org/ffmpeg.git Take the resulting ffmpeg directory, and move it to your Msys home directory. (probably located at C:\mingw\msys\1.0\home\<yourusername>\) 4)Grab libx264 Visit http://www.videolan.org/developers/x264.html and grab a daily tarball. (or git it, with the instructions above. If you go that route, address is: git://git.videolan.org/x264.git) Extract the contents and move it to your Msys home directory. (probably located at C:\mingw\msys\1.0\home\<yourusername>\) 5)Configure and build libx264 Press "Start"... "Programs".. and go to the "MinGW" folder, and launch the "MinGW Shell". Type: cd x264* ./configure --enable-shared --prefix=/mingw --enable-win32thread make make install 4)Configure and build ffmpeg From your home directory (cd ~), type: cd ffmpeg ./configure --enable-memalign-hack --extra-cflags=-U__STRICT_ANSI__ --extra-cflags=-D_MT --enable-w32threads --enable-libx264 --enable-gpl (note: if you don't want x264, just leave that switch out) (I found a discussion from one of the ffmpeg devs, who suggested those cflags when building on mingw) Then type: make If everything goes as it should, you should end up with an ffmpeg.exe in the ffmpeg directory.
Last edited by liquid217; 27th Jan 2011 at 12:04.
-
Great !
Everytime you rerun the git command, it re-syncs that source.
I had the same compile-failure with pthreads and so switched to --enable-w32threads instead and it compiled with a lot of warnings.
When making all of the external libraries, eg libx264, does "--prefix=/mingw" put them in the right place that ffmpeg's configure expects ? Other notes told menavigate to c:\mingw\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). -
I may be wrong on git re-syncing the source. It's been a while.
And --enable-w32threads is the the correct way to compile on win32. Completely forgot about that switch.
As far as starting up msys for the first time, that is what that startup script does when you go to "Start"... "Programs"... "MinGW"... "MinGW Shell"
Edit: You are correct too, on that prefix command when configuring libx264. It just moves the libraries where they need to go when you run "make install" -
You can build x264 static also, and it has win32 threading option.
I think x264 uses pthreads by default, and ffmpeg would have to have pthreads enabled, so do yourself a favor use
" --enable-w32threads " for x264 and ffmpeg because it's APITA to compile with pthreads and x264.
Actually that should be "--enable-win32thread" for x264.
Yes, "--prefix=/mingw" should install everything to the correct folders.Last edited by gregalan; 27th Jan 2011 at 11:48.
-
greglan,
Good call. I changed my writeup above with that switch for compiling x264. -
OK, good so far. To put the GIT question to rest -
If I do a first time -
git clone git://git.ffmpeg.org/ffmpeg.git
then it clones the latest to a local folder named ffmpeg.
i) how to I get the latest updates when I return another day - do I have to remove the ffmpeg folder and re-do that GIT command ?
ii) how to I clone a specific release eg the latest official release (I don't even know how to find that let alone specify it) -
The official releases can be downloaded from ffmpeg.org download page: http://www.ffmpeg.org/download.html
I don't use git, I prefer to use the web interface to the git repository and download snapshots from there.
It's easier to browse, and see what changes have been made.
Unfortunately, since the split there's more than one git repository to choose from.
There's links to all the repositories on the download page. -
Um, just checking -
x264 is being built "shared", if I understand it, with --enable-shared but ffmpeg seems to be being built static (by default) ... is this a problem or does it mean something else ?
The configure file for x264 mentions --cross-prefix=VALUE rather than --prefix=VALUE ... what's the diff ?Last edited by hydra3333; 28th Jan 2011 at 18:12.
-
Hmm, with x264 I receive
$ ./configure --enable-shared --prefix=/mingw --enable-win32thread
./version.sh: line 2: git: command not found -
I've always just used "./configure --prefix=/mingw --enable-win32thread" for x264, it builds static by default just like FFmpeg.
I don't know why you would want to use "--enable-shared" if just compiling to use with FFmpeg.
I get this with the newest tarball:
$ ./configure --prefix=/mingw --enable-win32thread
./version.sh: line 2: git: command not found
Platform: X86
System: MINGW
asm: yes
avs: yes
lavf: no
ffms: no
gpac: yes
gpl: yes
thread: win32
filters: crop select_every
debug: no
gprof: no
PIC: no
shared: no
visualize: no
bit depth: 8
You can run 'make' or 'make fprofiled' now.
Do you not get the rest ?
If you do you can ignore the line "./version.sh: line 2: git: command not found".
I always get that with the daily tarballs.
I don't have git installed, it foobarred my build environment once and I haven't tried it since.
I do use Portable Git occasionally, since it's not tied in with my environment it can't screw things up.Last edited by gregalan; 28th Jan 2011 at 19:11.
-
If you want a good pre-built environment you can download one from here: http://www.cccp-project.net/wiki/index.php?title=Installing_MSYS-MinGW
They also have a pretty good guide for installing MSYS-MinGW yourself. -
Ah. Yes I get the rest of the text too, but didn't know I could just ignore the error.
The x264 configure says "--enable-shared build libx264.so" so it creates a .so library (I gather these are shared object libraries, which we don't want?), hence my wondering.
Still wondering about the configure file for x264 mentioning --cross-prefix=VALUE rather than --prefix=VALUE however if it works for you ...
Thanks, I wanted to do it from scratch to learn a little along the way. I'd had a look at their guide and got some pointers, however they don't step-by-step the GIT part They also use their own script to download and install a lot (not sure the script d/l's the latest version any more) so that's worth a look. -
Thanks for that, now that me too will have to mess around with ffmpeg's source-code
I don't have git installed, it foobarred my build environment once and I haven't tried it since.
I do use Portable Git occasionally, since it's not tied in with my environment it can't screw things up.
FWIW, here goes the dir listing for the root folder of my MSYS+GIT+GCC bloatware:
Code:25/10/2010 02:29 <DIR> . 25/10/2010 02:29 <DIR> .. 25/10/2010 02:13 <DIR> bin 25/10/2010 02:13 <DIR> doc 25/10/2010 02:13 <DIR> etc 25/10/2010 02:17 <DIR> gcc 02/10/2010 11:18 5.632 getcp.exe 02/10/2010 11:18 1.166.848 git-receive-pack.exe 02/10/2010 11:18 1.166.848 git-upload-archive.exe 02/10/2010 11:18 552.448 git-upload-pack.exe 02/10/2010 11:18 1.166.848 git.exe 02/10/2010 08:06 322.643 gitk 25/10/2010 02:13 <DIR> home 28/02/2009 08:58 978.432 libiconv2.dll 11/07/2009 13:34 2.238 m.ico 11/07/2009 13:34 7.056 msys.bat 11/07/2009 13:34 37.758 msys.ico 25/10/2010 02:13 <DIR> share 10 file(s) 5.406.751 bytes
HTH. -
Sorry, I forgot the part about "--cross-prefix=VALUE".
That's only used if your compiling FFmpeg on Linux to run on Windows.
Or to clarify a little bit it's the cross compile flag.
The MinGW download page was such a mess it made it hard to find everything needed, I thought if anyone else wanted to compile FFmpeg it would be simpler to get a premade environment than trying to find everything for themselves.Last edited by gregalan; 29th Jan 2011 at 07:39.
-
Sounds good. With quite a lot of hassle, for a beginner, I eventually built GIT myself and copied it's exe to C:\MinGW\msys\1.0\bin
I had to create a config.mak in it's folder with content
Code:#You can place local settings in config.mak and the Makefile # will include them. Note that config.mak is not distributed; # the name is reserved for local settings. # Define NO_OPENSSL environment variable if you do not have OpenSSL. # Define NO_CURL if you do not have libcurl installed. git-http-pull and # git-http-push are not built, and you cannot use http:// and https:// # transports. # Define NO_PTHREADS if you do not have or do not want to use Pthreads. # Define NO_TCLTK if you do not want Tcl/Tk GUI. NO_OPENSSL = true NO_CURL = true NO_PTHREADS = true NO_TCLTK = true
I'll update my total beginner's step-by-step documentation to include the above and add in the other libraries per the autobuilds here http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/readme/ffmpeg-r26400-swscale-r32676-README and then post it somewhere I guess.
-
-
Sure in a week or two ... got caught up being "smart" trying to compile GIT itself however that doesn't work for me with all it's dependencies (eg ssl) and complete lack of beginner's documentation on how to do that It's an "insider's" game where a lot of undocumented steps/assumptions are made as if they're obvious.
So, am stuck having to manually check an then if required re-d/l the latest sources for ffmpeg and it's dependencies. Got discouraged and gave it away for a bit - so far got to compile OK but only added in the x264 library so far
Liquid217 has most of it above. -
And while we wait...
one can grab the latest "gits" @ :
http://81-89-103-86.blue.kundencontroller.de/mencoder/ffmpeg/ -
Would be nice to note they come from Dirk Paehl (he did the work, didn't he?).
http://www.paehl.com/open_source/?Convert_Tools:FFMPEG
Damn! "Disable automatic tool link" doesn't work.Last edited by Chris K; 14th Feb 2011 at 11:54.
-
Overdue update
How to compile ffmpeg/x264 for Windows
http://csbarn.blogspot.com/2011/02/how-to-compile-ffmpegx264-for-windows.html
Originally posted by Chikuzen :
Because there are several people who started the redistribution of the binary of ffmpeg for windows, I will stop updating and delete all my builds tomorrow (2011/03/19).
http://ffmpeg.arrozcru.org/wiki/index.php?title=Builds
http://hawkeye.arrozcru.org/
regards. -
Wish I knew who those several people were !
I also stopped building but will tidy up and post what home grown instructions I have in the next few days. Expect not much more that what's already above with some newbie comments thrown in. -
Hi
It's an old thread but...
Do any of you guys still compile FFmpeg for Windows?
This is mine, cross-compiled with Ubuntu and mingw:-
ffmpeg version git-2012-10-20-044c0e6 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 21 2012 02:21:00 with gcc 4.7.1 (GCC)
configuration: --pkg-config=pkg-config --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-gpl --enable-nonfree --enable-version3 --enable-libaacplus --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --extra-libs='-lcrypt32 -lgdi32 -lm -lpthread -lwinmm -lws2_32' -
regarding cross-compiling I use a Ubuntu VM and https://github.com/rdp/ffmpeg-windows-build-helpers to build ffmpeg for windows 32&64bit
-
Last edited by bat999; 25th Oct 2012 at 11:43.
Similar Threads
-
how we can implement "VirtualDub" or "FFmpeg" with my C# windows applicati
By dhemittal in forum ProgrammingReplies: 0Last Post: 8th Jun 2010, 07:17 -
"reported post" notification is showing up with the latest posts
By aedipuss in forum FeedbackReplies: 1Last Post: 26th Jan 2010, 18:49 -
ffmpeg / "ffpresets" dir (under Win32)..?
By Gew in forum Newbie / General discussionsReplies: 0Last Post: 19th Apr 2009, 16:40 -
Latest "Best TVs" Consumer Reports arrived today. Winner Samsung
By edDV in forum Latest Video NewsReplies: 1Last Post: 30th Jan 2009, 23:46 -
Fairuse Wizard full version and adware "win32.rabio"
By ricardouk in forum DVD RippingReplies: 2Last Post: 13th Mar 2008, 10:56