Recherche avancée

Médias (91)

Autres articles (106)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (15762)

  • android- How to compile ffmpeg for all cpu architectures

    11 décembre 2014, par Sujith Manjavana

    How to compile ffmpeg for all cpu architectures in android. Currently i’m using the following script which generates libs for arm only.

    #!/bin/bash
    NDK=$HOME/ndk32
    SYSROOT=$NDK/platforms/android-9/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86
    function build_one
    {
    ./configure \
       --prefix=$PREFIX \
       --enable-shared \
       --disable-static \
       --disable-doc \
       --disable-ffmpeg \
       --disable-ffplay \
       --disable-ffprobe \
       --disable-ffserver \
       --disable-avdevice \
       --disable-doc \
       --disable-symver \
       --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
       --target-os=linux \
       --arch=arm \
       --enable-cross-compile \
       --sysroot=$SYSROOT \
       --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
       --extra-ldflags="$ADDI_LDFLAGS" \
       $ADDITIONAL_CONFIGURE_FLAG
    make clean
    make
    make install
    }
    CPU=arm
    PREFIX=$(pwd)/android/$CPU
    ADDI_CFLAGS="-marm"
    build_one

    I want to support all possible platforms.

  • How to compile FFmpeg for Android with clang in ubuntu18.04 ?

    31 juillet 2019, par user10959099

    I want to compile FFmpeg with clang as it’s more faster,but I don’t know how to do it in ubuntu.
    NDk version r16b ,ffmpeg version 4.1.

    I did it with gcc. here is my build script,and it works well.

    #!/bin/sh
    NDK=/home/gjy/ndk/android-ndk-r16b-linux-x86_64/android-ndk-r16b
    ANDROID_VERSION=19
    TOOLCHAIN_VERSION=4.9
    BUILD_PLATFORM=linux-x86_64
    ARCH=arm
    ANDROID_ARCH_ABI=armeabi
    HOST=arm-linux-androideabi
    CROSS=arm-linux-androideabi
    SYSROOT=${NDK}/platforms/android-${ANDROID_VERSION}/arch-${ARCH}/
    PREFIX=$(pwd)/android/${ANDROID_VERSION}/$ANDROID_ARCH_ABI
    TOOLCHAIN=${NDK}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}
    CFLAGS="-Os -fpic -march=armv5te -isysroot $NDK/sysroot -I$NDK/sysroot/usr/include/$CROSS -D__ANDROID_API__=$ANDROID_VERSION -U_FILE_OFFSET_BITS"
    CROSS_PREFIX=${TOOLCHAIN}/bin/${CROSS}-
    build(){
    echo "configuring $ANDROID_ARCH_ABI ANDROID_VERSION=$ANDROID_VERSION"
    ./configure \
       --prefix=$PREFIX \
       --enable-neon \
       --enable-hwaccels \
       --enable-gpl \
       --enable-postproc \
       --enable-shared \
       --enable-jni \
       --enable-mediacodec \
       --enable-decoder=h264_mediacodec \
       --enable-hwaccel=h264_mediacodec \
       --enable-decoder=hevc_mediacodec \
       --enable-decoder=mpeg4_mediacodec \
       --enable-decoder=vp8_mediacodec \
       --enable-decoder=vp9_mediacodec \
       --disable-static \
       --disable-doc \
       --enable-ffmpeg \
       --disable-ffplay \
       --disable-ffprobe \
       --enable-avdevice \
       --disable-doc \
       --disable-symver \
       --cross-prefix=$CROSS_PREFIX \
       --target-os=android \
       --arch=$ARCH \
       --disable-yasm \
       --enable-cross-compile \
       --sysroot=$SYSROOT \
       --extra-cflags="$CFLAGS " \
       --extra-ldflags="$ADDI_LDFLAGS" \
       $ADDITIONAL_CONFIGURE_FLAG
       make clean
       make -j4
       make install
       echo "$ANDROID_ARCH_ABI installed"
    }
    build

    I wonder how to do it with clang friendly.I’m still new int the NDK and I’ve just started learning.So I have no idea to do it at all.
    When I was trying turn to clang,and get many errors.
    After trying so many times,I update my build script with this question :

    FFMPEG source compilation failed with Android NDK Clang compiler (r16b) with error "the clang compiler does not support ’-mcpu=arm’"

    #!/bin/sh
    #r16b min support android-14  max android-8.1
    NDK=/home/gjy/ndk/android-ndk-r16b-linux-x86_64/android-ndk-r16b
    ANDROID_VERSION=19
    TOOLCHAIN_VERSION=4.9
    BUILD_PLATFORM=linux-x86_64
    ARCH=arm
    ANDROID_ARCH_ABI=armeabi
    HOST=arm-linux-androideabi
    CROSS=arm-linux-androideabi
    SYSROOT=${NDK}/platforms/android-${ANDROID_VERSION}/arch-${ARCH}/
    PREFIX=$(pwd)/android/${ANDROID_VERSION}/$ANDROID_ARCH_ABI
    TOOLCHAIN=${NDK}/toolchains/llvm/prebuilt/${BUILD_PLATFORM}/bin
    #LD
    LD=${NDK}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}/bin/${CROSS}-ld
    #AS
    AS=${NDK}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}/bin/${CROSS}-as
    #AR
    AR=${NDK}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}/bin/${CROSS}-ar
    CFLAGS="-mcpu=$ARCH -I$NDK/sysroot/usr/include/$CROSS -D__ANDROID_API__=$ANDROID_VERSION"
    CROSS_PREFIX=${NDK}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}/bin/${CROSS}-
    build(){
    echo "configuring $ANDROID_ARCH_ABI ANDROID_VERSION=$ANDROID_VERSION"
    ./configure \
       --prefix=$PREFIX \
       --toolchain=clang-usan \
       --cross-prefix=$CROSS_PREFIX \
       --enable-neon \
       --enable-hwaccels \
       --enable-gpl \
       --enable-postproc \
       --enable-shared \
       --disable-static \
       --enable-jni \
       --enable-mediacodec \
       --enable-decoder=h264_mediacodec \
       --enable-hwaccel=h264_mediacodec \
       --enable-decoder=hevc_mediacodec \
       --enable-decoder=mpeg4_mediacodec \
       --enable-decoder=vp8_mediacodec \
       --enable-decoder=vp9_mediacodec \
       --disable-doc \
       --enable-ffmpeg \
       --disable-ffplay \
       --disable-ffprobe \
       --enable-avdevice \
       --disable-doc \
       --disable-symver \
       --target-os=android \
       --extra-ldflags="-shared" \
       --arch=$ARCH \
       --cpu=$ANDROID_ARCH_ABI \
       --extra-cflags="-fPIE -fPIC -ffast-math -funroll-loops -mfloat-abi=softfp -mfpu=vfpv3-d16" \
       --enable-x86asm \
       --enable-cross-compile \
       --cc=$TOOLCHAIN/clang \
       --cxx=$TOOLCHAIN/clang++ \
       --ld=$LD \
       --as=$AS \
       --ar=$AR \
       --strip=${NDK}/toolchains/${HOST}-${TOOLCHAIN_VERSION}/prebuilt/${BUILD_PLATFORM}/${CROSS}-strip \
       $ADDITIONAL_CONFIGURE_FLAG
       #make clean
       #make -j4
       #make install
       echo "$ANDROID_ARCH_ABI installed"
    }
    build

    then I get error form config.log :

    /home/gjy/ndk/android-ndk-r16b-linux-x86_64/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -fPIE -fPIC -ffast-math -funroll-loops -mfloat-abi=softfp -mfpu=vfpv3-d16 -mcpu=armeabi -fPIC -c -o /tmp/ffconf.hfTGr6sO/test.o /tmp/ffconf.hfTGr6sO/test.S
    /home/gjy/ndk/android-ndk-r16b-linux-x86_64/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as: invalid option -- '_'
    GNU assembler not found, install/update gas-preprocessor

    it seems like that the frist char was ignored. When I try :

    /home/gjy/ndk/android-ndk-r16b-linux-x86_64/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-as -fPIC -c -o /tmp/ffconf.jHtqLsFE/test.o /tmp/ffconf.jHtqLsFE/test.S
    invalid option -- P

    can any body help fine the problem?

  • react electron importing 'execa' Error : Can't resolve 'child_process'

    8 décembre 2024, par Martin

    I have been dealing with this issue for a while, trying different stackoverflow solutions, AI advice, multiple re-writes, and I am still very puzzles by it.

    


    I have a react electron app, which works fine, but if I try to import the 'execa' module :

    


    import { execa } from 'execa';

    


    I always get these error messages :

    


    [0] Failed to compile.
