[SOLVED] Opus 1.1 and FFmpeg (shared)

Questions that occur when trying to compile FFmpeg.
Post Reply
andres
Posts: 5
Joined: Wed Apr 30, 2014 4:11 pm

[SOLVED] Opus 1.1 and FFmpeg (shared)

Post by andres » Wed Apr 30, 2014 5:18 pm

Hi, folks

I wonder if someone would tell me how to build shared FFmpeg with libopus 1.1 for Windows.

My configuration:

Code: Select all

./configure --arch=x86 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --enable-version3 --enable-gpl --disable-static --enable-shared --disable-debug --disable-doc --enable-bzlib --enable-iconv --enable-libopus
What happens:

Code: Select all

LD	libavformat/avformat-55.dll
libavformat/4xm.o:4xm.c:(.text+0x1bf): undefined reference to `av_new_packet'
libavformat/4xm.o:4xm.c:(.text+0x21d): undefined reference to `av_shrink_packet'
libavformat/4xm.o:4xm.c:(.text+0x247): undefined reference to `av_free_packet'
/home/MinGW64/mingw-w64-x86_64/lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld: libavformat/4xm.o: bad reloc address 0x0 in section `.data'
collect2: error: ld returned 1 exit status
make: *** [libavformat/avformat-55.dll] Error 1
Opus seems to replace all code in avcodec-55.dll by only it's own code. This is why avformat-55.dll cannot resolve the references.

Any advices?

Thanks
Last edited by andres on Thu May 08, 2014 4:02 pm, edited 1 time in total.

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: Opus 1.1 and FFmpeg (shared)

Post by rogerdpack » Wed May 07, 2014 2:38 pm

haven't gotten 1.1 to work with ffmpeg shared [zeranoe any suggestions there?]
Anyway 1.0.1 works ok...

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

Re: Opus 1.1 and FFmpeg (shared)

Post by Zeranoe » Wed May 07, 2014 5:52 pm

This did the trick for me:

Code: Select all

diff -uprN ./opus-1.1.orig/include/opus_defines.h ./opus-1.1/include/opus_defines.h
--- ./opus-1.1.orig/include/opus_defines.h	2013-11-29 15:17:15.000000000 -0500
+++ ./opus-1.1/include/opus_defines.h	2013-12-06 01:44:24.656150129 -0500
@@ -65,11 +65,7 @@ extern "C" {
 
 #ifndef OPUS_EXPORT
 # if defined(WIN32)
-#  ifdef OPUS_BUILD
-#   define OPUS_EXPORT __declspec(dllexport)
-#  else
 #   define OPUS_EXPORT
-#  endif
 # elif defined(__GNUC__) && defined(OPUS_BUILD)
 #  define OPUS_EXPORT __attribute__ ((visibility ("default")))
 # else

andres
Posts: 5
Joined: Wed Apr 30, 2014 4:11 pm

Re: Opus 1.1 and FFmpeg (shared)

Post by andres » Thu May 08, 2014 4:01 pm

Thank you Zeranoe! It works.

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: Opus 1.1 and FFmpeg (shared)

Post by rogerdpack » Thu May 08, 2014 7:34 pm

andres wrote:Thank you Zeranoe! It works.
Same here, thanks.

onsight
Posts: 7
Joined: Mon Apr 13, 2015 6:25 am

Re: [SOLVED] Opus 1.1 and FFmpeg (shared)

Post by onsight » Thu Oct 22, 2015 2:07 pm

wow, that helped here too! i almost got crazy...

thanks!

Post Reply
'