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.
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:
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
June 30th, 2007 at 2:11
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?
June 30th, 2007 at 10:07
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.
June 30th, 2007 at 11:23
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!
June 30th, 2007 at 11:29
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.
June 30th, 2007 at 12:22
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?
July 1st, 2007 at 16:10
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
July 5th, 2007 at 12:02
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.
July 5th, 2007 at 12:56
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
July 5th, 2007 at 13:22
That’s cool Chronos. Downloading topologilinux right now. Thanks!
July 5th, 2007 at 14:13
Uh, I should have given that link in my first comment.
Glad that I managed to help you anyway
August 17th, 2007 at 21:36
Any way to compile this for Gallery with a Truemotion VP6 codec support?
August 17th, 2007 at 23:55
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.
August 17th, 2007 at 23:59
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?
August 18th, 2007 at 0:26
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
September 19th, 2007 at 11:02
[...] Compiled linux ffmpeg binary for Gallery2: download [...]
October 25th, 2007 at 21:56
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…
October 25th, 2007 at 22:56
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?
October 25th, 2007 at 23:09
[...] 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. [...]
October 28th, 2007 at 23:47
New binaries uploaded, version SVN-r10867. Shared hosting testing/usage reports of the two provided binaries are welcome.
March 6th, 2008 at 11:45
where can i get the libmp3lame.so.0 or libmp4lame.so.0 files for godaddy shared hosting?
March 6th, 2008 at 14:05
Try the binaries from any other Linux system. You may want to try binaries from systems with 2.4.x kernels first.
March 6th, 2008 at 22:35
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
March 7th, 2008 at 13:04
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.
March 10th, 2008 at 21:10
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
March 11th, 2008 at 8:45
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.
April 7th, 2008 at 3:23
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
April 7th, 2008 at 9:20
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.
April 7th, 2008 at 21:25
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!
April 8th, 2008 at 15:04
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.
April 8th, 2008 at 15:55
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.
April 8th, 2008 at 16:00
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!
April 8th, 2008 at 16:06
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!
April 8th, 2008 at 16:20
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.
April 12th, 2008 at 22:41
[...] the solution is to use ffmpeg direct stream copy option [...]
May 6th, 2008 at 20:30
[...] Compiled linux ffmpeg binary: download [...]
September 30th, 2008 at 16:03
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!
October 1st, 2008 at 11:59
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.
October 1st, 2008 at 12:09
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).
October 3rd, 2008 at 11:40
thanks Bogdan,
But is there any good alternative for applying watermarks or logo’s on our video?
October 3rd, 2008 at 12:01
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
November 1st, 2008 at 15:34
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
November 5th, 2008 at 20:17
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.
March 4th, 2010 at 4:43
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
April 3rd, 2010 at 22:21
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.
April 3rd, 2010 at 23:46
J,
when configure script says
then most likely this option is indeed unknown to (not supported by) that script.
Just remove any options generating these messages.
As for the
- 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.
April 6th, 2010 at 3:54
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
September 1st, 2010 at 22:35
Hi Im using this but have a question about ffplay:
How do i enable ffplay to preview the conversions after e before runs?
March 12th, 2012 at 8:29
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?
March 25th, 2012 at 23:48
@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).