I am following this guide to compile FFMPEG with libvpx support. On the libvorbis compilation step, I get this error:
The test program failed to compile or link. See the file config.log for the exact error that occurred. This usually means Ogg was incorrectly installed or that you have moved Ogg since it was installed.
There is no error on the Ogg compilation and installation step, and I cannot find this config.log file. I have libogg available in local/lib and local/bin.
Resolved with the following:
Correct the path to MinGW in the fstab file in /etc
add--prefix="path to MinGW" to the configure flags
Related
I need use the ffmpeg (v2.8) to convert mp4 to webp, how to build ffmpeg with libwebp for android ?
I googled, but have little information to build ffmpeg with libwebp.
I try to add the configuration:
--enable-libwebp
--enable-muxer=webp
--enable-encoder=libwebp
but i got the following compile error.
ERROR: libwebp not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
The config.log is:
check_pkg_config libwebp >= 0.2.0 webp/encode.h WebPGetEncoderVersion
false --exists --print-errors libwebp >= 0.2.0
ERROR: libwebp not found using pkg-config
I solved the problem as the following steps:
build libwebp by ndk-build
add *.a and *.h into a folder, such as libwebp-armv7a, under the project
link the webp without pkg-config
The way that #halfelf mentioned in comments is for PC build, not for Android mobile platform.
FFmpeg compilation with encoder x264 not found Windows
I am trying to compile FFmpeg with several encoder (x264, NVENC). I already
managed to compile FFmpeg with MinGW and also x264 but I do not know how I can
tell where my compiled encoders are.
I have a folder where my FFmpeg sources are and in this directory I have my
compiled x264 encoder in a subfolder called x264.
OS: Windows 10
Compiler: MinGW
You need to install x264 to the correct place. When building x264, use this
or similar:
./configure --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw
Example
Use the appropriate options when compiling FFmpeg, for example:
./configure --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32-
Example
This will allow FFmpeg to find your build tools and libraries.
I don't really have any experience cross compiling so there is probably a simple solution to my problem. I downloaded libogg 1.3.1 from http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz and libtheora from http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2. First I compile and libogg using these commands (in MSYS, when in the extracted directory):
./configure --prefix=/usr/local/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-static
make clean && make -j4
make install
and it looks like everything works (no errors reported and I see libogg files in /usr/local/x86_64-w64-mingw32).
I also compile and install libvorbis and libSDL with similar commands (downloads found in links on http://www.theora.org/downloads/)
I then try to compile libtheora and it fails at the configure. Here is the command I run:
./configure --prefix=/usr/local/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --disable-static
and the result is an error about not finding the libogg library (below is the end of the configure output):
checking for OGG... no
checking for Ogg... no
*** Could not run Ogg test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means Ogg was incorrectly installed
*** or that you have moved Ogg since it was installed.
configure: error:
libogg is required to build this package!
please see http://www.xiph.org/ for how to
obtain a copy.
Does anyone have any thoughts on what I am doing wrong?
Thanks,
David
I am building ffmpeg on ubuntu. I could able to build yasm-1.2.0, and next i tried building x264. x264 requires minumum of yasm-1.2.0, Hence i tried the below command to build x264.
./configure --prefix=<myprefix> --bindir=<mybindir> --extracflgs=<Include directory of yasm-1.2.0> --extra-ldflags=<libdirectory of yasm-1.2.0>
I got the below error:
No working C compiler found.
Not sure what error i commited. Could someone kindly tell me what do i have to do?
You misuse --extra-cflags and --extra-ldflags options and so C compiler gives you error (you can look at exact error in config.log file). This are additional flags that are passed to GCC (C compiler) and have nothing to do with YASM (assembler). All what you need to do with YASM is to have it in one of the $PATH directories i.e. it should run in shell/console from any current working dir with simple yasm --version.
While installing ffmpeg on Ubuntu 12.04
I am getting following error
libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/root/ffmpeg/libavcodec/libx264.c:492: undefined reference to `x264_encoder_open_125'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
I am following the instructions given at
http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
Do anyone have idea about this error?
This is a typical problem for people who already have x264 installed through the package management system. You can solve this in at least 2 ways:
Uninstall the already existing x264 from your system, through the package management system:
# apt-get remove x264
and compile your new x264 from source
Don't uninstall the x264 package, but compile your new x264 and then compile your ffmpeg, telling it to use that newly compiled x264 library, by specifying that directory where your compiled x264 library is, using the mentioned LD_LIBRARY_PATH environment variable:
LD_LIBRARY_PATH=/path/to/my/compiled/x264/library ./configure --enable-libx264 ...
More info can be found on these links:
problem with --enable-libx264 option in ffmpeg
Compiling FFmpeg
add the header and lib path
gcc x264_test1.c -o x264_encoder -I/usr/local/include -L/usr/local/lib -lpthread -lm -lx264
Generally the error means that the library binary libx264.so picked up by the linker does not match the version in the header file x264.h. See the following lines of code in this header file:
/* Force a link error in the case of linking against an incompatible API version.
* Glue #defines exist to force correct macro expansion; the final output of the macro
* is x264_encoder_open_##X264_BUILD (for purposes of dlopen). */
#define x264_encoder_glue1(x,y) x##y
#define x264_encoder_glue2(x,y) x264_encoder_glue1(x,y)
#define x264_encoder_open x264_encoder_glue2(x264_encoder_open_,X264_BUILD)
The solution usually does not require building libx264 yourself,
just make sure that you installed libx264-dev properly without interference with other versions, which may also be in /usr/local/lib or the like.
I had the same issue with version 155:
undefined reference to 'x264_encoder_open_155'.
In my case this was because I had in /usr/lib/x86_64-linux-gnu and unsuitable copy of libx264.so (which I had produced myself and uncleanly copied there).
So all I had to do was sudo apt-get install --reinstall libx264-dev.