[Libav-user] build for Android on WIndows

Alex Cohn alexcohn at netvision.net.il
Mon Jun 23 14:50:55 CEST 2014

When we build ffmpeg for Android in Windows (using cygwin or Mingw
shell), and enable NEON, make for libavcodec.so fails because the
command line becomes too long.

I suggest a simple patch which will work for all platforms and all
targets. I am not sure if this patch will resolve all problems for

$ git diff
diff --git a/library.mak b/library.mak
index cd39f11..5d4293b 100644
--- a/library.mak
+++ b/library.mak

-       $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS)
+       $(Q)echo >$(SUBDIR)lib$(NAME).list $(wordlist 1,400,$(filter %.o,$$<))
+       $(Q)echo >>$(SUBDIR)lib$(NAME).list $(wordlist 401,999,$(filter %.o,$$<)
+       $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O)

 ifdef SUBDIR

See http://stackoverflow.com/questions/23683518/how-to-compile-ffmpeg-2-2-2-on-windows-with-cygwin-and-android-ndk-r9c

Should I open a ticket about this? Should I forward this to ffmpeg-devel?

Alex Cohn

More information about the Libav-user mailing list