Build Ffmpeg On Mac For Mac

Автор:
Build Ffmpeg On Mac For Mac Average ratng: 9,8/10 7048 votes

I tried installing it using homebrew and also tried to clone from clone it always ends up failing building. I don't find the cause but is it because of.

Runs on Mac OS X: Yes. Radio automation software for mac.


Thread Rating:
  • 0 Vote(s) - 0 Average
2008-02-27, 21:35
This is slightly off thread but it regards how you guys have managed to build FFmpeg (trunk) on OS X.
With XCode 3.0 on OS X 10.5.1, I get the dreaded:
i386/cavsdsp_mmx.c:447: error: can't find a register in class
'GENERAL_REGS' while reloading 'asm'
make[1]: *** [i386/cavsdsp_mmx.o] Error 1
make: *** [lib] Error 2
From looking at SVN, I can see you have the ffmpeg libraries precompiled and checked in. I assume this is because you needed to use a different tool chain?
I assume you haven't configured without mmx.. Any help would be appreciated!
2008-02-28, 07:19
ffmpeg source is checked in here. We don't use trunk ffmpeg, but do frequent updates. On OSX, Elan compiled it, not sure if he made changes to get it to compile.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.

2008-02-28, 07:51
This works for me, with trunk ffmpeg (in a terminal, not Xcode)
./configure --prefix=/opt/local/ --enable-liba52 --enable-swscaler --enable-avfilter --disable-mmx --enable-libmp3lame --enable-gpl --extra-cflags='-I/opt/local/include' --extra-ldflags='-L/opt/local/lib'
assuming of course you have all the required dependencies (ports).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.

2008-02-28, 18:19
I have been able to compile if I disable mmx, which isn't ideal
I had a look at the makefile from the XBMC OS X sources and it appears that they are being built with mmx enabled.
I'll keep trying. Any further hints from yourself or Elan would be appreciated.
2008-02-28, 19:16
Which Makefile?
Maybe Elan will chip in since he's the one who actually compiled it. I don't know if MMX is enabled or not. Based on r11434, it's possible that it is.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.

2008-02-28, 19:20
I used this guide.
http://stephenjungels.com/jungels.net/ar..howto.html

Click Here if you use a Mac
For all your HDTV needs click here
2008-02-28, 20:27
Thanks B4tm4n, unfortunately, the guide also disables mmx.
Sorry, I meant the config.mak (referenced by the Makefile) in
linuxport/docs/sources/dvdplayer/ffmpeg/ffmpeg (after untarring) has the following set:
ARCH_X86=yes
ARCH_X86_32=yes
HAVE_MMX=yes
HAVE_SSSE3=yes
Which seems to agree with the following line in the build_xbmc.sh file:
./configure --extra-cflags=-D_XBOX --enable-shared --enable-pp --enable-memalign-hack --enable-gpl --disable-static --disable-vhook --disable-en
coders --enable-swscaler
I have made some progress, in building the object files but build_xbmc.sh can't seem to build the shared library. Although, that might not be too much of a problem, since I'm after static libraries.. I'll keep at it.
2008-02-28, 20:39
build_xbmc.sh is used for compiling it under Linux, Elan hasn't checked in any ffmpeg source, so he's probably using vanilla trunk with the cabac patch and compiling it with the ./configure script. That config.mak doesn't mean anything for OSX.
P.S. - the cabac patch is purely for optimizing h264 performance and has nothing to do with getting it to compile.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.

2008-02-28, 20:42
I'm using trunk (or at least close to trunk), with assembly turned on, the cabac patch and the xbmc subtitles patch. I used the Perian project as a starter for how to build the ffmpeg libraries. Building statically was the key.
-elan
2008-04-11, 19:40
Xcode 3.1 from the iPhone SDK, static libraries and we have successful ASM finally on 10.5 using SVN-r12787.
I installed all the libraries following loosely: http://devblog.rorcraft.com/2007/8/18/ho..-and-linux (the patches aren't needed. if you bet compiler errors, trying converting text format using pico)
./configure --prefix=/usr --disable-vhook --enable-pthreads --enable-gpl --enable-libfaac --enable-libfaad --enable-libx264 --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-liba52 --enable-libxvid
I successfully built a 64-bit binary too using:
./configure --extra-cflags=-m64 --extra-ldflags=-m64 --arch=x86_64 --prefix=/usr
(The 64-bit version is useless at the moment until I get it to use 32-bit liba52 binaries. I did manage a x264 64-bit library build using '--host=x86_64-darwin' but again, no A52 decoding makes it moot.)
Whoo hoo! A quick benchmark using a h.264/ac3 MKV rip yielded the following benchmark (/usr/bin/ffmpeg -benchmark -i /Volumes/HD/Film/Cars.mkv -f null -an /dev/null):
w/o MMX/SSE: 80 fps
w/ MMX/SSE: 154 fps
This was on a Mac Pro 8x2.8 Xeon.
Good luck!
2009-12-09, 07:28
Hi all, Can anyone has configured FFMPEG for XCode 3.1.4 ?
Thanks
Pratik
2009-12-09, 08:29
pratikgoswami Wrote:Hi all, Can anyone has configured FFMPEG for XCode 3.1.4 ?
Thanks
Pratik

What's the problem ? And by above, do you mean FFMPEG by itself or the FFMPEG configure that occurs when XBMC is configured ?
Thread Rating:
  • 0 Vote(s) - 0 Average