Recherche avancée

Médias (2)

Mot : - Tags -/plugins

Autres articles (72)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • 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 (7479)

  • 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
  • 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 \
  • Compiling FFmpeg 2.3 with Android NDK r10

    25 juillet 2014, par Robin

    I want to compile FFMpeg 2.3 with Android NDK r10 by following this tutorial : http://www.roman10.net/how-to-build-ffmpeg-for-android/

    After getting several errors i modified the build script like this :

     #!/bin/bash
       ######################################################
    # Usage:
    # put this script in top of FFmpeg source tree
    # ./build_android
    # It generates binary for following architectures:
    # ARMv6
    # ARMv6+VFP
    # ARMv7+VFM-ïd16 (Tegra2)
    # ARMv7+Neon (Cortex-A8)
    # Customizing:
    # 1. Feel free to change ./configure parameters for more features
    # 2. To adapt other ARM variants
    # set $CPU and $OPTIMIZE_CFLAGS
    # call build_one
    ######################################################
    NDK=/usr/local/src/android-ndk-r10
    PLATFORM=$NDK/platforms/android-8/arch-arm/
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64
    function build_one
    {
    ./configure --target-os=linux \
       --prefix=$PREFIX \
       --enable-cross-compile \
       --extra-libs="-lgcc" \
       --arch=arm \
       --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
       --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
       --nm=$PREBUILT/bin/arm-linux-androideabi-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 \
       --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \
       --disable-everything \
       --enable-demuxer=mov \
       --enable-demuxer=h264 \
       --disable-ffplay \
       --enable-protocol=file \
       --enable-avformat \
       --enable-avcodec \
       --enable-decoder=rawvideo \
       --enable-decoder=mjpeg \
       --enable-decoder=h263 \
       --enable-decoder=h265 \
       --enable-decoder=mpeg4 \
       --enable-decoder=h264 \
       --enable-parser=h264 \
       --enable-parser=h265
       --enabled-network \
       --enable-zlib \
       --disable-avfilter \
       --disable-avdevice \
       $ADDITIONAL_CONFIGURE_FLAG

    make clean
    make  -j4 install
    $PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
    $PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib  -soname libffmpeg.so -nostdlib,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.8/libgcc.a
    }

    #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

    But unfortunatly I get the following error :

       INSTALL ffmpeg
    INSTALL ffprobe
    INSTALL ffserver
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(eventfd.o): multiple definition of 'eventfd'
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(eventfd.o): previous definition here
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): multiple definition of '__dorand48'
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): previous definition here
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): multiple definition of '__rand48_mult'
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): previous definition here
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): multiple definition of '__rand48_add'
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): previous definition here
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): multiple definition of '__rand48_seed'
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(_rand48.o): previous definition here
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libm.a(s_scalbn.o): multiple definition of 'ldexp'
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: /usr/local/src/android-ndk-r10/platforms/android-8/arch-arm//usr/lib/libc.a(ldexp.o): previous definition here
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: cannot find -lz
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: cannot find -ldl
    /usr/local/src/android-ndk-r10/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld: error: cannot find -llog
    libavformat/http.c:384: error: undefined reference to 'inflateEnd'
    libavformat/http.c:385: error: undefined reference to 'inflateInit2_'
    libavformat/http.c:390: error: undefined reference to 'zlibCompileFlags'
    libavformat/http.c:1029: error: undefined reference to 'inflateEnd'
    libavformat/http.c:867: error: undefined reference to 'inflate'
    libavformat/id3v2.c:840: error: undefined reference to 'uncompress'
    libavformat/mov.c:2934: error: undefined reference to 'uncompress'
    bionic/libc/bionic/drand48.c:24: error: undefined reference to '_rand48_seed'
    bionic/libc/bionic/erand48.c:21: error: undefined reference to '_dorand48'

    Any help would be appreciated. Thank you !