Recherche avancée

Médias (91)

Autres articles (20)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (3202)

  • Understanding the VP8 Token Tree

    7 juin 2010, par Multimedia Mike — VP8

    I got tripped up on another part of the VP8 decoding process today. So I drew a picture to help myself understand it. Then I went back and read David Conrad’s comment on my last post regarding my difficulty understanding the VP8 spec and saw that he ran into the same problem. Since we both experienced the same hindrance in trying to sort out this matter, I thought I may as well publish the picture I drew.

    VP8 defines various trees for decoding different syntax elements. There is one tree for decoding the tokens and it is expressed in the VP8 spec as such :

    C :
    1. const tree_index coef_tree [2 * (num_dct_tokens - 1)] =
    2. {
    3.  -dct_eob, 2,        /* eob = "0"  */
    4.   -DCT_0, 4,        /* 0  = "10" */
    5.   -DCT_1, 6,        /* 1  = "110" */
    6.    8, 12,
    7.    -DCT_2, 10,      /* 2  = "11100" */
    8.     -DCT_3, -DCT_4,    /* 3  = "111010", 4 = "111011" */
    9.    14, 16,
    10.     -dct_cat1, -dct_cat2, /* cat1 = "111100", cat2 = "111101" */
    11.    18, 20,
    12.     -dct_cat3, -dct_cat4, /* cat3 = "1111100", cat4 = "1111101" */
    13.     -dct_cat5, -dct_cat6 /* cat4 = "1111110", cat4 = "1111111" */
    14. } ;

    Here is what the table looks like when you make a tree out of it (click for full size image) :



    The catch is that it makes no sense for an end-of-block (EOB) token to follow a 0 token since EOB already indicates that the remainder of the coefficients should be 0 anyway. Thus, the spec states that, "decoding of certain DCT coefficients may skip the first branch, whose preceding coefficient is a DCT_0." I confess, I didn’t understand what "skip the first branch" meant until I drew the tree.



    For those wondering why it might be sub-optimal (clarity-wise) for a spec to simply regurgitate vast chunks of C code, this makes a decent case. As you can see, the spec makes certain assumptions about how a binary tree should be organized in a static array (node n points to elements n*2 and n*2+1 as its branches ; leaves are either negative or 0). This is the second method I have seen ; another piece of code (not the VP8 spec) had the nodes in the first half of the array and pointed to leaves in the second half. There must be other arrangements.

  • libx264 encoder error in ffmpeg android build

    26 décembre 2013, par kerim yucel

    Right now, I have a ffmeg build script which recognizes libx264 and compiles succesfully. I have also compiled x264 and obtained libx264.a library. Both ffmpeg and libx264 are built from source. I can build ffmpeg without libx264 succesfully as well. Below you may find my script which tries to build ffmpeg with libx264.

    #!/bin/bash
    NDK=~/Android_NDK_r7b
    PLATFORM=$NDK/platforms/android-8/arch-arm/
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    alitan=~/x264/ndk7_build
    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=" -I$alitan/include" \
    --disable-shared \
    --enable-static \
    --extra-ldflags=" -L$alitan/lib " \
    --enable-version3 \
    --enable-gpl \
    --disable-doc \
    --disable-everything \
    --enable-libx264 \
    --enable-encoder=libx264 \
    $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 -shared -nostdlib -z,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 --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
    }

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

    Above script doesn't give me libx264.a in ffmpeg output builds.Several other scenarios are as follows.
    If I enable x264 encoder, I get undefined reference errors to some variables in x264.c (in libavcodec).
    If I enable shared in ffmpeg configure, I get an error which says it can't cd to my prefix directory (no permission issues by the way).

    I am using latest releases of ffmpeg and x264 (cloned the git today) and ndk 7. Ubuntu runs on VM, installed on Windows 7. For further details about my adventure of ffmpeg/x264 porting to Android, you may refer here.

    What should I do to use libx264 with ffmpeg ? I kept on trying this script with different configurations, removed all ffmpeg x264 folders and reinstalled them, but to no avail.

    Thanks a lot in advance.

    EDIT
    Below is my x264 build script. It builds fine, gives me the static library and the headers.

    export ARM_ROOT=/home/mehmet/Android_NDK_r7b
    export ARM_INC=$ARM_ROOT/platforms/android-8/arch-arm/usr/include/
    export ARM_LIB=$ARM_ROOT/platforms/android-8/arch-arm/usr/lib/
    export ARM_TOOL=$ARM_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    export ARM_LIBO=$ARM_TOOL/lib/gcc/arm-linux-androideabi/4.4.3
    export PATH=$ARM_TOOL/bin:$PATH
    export PATH=$ARM_TOOL/arm-linux-androideabi/bin:$PATH
    export ARM_PRE=arm-linux-androideabi
    #tries to build for 4.4.3 toolchain

    ./configure --prefix=./ndk7_build \
    --disable-gpac \
    --extra-cflags=" -I$ARM_INC -fPIC -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -MMD -MP " \
    --extra-ldflags=" -nostdlib -Bdynamic -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ARM_LIB -nostdlib $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -lc -lm -ldl -lgcc " \
    --cross-prefix=${ARM_PRE}- \
    --disable-asm \
    --enable-static \
    --host=arm-linux \

    This is what happens on terminal when i enable libx264 encoder.

    STRIP   ffmpeg
    INSTALL install-progs-yes
    INSTALL ffmpeg
    INSTALL ffprobe
    libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:158: undefined reference to `x264_picture_init'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:178: undefined reference to `x264_encoder_reconfig'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:189: undefined reference to `x264_encoder_encode'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:195: undefined reference to `x264_encoder_delayed_frames'
    libavcodec/libavcodec.a(libx264.o): In function `encode_nals':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:100: undefined reference to `x264_bit_depth'
    libavcodec/libavcodec.a(libx264.o): In function `X264_close':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:230: undefined reference to `x264_encoder_close'
    libavcodec/libavcodec.a(libx264.o): In function `X264_init':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:283: undefined reference to `x264_param_default'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:291: undefined reference to `x264_param_default_preset'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:313: undefined reference to `x264_param_parse'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:448: undefined reference to `x264_param_apply_fastfirstpass'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:451: undefined reference to `x264_param_apply_profile'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:494: undefined reference to `x264_encoder_open_125'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:505: undefined reference to `x264_encoder_headers'
  • libx264 encoder error in ffmpeg android build

    26 décembre 2013, par kerim yucel

    Right now, I have a ffmeg build script which recognizes libx264 and compiles succesfully. I have also compiled x264 and obtained libx264.a library. Both ffmpeg and libx264 are built from source. I can build ffmpeg without libx264 succesfully as well. Below you may find my script which tries to build ffmpeg with libx264.

    #!/bin/bash
    NDK=~/Android_NDK_r7b
    PLATFORM=$NDK/platforms/android-8/arch-arm/
    PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    alitan=~/x264/ndk7_build
    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=" -I$alitan/include" \
    --disable-shared \
    --enable-static \
    --extra-ldflags=" -L$alitan/lib " \
    --enable-version3 \
    --enable-gpl \
    --disable-doc \
    --disable-everything \
    --enable-libx264 \
    --enable-encoder=libx264 \
    $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 -shared -nostdlib -z,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 --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
    }

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

    Above script doesn’t give me libx264.a in ffmpeg output builds.Several other scenarios are as follows.
    If I enable x264 encoder, I get undefined reference errors to some variables in x264.c (in libavcodec).
    If I enable shared in ffmpeg configure, I get an error which says it can’t cd to my prefix directory (no permission issues by the way).

    I am using latest releases of ffmpeg and x264 (cloned the git today) and ndk 7. Ubuntu runs on VM, installed on Windows 7. For further details about my adventure of ffmpeg/x264 porting to Android, you may refer here.

    What should I do to use libx264 with ffmpeg ? I kept on trying this script with different configurations, removed all ffmpeg x264 folders and reinstalled them, but to no avail.

    Thanks a lot in advance.

    EDIT
    Below is my x264 build script. It builds fine, gives me the static library and the headers.

    export ARM_ROOT=/home/mehmet/Android_NDK_r7b
    export ARM_INC=$ARM_ROOT/platforms/android-8/arch-arm/usr/include/
    export ARM_LIB=$ARM_ROOT/platforms/android-8/arch-arm/usr/lib/
    export ARM_TOOL=$ARM_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
    export ARM_LIBO=$ARM_TOOL/lib/gcc/arm-linux-androideabi/4.4.3
    export PATH=$ARM_TOOL/bin:$PATH
    export PATH=$ARM_TOOL/arm-linux-androideabi/bin:$PATH
    export ARM_PRE=arm-linux-androideabi
    #tries to build for 4.4.3 toolchain

    ./configure --prefix=./ndk7_build \
    --disable-gpac \
    --extra-cflags=" -I$ARM_INC -fPIC -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -MMD -MP " \
    --extra-ldflags=" -nostdlib -Bdynamic -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ARM_LIB -nostdlib $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -lc -lm -ldl -lgcc " \
    --cross-prefix=${ARM_PRE}- \
    --disable-asm \
    --enable-static \
    --host=arm-linux \

    This is what happens on terminal when i enable libx264 encoder.

    STRIP   ffmpeg
    INSTALL install-progs-yes
    INSTALL ffmpeg
    INSTALL ffprobe
    libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:158: undefined reference to `x264_picture_init'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:178: undefined reference to `x264_encoder_reconfig'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:189: undefined reference to `x264_encoder_encode'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:195: undefined reference to `x264_encoder_delayed_frames'
    libavcodec/libavcodec.a(libx264.o): In function `encode_nals':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:100: undefined reference to `x264_bit_depth'
    libavcodec/libavcodec.a(libx264.o): In function `X264_close':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:230: undefined reference to `x264_encoder_close'
    libavcodec/libavcodec.a(libx264.o): In function `X264_init':
    /home/mehmet/ffmpeg/libavcodec/libx264.c:283: undefined reference to `x264_param_default'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:291: undefined reference to `x264_param_default_preset'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:313: undefined reference to `x264_param_parse'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:448: undefined reference to `x264_param_apply_fastfirstpass'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:451: undefined reference to `x264_param_apply_profile'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:494: undefined reference to `x264_encoder_open_125'
    /home/mehmet/ffmpeg/libavcodec/libx264.c:505: undefined reference to `x264_encoder_headers'