ffmpeg under MinGW...

Questions that occur when trying to compile FFmpeg.
jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

ffmpeg under MinGW...

Post by jiapei100 »

Hi, all:

I've already successfully installed a lot of 3rd party libraries, under the folder /usr/local/. Under Windows, it's the folder C:\MinGW\msys\1.0\local .

However, when I tried to configure ffmpeg-git, with the command:

Code: Select all

$ ./configure --enable-gpl --enable-nonfree --enable-version3 --enable-shared --enable-libfaac --enable-libgsm --enable-libfreetype --enable-libopenjpeg --enable-librtmp --enable-libvpx --enable-libx264 --enable-libxvid --enable-libmp3lame --enable-zlib --enable-openssl --enable-libspeex --enable-libschroedinger --enable-libvorbis --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libnut --enable-memalign-hack 
I got an error:
ERROR: libnut not found.
If I removed that

Code: Select all

--enable-libnut
I still got an error:
ERROR: libopenjpeg not found
However, both libnut.a and libopenjpeg.a are clearly under the folder
C:\MinGW\msys\1.0\local\lib .

What can I do ?


Cheers
Pei

User avatar
Zeranoe
Site Admin
Posts: 705
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg under MinGW...

Post by Zeranoe »

Please post your FFmpeg config.log

jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

Re: ffmpeg under MinGW...

Post by jiapei100 »

Wow... Hi, Thank you thank you !!!!!

Since my config.log is of size 183k, too big.
I upload it at http://visionopen.com/questions/config.log
(BTW, it's weird that I'm not allowed to attach a file with extension
.log (config.log)
.txt (config.log.txt)
)
The config.log at http://visionopen.com/questions/config.log
is produced by

Code: Select all

$ ./configure --enable-gpl --enable-nonfree --enable-version3 --enable-shared  --enable-memalign-hack  --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --enable-bzlib --enable-zlib --enable-libass --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid  --enable-openssl 

Cheers
Pei

Zeranoe wrote:Please post your FFmpeg config.log

User avatar
Zeranoe
Site Admin
Posts: 705
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg under MinGW...

Post by Zeranoe »

Your sure FFmpeg can find libopenjpeg.a?

Try --extra-libs=-lopenjpeg

jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

Re: ffmpeg under MinGW...

Post by jiapei100 »

Zeranoe wrote:Your sure FFmpeg can find libopenjpeg.a?

Try --extra-libs=-lopenjpeg

Tried, still the same.

The following is copied from the bottom of file config.log
...
C:/Users/pei/AppData/Local/Temp/ffconf.uWDQsncq.o:ffconf.yLUbKugQ.c:(.text+0xc): undefined reference to `opj_version'
collect2: ld returned 1 exit status
ERROR: libopenjpeg not found

All what I've done is summarized at :
http://www.visionopen.com/forum/program ... hread54.0/

And I can clearly see that libopenjpeg.a is under /usr/local/lib ...
Please refer to the attached .png file.

User avatar
Zeranoe
Site Admin
Posts: 705
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg under MinGW...

Post by Zeranoe »

That's interesting... Is that library made for the arch your trying to compile for? Meaning is it 32-bit if your trying to compile a 32-bit FFmpeg?

It seems to be finding the lib, can you confirm that opj_version is defined in it? (nm is the command you use to list symbols).

jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

Re: ffmpeg under MinGW...

Post by jiapei100 »

Zeranoe wrote:That's interesting... Is that library made for the arch your trying to compile for? Meaning is it 32-bit if your trying to compile a 32-bit FFmpeg?
Yes, I am trying to build on an 32-bit arch.
It seems to be finding the lib, can you confirm that opj_version is defined in it? (nm is the command you use to list symbols).
I got the answer from http://ffmpeg-users.933282.n4.nabble.co ... 50726.html
In my case:

Code: Select all

$ nm /usr/local/lib/libopenjpeg.a |grep opj_version 
shows
but

Code: Select all

$ nm /usr/local/bin/libopenjpeg-1.dll |grep opj_version 
shows
Cheers
Pei

User avatar
Zeranoe
Site Admin
Posts: 705
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg under MinGW...

Post by Zeranoe »

try removing that lib and recompiling it yourself and then linking it.

jiapei100
Posts: 27
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

Re: ffmpeg under MinGW...

Post by jiapei100 »

Do you mean:
removing libopenjpeg, and recompile libopenjpeg by myself?
Yes, the current libopenjpeg is just built by me manually...



Cheers
Pei
Zeranoe wrote:try removing that lib and recompiling it yourself and then linking it.

User avatar
Zeranoe
Site Admin
Posts: 705
Joined: Sat May 07, 2011 7:12 pm
Contact:

Re: ffmpeg under MinGW...

Post by Zeranoe »

Compile with --enable-static --disable-shared

Post Reply