kewlbear / FFmpeg-iOS-build-script

Shell scripts to build FFmpeg for iOS and tvOS
3.03k stars 899 forks source link

Supporting about compile with lame #54

Closed DickyT closed 8 years ago

DickyT commented 8 years ago

Hi, I was trying to build ffmpeg with --enable-libmp3lame, and I have no idea how to use your lame build script with this ffmpeg build script.

Thank you very much

kewlbear commented 8 years ago

Build lame first. When you use --enable-libXXX, you also need to provide paths to find the lib using -I and -L flags. See X264 in the script for example.

DickyT commented 8 years ago

Oh thank you very much!!! I am going to have a try this night!!

DickyT commented 8 years ago

@kewlbear Hi, I just try it, and my CFLAGS is

-arch arm64 -mios-version-min=6.0 -fembed-bitcode -I /Users/KanzakiMirai/XcodeProjects/ffmpeg-objc/FFMP3/lame-ios-build/fat-lame/include

LDFLAGS is

-arch arm64 -mios-version-min=6.0 -fembed-bitcode -L /Users/KanzakiMirai/XcodeProjects/ffmpeg-objc/FFMP3/lame-ios-build/fat-lame/lib

but the compiler still throws an error that ERROR: libmp3lame >= 3.98.3 not found, any idea about this? Thank you very much!

kewlbear commented 8 years ago

I think it's related to bitcode. You should either remove -fembed-bitcode from this script or add it to lame script.

DickyT commented 8 years ago

Thank you very much!! I can make it work now!!!

DickyT commented 8 years ago

@kewlbear I got a new issue... While I am running on my simulator, XCode tells me. screen shot 2015-12-03 at 22 17 15

And I also tried disabling bitcode for both lame and ffmpeg, or enabing bitcode for them. Is this the problem that something goes wrong of lame? Thanks!!

kewlbear commented 8 years ago

Did you link lame to your app?

DickyT commented 8 years ago

Oh I even forget that, now I can run it on my simulator. Thank you very much!!!!