Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (27)

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Formulaire personnalisable

    21 juin 2013, par

    Cette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
    Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire. (...)

Sur d’autres sites (4837)

  • sharedarraybuffer error in edge and firefox but not in chrome when uploading with ffmpeg in nodejs

    29 juillet 2021, par Juliette

    I have the code below in React.js that uses ffmpeg to convert files :

    


    import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';

  const doTranscode = async () => {
    setMessage('Loading ffmpeg-core.js');
    await ffmpeg.load();
    setMessage('Uploading file');
    ffmpeg.FS('writeFile', filename, await fetchFile(file));
    await ffmpeg.run('-i', filename, 'test.wav');
    setMessage('Upload to manager complete. Sound file will be available and playable on the manger within 1-2 minutes.');
    const data = ffmpeg.FS('readFile', 'test.wav');
    setAudioSrc(URL.createObjectURL(new Blob([data.buffer], { type: 'audio/wav' })));

    var file_name = prompt('What would you like to call this file?');

    if (!file_name) {
      file_name = Date.now()
    }
    
    (async function(){
      let output = await getSoundID(customer_id, file_name);
      let sound_id = output.data;
      var bucket_file = new File([new Blob([data.buffer], { type: 'audio/wav' })], "sounds/" + customer_id + "/" + sound_id + ".wav");
      uploadFileToS3(bucket_file);
      updateSoundData(sound_id, customer_id);
    })();
  };

  useEffect(() => {
    if (file) {
      doTranscode()
    }
  }, [file])


    


    The code above works great in Chrome and the files are successfully converted. However, when I bring it to Firefox or Edge I get this error Unhandled Rejection (ReferenceError): SharedArrayBuffer is not defined.

    


    I looked up this issue and they said I need to modify my headers to include this :

    


    You need to set two response headers for your document:

Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp


    


    Not sure how I would this in my JS code ?

    


    Would love to hear what you guys think.

    


  • Executing process on cmd, does not process

    2 août 2012, par Z Jackobovski

    I am running ffmpeg from Java. Using it to convert flv files to mp3.

    When I run the code below, ffmpeg starts, creates a new file (the .mp3 one) but runs at 0% of CPU. When I stop the JAVA app (from netbeans) ffmpeg remains open and goes from 0% to 99% per Windows task manager (CTRL-ALT-DEL). Another weird thing is going on. The output from ffmpeg is not being printed.

    The thread is starting but for some reason java is not giving it any time to do its processing.

    Any suggestions on how to fix this ? Thanks.

    public class ConverterThread extends Thread {

    String fileToConvert;
    String fileToCreate;
    GetSong getSong;



    public ConverterThread(String downloadLocationOnDisk, GetSong getSong) {
      this.fileToConvert = downloadLocationOnDisk;
      this.getSong = getSong;
    }


    public void run(){
       try {
           Thread cur=Thread.currentThread();
           cur.setPriority(Thread.MAX_PRIORITY);

              String downloadLocationOnDisk = fileToConvert;

               if(downloadLocationOnDisk.contains(".flv"))
                   fileToCreate = downloadLocationOnDisk.replace(".flv", ".mp3");

               if(downloadLocationOnDisk.contains(".m4a"))
                   fileToCreate = downloadLocationOnDisk.replace(".m4a", ".mp3");



               String cmdLine =  "ffmpeg/bin/ffmpeg -i \"" + fileToConvert + "\" \"" + fileToCreate +"\"";

               System.err.println(cmdLine);

                // run the Unix "ps -ef" command
                // using the Runtime exec method:
                Process p = Runtime.getRuntime().exec(cmdLine);


                BufferedReader stdInput = new BufferedReader(new
                     InputStreamReader(p.getInputStream()));

                BufferedReader stdError = new BufferedReader(new
                     InputStreamReader(p.getErrorStream()));

                String s;

                // read the output from the command
                while ((s = stdInput.readLine()) != null) {
                    System.out.println(s);
                }

                // read any errors from the attempted command
                System.out.println("Here is the standard error of the command (if any):\n");
                while ((s = stdError.readLine()) != null) {
                    System.out.println(s);
                }

       } catch (IOException ex) {
           Logger.getLogger(ConverterThread.class.getName()).log(Level.SEVERE, null, ex);
       }
  • ffmpeg crashing on my ec2 linux

    19 décembre 2016, par Alex Bollbach

    I have a node script that has the line :

    execSync('ffmpeg -loglevel panic -i ${path} -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 ./tmp/%d.ts');

    Basically, I’m splitting a given video into 10 second segments. This works on my development machine where I have ffmpeg installed :

    However, when I push the code to my ec2 instance (running the linux AMI), I get this crash :

    Error: Command failed: ffmpeg -loglevel panic -i ../test11.mp4 -acodec copy -f segment -segment_time 10 -vcodec copy -reset_timestamps 1 -map 0 ./tmp/%d.ts

    I have checked that all the files and directories exist and are organized correctly in both cases. The only thing I’ve deduced is that the ffmpeg versions vary between machines, so :

    (developement-Machine)$ ffmpeg -version

    (developement-Machine)$ ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers

    (ec2)$ ffmpeg -version

    (ec2)$ ffmpeg version N-61041-g52a2138

    Is it the case that the ffmpeg version issues are the culprit here and if so how can I get them in sync ? Locally I simply used Homebrew to install ffmpeg. On the ec2, I’ve used YUM as a package manager to install node and npm before but it isn’t trivial to install ffmpeg. I’ve tried to wget the static builds on ffmpeg sites but after un-taring them I get a directory of directories and I’m not sure how to proceed. The original ffmpeg I installed on my ec2 was here (http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2014-02-16.tar.gz)

    Either way I am making no progress and I could spend the next 6 hours figuring out what is going on in my linux shell. So I realize this question is a bit unfocused but is the crash likely an ffmpeg version ? and if so, how can I install the local version I have of ffmpeg on my production ec2 server ?