Recherche avancée

Médias (91)

Autres articles (99)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (9411)

  • Android ffmpeg with libx264 - undefined references

    5 décembre 2015, par Krzysztof Kansy

    I’m building ffmpeg for Android with libx264 using appunite’s project under Ubuntu 15.10. I’ve build it without libx264 properly, but adding the library keep giving me undefined reference to 'x264_picture_init' and multiple other similar errors. I tried variety of possible solutions from mailing lists/other SO questions, but still nothing helps me solving the problem.

    I have removed ffmpeg/libx264/libx264-dev packages to avoid possible duplicate libraries in the system. I’ve got the libx264.a library in ffmpeg-build/ARCH/lib, where the other built libraries lives. Also I don’t think this is caused by header file not matching the library, because the only x264.h header in the system is the one used for the library building.

    Here is my build_android.sh.

    set -x

    if [ "$ANDROID_NDK_HOME" = "" ]; then
       echo ANDROID_NDK_HOME variable not set, exiting
       echo "Use: export ANDROID_NDK_HOME=/your/path/to/android-ndk"
       exit 1
    fi

    # Get the newest arm-linux-androideabi version
    if [ -z "$COMPILATOR_VERSION" ]; then
       DIRECTORIES=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-*
       for i in $DIRECTORIES; do
           PROPOSED_NAME=${i#*$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-}
           if [[ $PROPOSED_NAME =~ ^[0-9\.]+$ ]] ; then
               echo "Available compilator version: $PROPOSED_NAME"
               COMPILATOR_VERSION=$PROPOSED_NAME
           fi
       done
    fi

    if [ -z "$COMPILATOR_VERSION" ]; then
       echo "Could not find compilator"
       exit 1
    fi

    if [ ! -d $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION ]; then
       echo $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION does not exist
       exit 1
    fi
    echo "Using compilator version: $COMPILATOR_VERSION"

    OS_ARCH=`basename $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/*`
    echo "Using architecture: $OS_ARCH"


    function setup_paths
    {
       export PLATFORM=$ANDROID_NDK_HOME/platforms/$PLATFORM_VERSION/arch-$ARCH/
       if [ ! -d $PLATFORM ]; then
           echo $PLATFORM does not exist
           exit 1
       fi
       echo "Using platform: $PLATFORM"
       export PATH=${PATH}:$PREBUILT/bin/
       export CROSS_COMPILE=$PREBUILT/bin/$EABIARCH-
       export CFLAGS=$OPTIMIZE_CFLAGS
       export CPPFLAGS="$CFLAGS"
       export CFLAGS="$CFLAGS"
       export CXXFLAGS="$CFLAGS"
       export CXX="${CROSS_COMPILE}g++ --sysroot=$PLATFORM"
       export AS="${CROSS_COMPILE}gcc --sysroot=$PLATFORM"
       export CC="${CROSS_COMPILE}gcc --sysroot=$PLATFORM"
       export PKG_CONFIG="${CROSS_COMPILE}pkg-config"
       export LD="${CROSS_COMPILE}ld"
       export NM="${CROSS_COMPILE}nm"
       export STRIP="${CROSS_COMPILE}strip"
       export RANLIB="${CROSS_COMPILE}ranlib"
       export AR="${CROSS_COMPILE}ar"
       export LDFLAGS="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog"
       export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig/
       export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/

       if [ ! -f "${CROSS_COMPILE}gcc" ]; then
           echo "Gcc does not exists in path: ${CROSS_COMPILE}gcc"
           exit 1;
       fi

       if [ ! -f "${PKG_CONFIG}" ]; then
           echo "Pkg config does not exists in path: ${PKG_CONFIG} - Probably BUG in NDK but..."
           set +e
           SYS_PKG_CONFIG=$(which pkg-config)
           if [ "$?" -ne 0 ]; then
               echo "This system does not contain system pkg-config, so we can do anything"
               exit 1
           fi
           set -e
           cat > $PKG_CONFIG << EOF
    #!/bin/bash
    pkg-config \$*
    EOF
           chmod u+x $PKG_CONFIG
           echo "Because we have local pkg-config we will create it in ${PKG_CONFIG} directory using ${SYS_PKG_CONFIG}"
       fi
    }

    function build_x264
    {
       echo "Starting build x264 for $ARCH"
       cd x264
       ./configure --prefix=$PREFIX --host=$ARCH-linux --enable-static --disable-shared --enable-pic --disable-cli $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED x264 for $ARCH"
    }

    function build_amr
    {
       echo "Starting build amr for $ARCH"
       cd vo-amrwbenc
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED amr for $ARCH"
    }

    function build_aac
    {
       echo "Starting build aac for $ARCH"
       cd vo-aacenc
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED aac for $ARCH"
    }
    function build_freetype2
    {
       echo "Starting build freetype2 for $ARCH"
       cd freetype2
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED freetype2 for $ARCH"
    }

    function build_ass
    {
       echo "Starting build ass for $ARCH"
       cd libass
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-fontconfig \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make V=1 -j4 install
       make clean
       cd ..
       echo "FINISHED ass for $ARCH"
    }
    function build_fribidi
    {
       echo "Starting build fribidi for $ARCH"
       cd fribidi
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-bin \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED fribidi for $ARCH"
    }
    function build_ffmpeg
    {
       echo "Starting build ffmpeg for $ARCH"
       cd ffmpeg
       ./configure --target-os=linux \
           --prefix=$PREFIX \
           --enable-cross-compile \
           --extra-libs="-lgcc -L$PREFIX/lib/libx264.a" \
           --arch=$ARCH \
           --cc=$CC \
           --cross-prefix=$CROSS_COMPILE \
           --nm=$NM \
           --sysroot=$PLATFORM \
           --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums  -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS" \
           --disable-shared \
           --enable-static \
           --enable-runtime-cpudetect \
           --pkg-config-flags="--static" \
           --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib  -nostdlib -lc -lm -ldl -llog -L$PREFIX/lib" \
           --extra-cflags="-I$PREFIX/include" \
           --disable-everything \
           --enable-gpl \
           --enable-pthreads \
           --enable-libass \
           --enable-libvo-aacenc \
           --enable-libvo-amrwbenc \
           --enable-hwaccel=h264_vaapi \
           --enable-hwaccel=h264_vaapi \
           --enable-hwaccel=h264_dxva2 \
           --enable-hwaccel=mpeg4_vaapi \
           --enable-libx264 \
           --enable-demuxer=mov \
           --enable-demuxer=h264 \
           --enable-muxer=h264 \
           --enable-demuxer=mpegvideo \
           --enable-demuxer=h263 \
           --enable-demuxer=mpegps \
           --enable-demuxer=mjpeg \
           --enable-demuxer=rtsp \
           --enable-demuxer=rtp \
           --enable-demuxer=hls \
           --enable-demuxer=matroska \
           --enable-muxer=rtsp \
           --enable-muxer=mp4 \
           --enable-muxer=mov \
           --enable-muxer=mjpeg \
           --enable-muxer=matroska \
           --enable-protocol=crypto \
           --enable-protocol=jni \
           --enable-protocol=file \
           --enable-protocol=rtp \
           --enable-protocol=tcp \
           --enable-protocol=udp \
           --enable-protocol=applehttp \
           --enable-protocol=hls \
           --enable-protocol=http \
           --enable-decoder=xsub \
           --enable-decoder=jacosub \
           --enable-decoder=dvdsub \
           --enable-decoder=dvbsub \
           --enable-decoder=subviewer \
           --enable-decoder=rawvideo \
           --enable-encoder=rawvideo \
           --enable-decoder=mjpeg \
           --enable-encoder=mjpeg \
           --enable-decoder=h263 \
           --enable-decoder=mpeg4 \
           --enable-encoder=mpeg4 \
           --enable-decoder=h264 \
           --enable-encoder=h264 \
           --enable-decoder=aac \
           --enable-encoder=aac \
           --enable-parser=h264 \
           --enable-encoder=mp2 \
           --enable-decoder=mp2 \
           --enable-encoder=libvo_amrwbenc \
           --enable-decoder=amrwb \
           --enable-muxer=mp2 \
           --enable-bsfs \
           --enable-decoders \
           --enable-encoders \
           --enable-parsers \
           --enable-hwaccels \
           --enable-muxers \
           --enable-avformat \
           --enable-avcodec \
           --enable-avresample \
           --enable-zlib \
           --disable-doc \
           --disable-ffplay \
           --disable-ffmpeg \
           --disable-ffplay \
           --disable-ffprobe \
           --disable-ffserver \
           --enable-avfilter \
           --disable-avdevice \
           --disable-opencl \
           --enable-nonfree \
           --enable-version3 \
           --enable-memalign-hack \
           --enable-asm \
           $ADDITIONAL_CONFIGURE_FLAG
       make clean
       make -j4 install
       make clean

       cd ..
       echo "FINISHED ffmpeg for $ARCH"
    }

    function build_one {
       echo "Starting build one for $ARCH"
       cd ffmpeg
       ${LD} -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib  -soname $SONAME -shared -nostdlib -Bsymbolic --whole-archive --no-undefined -o $OUT_LIBRARY -lavformat -lavcodec -lavresample -lavutil -lswresample -lavfilter -lass -lfreetype -lfribidi -lswscale -lvo-aacenc -lvo-amrwbenc -lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker -zmuldefs $PREBUILT/lib/gcc/$EABIARCH/$COMPILATOR_VERSION/libgcc.a
       cd ..
       echo "FINISHED one for $ARCH"
    }

    # enable additional architectures later on

    #arm v5
    #EABIARCH=arm-linux-androideabi
    #ARCH=arm
    #CPU=armv5
    #OPTIMIZE_CFLAGS="-marm -march=$CPU"
    #PREFIX=$(pwd)/ffmpeg-build/armeabi
    #OUT_LIBRARY=$PREFIX/libffmpeg.so
    #ADDITIONAL_CONFIGURE_FLAG=
    #SONAME=libffmpeg.so
    #PREBUILT=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    #PLATFORM_VERSION=android-5
    #setup_paths
    #build_amr
    #build_aac
    #build_fribidi
    #build_freetype2
    #build_ass
    #build_ffmpeg
    #build_one

    #x86
    #EABIARCH=i686-linux-android
    #ARCH=x86
    #OPTIMIZE_CFLAGS="-m32"
    #PREFIX=$(pwd)/ffmpeg-build/x86
    #OUT_LIBRARY=$PREFIX/libffmpeg.so
    #ADDITIONAL_CONFIGURE_FLAG=--disable-asm
    #SONAME=libffmpeg.so
    #PREBUILT=$ANDROID_NDK_HOME/toolchains/x86-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    #PLATFORM_VERSION=android-9
    #setup_paths
    #build_amr
    #build_aac
    #build_fribidi
    #build_freetype2
    #build_ass
    #build_ffmpeg
    #build_one

    #mips
    #EABIARCH=mipsel-linux-android
    #ARCH=mips
    #OPTIMIZE_CFLAGS="-EL -march=mips32 -mips32 -mhard-float"
    #PREFIX=$(pwd)/ffmpeg-build/mips
    #OUT_LIBRARY=$PREFIX/libffmpeg.so
    #ADDITIONAL_CONFIGURE_FLAG="--disable-mips32r2"
    #SONAME=libffmpeg.so
    #PREBUILT=$ANDROID_NDK_HOME/toolchains/mipsel-linux-android-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    #PLATFORM_VERSION=android-9
    #setup_paths
    #build_amr
    #build_aac
    #build_fribidi
    #build_freetype2
    #build_ass
    #build_ffmpeg
    #build_one

    #arm v7vfpv3
    EABIARCH=arm-linux-androideabi
    ARCH=arm
    CPU=armv7-a
    OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
    PREFIX=$(pwd)/ffmpeg-build/armeabi-v7a
    OUT_LIBRARY=$PREFIX/libffmpeg.so
    ADDITIONAL_CONFIGURE_FLAG=
    SONAME=libffmpeg.so
    PREBUILT=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    PLATFORM_VERSION=android-5
    setup_paths
    build_x264
    build_amr
    build_aac
    build_fribidi
    build_freetype2
    build_ass
    build_ffmpeg
    build_one

    #arm v7 + neon (neon also include vfpv3-32)
    EABIARCH=arm-linux-androideabi
    ARCH=arm
    CPU=armv7-a
    OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8 -mthumb -D__thumb__ "
    PREFIX=$(pwd)/ffmpeg-build/armeabi-v7a-neon
    OUT_LIBRARY=../ffmpeg-build/armeabi-v7a/libffmpeg-neon.so
    ADDITIONAL_CONFIGURE_FLAG=--enable-neon
    SONAME=libffmpeg-neon.so
    PREBUILT=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    PLATFORM_VERSION=android-9
    setup_paths
    build_x264
    build_amr
    build_aac
    build_fribidi
    build_freetype2
    build_ass
    build_ffmpeg
    build_one


    echo "BUILD SUCCESS"

    I’ve disabled the non-arm architectures for the time being. If there is any other information I can provide to help finding the problem, I will be happy to do so.

    I’m wondering if the issue may be caused by something missing in the script, namely in build_one part, tho I tried to indicate the libx264.a directly in —extra-ldflags, without success.

  • Android ffmpeg with libx264 - undefined references

    5 décembre 2015, par Krzysztof Kansy

    I’m building ffmpeg for Android with libx264 using appunite’s project under Ubuntu 15.10. I’ve build it without libx264 properly, but adding the library keep giving me undefined reference to 'x264_picture_init' and multiple other similar errors. I tried variety of possible solutions from mailing lists/other SO questions, but still nothing helps me solving the problem.

    I have removed ffmpeg/libx264/libx264-dev packages to avoid possible duplicate libraries in the system. I’ve got the libx264.a library in ffmpeg-build/ARCH/lib, where the other built libraries lives. Also I don’t think this is caused by header file not matching the library, because the only x264.h header in the system is the one used for the library building.

    Here is my build_android.sh.

    set -x

    if [ "$ANDROID_NDK_HOME" = "" ]; then
       echo ANDROID_NDK_HOME variable not set, exiting
       echo "Use: export ANDROID_NDK_HOME=/your/path/to/android-ndk"
       exit 1
    fi

    # Get the newest arm-linux-androideabi version
    if [ -z "$COMPILATOR_VERSION" ]; then
       DIRECTORIES=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-*
       for i in $DIRECTORIES; do
           PROPOSED_NAME=${i#*$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-}
           if [[ $PROPOSED_NAME =~ ^[0-9\.]+$ ]] ; then
               echo "Available compilator version: $PROPOSED_NAME"
               COMPILATOR_VERSION=$PROPOSED_NAME
           fi
       done
    fi

    if [ -z "$COMPILATOR_VERSION" ]; then
       echo "Could not find compilator"
       exit 1
    fi

    if [ ! -d $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION ]; then
       echo $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION does not exist
       exit 1
    fi
    echo "Using compilator version: $COMPILATOR_VERSION"

    OS_ARCH=`basename $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/*`
    echo "Using architecture: $OS_ARCH"


    function setup_paths
    {
       export PLATFORM=$ANDROID_NDK_HOME/platforms/$PLATFORM_VERSION/arch-$ARCH/
       if [ ! -d $PLATFORM ]; then
           echo $PLATFORM does not exist
           exit 1
       fi
       echo "Using platform: $PLATFORM"
       export PATH=${PATH}:$PREBUILT/bin/
       export CROSS_COMPILE=$PREBUILT/bin/$EABIARCH-
       export CFLAGS=$OPTIMIZE_CFLAGS
       export CPPFLAGS="$CFLAGS"
       export CFLAGS="$CFLAGS"
       export CXXFLAGS="$CFLAGS"
       export CXX="${CROSS_COMPILE}g++ --sysroot=$PLATFORM"
       export AS="${CROSS_COMPILE}gcc --sysroot=$PLATFORM"
       export CC="${CROSS_COMPILE}gcc --sysroot=$PLATFORM"
       export PKG_CONFIG="${CROSS_COMPILE}pkg-config"
       export LD="${CROSS_COMPILE}ld"
       export NM="${CROSS_COMPILE}nm"
       export STRIP="${CROSS_COMPILE}strip"
       export RANLIB="${CROSS_COMPILE}ranlib"
       export AR="${CROSS_COMPILE}ar"
       export LDFLAGS="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog"
       export PKG_CONFIG_LIBDIR=$PREFIX/lib/pkgconfig/
       export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig/

       if [ ! -f "${CROSS_COMPILE}gcc" ]; then
           echo "Gcc does not exists in path: ${CROSS_COMPILE}gcc"
           exit 1;
       fi

       if [ ! -f "${PKG_CONFIG}" ]; then
           echo "Pkg config does not exists in path: ${PKG_CONFIG} - Probably BUG in NDK but..."
           set +e
           SYS_PKG_CONFIG=$(which pkg-config)
           if [ "$?" -ne 0 ]; then
               echo "This system does not contain system pkg-config, so we can do anything"
               exit 1
           fi
           set -e
           cat > $PKG_CONFIG << EOF
    #!/bin/bash
    pkg-config \$*
    EOF
           chmod u+x $PKG_CONFIG
           echo "Because we have local pkg-config we will create it in ${PKG_CONFIG} directory using ${SYS_PKG_CONFIG}"
       fi
    }

    function build_x264
    {
       echo "Starting build x264 for $ARCH"
       cd x264
       ./configure --prefix=$PREFIX --host=$ARCH-linux --enable-static --disable-shared --enable-pic --disable-cli $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED x264 for $ARCH"
    }

    function build_amr
    {
       echo "Starting build amr for $ARCH"
       cd vo-amrwbenc
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED amr for $ARCH"
    }

    function build_aac
    {
       echo "Starting build aac for $ARCH"
       cd vo-aacenc
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED aac for $ARCH"
    }
    function build_freetype2
    {
       echo "Starting build freetype2 for $ARCH"
       cd freetype2
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED freetype2 for $ARCH"
    }

    function build_ass
    {
       echo "Starting build ass for $ARCH"
       cd libass
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-fontconfig \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make V=1 -j4 install
       make clean
       cd ..
       echo "FINISHED ass for $ARCH"
    }
    function build_fribidi
    {
       echo "Starting build fribidi for $ARCH"
       cd fribidi
       ./configure \
           --prefix=$PREFIX \
           --host=$ARCH-linux \
           --disable-bin \
           --disable-dependency-tracking \
           --disable-shared \
           --enable-static \
           --with-pic \
           $ADDITIONAL_CONFIGURE_FLAG

       make clean
       make -j4 install
       make clean
       cd ..
       echo "FINISHED fribidi for $ARCH"
    }
    function build_ffmpeg
    {
       echo "Starting build ffmpeg for $ARCH"
       cd ffmpeg
       ./configure --target-os=linux \
           --prefix=$PREFIX \
           --enable-cross-compile \
           --extra-libs="-lgcc -L$PREFIX/lib/libx264.a" \
           --arch=$ARCH \
           --cc=$CC \
           --cross-prefix=$CROSS_COMPILE \
           --nm=$NM \
           --sysroot=$PLATFORM \
           --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums  -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS" \
           --disable-shared \
           --enable-static \
           --enable-runtime-cpudetect \
           --pkg-config-flags="--static" \
           --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib  -nostdlib -lc -lm -ldl -llog -L$PREFIX/lib" \
           --extra-cflags="-I$PREFIX/include" \
           --disable-everything \
           --enable-gpl \
           --enable-pthreads \
           --enable-libass \
           --enable-libvo-aacenc \
           --enable-libvo-amrwbenc \
           --enable-hwaccel=h264_vaapi \
           --enable-hwaccel=h264_vaapi \
           --enable-hwaccel=h264_dxva2 \
           --enable-hwaccel=mpeg4_vaapi \
           --enable-libx264 \
           --enable-demuxer=mov \
           --enable-demuxer=h264 \
           --enable-muxer=h264 \
           --enable-demuxer=mpegvideo \
           --enable-demuxer=h263 \
           --enable-demuxer=mpegps \
           --enable-demuxer=mjpeg \
           --enable-demuxer=rtsp \
           --enable-demuxer=rtp \
           --enable-demuxer=hls \
           --enable-demuxer=matroska \
           --enable-muxer=rtsp \
           --enable-muxer=mp4 \
           --enable-muxer=mov \
           --enable-muxer=mjpeg \
           --enable-muxer=matroska \
           --enable-protocol=crypto \
           --enable-protocol=jni \
           --enable-protocol=file \
           --enable-protocol=rtp \
           --enable-protocol=tcp \
           --enable-protocol=udp \
           --enable-protocol=applehttp \
           --enable-protocol=hls \
           --enable-protocol=http \
           --enable-decoder=xsub \
           --enable-decoder=jacosub \
           --enable-decoder=dvdsub \
           --enable-decoder=dvbsub \
           --enable-decoder=subviewer \
           --enable-decoder=rawvideo \
           --enable-encoder=rawvideo \
           --enable-decoder=mjpeg \
           --enable-encoder=mjpeg \
           --enable-decoder=h263 \
           --enable-decoder=mpeg4 \
           --enable-encoder=mpeg4 \
           --enable-decoder=h264 \
           --enable-encoder=h264 \
           --enable-decoder=aac \
           --enable-encoder=aac \
           --enable-parser=h264 \
           --enable-encoder=mp2 \
           --enable-decoder=mp2 \
           --enable-encoder=libvo_amrwbenc \
           --enable-decoder=amrwb \
           --enable-muxer=mp2 \
           --enable-bsfs \
           --enable-decoders \
           --enable-encoders \
           --enable-parsers \
           --enable-hwaccels \
           --enable-muxers \
           --enable-avformat \
           --enable-avcodec \
           --enable-avresample \
           --enable-zlib \
           --disable-doc \
           --disable-ffplay \
           --disable-ffmpeg \
           --disable-ffplay \
           --disable-ffprobe \
           --disable-ffserver \
           --enable-avfilter \
           --disable-avdevice \
           --disable-opencl \
           --enable-nonfree \
           --enable-version3 \
           --enable-memalign-hack \
           --enable-asm \
           $ADDITIONAL_CONFIGURE_FLAG
       make clean
       make -j4 install
       make clean

       cd ..
       echo "FINISHED ffmpeg for $ARCH"
    }

    function build_one {
       echo "Starting build one for $ARCH"
       cd ffmpeg
       ${LD} -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -L$PREFIX/lib  -soname $SONAME -shared -nostdlib -Bsymbolic --whole-archive --no-undefined -o $OUT_LIBRARY -lavformat -lavcodec -lavresample -lavutil -lswresample -lavfilter -lass -lfreetype -lfribidi -lswscale -lvo-aacenc -lvo-amrwbenc -lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker -zmuldefs $PREBUILT/lib/gcc/$EABIARCH/$COMPILATOR_VERSION/libgcc.a
       cd ..
       echo "FINISHED one for $ARCH"
    }

    # enable additional architectures later on

    #arm v5
    #EABIARCH=arm-linux-androideabi
    #ARCH=arm
    #CPU=armv5
    #OPTIMIZE_CFLAGS="-marm -march=$CPU"
    #PREFIX=$(pwd)/ffmpeg-build/armeabi
    #OUT_LIBRARY=$PREFIX/libffmpeg.so
    #ADDITIONAL_CONFIGURE_FLAG=
    #SONAME=libffmpeg.so
    #PREBUILT=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    #PLATFORM_VERSION=android-5
    #setup_paths
    #build_amr
    #build_aac
    #build_fribidi
    #build_freetype2
    #build_ass
    #build_ffmpeg
    #build_one

    #x86
    #EABIARCH=i686-linux-android
    #ARCH=x86
    #OPTIMIZE_CFLAGS="-m32"
    #PREFIX=$(pwd)/ffmpeg-build/x86
    #OUT_LIBRARY=$PREFIX/libffmpeg.so
    #ADDITIONAL_CONFIGURE_FLAG=--disable-asm
    #SONAME=libffmpeg.so
    #PREBUILT=$ANDROID_NDK_HOME/toolchains/x86-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    #PLATFORM_VERSION=android-9
    #setup_paths
    #build_amr
    #build_aac
    #build_fribidi
    #build_freetype2
    #build_ass
    #build_ffmpeg
    #build_one

    #mips
    #EABIARCH=mipsel-linux-android
    #ARCH=mips
    #OPTIMIZE_CFLAGS="-EL -march=mips32 -mips32 -mhard-float"
    #PREFIX=$(pwd)/ffmpeg-build/mips
    #OUT_LIBRARY=$PREFIX/libffmpeg.so
    #ADDITIONAL_CONFIGURE_FLAG="--disable-mips32r2"
    #SONAME=libffmpeg.so
    #PREBUILT=$ANDROID_NDK_HOME/toolchains/mipsel-linux-android-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    #PLATFORM_VERSION=android-9
    #setup_paths
    #build_amr
    #build_aac
    #build_fribidi
    #build_freetype2
    #build_ass
    #build_ffmpeg
    #build_one

    #arm v7vfpv3
    EABIARCH=arm-linux-androideabi
    ARCH=arm
    CPU=armv7-a
    OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
    PREFIX=$(pwd)/ffmpeg-build/armeabi-v7a
    OUT_LIBRARY=$PREFIX/libffmpeg.so
    ADDITIONAL_CONFIGURE_FLAG=
    SONAME=libffmpeg.so
    PREBUILT=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    PLATFORM_VERSION=android-5
    setup_paths
    build_x264
    build_amr
    build_aac
    build_fribidi
    build_freetype2
    build_ass
    build_ffmpeg
    build_one

    #arm v7 + neon (neon also include vfpv3-32)
    EABIARCH=arm-linux-androideabi
    ARCH=arm
    CPU=armv7-a
    OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8 -mthumb -D__thumb__ "
    PREFIX=$(pwd)/ffmpeg-build/armeabi-v7a-neon
    OUT_LIBRARY=../ffmpeg-build/armeabi-v7a/libffmpeg-neon.so
    ADDITIONAL_CONFIGURE_FLAG=--enable-neon
    SONAME=libffmpeg-neon.so
    PREBUILT=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-$COMPILATOR_VERSION/prebuilt/$OS_ARCH
    PLATFORM_VERSION=android-9
    setup_paths
    build_x264
    build_amr
    build_aac
    build_fribidi
    build_freetype2
    build_ass
    build_ffmpeg
    build_one


    echo "BUILD SUCCESS"

    I’ve disabled the non-arm architectures for the time being. If there is any other information I can provide to help finding the problem, I will be happy to do so.

    I’m wondering if the issue may be caused by something missing in the script, namely in build_one part, tho I tried to indicate the libx264.a directly in —extra-ldflags, without success.

  • i use vitamio-ffmpeg achieve filters function,who can help me to see [on hold]

    30 décembre 2015, par 陈腾明

    my cmd is :
    ffmpeg -y -i /storage/emulated/0/Foream/a.mp4 -i /storage/emulated/0/Foream/q.jpg -filter_complex [0:v][1:v]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out] -map [out] -map 0:a -codec:a copy /storage/test.mp4

    • ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers

      built on Dec 30 2015 17:40:40 with gcc 4.8 (GCC)
      configuration: --arch=arm --disable-runtime-cpudetect    --target-os=linux --enable-cross-compile --cross-prefix=arm-linux-androideabi- --enable-version3 --enable-optimizations --enable-shared --disable-fast-unaligned --disable-static --disable-symver --disable-programs --disable-doc --disable-avdevice --disable-postproc --disable-encoders --disable-muxers --enable-muxer=mp4 --disable-devices --disable-demuxer=sbg --disable-demuxer=dts --disable-parser=dca --disable-decoder=dca --disable-decoder=svq3 --disable-debug --enable-network --enable-asm --prefix=/var/vitamio/FFmpeg-Vitamio-vitamio/build/android/armv6 --extra-cflags='-mthumb -std=c99 -O3 -Wall -pipe -fpic -fasm -finline-limit=300 -ffast-math -fstrict-aliasing -Werror=strict-aliasing -Wno-psabi -Wa,--noexecstack -fdiagnostics-color=always -DANDROID -DNDEBUG -I/var/openssl/OpenSSL-Vitamio-master/include -D__ARM_ARCH_5__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5TE__ -march=armv6 -msoft-float' --extra-ldflags='-lm -lz -Wl,--no-undefined -Wl,-z,no   WARNING: library configuration mismatch
      avutil      configuration: --arch=arm --disable-runtime-cpudetect    --target-os=linux --cross-prefix=arm-linux-androideabi- --enable-cross-compile --enable-version3 --enable-shared --disable-static --disable-symver --disable-programs --disable-doc --disable-avdevice --disable-encoders --disable-muxers --disable-devices --disable-everything --disable-protocols --disable-demuxers --disable-decoders --disable-bsfs --disable-debug --enable-optimizations --enable-filters --enable-parsers --disable-parser=hevc --enable-swscale --enable-network --enable-protocol=file --enable-protocol=http --enable-protocol=rtmp --enable-protocol=rtp --enable-protocol=mmst --enable-protocol=mmsh --enable-protocol=crypto --enable-protocol=hls --enable-demuxer=hls --enable-demuxer=mpegts --enable-demuxer=mpegtsraw --enable-demuxer=mpegvideo --enable-demuxer=concat --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=rtsp --enable-demuxer=mp3 --enable-demuxer=matroska --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-de   avcodec     configuration: --arch=arm --disable-runtime-cpudetect

      —target-os=linux —cross-prefix=arm-linux-androideabi- —enable-cross-compile —enable-version3 —enable-shared —disable-static —disable-symver —disable-programs —disable-doc —disable-avdevice —disable-encoders —disable-muxers —disable-devices —disable-everything —disable-protocols —disable-demuxers —disable-decoders —disable-bsfs —disable-debug —enable-optimizations —enable-filters —enable-parsers —disable-parser=hevc —enable-swscale —enable-network —enable-protocol=file —enable-protocol=http —enable-protocol=rtmp —enable-protocol=rtp —enable-protocol=mmst —enable-protocol=mmsh —enable-protocol=crypto —enable-protocol=hls —enable-demuxer=hls —enable-demuxer=mpegts —enable-demuxer=mpegtsraw —enable-demuxer=mpegvideo —enable-demuxer=concat —enable-demuxer=mov —enable-demuxer=flv —enable-demuxer=rtsp —enable-demuxer=mp3 —enable-demuxer=matroska —enable-decoder=mpeg4 —enable-decoder=mpegvideo —enable-de avformat configuration : —arch=arm —disable-runtime-cpudetect
      — target-os=linux —cross-prefix=arm-linux-androideabi- —enable-cross-compile —enable-version3 —enable-shared —disable-static —disable-symver —disable-programs —disable-doc —disable-avdevice —disable-encoders —disable-muxers —disable-devices —disable-everything —disable-protocols —disable-demuxers —disable-decoders —disable-bsfs —disable-debug —enable-optimizations —enable-filters —enable-parsers —disable-parser=hevc —enable-swscale —enable-network —enable-protocol=file —enable-protocol=http —enable-protocol=rtmp —enable-protocol=rtp —enable-protocol=mmst —enable-protocol=mmsh —enable-protocol=crypto —enable-protocol=hls —enable-demuxer=hls —enable-demuxer=mpegts —enable-demuxer=mpegtsraw —enable-demuxer=mpegvideo —enable-demuxer=concat —enable-demuxer=mov —enable-demuxer=flv —enable-demuxer=rtsp —enable-demuxer=mp3 —enable-demuxer=matroska —enable-decoder=mpeg4 —enable-decoder=mpegvideo —enable-de avfilter configuration : —arch=arm —disable-runtime-cpudetect
      — target-os=linux —cross-prefix=arm-linux-androideabi- —enable-cross-compile —enable-version3 —enable-shared —disable-static —disable-symver —disable-programs —disable-doc —disable-avdevice —disable-encoders —disable-muxers —disable-devices —disable-everything —disable-protocols —disable-demuxers —disable-decoders —disable-bsfs —disable-debug —enable-optimizations —enable-filters —enable-parsers —disable-parser=hevc —enable-swscale —enable-network —enable-protocol=file —enable-protocol=http —enable-protocol=rtmp —enable-protocol=rtp —enable-protocol=mmst —enable-protocol=mmsh —enable-protocol=crypto —enable-protocol=hls —enable-demuxer=hls —enable-demuxer=mpegts —enable-demuxer=mpegtsraw —enable-demuxer=mpegvideo —enable-demuxer=concat —enable-demuxer=mov —enable-demuxer=flv —enable-demuxer=rtsp —enable-demuxer=mp3 —enable-demuxer=matroska —enable-decoder=mpeg4 —enable-decoder=mpegvideo —enable-de swscale configuration : —arch=arm —disable-runtime-cpudetect
      — target-os=linux —cross-prefix=arm-linux-androideabi- —enable-cross-compile —enable-version3 —enable-shared —disable-static —disable-symver —disable-programs —disable-doc —disable-avdevice —disable-encoders —disable-muxers —disable-devices —disable-everything —disable-protocols —disable-demuxers —disable-decoders —disable-bsfs —disable-debug —enable-optimizations —enable-filters —enable-parsers —disable-parser=hevc —enable-swscale —enable-network —enable-protocol=file —enable-protocol=http —enable-protocol=rtmp —enable-protocol=rtp —enable-protocol=mmst —enable-protocol=mmsh —enable-protocol=crypto —enable-protocol=hls —enable-demuxer=hls —enable-demuxer=mpegts —enable-demuxer=mpegtsraw —enable-demuxer=mpegvideo —enable-demuxer=concat —enable-demuxer=mov —enable-demuxer=flv —enable-demuxer=rtsp —enable-demuxer=mp3 —enable-demuxer=matroska —enable-decoder=mpeg4 —enable-decoder=mpegvideo —enable-de swresample configuration : —arch=arm —disable-runtime-cpudetect
      — target-os=linux —cross-prefix=arm-linux-androideabi- —enable-cross-compile —enable-version3 —enable-shared —disable-static —disable-symver —disable-programs —disable-doc —disable-avdevice —disable-encoders —disable-muxers —disable-devices —disable-everything —disable-protocols —disable-demuxers —disable-decoders —disable-bsfs —disable-debug —enable-optimizations —enable-filters —enable-parsers —disable-parser=hevc —enable-swscale —enable-network —enable-protocol=file —enable-protocol=http —enable-protocol=rtmp —enable-protocol=rtp —enable-protocol=mmst —enable-protocol=mmsh —enable-protocol=crypto —enable-protocol=hls —enable-demuxer=hls —enable-demuxer=mpegts —enable-demuxer=mpegtsraw —enable-demuxer=mpegvideo —enable-demuxer=concat —enable-demuxer=mov —enable-demuxer=flv —enable-demuxer=rtsp —enable-demuxer=mp3 —enable-demuxer=matroska —enable-decoder=mpeg4 —enable-decoder=mpegvideo —enable-de libavutil 52. 48.100 / 52. 48.100
      libavcodec 55. 39.100 / 55. 39.100
      libavformat 55. 19.104 / 55. 19.104
      libavfilter 3. 90.100 / 3. 90.100
      libswscale 2. 5.101 / 2. 5.101
      libswresample 0. 17.104 / 0. 17.104
      Splitting the commandline.
      Reading option ’-y’ ... matched as option ’y’ (overwrite output files) with argument ’1’.
      Reading option ’-i’ ... matched as input file with argument ’/storage/emulated/0/Foream/a.mp4’.
      Reading option ’-i’ ... matched as input file with argument ’/storage/emulated/0/Foream/q.jpg’.
      Reading option ’-filter_complex’ ... matched as option ’filter_complex’ (create a complex filtergraph) with argument
      ’[0:v][1:v]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out]’.
      Reading option ’-map’ ... matched as option ’map’ (set input stream mapping) with argument ’[out]’.
      Reading option ’-map’ ... matched as option ’map’ (set input stream mapping) with argument ’0:a’.
      Reading option ’-codec:a’ ... matched as option ’codec’ (codec name) with argument ’copy’.
      Reading option ’/storage/emulated/0/Foream/test.mp4’ ... matched as output file.
      Finished splitting the commandline.
      Parsing a group of options : global .
      Applying option y (overwrite output files) with argument 1.
      Applying option filter_complex (create a complex filtergraph) with argument
      [0:v][1:v]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out].
      Successfully parsed a group of options.
      Parsing a group of options : input file /storage/emulated/0/Foream/a.mp4.
      Successfully parsed a group of options.
      Opening an input file : /storage/emulated/0/Foream/a.mp4.
      [mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9270990] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
      [mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9270990] ISO : File Type Major Brand : mp42
      [mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9270990] File position before avformat_find_stream_info() is 810040
      [mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9270990] All info found
      rfps : 29.416667 0.016512
      rfps : 29.416667 0.016512
      rfps : 29.500000 0.012847
      rfps : 29.500000 0.012847
      rfps : 29.583333 0.009693
      rfps : 29.666667 0.007050
      rfps : 29.750000 0.004918
      rfps : 29.833333 0.003298
      rfps : 29.916667 0.002188
      rfps : 30.000000 0.001590
      rfps : 30.083333 0.001503
      rfps : 30.166667 0.001928
      rfps : 30.250000 0.002863
      rfps : 30.333333 0.004310
      rfps : 30.333333 0.004310
      rfps : 30.416667 0.006268
      rfps : 30.416667 0.006268
      rfps : 30.500000 0.008737
      rfps : 30.500000 0.008737
      rfps : 30.583333 0.011717
      rfps : 30.583333 0.011717
      rfps : 30.666667 0.015208
      rfps : 30.666667 0.015208
      rfps : 30.750000 0.019211
      rfps : 30.750000 0.019211
      rfps : 59.500000 0.019673
      rfps : 59.583333 0.016176
      rfps : 59.666667 0.013191
      rfps : 59.750000 0.010716
      rfps : 59.833333 0.008753
      rfps : 59.916667 0.007302
      rfps : 60.000000 0.006361
      rfps : 29.970030 0.001747
      rfps : 59.940060 0.006986
      [mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9270990] File position after avformat_find_stream_info() is 1684954
      Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/Foream/a.mp4’ :
      Metadata :
      major_brand : mp42

       minor_version   :  0

       compatible_brands:  isommp42

       creation_time   :  2015-11-07 12:30:11

       location        :     +22.5935+113.8685/

       location-eng    :     +22.5935+113.8685/

      Duration:  00:00:17.24 , start:

      0.000000 , bitrate : 9934 kb/s

       Stream #0:0 (eng) , 21, 1/90000 : Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 9488 kb/s , SAR  

      65536:65536 DAR 16:9 , 29.61 fps , 30.08 tbr , 90k tbn , 50 tbc
      (default)

       Metadata:

      rotate          :  90


      creation_time   :  2015-11-07 12:30:11


      handler_name    :  VideoHandle

       Stream #0:1 (eng) , 49, 1/48000 : Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 96 kb/s  (default)

       Metadata:

      creation_time   :  2015-11-07 12:30:11


      handler_name    :  SoundHandle

       Successfully opened the file.
       Parsing a group of options: input file    /storage/emulated/0/Foream/q.jpg.
       Successfully parsed a group of options.
       Opening an input file: /storage/emulated/0/Foream/q.jpg.
       [mp3 @ 0xb924f040] Format mp3 detected only with low score of 1,    misdetection possible!
       [mp3 @ 0xb924f040] File position before avformat_find_stream_info()    is 0
       [mp3 @ 0xb9216ef0] Header missing
       [mp3 @ 0xb9216ef0] Header missing
       [mp3 @ 0xb9216ef0] Header missing
       [mp3 @ 0xb924f040] decoding for stream 0 failed
       [mp3 @ 0xb924f040] Could not find codec parameters for stream 0    (Audio: mp1, 0 channels, s16p): unspecified frame size Consider

      increasing the value for the ’analyzeduration’ and ’probesize’
      options
      [mp3 @ 0xb924f040] File position after avformat_find_stream_info() is 9590
      /storage/emulated/0/Foream/q.jpg : could not find codec parameters
      [AVIOContext @ 0xb9251990] Statistics : 9590 bytes read, 0 seeks
      [AVIOContext @ 0xb923e090] Statistics : 907698 bytes read, 1 seeks