VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
Thread
  1. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  2. Free Flying Soul liquid217's Avatar
    Join Date
    Feb 2002
    Location
    United States
    Search Comp PM
    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".
    Quote Quote  
  3. Free Flying Soul liquid217's Avatar
    Join Date
    Feb 2002
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  4. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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 05:41.
    Quote Quote  
  5. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  6. Free Flying Soul liquid217's Avatar
    Join Date
    Feb 2002
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  
  7. Free Flying Soul liquid217's Avatar
    Join Date
    Feb 2002
    Location
    United States
    Search Comp PM
    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.
    Edit: added --enable-w32threads
    Last edited by liquid217; 27th Jan 2011 at 13:04.
    Quote Quote  
  8. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Great !

    Everytime you rerun the git command, it re-syncs that source.
    OK.

    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 me
    navigate 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).
    Quote Quote  
  9. Free Flying Soul liquid217's Avatar
    Join Date
    Feb 2002
    Location
    United States
    Search Comp PM
    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"
    Quote Quote  
  10. Member
    Join Date
    Nov 2009
    Location
    United States
    Search PM
    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 12:48.
    Quote Quote  
  11. Free Flying Soul liquid217's Avatar
    Join Date
    Feb 2002
    Location
    United States
    Search Comp PM
    greglan,
    Good call. I changed my writeup above with that switch for compiling x264.
    Quote Quote  
  12. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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)
    Quote Quote  
  13. Member
    Join Date
    Nov 2009
    Location
    United States
    Search PM
    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.
    Quote Quote  
  14. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Originally Posted by liquid217 View Post
    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.[/CODE]
    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 19:12.
    Quote Quote  
  15. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    Hmm, with x264 I receive
    $ ./configure --enable-shared --prefix=/mingw --enable-win32thread
    ./version.sh: line 2: git: command not found
    so it's expecting a "local" GIT command to be available rather than the one from http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.3.1-preview20101002.exe
    Quote Quote  
  16. Member
    Join Date
    Nov 2009
    Location
    United States
    Search PM
    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 20:11.
    Quote Quote  
  17. Member
    Join Date
    Nov 2009
    Location
    United States
    Search PM
    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.
    Quote Quote  
  18. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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 ...

    Originally Posted by gregalan View Post
    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.
    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.
    Quote Quote  
  19. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by gregalan View Post
    If you do you can ignore the line "./version.sh: line 2: git: command not found".
    I always get that with the daily tarballs.
    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.
    Yep, it seems the "installermania" has affected the Linux-centered devilopers as well.
    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
    As you can see, git itself doesn't need to be much greater than 5MB
    HTH.
    Quote Quote  
  20. Member
    Join Date
    Nov 2009
    Location
    United States
    Search PM
    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 08:39.
    Quote Quote  
  21. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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
    X264 build didn't seem to complain then. Built ffmpeg with it and it doesn't crash straight away.

    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.
    Quote Quote  
  22. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by hydra3333 View Post
    I'll update my total beginner's step-by-step documentation...
    ...
    ... and then post it somewhere I guess.
    Couldn't your "somewhere" be this thread
    Quote Quote  
  23. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  24. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    And while we wait...

    one can grab the latest "gits" @ :

    http://81-89-103-86.blue.kundencontroller.de/mencoder/ffmpeg/
    Quote Quote  
  25. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    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 12:54.
    Quote Quote  
  26. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    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.
    Quote Quote  
  27. Member hydra3333's Avatar
    Join Date
    Oct 2009
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  28. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    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'
    Quote Quote  
  29. regarding cross-compiling I use a Ubuntu VM and https://github.com/rdp/ffmpeg-windows-build-helpers to build ffmpeg for windows 32&64bit
    Quote Quote  
  30. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by Selur View Post
    Hi Selur
    I came across that same script in the Zeranoe forum.
    I used it for ideas to make a stripped-down build script for myself.
    Last edited by bat999; 25th Oct 2012 at 12:43.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!