All:
I have followed the directions given in the post "Install FFmpeg and x264 on Ubuntu Lucid Lynx 10.04" ( http://ubuntuforums.org/showpost.php...postcount=1289 ) to the letter and have failed to get a fully functional build of ffmpeg. If anyone has the time, can you review my issue and shoot a few ideas my way.
History:
1. Not knowing that ffmpeg was stripped, I installed the ffmpeg package and the libavcodec-extra-52 package (possibly a few more; I was liberal with the package manager on day one of the install). This failed to produce a version of ffmpeg that could transcode audio with libfaac.
2. I removed those packages and added the medibuntu repository and installed the same packages but ran into some sort of error when trying to convert an mkv (sorry, I can't remember the error)
3. [Currently hung on this one] Building components from source, as noted in the introduction, has provided a copy of ffmpeg that doesn't encode with the libx264 codec
Issue:
I compiled and installed all of the packages (including optional lame and vpx). There weren't any issues, save for the apparently innocuous warnings which inexorably appear during a compile.
To test the build, I ran a basic test command that works on my mac (installed with macports):
ffmpeg -i ./pp.mkv -vcodec libx264 -acodec libfaac -t 15 ./a.mp4
The job fails immediately with the following error:
Code:
Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Google... and I came across this mail indicating a similar issue ( http://mailman.videolan.org/pipermai...st/006123.html ), which says "This error *CANNOT APPEAR* unless ffmpeg has been miscompiled."
OK. I had an issue with the compile. I tried the suggestion of comparing the header build spec (turns out to be 122) with the shared library linked in the ffmpeg binary (given by ldd). But, when I issued the ldd command on the ffmpeg binary, there was no reference, at all, to x264.
Now, I wanted to see if my libx264 files really were placed when I built the x264 package. So, I ran mlocate to see what exists:
Code:
mlocate 264
/home/brucew/.mozilla/firefox/83cf7lv6.default/Cache/2644ADC7d01
/usr/lib/libx264.so.85
/usr/lib/gstreamer-0.10/libgsth264parse.so
/usr/lib/i686/sse2/libx264.so.85
/usr/local/bin/x264
/usr/local/include/x264.h
/usr/local/include/x264_config.h
/usr/local/lib/libx264.a
/usr/local/lib/pkgconfig/x264.pc
...
So, a little problem there--I built 122, but I have an 85 module out there, for some reason. "No problem," I thought. "I will just specify the include and lib paths with the CFLAGS and LDFLAGS environment variables:
Code:
export CFLAGS=-I/usr/local/include:$CFLAGS
export LDFLAGS=-L/usr/local/lib:$LDFLAGS
So, I removed the old checkinstall package and did the ffmpeg build again by
make distclean, ./configure..., make... The outcome was identical.
My impression was that it ignored the CFLAGS and LDFLAGS that I set (or the default paths superseded). My next attempt involved renaming the /usr/lib/libx264.so.85 module to aaaaaa.so.85 and then creating the following symlinks in /usr/lib pointing to /usr/local/lib/libx264.a
Code:
libx264.a
libx264.so
libx264.so.122
I repeated the ffmpeg rebuild procedure and ran into the same issue AGAIN!
ARRRRGGGHGHHHH!
Does anyone have a firm understanding of what is happening here, what is interfering with my build, or where I could have made a mistake? What is the best way for me to get an ffmpeg build that is pretty well loaded with prominent codecs (like my macports version).
I'm willing to try just about anything.
Thanks.
Bookmarks