Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    Compiled linux ffmpeg binary for Gallery2: download

    28th June 2007

    Updated on Apr 8, 2008.

    Stimulated by the post of Eric Daniel (who used to have a blog at termitenshort.com), I compiled the most recent ffmpeg SVN source into Linux binary, which runs fine on my shared hosting (note: I’m using older ffmpeg binaries, which are at the end of the post).

    mini-FAQ:
    Q: Why the title has “for Gallery2″?
    A: Just because I avoided the inclusion of libraries, which were not found on my shared hosting server. I hope this will work for other shared hosting environments.

    Configuration, version and date can be found in the output of ffmpeg.

    Versions built on April, 8, 2008:
    ffmpeg (no lame) (checked: can be executed on godaddy shared hosting)

    FFmpeg version SVN-r12769, Copyright (c) 2000-2008 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-postproc –enable-swscale –enable-pthreads –disable-debug –enable-gray –disable-ffserver –disable-ffplay –enable-avfilter –disable-network –disable-ipv6
    libavutil version: 49.6.0
    libavcodec version: 51.54.0
    libavformat version: 52.13.0
    libavdevice version: 52.0.0
    libavfilter version: 0.0.0
    built on Apr 8 2008 15:13:14, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
    usage: ffmpeg [[infile options] -i infile]… {[outfile options] outfile}…

    ffmpeg (with lame). For this one, grab libmp3lame.so.

    FFmpeg version SVN-r12769, Copyright (c) 2000-2008 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-postproc –enable-swscale –enable-pthreads –disable-debug –enable-gray –disable-ffserver –disable-ffplay –enable-avfilter –disable-network –disable-ipv6 –enable-libmp3lame
    libavutil version: 49.6.0
    libavcodec version: 51.54.0
    libavformat version: 52.13.0
    libavdevice version: 52.0.0
    libavfilter version: 0.0.0
    built on Apr 8 2008 15:44:31, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

    Based on single request: ffmpeg (with lame and libfaac and libfaad). For this one, grab libfaac.so and libfaad.so.

    FFmpeg version SVN-r12769, Copyright (c) 2000-2008 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-postproc –enable-swscale –enable-pthreads –disable-debug –enable-gray –disable-ffserver –disable-ffplay –enable-avfilter –disable-network –disable-ipv6 –enable-libmp3lame –enable-libfaac –enable-libfaad
    libavutil version: 49.6.0
    libavcodec version: 51.54.0
    libavformat version: 52.13.0
    libavdevice version: 52.0.0
    libavfilter version: 0.0.0
    built on Apr 8 2008 23:53:57, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

    As an experiment, here’s ffmpeg freebsd binary without lame support. Did ran on some FreeBSD 6.3 hosting.

    FFmpeg version SVN-r12769, Copyright (c) 2000-2008 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-postproc –enable-swscale –enable-pthreads –disable-debug –enable-gray –disable-ffserver –disable-ffplay –enable-avfilter –disable-network –disable-ipv6 –target-os=freebsd
    libavutil version: 49.6.0
    libavcodec version: 51.54.0
    libavformat version: 52.13.0
    libavdevice version: 52.0.0
    libavfilter version: 0.0.0
    built on Apr 8 2008 16:15:38, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

    Versions built on Ocotber, 28, 2007:
    download ffmpeg without libmp3lame support

    FFmpeg version SVN-r10867, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-pp –enable-swscaler –enable-pthreads

    –enable-libogg –enable-libvorbis –disable-debug
    libavutil version: 49.5.0
    libavcodec version: 51.47.1
    libavformat version: 51.17.0
    built on Oct 28 2007 22:46:10, gcc: 3.4.6

    download ffmpeg with libmp3lame support

    FFmpeg version SVN-r10867, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-pp –enable-swscaler –enable-libmp3lame

    –enable-pthreads –enable-libogg –enable-libvorbis –disable-debug
    libavutil version: 49.5.0
    libavcodec version: 51.47.1
    libavformat version: 51.17.0
    built on Oct 28 2007 23:04:59, gcc: 3.4.6

    Shared hosting testing reports are welcome.

    Below you can find even older versions of ffmpeg, which were tested and found functional on GoDaddy shared hosting.

    Again, two versions are available – with libmp3lame support and without. Learn more about using ffmpeg with libmp3lame support in shared hosting environment.

    download ffmpeg without lame

    FFmpeg version SVN-r9447, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-pp –enable-swscaler –enable-pthreads –enable-libvorbis –disable-v4l –disable-v4l2 –disable-bktr –disable-dv1394 –disable-debug
    libavutil version: 49.4.1
    libavcodec version: 51.40.4
    libavformat version: 51.12.1
    built on Jun 28 2007 12:32:29, gcc: 3.4.6

    The second binary DID NOT work on my shared hosting due to the absence of libmp3lame.so.0 (see comments and this post on how to enable libmp3lame support).
    It was built two days later, and has the following config:

    download ffmpeg with lame

    FFmpeg version SVN-r9451, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    configuration: –enable-gpl –enable-pp –enable-swscaler –enable-libmp3lame –enable-pthreads –enable-libvorbis –disable-v4l –disable-v4l2 –disable-bktr –disable-dv1394 –disable-debug
    libavutil version: 49.4.1
    libavcodec version: 51.40.4
    libavformat version: 51.12.1
    built on Jun 30 2007 11:51:23, gcc: 3.4.6

    StumbleUponDeliciousCiteULikeShare

    49 Responses to “Compiled linux ffmpeg binary for Gallery2: download”

    1. Maxim Says:

      Hi Bogdan,

      I’m getting this warning with your binary: “Compiler did not align stack variables. Libavcodec has been miscompiled
      and may be very slow or crash. This is not a bug in libavcodec,
      but in the compiler. Do not report crashes to FFmpeg developers.”

      But it’s just a warning. It’s making a FLV but without SOUND. Any chance you can compile a version with lame included?

    2. chronos Says:

      Maxim,

      I surely would have included lame, but it’s not available on my shared hosting – thus I didn’t include it. This binary is intended for Gallery2, where – to the best of my knowledge – there is no video conversion, enabled/available by default.

      As for the warning: when compiling first with gcc-3.3.6, I was getting the same warning on my local machine. After compiling with gcc-3.4.6, the warning seemed to be gone on my machine, and I never noticed this warning on my shared hostig. Should be OK, I think – gcc-3.4.6 is the ‘current’ version for Slackware.

      It’s easy compiling ffmpeg with lame included (plus even more libraries, I had to exclude some 5 or 6 libraries), you may want to try if you’re going to use ffmpeg.

      Well, after some thought I decided to compile ffmpeg with lame. Most probably will add to this post within one or two days, might be even today.

    3. Maxim Says:

      Thanks Chronos. I know compiling is fairly easy but unfortunately my provider doesn’t allow it. At least it doesn’t allow putting libs in /usr/bin
      Looking forward to your new version. Highly appreciated!

    4. chronos Says:

      Maxim,

      ffmpeg with libmp3lame still requires the /usr/lib/libmp3lame.so.0. Unless you known how to “build-in” the libmp3lame library into ffmpeg, the new binary won’t be of help if there is no libmp3lame.so.0 on your provider’s server. Even if I put here the downloadable library binary, it might not be possible to make ffmpeg use it – just because ffmpeg looks for the library in /usr/lib, and not local directory.

    5. Maxim Says:

      Okay. I’ve managed to install lame into local/lib. but of course ffmpeg still is not finding it.
      if it were possible to make ffmpeg look in a local dir (i.e. the same dir as ffmpeg is in) maybe that could solve the problem. users without root access could then download an ffmpeg binary and a lame binary and would be all set. no?

    6. chronos Says:

      saying ‘local/lib’, do you mean ‘/usr/local/lib’? if yes, then you may want to have a look at my next post.

      As for the ‘local directory’ version of ffmpeg+lame: I think it’s possible, might be even with some ‘configure’ switches. But I won’t be checking this now – have no desire to download and compile ffmpeg for the third time :)

    7. Maxim Says:

      Chronos,

      Yes that would work, but I don’t have writing access to usr/lib. My lame lib now is in $HOME/DOMAIN/HTML/lib and it’s impossible to make a symbolic link and store it in usr/lib.

    8. chronos Says:

      Hmm, I think it’s possible to look through the code of ffmpeg, find the reference to ‘libmp3lame.so.0′, and edit that reference, replacing /usr/lib for the exact path you have. Then compile, and it should work.

      This is just a guess :) , but should work.

      One more comment: as I understood, you don’t have access to a Linux machine to compile ffmpeg. I assume your primary working environment is Windows. If so, you might be interested in having a look at Topologilinux – that is the system I used to compile ffmpeg binaries :)

    9. Maxim Says:

      That’s cool Chronos. Downloading topologilinux right now. Thanks!

    10. chronos Says:

      Uh, I should have given that link in my first comment.
      Glad that I managed to help you anyway :)

    11. shdwkeeper Says:

      Any way to compile this for Gallery with a Truemotion VP6 codec support?

    12. Bogdan Says:

      Shdwkeeper, (wow! how would that be pronounced?)

      I do not recollect seeing such an option when configuring ffmpeg for compilation… Thus I assume that some external library might be needed. Checking this to be 100% sure isn’t possible at the moment, as I deleted the local source files for ffmpeg.

      Unless I stumble upon the step-by-step instructions on how to include that thing into ffmpeg, I’m unlikely to provide such a version due to the absence of any personal need/popular demand for compiling such a version.

    13. shdwkeeper Says:

      I’m on a shared host so I do not have libmp3lame.so.0 anyway to compile somthing that will still give the files audio or can you install libmp3lame.so.0 into a seperate directory and point ffmpeg to it?

    14. Bogdan Says:

      Being on shared hosting doesn’t strictly mean there’s no libmp3lame.so.0 (though highly probable); good and willing techsupport might install that library upon request, I think.

      I don’t know what kind of a project you have, but in Gallery2 (to the best of my knowledge) ffmpeg is used only for three basic things, which do not include video recoding: 1) determining video size, 2) generating thumbnails, and 3) providing means to choose any frame for a thumbnail. Thus, libmp3lame support isn’t required by Gallery2 to be present in ffmpeg. Extra video codecs, though, might be needed if you upload videos encoded with those extra codecs…

      Did you find anything worthy on VP6 support in ffmpeg? Any FAQs, official feature description docs, probably some binary packages? If you do find info on enabling VP6 in ffmpeg and post that here, I might compile the version exclusively for you :)

    15. libmp3lame.so.0 (slackware, lame-3.97) » Autarchy of the Private Cave Says:

      [...] Compiled linux ffmpeg binary for Gallery2: download [...]

    16. Gabe Says:

      You can upload libmp4lame.so as well to the shared hosting site and when you call ffmpeg, call something to set an environment variable right before the call to ffmpeg i.e. in php I’d do exec(“export LD_LIBRARY_PATH=/path/to/lib/with/lame; /path/to/ffmpeg [ffmpegargs]“); That way you can use the uploaded lame. I hope that helps someone as I have been unable to find any info on how to use an uploaded lame. I’ve tried it and it works on godaddy. However, I have been unable to compile my own ffmpeg that works on godaddy as my version of GLIBC is too new and I don’t know how to compile using an older version. I get the error /lib/tls/libc.so.6: version `GLIBC_2.4′ not found (required by ffmpeg). running strings /lib/tls/libc.so.6 | grep GLIBC shows the latest as being GLIBC_2.3.3. So if someone knows how I can compile using an older GLIBC or workaround this that would be great. If someone could post a newer ffmpeg.with.lame than what is posted here, that would be cool too. For some reason the ffmpeg.with.lame posted here gives me a black strips on the lower and right sides when converting .mov to .flv. I saw that that was a bug in older releases in ffmpeg…

    17. Bogdan Says:

      Gabe,

      thanks for valuable comment – if you don’t mind, I will either cite your experience in the post body or maybe even will write a separate post on using libmp3lame with ffmpeg on shared hosting.

      As for the compilation with older glibc – I have no simple methods at hand.

      The good news might be that I will compile a new ffmpeg within 2 days from the SVN sources on the same box as the versions currently available here; again, I think there will be two versions – one without and one with lame support. I expect new versions to work on godaddy, as the current versions do. If I do not update the post with new ffmpeg binaries – please comment here to remind me…

      Gabe, two more questions: 1) can you prove or disprove this post (probably you observed some weird behaviour which can be explained with CPU time limitation), and 2) which web frontend to ffmpeg do you use? Is that Gallery2 or something else?

    18. Using libmp3lame-enabled ffmpeg on shared hosting » Autarchy of the Private Cave Says:

      [...] As Gabe pointed out in my post with compiled ffmpeg Linux binaries, there is a relatively simple method of adding libmp3lame.so.0 file to your shared hosting so that ffmpeg executable will see the library. [...]

    19. Bogdan Says:

      New binaries uploaded, version SVN-r10867. Shared hosting testing/usage reports of the two provided binaries are welcome.

    20. Chava Says:

      where can i get the libmp3lame.so.0 or libmp4lame.so.0 files for godaddy shared hosting?

    21. Bogdan Says:

      Try the binaries from any other Linux system. You may want to try binaries from systems with 2.4.x kernels first.

    22. Chava Says:

      is there any way you can send me one of them because i dont seem to find any of those libmp3lame.so.0 or libmp4lame.so.0, i need them for godaddy. Thanks

    23. Bogdan Says:

      I’ve just sent you archived libmp3lame.so.0.0.0 from my Slackware installation. please don’t forget to comment how that works for you on godaddy.

    24. Simon Says:

      I’m also in desperate need for libmp3lame.so.0.0.0, to use for ffmpeg. If anyone have ideas on how to get sound on my FLV-files, please let me know. So far, no luck as the -acodec mp3 is not working. I can’t run the ffmpeg-compiles with mp3-lame encoders. I’m on shared hosting

    25. Bogdan Says:

      Here is the binary of libmp3lame.so from the system where I’m compiling ffmpeg’s for this page. Also see how to install libmp3lame-enabled ffmpeg on shared linux hosting.

    26. reymundcd Says:

      Hello Bogdan-

      I was wondering if I can PM you regarding your installation steps posted above. I need a few more info on how to make it work with godaddy

      Thanks

      Reymund

    27. Bogdan Says:

      Feel free to contact me privately.

      Please note, that on godaddy I’m currently using only no-mp3 version of ffmpeg, but mp3 version must be also possible.

    28. Denny Deaton Says:

      What a great script! But for me its not working with AAC files. Do you have a version of the ffmpeg with lame support that has faac enabled? Thanks so much!

    29. Bogdan Says:

      Denny,

      I’ve just updated the post with fresh compilations. There’s also one with libfaac support. But as long as it’s an external library, you may have to do something similar to what is described here for own libmp3lame support on shared hostings.

    30. Denny Deaton Says:

      Very cool! Thanks so much!

      I just tried it out and it works with non-aac files just fine. However it outputs a 0KB file if I run an AAC file through it. I am using GoDaddy shared hosting if that helps. And I had to create a shell script (as suggested) to initiate the local LD_LIBRARY_PATH which loads in the libmp3lame and libfaac libraries. That seems to be working fine. Any ideas? Thanks again, I feel like I am so close to getting this working.

    31. Denny Deaton Says:

      I just found this in a follow-up check in the formats.

      EA libfaac
      EA libmp3lame

      Should there be a D in there for libfaac for it to decode AAC codec?

      Thanks!

    32. Denny Deaton Says:

      I am sorry to hijack your forum but I think I spotted the issue. FAAD decodes and FAAC encodes. I am learning here. Any change I could bother you to compile a version with FAAD and FAAC? Thanks so much!

    33. Bogdan Says:

      Yes, I did notice that there are both faad and faac in compile options, but I wasn’t sure so left faad out.

      I can compile lame/faad/faac binary, but that will have to wait until I’m back to Linux :) I expect to be able to put up here the new version late this evening (I’m in GMT+2, for reference).

      Could you send me the shell script you use at GoDaddy? (via contact form)

      It looks like we are creating the “full-featured binary ffmpeg package for shared hostings” here :) I’m thinking on packaging everything into a single distribution – bundled with that library-support shell script and all the *.so files required by the package-included ffmpeg. That’s pretty simple, but still requires time :(

      Update: faad-version is now available, together with libfaad.so.

    34. How to use ffmpeg if libmp3lame support is not present » Autarchy of the Private Cave Says:

      [...] the solution is to use ffmpeg direct stream copy option [...]

    35. Instructions on installing libmp3lame-enabled ffmpeg on shared linux hosting » Autarchy of the Private Cave Says:

      [...] Compiled linux ffmpeg binary: download [...]

    36. sjaak Says:

      This article is awesome Bogdan! Is there also a compiled version of ffmpeg that supports vhook? This is used for watermarking videos with ffmpeg.

      Thanks alot!

    37. Bogdan Says:

      Sjaak,

      after looking into it, I might actually enable vhook for all further compilations of ffmpeg.

      New binaries will be added here in the near future.

      Also, I might be setting up compilation pipeline, probably even providing daily svn builds of several different ffmpeg configuration targets.

    38. Bogdan Says:

      On a second thought: no, vhook is deprecated, and will be removed from future versions of ffmpeg. It doesn’t look worth including into binary builds; let’s wait for something better and non-deprecated (source).

    39. sjaak Says:

      thanks Bogdan,

      But is there any good alternative for applying watermarks or logo’s on our video?

    40. Bogdan Says:

      Sjaak,

      you can compile vhook-enabled version of ffmpeg yourself, if you need it that badly.

      Unfortunately, I am not aware of any video-watermarking tools; I didn’t even know it’s possible with ffmpeg :)

    41. Andreas Says:

      Bogdan,

      thanks a lot, your binaries are a lifesaver! ;)

      I’m not using them for shared hosting but for a Thecus N5200Pro NAS. Your ffmpeg compile is perfect for Gallery2,
      but once I had it installed I wanted to transcode some video files to h264.

      Do you think you could compile a version with lame, libfaac, libfaad AND libx264? That would be awesome!

      Cheers

    42. Bogdan Says:

      Andreas,

      I might compile such a version as soon as time permits – and as soon as I do set up a compilation pipeline, which does everything [semi-]automatically.

      If you are motivated enough to write a really simple bash script which would a) check-out current ffmpeg from svn and then b) compile and rename several targets with different compilation options – then I will run it and post resulting binaries here.

    43. Kithros Says:

      Just FYI,

      I was able to test the no lame version on hostgator. Not sure how kindly they will take to it, but it works. I am using it for Jomsocial.

      ~k

    44. J Says:

      Hi chronos,

      I was attempting to compile the latest FFmpeg version for Boonex Dolphin 7.0 community on a ClearOS 5.1 SP1 (based on Red Hat 4.1/ CentOS 5.4), but I was unsuccessful, because of missing dependencies.
      I have also tried to use the latest version of ClearOS, but this was not working either.
      At the moment, the only FFmpeg version that partly works is the one from the previous Dolphin 6.1.6, but I am looking for one that works 100%.

      Since I am completely new to this, I don’t know what information you need so here is a link to my latest attempts:
      http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,40/func,view/id,7263/limit,10/limitstart,90/#8834

      Can you help me, or guide me in the right direction please … ?!?

      Thanks,

      J.

    45. Bogdan Says:

      J,

      when configure script says

      Unknown option “–enable-libogg”

      then most likely this option is indeed unknown to (not supported by) that script.

      Just remove any options generating these messages.

      As for the

      FAAD test failed

      - identify what that abbreviation stands for
      - try to find [+ compile + install, if needed] missing packages
      - try ./configure once again

      Further down in that thread, this comment actually shows ffmpeg working (there are no errors). If no files are created – that might be the problem with the permissions of the target directory.

      To figure out if that ffmpeg from aforementioned comment actually works, you need to find the exact command line executed by Dolphin (I have no clue what that software is for), and try/”debug” it in the terminal window.

      That is all I can help you with for now.

    46. J. Says:

      Hi Bogdan,

      You gave me hope for a while, until I realized this:
      (Just)Removing the options that generate these kinds of errors makes the FFmpeg incomplete.
      “FAAD test failed” is the result from doing that.

      When I use FFmpeg from Dolphin 6.1.6 I have no problems recording video (but without sound), so it cannot be a permission issue.
      It’s because of missing audio codecs.
      I also cannot uploading files. They are send, but no files are stored / saved, because of missing codecs.

      The exact command line from Dolphin 7 is in the same post as you mention (there are no errors) and is resulting in the problems I started out with in the first place.
      It actually doesn’t say that there are no errors.

      Dolphin is community site software and you can find all related information in the first post of that thread.

      Thanks for your help, but I hope someone else will be able to assist me, so I can finally solve this issue.

      Greetings,

      J

    47. ledm78 Says:

      Hi Im using this but have a question about ffplay:

      How do i enable ffplay to preview the conversions after e before runs?

    48. Adam Says:

      Hello!

      Do you know what might the problem with shared libraries Godaddy shared hosting? The binary of ffmpeg i have works fine, but i need AAC support now. here’s my code:


      $ffmpeg = "/absolute/path/to/ffmpeg"; // this is a folder that contains ffmpeg (binary) and libfaac.so and libfaad.so, all are chmod'd to 755
      $bash = "#!/bin/bash\n";
      $bash .= "export LD_LIBRARY_PATH=$ffmpeg/:$ffmpeg 2>&1;\n";
      $bash .= "exec $ffmpeg/ffmpeg.faad -i '$url' -ab {$bitrate}k ".PATH."$output 2>&1";
      file_put_contents("temporarybashscript.sh",$bash);
      chmod("temporarybashscript.sh",0755);
      passthru("./temporarybashscript.sh", $status);

      and it returns the error message:
      /absolute/path/to/ffmpeg/ffmpeg.faad: error while loading shared libraries: libfaac.so.0: cannot open shared object file: No such file or directory

      any ideas?

    49. Bogdan Says:

      @Adam, you probably need an approach similar to http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html (but for your library instead of libmp3lame).

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>