Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (55)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

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

Sur d’autres sites (10772)

  • Running FFMPEG in electron using react, either doesn't load without any error or throws an SharedArrayBuffer is not defined when run after building

    23 mars 2024, par Satnam Sandhu

    I am trying to build a web based media conversion tool to be able to ship with electron.

    


      const ffmpegInit = async () => {
    try {
      const baseURL = "https://unpkg.com/@ffmpeg/core-mt@0.12.6/dist/esm";
      const ffmpeg = ffmpegRef.current;
      ffmpeg.on("log", ({ message }) => {
        console.log(message);
      });
      // toBlobURL is used to bypass CORS issue, urls with the same
      // domain can be used directly.
      await ffmpeg.load({
        coreURL: await toBlobURL(
          `${baseURL}/ffmpeg-core.js`,
          "text/javascript",
        ),
        wasmURL: await toBlobURL(
          `${baseURL}/ffmpeg-core.wasm`,
          "application/wasm",
        ),
        workerURL: await toBlobURL(
          `${baseURL}/ffmpeg-core.worker.js`,
          "text/javascript",
        ),
      });
      setLoaded(true);
    } catch (err) {
      console.log("------->>>", err);
    }
  };

  useEffect(() => {
    ffmpegInit();
  }, [ffmpegRef]);



    


    This piece of code is directly taken from FFMpeg's usage guide

    


    On viewing the network's tab of my electron's dev tool, I see a 11.4 MB file being downloaded with resource size of around 32 MB. Which seems fair.

    


    But the code never moves ahead of the await ffmpeg.load() call without throwing any error.

    


    I then proceeded to build the react app using vite and then only I could see the app throw an error :

    


    


    ReferenceError : SharedArrayBuffer is not defined

    


    


    After digging through some GitHub issues on the same I found out that SharedArrayBuffer has something to do with cross-origin-isolation for security reasons so I updated my vite.config.ts file to the following :

    


    import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import crossOriginIsolation from "vite-plugin-cross-origin-isolation";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react(), crossOriginIsolation()],
  optimizeDeps: {
    exclude: ["@ffmpeg/ffmpeg", "@ffmpeg/util"],
  },
  server: {
    headers: {
      "Cross-Origin-Opener-Policy": "same-origin",
      "Cross-Origin-Embedder-Policy": "require-corp",
    },
  },
});



    


    as u can see I also added vite-plugin-cross-origin-isolation but still ffmpeg refuses to work.

    


    I saw this tutorial in YouTube and he made it work with ease, even after following the same steps I am unable to get it to working.

    


    Thanks in advance !!!

    


  • Revision 33480 : ajout d’un paramètre optionnel au modèle : largeur=xx pour spécifier une ...

    2 décembre 2009, par brunobergot@… — Log

    ajout d’un paramètre optionnel au modèle : largeur=xx pour spécifier une autre dimension de gravatar en pixels

  • FFmpeg Android compilation : command not found

    18 février 2019, par maxest

    So I’m trying to build, on Ubuntu, FFmpeg from sources. Here’s a script I assembled from here and there :

    #!/bin/bash

    NDK=$HOME/Desktop/adt/android-ndk-r19b
    SYSROOT=$NDK/platforms/android-26/arch-arm/
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64

    function build_one
    {
    ./configure
     --prefix=$PREFIX
     --arch=arm
     --target-os=linux
     --enable-cross-compile
     --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi-
     --sysroot=$SYSROOT
     --extra-cflags="-Os -fpic $ADDI_CFLAGS"
     --extra-ldflags="$ADDI_LDFLAGS"
     $ADDITIONAL_CONFIGURE_FLAG

     make clean
     make -j9
     make install
    }

    CPU=arm
    PREFIX=$(pwd)/android/$CPU
    ADDI_CFLAGS="-marm"

    build_one

    Unfortunately I get a list of following outputs :

    ffbuild/config.sh is unchanged

    ./build_android_2.sh: line 26: --prefix=/home/maxest/Desktop/adt/android-ndk-r19b/sources/ffmpeg-4.1/android/arm: No such file or directory

    ./build_android_2.sh: line 27: --arch=arm: command not found

    ./build_android_2.sh: line 28: --target-os=linux: command not found

    ./build_android_2.sh: line 29: --enable-cross-compile: command not found

    ./build_android_2.sh: line 30: --cross-prefix=/home/maxest/Desktop/adt/android-ndk-r19b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-: No such file or directory

    ./build_android_2.sh: line 31: --sysroot=/home/maxest/Desktop/adt/android-ndk-r19b/platforms/android-26/arch-arm/: No such file or directory

    ./build_android_2.sh: line 32: --extra-cflags=-Os -fpic -marm: command not found

    ./build_android_2.sh: line 34: --extra-ldflags=: command not found

    I’ve double checked all the paths are correct. Although I create by hand folder /home/maxest/Desktop/adt/android-ndk-r19b/sources/ffmpeg-4.1/android/arm because there were no folder android/arm.