[0] 
[0] Module not found: Error: Can't resolve 'child_process' in '/home/martin/Documents/projects/electron-ghactions/node_modules/cross-spawn'
[0] ERROR in ./node_modules/cross-spawn/index.js 3:11-35
[0] Module not found: Error: Can't resolve 'child_process' in '/home/martin/Documents/projects/electron-ghactions/node_modules/cross-spawn'
[0] 
[0] ERROR in ./node_modules/cross-spawn/lib/parse.js 3:13-28
[0] Module not found: Error: Can't resolve 'path' in '/home/martin/Documents/projects/electron-ghactions/node_modules/cross-spawn/lib'
[0] 
[0] BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
[0] This is no longer the case. Verify if you need this module and configure a polyfill for it.
[0] 
[0] If you want to include a polyfill, you need to:
[0]     - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
[0]     - install 'path-browserify'
[0] If you don't want to include a polyfill, you can use an empty module like this:
[0]     resolve.fallback: { "path": false }
[0] 


    


    It happens when I try to import execa at this line in my file 'FFmpeg.js' inside of this repo :
https://github.com/MartinBarker/electron-ghactions/blob/e76d643302cdc8601c11877eff8b43f2d5977c65/src/Ffmpeg.js#L3

    


    The thing that confuses me, is that I have a separate repo doing a very similar thing, react and electron, which can import and use this line totally fine with no error :

    


    const execa = window.require('execa');


    


    https://github.com/MartinBarker/RenderTune/blob/59450b3f8445731e419c99335e7ebf7dbca6cbdf/src/FFmpeg.js#L4C1-L4C39

    


    I've tried taking all the dependency versions from the working repo package.json and moving them to my non working repo, but the error still persists. Is there a config setting inside my electron-ghactions repo package.json file causing this error ? How can I allow for the importing of execa inside my react component FFmpeg.js ?