title: compiling ffmpeg and chromaprint for android with success on some devices
body: <p>I am following the recommendations of this site:</p>
  
  <p><a href="https://bitbucket.org/phorton1/chromaprint" rel="nofollow">https://bitbucket.org/phorton1/chromaprint</a></p>
  
  <p>From the site I have copied the <code>multi-configure</code> and <code>multi-make</code> scripts for the ffmpeg and chromaprint libraries. I have used them with recent clones of ffmpeg 3.0 and chromaprint 1.3.2 . I get working '.so' files for arm, x86 and armv7. I don't have compillation problems. I load them into my app (a very simple app just to test this library) and  I try it on my two devices. One is a Samsung Galaxy TabPro (SM-T320, api 19), and one is the Samsung S4 (api 21). I get the program to run on both. I can use the '-version' command to get the chromaprint version info. When I try to fingerprint a audio file, the software works on the older tablet, but not on the s4. On the s4 the error message is 'error decoding audio'.</p>
  
  <p>I have tried ffmpeg 0.9 as the bitbucket site suggests. I have the same problem. I have tried ffmpeg 2.7 and I thought this was working. Now I cannot get 2.7 to work. As before the code works on the api 19 device and not the s4.</p>
  
  <p>The Tab is an armeabi-v7a device and the s4 is an armeabi/armeabi-v7 device, so I thought by removing the 'armeabi' binary I would have the same file on both machines, and they would have to work. This attempt did nothing. I am using android studio.</p>
  
  <p>Below is a list of some of my ffmpeg configurations. They are taken from the multi-configure script.</p>
  
  <pre><code>    --enable-static
      --disable-shared
      --disable-doc
      --disable-txtpages
      --disable-iconv
  
      --enable-memalign-hack
      --enable-debug
      --disable-avdevice
      --disable-avfilter
      --disable-swscale
      --disable-ffmpeg
      --disable-ffplay
      --disable-ffserver
      --disable-network
      --disable-muxers
      --disable-demuxers
      --enable-rdft
      --enable-demuxer=aac
      --enable-demuxer=ac3
      --enable-demuxer=ape
      --enable-demuxer=asf
      --enable-demuxer=flac
      --enable-demuxer=matroska_audio
      --enable-demuxer=mp3
      --enable-demuxer=mpc
      --enable-demuxer=mov
      --enable-demuxer=mpc8
      --enable-demuxer=ogg
      --enable-demuxer=tta
      --enable-demuxer=wav
      --enable-demuxer=wv
      --disable-bsfs
      --disable-filters
      --disable-parsers
      --enable-parser=aac
      --enable-parser=ac3
      --enable-parser=mpegaudio
      --disable-protocols
      --enable-protocol=file
      --disable-indevs
      --disable-outdevs
      --disable-encoders
      --disable-decoders
      --enable-decoder=aac
      --enable-decoder=ac3
      --enable-decoder=alac
      --enable-decoder=ape
      --enable-decoder=flac
      --enable-decoder=mp1
      --enable-decoder=mp2
      --enable-decoder=mp3
      --enable-decoder=mpc7
      --enable-decoder=mpc8
      --enable-decoder=tta
      --enable-decoder=vorbis
      --enable-decoder=wavpack
      --enable-decoder=wmav1
      --enable-decoder=wmav2
      --enable-decoder=pcm_alaw
      --enable-decoder=pcm_dvd
      --enable-decoder=pcm_f32be
      --enable-decoder=pcm_f32le
      --enable-decoder=pcm_f64be
      --enable-decoder=pcm_f64le
      --enable-decoder=pcm_s16be
      --enable-decoder=pcm_s16le
      --enable-decoder=pcm_s16le_planar
      --enable-decoder=pcm_s24be
      --enable-decoder=pcm_daud
      --enable-decoder=pcm_s24le
      --enable-decoder=pcm_s32be
      --enable-decoder=pcm_s32le
      --enable-decoder=pcm_s8
      --enable-decoder=pcm_u16be
      --enable-decoder=pcm_u16le
      --enable-decoder=pcm_u24be
      --enable-decoder=pcm_u24le
      --enable-decoder=rawvideo
  </code></pre>
  
  <p>Here is some information about the s4 that I got from a system info app.</p>
  
  <pre><code>Build Info
      Build.BOARD: MSM8960
      Build.BRAND: Verizon
      Build.DEVICE: jfltevzw
      Build.DISPLAY: LRX22C.I545VRUGOF1
      Build.PRODUCT: jfltevzw
      Build.HARDWARE: qcom
      Build.FINGERPRINT: Verizon/jfltevzw/jfltevzw:5.0.1/LRX22C/I545VRUGOF1:user/release-keys
      Build.CPU_ABI: armeabi-v7a
      Build.SUPPORTED_32_BIT_ABIS: [armeabi-v7a, armeabi]
      Build.SUPPORTED_64_BIT_ABIS: []
      Build.SUPPORTED_ABIS: [armeabi-v7a, armeabi]
      Build.HOST: SWDD6122
      Build.ID: LRX22C
      Build.MANUFACTURER: samsung
      Build.MODEL: SCH-I545
      Build.PRODUCT: jfltevzw
      Build.TAGS: release-keys
      Build.TIME: 2015-07-15T03:39:01.000-0400
      Build.TYPE: user
      Build.USER: dpi
      Build.BOOTLOADER: I545VRUGOF1
      Build.TAGS: release-keys
      Build.VERSION.CODENAME: REL
      Build.VERSION.INCREMENTAL: I545VRUGOF1
      Build.VERSION.RELEASE: 5.0.1
      Build.VERSION.SDK_INT: 21
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This is the complete source for my project minus the api-key which is personal. <a href="https://github.com/radiodee1/awesome-fpcalc" rel="nofollow">https://github.com/radiodee1/awesome-fpcalc</a>  The code is arranged in parts inside the git repository. The 'fpcalc-testapp' part just has the Android Studio project. The 'fpcalc-build' part is my attempt to use the latest versions of ffmpeg, chromaprint, and kissfft. The 'fpcalc-build-complete' part is a series of scripts that reproduces the P. Horton ffmpeg 2.7 scenario. Bye the way I believe the best libraries are produced in the 'build-complete' folders.</p>