FFmpeg 1.2 for Android generates a dynamic library

Source: Internet
Author: User

The previous article FFmpeg 1.2 for Android dynamic library compilation introduced how to compile the dynamic library, but the dynamic library generated at that time contains a total of 10 so files, in this way, loading will seriously affect the startup speed of the software. Many enthusiastic children's shoes later say that a single dynamic library is required (only libffmpeg is generated. so) I am sorry to you because I have been busy working for a while and I have no time to get it.

 

In fact, it is easier to generate a single dynamic library version than to generate multiple dynamic library versions, as long as one config. sh can be done without retaining it. Now I will share it with you. Which of the following can be enabled and disabled before further modification.

To the front of the ffmpeg Directory: tar xvf ffmpeg-1.2.1.tar.gz-C./ffmpeg

=$NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-=$NDK_HOME/platforms/android-8/arch-/configure --target-os=--arch=--enable---enable---enable---disable---disable---disable---disable---disable---disable---enable---enable---enable---disable---disable---enable-protocol=--enable---enable---enable---disable---enable-cross---enable-runtime---sysroot=--disable---disable---enable---enable-demuxer=--enable-muxer=--enable-protocol=--enable---enable---prefix=$PLATFORM/--cc=$PREBUILT/bin/arm-linux-androideabi---cross-prefix=$PREBUILT/bin/arm-linux-androideabi---nm=$PREBUILT/bin/arm-linux-androideabi---extra-cflags=--extra-ldflags=--rf ../libs && mkdir ../libs && mkdir ../libs//bin/arm-linux-androideabi-ar d libavcodec//bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib  -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PLATFORM/usr/libffmpeg.so libavcodec/libavcodec.a libavfilter/libavfilter.a libavresample/libavresample.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3//usr/libffmpeg.so ../libs/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.