Build FFMPEG with x264 for Android

后端 未结 6 2024
长发绾君心
长发绾君心 2020-12-29 09:48

I am trying to build FFMPEG with libx264 for Android.

I can successfully build and use FFMPEG for Android but I realized that I need the ability to encode, therefore

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 10:05

    I have met the same issue before, and I tried several times to find out the reason:

    You must make sure the x264 and the ffmpeg are using same way to compile. like: using Android NDK. Using the same gcc compiler.

    So you can not compile ffmpeg with this command:"--cross-prefix=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi-", but compile the x264 without that. Here is my x264 compile script:

    ./configure --prefix=$PREFIX \
    --enable-static \
    --enable-pic \
    --disable-asm \
    --disable-cli \
    --host=arm-linux \
    --cross-prefix=$PREBUILT/darwin-x86_64/bin/arm-linux-androideabi- \
    --sysroot=$PLATFORM
    
    make
    sudo make install
    sudo ldconfig
    

提交回复
热议问题