Compiling the ffmpeg on iPhone

Discussion in 'iOS Programming' started by cruccruc, Mar 4, 2010.

  1. cruccruc macrumors newbie

    Joined:
    Mar 4, 2010
    #1
    I downloaded the iFrameExtractor sample code and try to compile it with the iPhone simulator version 3.1.3

    The project shows the following error even thought I added *.a libraries to my project. All libraries was under the searching path.

    [​IMG]

    Please give me some comments or suggestion to solve the problem. Thanks in advance.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    The libraries are probably compiled for arm (device) and not i386 (simulator).
     
  3. KoolStar macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #3
    That or the link for the library is incorrect in your build configurations.
     
  4. cruccruc thread starter macrumors newbie

    Joined:
    Mar 4, 2010
    #4

    Thanks for comments.

    I compiled with the following parameters for i386 but I got the same errors. I have changed different parameters but not successful yet.

    I also checked the path for linking library. Have got any solution?

    ./configure --enable-cross-compile --target-os=darwin --cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl --disable-neon --disable-pic --enable-postproc --disable-debug --disable-stripping --enable-avfilter --enable-avfilter-lavf --enable-gpl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386'
     
  5. cruccruc thread starter macrumors newbie

    Joined:
    Mar 4, 2010
    #5
    I checked the path to libraries and also tried to compile the fflpay that using ffmpeg but still got the same errors.
    Anyone help me, pls.
     
  6. michelle21 macrumors regular

    Joined:
    Jun 29, 2007
    #6
    I'm not aware of anyone who got it to work on the simulator.

    We do our testing on the device.

    To many false starts, We thought we had it working on the simulator, than we deployed on the device and the video came out distorted. In the end we just did all our testing on the device. If you have a 3gs you can use this build of ffplay for a 3g you will need to recompile using the gas script. we will try to have a 3g version available real soon.

    http://sol3.typepad.com/tagalong_developer_journa/2010/01/the-ffplay-mods-are-complete.html

    Sorry I couldn't be more help
     
  7. jhurley macrumors newbie

    Joined:
    Feb 2, 2010
    #7
    I actually managed to compile it for the simulator.. I'll have to look for the libraries on my hard drive. I can't remember but I may have made them fat (works with both the simulator and the device).

    The iFrameExtractor project comes with a script that creates a nice set of fat universal libraries that include both ARMv6 and ARMv7 architectures

    I'll try to finish my tutorial blog posts up tonight or tomorrow and post them here for you guys. I'm aiming to make them a little more robust than previous efforts to document getting ffmpeg libraries going on the iphone.
     
  8. Lukasz macrumors newbie

    Joined:
    Mar 25, 2010
    #8
    @jhurley

    Can you write how did you compile iFrameExtractor on iPhone simulator ?
     
  9. cruccruc thread starter macrumors newbie

    Joined:
    Mar 4, 2010
    #9
    Thanks everyone. I am successful to compile and it runs well on the simulator. Here is the configuration for running:

    ./configure --enable-cross-compile --target-os=darwin --disable-neon --disable-pic --enable-postproc --disable-debug --disable-stripping --enable-avfilter --enable-avfilter-lavf --enable-gpl --disable-bzlib
     
  10. michelle21 macrumors regular

    Joined:
    Jun 29, 2007
    #10
    You can probably use the libraries we used with ffplay and webstreamX, I copied those to iframeextractor and it ran beautifully, I was amazed at the fps rate considering its not using opencv or opengl.

    Note though the demo doesn't have sound, and that is the key as our experimenting shows it is pretty easy to get highframe rates its the audio queues that slow the process down.

    Stil I frameextractor is best used for extracting single frames from video, for decoding open gl textures are the way to go and for encoding opencv, but thats not really viable unless apple opens up the coresurface api.

    This technology is much simpler on Android.

    I two have the universals somewhere, there is also a build script with webstreamx that should work too.

    For those of you not familiar with webstreamX

    You can get it from the ffmpeg4iphone site.

    Its a demo for people who want to test the technology behind our streamX player. Because of the lgpl license before we actually go gold we will have to publish most of the code.

    webstreamX does not have the performance advantages of the current version , now in private beta 2. but does show how some of the technology works. its requires a json formatted file on an apache server as input.

    http://web.me.com/cannonwc/Site/Photos_9.html
     
  11. ragtag macrumors newbie

    Joined:
    Apr 22, 2010
    Location:
    Switzerland
    #11
    Dear Michelle,
    I recently got to know webstreamX and I think that's a great project which is filling some evident gaps in the apps landscape. I would like to get involved with testing and/or development but I've never managed to contact you.

    I already created and published one iPhone app, and collaborated on many more. Please find my contact information here on Mac Forums, I would love hear from you,
    cheers!
     

Share This Page