Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (61)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (9680)

  • Compile FFMPEG for command line usage

    3 septembre 2014, par Lior Iluz

    I’ve been trying to compile FFMPEG so I can use it with my Android application with commands. The result should be 1 static file, "ffmpeg", that is not package dependent. No .so files.

    I managed to compile it with guardianProject and everything is working but the source was too old and lacks options I need.
    I’m using the latest Ubuntu on VirtualBox, all essentials are installed and updated (gawk, yasm, aptitude, etc...).

    There are multiple examples around the web. Here are the issues I’ve experienced with each of the options I tried. I’d appreciate help with either one of the following errors :

    1. Guardian project - I managed to compile it and get the ffmpeg file but it uses an old version of ffmpeg that doesn’t include the "-movFlags faststart" option. I tried throwing the new ffmpeg (2.3.3) in there but it just throws error. (I ran git submodule init and update)

    2. JayH5 - A more generic build file that basically should work with every ffmpeg. I updated the build script to work with the latest NDK and it seems to be working but than it fails on /home/dor/Desktop/ndk/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-pkg-config not found, library detection may fail.
      I read about this and it seems to require a hack, which I don’t understand how to implement.

    3. Trovao - this is a very nice project and the build script even downloads the latest ffmpeg and x264 sources, and I even succeeded in compiling it to FFMPEG and X264 files but when I use it, I get this error : could not load library "libx264.so.142 which is weird, as x264 is there and the whole idea of this project is to cancel the need of .so files.

    I’d appreciate help with figuring out how to solve any of the issues. I prefer using the JayH5 build script as it seems the most straight forward out there...

    JayH5 build file :

    #!/bin/bash

    # set the base path to your Android NDK (or export NDK to environment)

    if [[ "x$NDK_BASE" == "x" ]]; then
       NDK_BASE=/opt/android-ndk
       echo "No NDK_BASE set, using $NDK_BASE"
    fi

    NDK_PLATFORM_VERSION=14
    NDK_ABI=arm
    NDK_COMPILER_VERSION=4.8
    NDK_SYSROOT=$NDK_BASE/platforms/android-$NDK_PLATFORM_VERSION/arch-$NDK_ABI
    NDK_UNAME=`uname -s | tr '[A-Z]' '[a-z]'` # Convert Linux -> linux
    HOST=$NDK_ABI-linux-androideabi
    NDK_TOOLCHAIN_BASE=$NDK_BASE/toolchains/$HOST-$NDK_COMPILER_VERSION/prebuilt/$NDK_UNAME-x86
    CC="$NDK_TOOLCHAIN_BASE/bin/$HOST-gcc --sysroot=$NDK_SYSROOT"
    LD=$NDK_TOOLCHAIN_BASE/bin/$HOST-ld

    BUILD_PATH=build/ffmpeg

    ./configure \
    $DEBUG_FLAG \
    --arch=arm \
    --target-os=linux \
    --enable-runtime-cpudetect \
    --enable-pic \
    --disable-shared \
    --enable-static \
    --cross-prefix=$NDK_TOOLCHAIN_BASE/bin/$NDK_ABI-linux-androideabi- \
    --sysroot="$NDK_SYSROOT" \
    --extra-cflags="-march=armv7-a -mfloat-abi=softfp -fPIC -DANDROID" \
    --extra-ldflags="" \
    --enable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-ffserver \
    --disable-network \
  • Reduce compiled ffmpeg library size based on what I need

    20 septembre 2014, par Alin

    I finally managed to build ffmpeg as detailed in here : https://enoent.fr/blog/2014/06/20/compile-ffmpeg-for-android/ and in the end, I have a ffmpeg library which accepts command arguments.

    I am ONLY applying a watermark image over the video so for it I am using this ffmpeg command :

    ffmpeg -i input.avi -i logo.png -filter_complex 'overlay=10:main_h-overlay_h-10' output.avi

    Basic config :

     ./configure \
       --prefix=$PREFIX \
       --disable-shared \
       --enable-static \
       --disable-doc \
       --disable-ffmpeg \
       --disable-ffplay \
       --disable-ffprobe \
       --disable-ffserver \
       --disable-doc \
       --disable-symver \
       --enable-protocol=concat \
       --enable-protocol=file \
       --enable-muxer=mp4 \
       --enable-demuxer=mpegts \
       --enable-memalign-hack \
       --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
       --target-os=linux \
       --arch=arm \
       --enable-cross-compile \
       --sysroot=$SYSROOT \
       --extra-cflags="-Os -fpic -marm $ADDI_CFLAGS" \
       --extra-ldflags="$ADDI_LDFLAGS"

    No other commands needed from ffmpeg.

    When compiling ffmpeg I get these files :

    enter image description here

    I want to reduce the size of the library to as small as possible, so given the above command, are there any files that I can remove from final build ?

    ALSO which is the most common CPU found in current devices ? arm v7vfpv3, arm v7vfp, arm v7n ? I want to cover as many devices as possible.

    #arm v6
    #CPU=armv6
    #OPTIMIZE_CFLAGS="-marm -march=$CPU"
    #PREFIX=./android/$CPU
    #ADDITIONAL_CONFIGURE_FLAG=
    #build_one

    #arm v7vfpv3
    CPU=armv7-a
    OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
    PREFIX=./android/$CPU
    ADDITIONAL_CONFIGURE_FLAG=
    build_one

    #arm v7vfp
    #CPU=armv7-a
    #OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "
    #PREFIX=./android/$CPU-vfp
    #ADDITIONAL_CONFIGURE_FLAG=
    #build_one

    #arm v7n
    #CPU=armv7-a
    #OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8"
    #PREFIX=./android/$CPU
    #ADDITIONAL_CONFIGURE_FLAG=--enable-neon
    #build_one

    #arm v6+vfp
    #CPU=armv6
    #OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU"
    #PREFIX=./android/${CPU}_vfp
    #ADDITIONAL_CONFIGURE_FLAG=
    #build_one
  • FFmpeg support for libstagefright hardware decoding

    25 février 2016, par Ming Zhang

    everyone :
    I am new to ffmpeg. Recently I am working on project to port ffmpeg to android device.
    At the beginning, I compiled ffmpeg to shared libs(.so files) in a very normal way following some guides on Internet, load them into my android app. It works perfectly.

    Now I want ffmpeg to use libstagefright to fulfill HW decoding.
    The problem is, I can compile the .so libs, but when I launch my app and load those .so libs, there is always a java.lang.UnsatisfiedLinkError :
    Cannot load library : reloc_library[1314] : 114 cannot locate ’_ZN7android11MediaBufferC1Ej’

    I stuck there for a few days. Does anyone encountered any similar problems before ? It would be great if someone can give me some hint about this error.

    My steps :
    1. Compile ffmpeg-2.1.4 souce code to .so shared libs. I use the build_libstagefright script to do this, and make some modification based on some guides from Internet.

    #!/bin/bash
    #export NDK=/home/mingzhang/android/android-ndk-r9c
    export NDK=/home/mingzhang/android/android-ndk-r7
    if [ "$NDK" = "" ]; then
       echo NDK variable not set, assuming ${HOME}/android-ndk
       export NDK=${HOME}/android-ndk
    fi

    echo "Fetching Android system headers"
    git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_base.git ../android-source/frameworks/base
    git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_av.git ../android-source/frameworks/av
    git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_frameworks_native.git ../android-source/frameworks/native
    git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_hardware_libhardware.git ../android-source/hardware/libhardware
    git clone --depth=1 --branch gingerbread-release git://github.com/CyanogenMod/android_system_core.git ../android-source/system/core

    echo "Fetching Android libraries for linking"
    # Libraries from any froyo/gingerbread device/emulator should work
    # fine, since the symbols used should be available on most of them.
    #if [ ! -d "../android-libs" ]; then
    #    if [ ! -f "../update-cm-7.0.3-N1-signed.zip" ]; then
    #        wget http://download.cyanogenmod.com/get/update-cm-7.0.3-N1-signed.zip -P../
    #    fi
    #    unzip ../update-cm-7.0.3-N1-signed.zip system/lib/* -d../
    #    mv ../system/lib ../android-libs
    #    rmdir ../system
    #fi

    SYSROOT=$NDK/platforms/android-9/arch-arm
    # Expand the prebuilt/* path into the correct one
    #TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
    TOOLCHAIN=/home/mingzhang/android/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    export PATH=$TOOLCHAIN/bin:$PATH
    ANDROID_SOURCE=../android-source
    ANDROID_LIBS=../android-libs
    ABI="armeabi-v7a"
    CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc
    #CC=$TOOLCHAIN/bin/arm-eabi-gcc-4.4.3
    NM=$TOOLCHAIN/bin/arm-linux-androideabi-nm
    #NM=$TOOLCHAIN/bin/arm-eabi-nm

    rm -rf ../build/stagefright
    mkdir -p ../build/stagefright

    ADDI_CFLAGS="-marm"
    DEST=../build/stagefright
    DEST="$DEST/$ABI"

    FLAGS="--target-os=linux --arch=arm --cpu=armv7-a --cross-prefix=arm-linux-androideabi- --cc=$CC --nm=$NM"
    #FLAGS="--target-os=linux --arch=arm --cpu=armv7-a --cross-prefix=arm-eabi- --cc=$CC --nm=$NM"
    FLAGS="$FLAGS --sysroot=$SYSROOT"
    #FLAGS="$FLAGS --disable-avdevice --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-libstagefright-h264"
    FLAGS="$FLAGS --enable-shared --disable-demuxers --disable-muxers --disable-parsers --disable-avdevice --disable-filters --disable-programs --disable-encoders --disable-decoders --disable-decoder=h264 --disable-decoder=h264_vdpau --enable-decoder=libstagefright_h264 --enable-libstagefright-h264 \
       --enable-asm \
       --enable-neon \
       --enable-cross-compile \
       --enable-gpl \
       --disable-static \
       --enable-memalign-hack"

    EXTRA_CFLAGS="-I$DEST/include"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/native/include"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/native/include/media/openmax"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/av/include"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/include -I$ANDROID_SOURCE/system/core/include"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/hardware/libhardware/include"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/media/libstagefright"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$ANDROID_SOURCE/frameworks/base/include/media/stagefright/openmax"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$NDK/sources/cxx-stl/gnu-libstdc++/4.6/include -I$NDK/sources/cxx-stl/gnu-libstdc++/4.6/libs/$ABI/include"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -I$NDK/sources/cxx-stl/stlport/stlport"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -march=armv7-a -mfloat-abi=softfp -mfpu=neon -marm -mtune=cortex-a8"
    EXTRA_CFLAGS="$EXTRA_CFLAGS -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -D_STLP_USE_NEWALLOC"

    EXTRA_LDFLAGS="-Wl,--fix-cortex-a8 -L$ANDROID_LIBS -Wl,-rpath-link,$ANDROID_LIBS -L$NDK/sources/cxx-stl/gnu-libstdc++/4.6/libs/$ABI -static-libstdc++"
    EXTRA_CXXFLAGS="-Wno-multichar -fno-exceptions -fno-rtti"
    FLAGS="$FLAGS --prefix=$DEST"

    mkdir -p $DEST

    echo $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" --extra-cxxflags="$EXTRA_CXXFLAGS" > $DEST/info.txt
    ./configure $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" --extra-cxxflags="$EXTRA_CXXFLAGS" | tee $DEST/configuration.txt
    [ $PIPESTATUS == 0 ] || exit 1
    make clean
    #make -j4 || exit 1
    #make -j4
    make install || exit 1
    1. Copy the compiled include and lib directories to my android-ndk-r7/sources/ffmpeg-2.1.4/android/arm directory. The Android.mk file under this directory is.

      LOCAL_PATH := $(call my-dir)

      include $(CLEAR_VARS)
      LOCAL_MODULE := libavcodec
      LOCAL_SRC_FILES := lib/libavcodec-55.so
      LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
      include $(PREBUILT_SHARED_LIBRARY)

      include $(CLEAR_VARS)
      LOCAL_MODULE := libavformat
      LOCAL_SRC_FILES := lib/libavformat-55.so
      LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
      include $(PREBUILT_SHARED_LIBRARY)

      include $(CLEAR_VARS)
      LOCAL_MODULE := libswscale
      LOCAL_SRC_FILES := lib/libswscale-2.so
      LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
      include $(PREBUILT_SHARED_LIBRARY)

      include $(CLEAR_VARS)
      LOCAL_MODULE := libavutil
      LOCAL_SRC_FILES := lib/libavutil-52.so
      LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
      include $(PREBUILT_SHARED_LIBRARY)

      include $(CLEAR_VARS)
      LOCAL_MODULE := libavfilter
      LOCAL_SRC_FILES := lib/libavfilter-3.so
      LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
      include $(PREBUILT_SHARED_LIBRARY)

      include $(CLEAR_VARS)
      LOCAL_MODULE := libwsresample
      LOCAL_SRC_FILES := lib/libswresample-0.so
      LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
      include $(PREBUILT_SHARED_LIBRARY)

    2. Under the jni directory of my android app, the Android.mk is.

      LOCAL_PATH:= $(call my-dir)
      include $(CLEAR_VARS)

      LOCAL_MODULE    := libripple
      #LOCAL_CFLAGS    := -Werror
      LOCAL_SRC_FILES := entrypoint.cpp scene.cpp
      LOCAL_LDLIBS    := -llog -lGLESv2 -lm

      include $(BUILD_SHARED_LIBRARY)

      include $(CLEAR_VARS)

      LOCAL_MODULE    := myfflib
      LOCAL_SRC_FILES := fflib.c
      LOCAL_LDLIBS := -L/home/mingzhang/ffmpeg_android/android-libs -llog -ljnigraphics -lz -landroid -ldl -lm -llog -lgcc -lc -lstagefright -lmedia -lutils -lbinder #-lstdc++
      LOCAL_SHARED_LIBRARIES := libavformat libavcodec libswscale libavutil libutils libstagefright libbinder libmedia libstdc++-6

      include $(BUILD_SHARED_LIBRARY)
      $(call import-module,ffmpeg-2.1.4/android/arm)

      And the Application.mk is :

      APP_ABI=armeabi-v7a
      #APP_STL=gnustl_static
      APP_STL=stlport_static

    I am not sure what else materials you need, if anything is missing, please let me know, I will upload it.
    Thank you guys very much !!!